diff --git a/.azure-pipelines/docs-steps.yml b/.azure-pipelines/docs-steps.yml index 55c38611b95..8e72baf2b12 100644 --- a/.azure-pipelines/docs-steps.yml +++ b/.azure-pipelines/docs-steps.yml @@ -12,7 +12,7 @@ steps: inputs: versionSpec: '>=3.6' -- script: python -m pip install sphinx==2.2.0 blurb python-docs-theme +- script: python -m pip install sphinx==3.2.1 blurb python-docs-theme displayName: 'Install build dependencies' - ${{ if ne(parameters.latex, 'true') }}: @@ -31,7 +31,7 @@ steps: - ${{ if eq(parameters.upload, 'true') }}: - task: PublishBuildArtifacts@1 displayName: 'Publish docs' - + inputs: PathToPublish: '$(build.sourcesDirectory)/Doc/build' ArtifactName: docs diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8c76f54af55..19ac3aac713 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -19,6 +19,7 @@ Objects/frameobject.c @markshannon Objects/call.c @markshannon Python/ceval.c @markshannon Python/compile.c @markshannon +Python/ast_opt.c @isidentical # Hashing **/*hashlib* @python/crypto-team @tiran @@ -84,6 +85,12 @@ Include/pytime.h @pganssle @abalkin /Lib/test/test_peg_generator/ @pablogsal @lysnikolaou /Grammar/python.gram @pablogsal @lysnikolaou +# AST +Python/ast.c @isidentical +Parser/asdl.py @isidentical +Parser/asdl_c.py @isidentical +Lib/ast.py @isidentical + # SQLite 3 **/*sqlite* @berkerpeksag diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e90677b9f77..d9cbb3c7ec3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,3 +7,7 @@ updates: labels: - "skip issue" - "skip news" + target_branch: + - "master" + - "3.9" + - "3.8" diff --git a/.github/problem-matchers/msvc.json b/.github/problem-matchers/msvc.json new file mode 100644 index 00000000000..303a36b1c58 --- /dev/null +++ b/.github/problem-matchers/msvc.json @@ -0,0 +1,19 @@ +{ + "__comment": "Taken from vscode's vs/workbench/contrib/tasks/common/problemMatcher.ts msCompile rule", + "problemMatcher": [ + { + "owner": "msvc-problem-matcher", + "pattern": [ + { + "regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "code": 5, + "message": 6 + } + ] + } + ] + } \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f543a94af36..6f05310e6e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: - name: Check for source changes id: check run: | - if [ -z "GITHUB_BASE_REF" ]; then + if [ -z "$GITHUB_BASE_REF" ]; then echo '::set-output name=run_tests::true' else git fetch origin $GITHUB_BASE_REF --depth=1 @@ -75,6 +75,8 @@ jobs: fi - name: Check exported libpython symbols run: make smelly + - name: Check limited ABI symbols + run: make check-limited-abi build_win32: name: 'Windows (x86)' @@ -97,6 +99,8 @@ jobs: if: needs.check_source.outputs.run_tests == 'true' steps: - uses: actions/checkout@v2 + - name: Register MSVC problem matcher + run: echo "::add-matcher::.github/problem-matchers/msvc.json" - name: Build CPython run: .\PCbuild\build.bat -e -p x64 - name: Display build info @@ -135,7 +139,7 @@ jobs: run: sudo ./.github/workflows/posix-deps-apt.sh - name: 'Restore OpenSSL build' id: cache-openssl - uses: actions/cache@v2.1.2 + uses: actions/cache@v2.1.3 with: path: ./multissl/openssl/${{ env.OPENSSL_VER }} key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ed71a012395..11748f0e449 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -32,7 +32,7 @@ jobs: run: sudo ./.github/workflows/posix-deps-apt.sh - name: 'Restore OpenSSL build' id: cache-openssl - uses: actions/cache@v2.1.2 + uses: actions/cache@v2.1.3 with: path: ./multissl/openssl/${{ env.OPENSSL_VER }} key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index f0dbfcd9d3b..82e9645b5b3 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -38,7 +38,7 @@ jobs: - name: 'Build documentation' run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest html - name: 'Upload' - uses: actions/upload-artifact@v2.2.0 + uses: actions/upload-artifact@v2.2.1 with: name: doc-html path: Doc/build/html diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000000..58c9a4f21c3 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,19 @@ +name: Mark stale pull requests + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity.' + stale-pr-label: 'stale' + days-before-stale: 30 + days-before-close: -1 diff --git a/.travis.yml b/.travis.yml index dfdf670bff5..547d9199749 100644 --- a/.travis.yml +++ b/.travis.yml @@ -192,6 +192,8 @@ script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./python Tools/scripts/patchcheck.py --travis $TRAVIS_PULL_REQUEST; fi # Check that all symbols exported by libpython start with "Py" or "_Py" - make smelly + # Check that all symbols in the limited abi are present + - make check-limited-abi # `-r -w` implicitly provided through `make buildbottest`. - | if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then diff --git a/Doc/Makefile b/Doc/Makefile index c24c70c699a..f113dd06539 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -202,6 +202,7 @@ dist: check: $(PYTHON) tools/rstlint.py -i tools -i $(VENVDIR) -i README.rst + $(PYTHON) tools/rstlint.py ../Misc/NEWS.d/next/ serve: $(PYTHON) ../Tools/scripts/serve.py build/html diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst index bf751e44acd..c0c14f480d3 100644 --- a/Doc/c-api/tuple.rst +++ b/Doc/c-api/tuple.rst @@ -57,7 +57,7 @@ Tuple Objects .. c:function:: PyObject* PyTuple_GetItem(PyObject *p, Py_ssize_t pos) Return the object at position *pos* in the tuple pointed to by *p*. If *pos* is - out of bounds, return ``NULL`` and set an :exc:`IndexError` exception. + negative or out of bounds, return ``NULL`` and set an :exc:`IndexError` exception. .. c:function:: PyObject* PyTuple_GET_ITEM(PyObject *p, Py_ssize_t pos) diff --git a/Doc/conf.py b/Doc/conf.py index 079d17717f3..6b88c23a444 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -15,8 +15,7 @@ sys.path.append(os.path.abspath('includes')) extensions = ['sphinx.ext.coverage', 'sphinx.ext.doctest', 'pyspecific', 'c_annotations', 'escape4chm', - 'asdl_highlight', 'peg_highlight'] - + 'asdl_highlight', 'peg_highlight', 'glossary_search'] doctest_global_setup = ''' try: diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat new file mode 100644 index 00000000000..c2c9c6e11e4 --- /dev/null +++ b/Doc/data/stable_abi.dat @@ -0,0 +1,780 @@ +# File generated by 'make regen-limited-abi' +# This is NOT an authoritative list of stable ABI symbols +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_GetFlags +PyCFunction_GetFunction +PyCFunction_GetSelf +PyCFunction_NewEx +PyCFunction_Type +PyCMethod_New +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_NameReplaceErrors +PyCodec_Register +PyCodec_RegisterError +PyCodec_ReplaceErrors +PyCodec_StreamReader +PyCodec_StreamWriter +PyCodec_StrictErrors +PyCodec_Unregister +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 +PyDictRevIterItem_Type +PyDictRevIterKey_Type +PyDictRevIterValue_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_FormatV +PyErr_GetExcInfo +PyErr_GivenExceptionMatches +PyErr_NewException +PyErr_NewExceptionWithDoc +PyErr_NoMemory +PyErr_NormalizeException +PyErr_Occurred +PyErr_Print +PyErr_PrintEx +PyErr_ProgramText +PyErr_ResourceWarning +PyErr_Restore +PyErr_SetExcInfo +PyErr_SetFromErrno +PyErr_SetFromErrnoWithFilename +PyErr_SetFromErrnoWithFilenameObject +PyErr_SetFromErrnoWithFilenameObjects +PyErr_SetImportError +PyErr_SetImportErrorSubclass +PyErr_SetInterrupt +PyErr_SetNone +PyErr_SetObject +PyErr_SetString +PyErr_SyntaxLocation +PyErr_SyntaxLocationEx +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_GetFrame +PyEval_GetFuncDesc +PyEval_GetFuncName +PyEval_GetGlobals +PyEval_GetLocals +PyEval_InitThreads +PyEval_ReleaseLock +PyEval_ReleaseThread +PyEval_RestoreThread +PyEval_SaveThread +PyEval_ThreadsInitialized +PyExc_ArithmeticError +PyExc_AssertionError +PyExc_AttributeError +PyExc_BaseException +PyExc_BlockingIOError +PyExc_BrokenPipeError +PyExc_BufferError +PyExc_BytesWarning +PyExc_ChildProcessError +PyExc_ConnectionAbortedError +PyExc_ConnectionError +PyExc_ConnectionRefusedError +PyExc_ConnectionResetError +PyExc_DeprecationWarning +PyExc_EOFError +PyExc_EnvironmentError +PyExc_Exception +PyExc_FileExistsError +PyExc_FileNotFoundError +PyExc_FloatingPointError +PyExc_FutureWarning +PyExc_GeneratorExit +PyExc_IOError +PyExc_ImportError +PyExc_ImportWarning +PyExc_IndentationError +PyExc_IndexError +PyExc_InterruptedError +PyExc_IsADirectoryError +PyExc_KeyError +PyExc_KeyboardInterrupt +PyExc_LookupError +PyExc_MemoryError +PyExc_ModuleNotFoundError +PyExc_NameError +PyExc_NotADirectoryError +PyExc_NotImplementedError +PyExc_OSError +PyExc_OverflowError +PyExc_PendingDeprecationWarning +PyExc_PermissionError +PyExc_ProcessLookupError +PyExc_RecursionError +PyExc_ReferenceError +PyExc_ResourceWarning +PyExc_RuntimeError +PyExc_RuntimeWarning +PyExc_StopAsyncIteration +PyExc_StopIteration +PyExc_SyntaxError +PyExc_SyntaxWarning +PyExc_SystemError +PyExc_SystemExit +PyExc_TabError +PyExc_TimeoutError +PyExc_TypeError +PyExc_UnboundLocalError +PyExc_UnicodeDecodeError +PyExc_UnicodeEncodeError +PyExc_UnicodeError +PyExc_UnicodeTranslateError +PyExc_UnicodeWarning +PyExc_UserWarning +PyExc_ValueError +PyExc_Warning +PyExc_ZeroDivisionError +PyExceptionClass_Name +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 +PyFrame_GetCode +PyFrame_GetLineNumber +PyFrozenSet_New +PyFrozenSet_Type +PyGC_Collect +PyGILState_Ensure +PyGILState_GetThisThreadState +PyGILState_Release +PyGetSetDescr_Type +PyImport_AddModule +PyImport_AddModuleObject +PyImport_AppendInittab +PyImport_ExecCodeModule +PyImport_ExecCodeModuleEx +PyImport_ExecCodeModuleObject +PyImport_ExecCodeModuleWithPathnames +PyImport_GetImporter +PyImport_GetMagicNumber +PyImport_GetMagicTag +PyImport_GetModule +PyImport_GetModuleDict +PyImport_Import +PyImport_ImportFrozenModule +PyImport_ImportFrozenModuleObject +PyImport_ImportModule +PyImport_ImportModuleLevel +PyImport_ImportModuleLevelObject +PyImport_ImportModuleNoBlock +PyImport_ReloadModule +PyIndex_Check +PyInterpreterState_Clear +PyInterpreterState_Delete +PyInterpreterState_Get +PyInterpreterState_GetDict +PyInterpreterState_GetID +PyInterpreterState_New +PyIter_Check +PyIter_Next +PyIter_Send +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 +PyMarshal_ReadObjectFromString +PyMarshal_WriteLongToFile +PyMarshal_WriteObjectToFile +PyMarshal_WriteObjectToString +PyMem_Free +PyMem_Malloc +PyMem_Realloc +PyMemberDescr_Type +PyMember_GetOne +PyMember_SetOne +PyMemoryView_FromMemory +PyMemoryView_FromObject +PyMemoryView_GetContiguous +PyMemoryView_Type +PyMethodDescr_Type +PyModuleDef_Init +PyModuleDef_Type +PyModule_AddFunctions +PyModule_AddIntConstant +PyModule_AddObject +PyModule_AddObjectRef +PyModule_AddStringConstant +PyModule_AddType +PyModule_Create2 +PyModule_ExecDef +PyModule_FromDefAndSpec2 +PyModule_GetDef +PyModule_GetDict +PyModule_GetFilename +PyModule_GetFilenameObject +PyModule_GetName +PyModule_GetNameObject +PyModule_GetState +PyModule_New +PyModule_NewObject +PyModule_SetDocString +PyModule_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_InPlaceMatrixMultiply +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_MatrixMultiply +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_AfterFork_Child +PyOS_AfterFork_Parent +PyOS_BeforeFork +PyOS_FSPath +PyOS_InterruptOccurred +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_AsFileDescriptor +PyObject_Bytes +PyObject_Call +PyObject_CallFunction +PyObject_CallFunctionObjArgs +PyObject_CallMethod +PyObject_CallMethodObjArgs +PyObject_CallNoArgs +PyObject_CallObject +PyObject_Calloc +PyObject_ClearWeakRefs +PyObject_DelItem +PyObject_DelItemString +PyObject_Dir +PyObject_Format +PyObject_Free +PyObject_GC_Del +PyObject_GC_IsFinalized +PyObject_GC_IsTracked +PyObject_GC_Track +PyObject_GC_UnTrack +PyObject_GenericGetAttr +PyObject_GenericGetDict +PyObject_GenericSetAttr +PyObject_GenericSetDict +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 +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_AdjustIndices +PySlice_GetIndices +PySlice_GetIndicesEx +PySlice_New +PySlice_Type +PySlice_Unpack +PyState_AddModule +PyState_FindModule +PyState_RemoveModule +PyStructSequence_GetItem +PyStructSequence_New +PyStructSequence_NewType +PyStructSequence_SetItem +PySuper_Type +PySys_AddWarnOption +PySys_AddWarnOptionUnicode +PySys_AddXOption +PySys_FormatStderr +PySys_FormatStdout +PySys_GetObject +PySys_GetXOptions +PySys_HasWarnOptions +PySys_ResetWarnOptions +PySys_SetArgv +PySys_SetArgvEx +PySys_SetObject +PySys_SetPath +PySys_WriteStderr +PySys_WriteStdout +PyThreadState_Clear +PyThreadState_Delete +PyThreadState_Get +PyThreadState_GetDict +PyThreadState_GetFrame +PyThreadState_GetID +PyThreadState_GetInterpreter +PyThreadState_New +PyThreadState_SetAsyncExc +PyThreadState_Swap +PyThread_GetInfo +PyThread_ReInitTLS +PyThread_acquire_lock +PyThread_acquire_lock_timed +PyThread_allocate_lock +PyThread_create_key +PyThread_delete_key +PyThread_delete_key_value +PyThread_exit_thread +PyThread_free_lock +PyThread_get_key_value +PyThread_get_stacksize +PyThread_get_thread_ident +PyThread_get_thread_native_id +PyThread_init_thread +PyThread_release_lock +PyThread_set_key_value +PyThread_set_stacksize +PyThread_start_new_thread +PyThread_tss_alloc +PyThread_tss_create +PyThread_tss_delete +PyThread_tss_free +PyThread_tss_get +PyThread_tss_is_created +PyThread_tss_set +PyTraceBack_Here +PyTraceBack_Print +PyTraceBack_Type +PyTupleIter_Type +PyTuple_GetItem +PyTuple_GetSlice +PyTuple_New +PyTuple_Pack +PyTuple_SetItem +PyTuple_Size +PyTuple_Type +PyType_ClearCache +PyType_FromModuleAndSpec +PyType_FromSpec +PyType_FromSpecWithBases +PyType_GenericAlloc +PyType_GenericNew +PyType_GetFlags +PyType_GetModule +PyType_GetModuleState +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_AsUCS4 +PyUnicode_AsUCS4Copy +PyUnicode_AsUTF16String +PyUnicode_AsUTF32String +PyUnicode_AsUTF8AndSize +PyUnicode_AsUTF8String +PyUnicode_AsUnicodeEscapeString +PyUnicode_AsWideChar +PyUnicode_AsWideCharString +PyUnicode_BuildEncodingMap +PyUnicode_Compare +PyUnicode_CompareWithASCIIString +PyUnicode_Concat +PyUnicode_Contains +PyUnicode_Count +PyUnicode_Decode +PyUnicode_DecodeASCII +PyUnicode_DecodeCharmap +PyUnicode_DecodeFSDefault +PyUnicode_DecodeFSDefaultAndSize +PyUnicode_DecodeLatin1 +PyUnicode_DecodeLocale +PyUnicode_DecodeLocaleAndSize +PyUnicode_DecodeRawUnicodeEscape +PyUnicode_DecodeUTF16 +PyUnicode_DecodeUTF16Stateful +PyUnicode_DecodeUTF32 +PyUnicode_DecodeUTF32Stateful +PyUnicode_DecodeUTF7 +PyUnicode_DecodeUTF7Stateful +PyUnicode_DecodeUTF8 +PyUnicode_DecodeUTF8Stateful +PyUnicode_DecodeUnicodeEscape +PyUnicode_EncodeFSDefault +PyUnicode_EncodeLocale +PyUnicode_FSConverter +PyUnicode_FSDecoder +PyUnicode_Find +PyUnicode_FindChar +PyUnicode_Format +PyUnicode_FromEncodedObject +PyUnicode_FromFormat +PyUnicode_FromFormatV +PyUnicode_FromObject +PyUnicode_FromOrdinal +PyUnicode_FromString +PyUnicode_FromStringAndSize +PyUnicode_FromWideChar +PyUnicode_GetDefaultEncoding +PyUnicode_GetLength +PyUnicode_GetSize +PyUnicode_InternFromString +PyUnicode_InternImmortal +PyUnicode_InternInPlace +PyUnicode_IsIdentifier +PyUnicode_Join +PyUnicode_Partition +PyUnicode_RPartition +PyUnicode_RSplit +PyUnicode_ReadChar +PyUnicode_Replace +PyUnicode_Resize +PyUnicode_RichCompare +PyUnicode_Split +PyUnicode_Splitlines +PyUnicode_Substring +PyUnicode_Tailmatch +PyUnicode_Translate +PyUnicode_Type +PyUnicode_WriteChar +PyWeakref_GetObject +PyWeakref_NewProxy +PyWeakref_NewRef +PyWrapperDescr_Type +PyWrapper_New +PyZip_Type +Py_AddPendingCall +Py_AtExit +Py_BuildValue +Py_BytesMain +Py_CompileString +Py_DecRef +Py_DecodeLocale +Py_EncodeLocale +Py_EndInterpreter +Py_EnterRecursiveCall +Py_Exit +Py_FatalError +Py_FileSystemDefaultEncodeErrors +Py_FileSystemDefaultEncoding +Py_Finalize +Py_FinalizeEx +Py_FrozenMain +Py_GenericAlias +Py_GenericAliasType +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_LeaveRecursiveCall +Py_Main +Py_MakePendingCalls +Py_NewInterpreter +Py_NewRef +Py_ReprEnter +Py_ReprLeave +Py_SetPath +Py_SetProgramName +Py_SetPythonHome +Py_SetRecursionLimit +Py_SymtableString +Py_UTF8Mode +Py_VaBuildValue +Py_XNewRef diff --git a/Doc/howto/argparse.rst b/Doc/howto/argparse.rst index 76d8e6be429..a97d10cfe6b 100644 --- a/Doc/howto/argparse.rst +++ b/Doc/howto/argparse.rst @@ -83,7 +83,7 @@ Following is a result of running the code: $ python3 prog.py --help usage: prog.py [-h] - optional arguments: + options: -h, --help show this help message and exit $ python3 prog.py --verbose usage: prog.py [-h] @@ -130,7 +130,7 @@ And running the code: positional arguments: echo - optional arguments: + options: -h, --help show this help message and exit $ python3 prog.py foo foo @@ -172,7 +172,7 @@ And we get: positional arguments: echo echo the string you use here - optional arguments: + options: -h, --help show this help message and exit Now, how about doing something even more useful:: @@ -241,7 +241,7 @@ And the output: $ python3 prog.py --help usage: prog.py [-h] [--verbosity VERBOSITY] - optional arguments: + options: -h, --help show this help message and exit --verbosity VERBOSITY increase output verbosity @@ -289,7 +289,7 @@ And the output: $ python3 prog.py --help usage: prog.py [-h] [--verbose] - optional arguments: + options: -h, --help show this help message and exit --verbose increase output verbosity @@ -332,7 +332,7 @@ And here goes: $ python3 prog.py --help usage: prog.py [-h] [-v] - optional arguments: + options: -h, --help show this help message and exit -v, --verbose increase output verbosity @@ -440,7 +440,7 @@ And the output: positional arguments: square display a square of a given number - optional arguments: + options: -h, --help show this help message and exit -v {0,1,2}, --verbosity {0,1,2} increase output verbosity @@ -468,7 +468,8 @@ verbosity argument (check the output of ``python --help``):: print(answer) We have introduced another action, "count", -to count the number of occurrences of a specific optional arguments: +to count the number of occurrences of specific options. + .. code-block:: shell-session @@ -489,7 +490,7 @@ to count the number of occurrences of a specific optional arguments: positional arguments: square display a square of a given number - optional arguments: + options: -h, --help show this help message and exit -v, --verbosity increase output verbosity $ python3 prog.py 4 -vvv @@ -626,7 +627,7 @@ Output: x the base y the exponent - optional arguments: + options: -h, --help show this help message and exit -v, --verbosity $ python3 prog.py 4 2 -v @@ -750,7 +751,7 @@ but not both at the same time: x the base y the exponent - optional arguments: + options: -h, --help show this help message and exit -v, --verbose -q, --quiet diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index ab5a573c6a0..d172c9b181c 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -934,32 +934,42 @@ here is a pure Python equivalent: if doc is None and fget is not None: doc = fget.__doc__ self.__doc__ = doc + self._name = '' + + def __set_name__(self, owner, name): + self._name = name def __get__(self, obj, objtype=None): if obj is None: return self if self.fget is None: - raise AttributeError("unreadable attribute") + raise AttributeError(f'unreadable attribute {self._name}') return self.fget(obj) def __set__(self, obj, value): if self.fset is None: - raise AttributeError("can't set attribute") + raise AttributeError(f"can't set attribute {self._name}") self.fset(obj, value) def __delete__(self, obj): if self.fdel is None: - raise AttributeError("can't delete attribute") + raise AttributeError(f"can't delete attribute {self._name}") self.fdel(obj) def getter(self, fget): - return type(self)(fget, self.fset, self.fdel, self.__doc__) + prop = type(self)(fget, self.fset, self.fdel, self.__doc__) + prop._name = self._name + return prop def setter(self, fset): - return type(self)(self.fget, fset, self.fdel, self.__doc__) + prop = type(self)(self.fget, fset, self.fdel, self.__doc__) + prop._name = self._name + return prop def deleter(self, fdel): - return type(self)(self.fget, self.fset, fdel, self.__doc__) + prop = type(self)(self.fget, self.fset, fdel, self.__doc__) + prop._name = self._name + return prop .. testcode:: :hide: diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst index 3a7414d7358..1a6ed474ff2 100644 --- a/Doc/library/abc.rst +++ b/Doc/library/abc.rst @@ -336,6 +336,7 @@ The :mod:`abc` module also provides the following functions: .. versionadded:: 3.4 .. function:: update_abstractmethods(cls) + A function to recalculate an abstract class's abstraction status. This function should be called if a class's abstract methods have been implemented or changed after it was created. Usually, this function should @@ -343,7 +344,7 @@ The :mod:`abc` module also provides the following functions: Returns *cls*, to allow usage as a class decorator. - If *cls* is not an instance of ABCMeta, does nothing. + If *cls* is not an instance of :class:`ABCMeta`, does nothing. .. note:: diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 7a7a4cf9497..80e0f013df0 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -57,7 +57,7 @@ be run at the command line and provides useful help messages: positional arguments: N an integer for the accumulator - optional arguments: + options: -h, --help show this help message and exit --sum sum the integers (default: find the max) @@ -217,14 +217,14 @@ The help for this program will display ``myprogram.py`` as the program name $ python myprogram.py --help usage: myprogram.py [-h] [--foo FOO] - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help $ cd .. $ python subdir/myprogram.py --help usage: myprogram.py [-h] [--foo FOO] - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help @@ -235,7 +235,7 @@ To change this default behavior, another value can be supplied using the >>> parser.print_help() usage: myprogram [-h] - optional arguments: + options: -h, --help show this help message and exit Note that the program name, whether determined from ``sys.argv[0]`` or from the @@ -249,7 +249,7 @@ specifier. >>> parser.print_help() usage: myprogram [-h] [--foo FOO] - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo of the myprogram program @@ -269,7 +269,7 @@ arguments it contains:: positional arguments: bar bar help - optional arguments: + options: -h, --help show this help message and exit --foo [FOO] foo help @@ -284,7 +284,7 @@ The default message can be overridden with the ``usage=`` keyword argument:: positional arguments: bar bar help - optional arguments: + options: -h, --help show this help message and exit --foo [FOO] foo help @@ -307,7 +307,7 @@ various arguments:: A foo that bars - optional arguments: + options: -h, --help show this help message and exit By default, the description will be line-wrapped so that it fits within the @@ -329,7 +329,7 @@ argument to :class:`ArgumentParser`:: A foo that bars - optional arguments: + options: -h, --help show this help message and exit And that's how you'd foo a bar @@ -403,7 +403,7 @@ epilog_ texts in command-line help messages:: this description was indented weird but that is okay - optional arguments: + options: -h, --help show this help message and exit likewise for this epilog whose whitespace will be cleaned up and whose words @@ -432,7 +432,7 @@ should not be line-wrapped:: exactly the way I want it - optional arguments: + options: -h, --help show this help message and exit :class:`RawTextHelpFormatter` maintains whitespace for all sorts of help text, @@ -454,7 +454,7 @@ default values to each of the argument help messages:: positional arguments: bar BAR! (default: [1, 2, 3]) - optional arguments: + options: -h, --help show this help message and exit --foo FOO FOO! (default: 42) @@ -473,7 +473,7 @@ as the regular formatter does):: positional arguments: float - optional arguments: + options: -h, --help show this help message and exit --foo int @@ -592,7 +592,7 @@ older arguments with the same option string. To get this behavior, the value >>> parser.print_help() usage: PROG [-h] [-f FOO] [--foo FOO] - optional arguments: + options: -h, --help show this help message and exit -f FOO old foo help --foo FOO new foo help @@ -623,7 +623,7 @@ help will be printed: $ python myprogram.py --help usage: myprogram.py [-h] [--foo FOO] - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help @@ -636,7 +636,7 @@ This can be achieved by passing ``False`` as the ``add_help=`` argument to >>> parser.print_help() usage: PROG [--foo FOO] - optional arguments: + options: --foo FOO foo help The help option is typically ``-h/--help``. The exception to this is @@ -649,7 +649,7 @@ the help options:: >>> parser.print_help() usage: PROG [+h] - optional arguments: + options: +h, ++help show this help message and exit @@ -696,7 +696,7 @@ The add_argument() method * const_ - A constant value required by some action_ and nargs_ selections. * default_ - The value produced if the argument is absent from the - command line. + command line and if it is absent from the namespace object. * type_ - The type to which the command-line argument should be converted. @@ -1006,6 +1006,14 @@ was not present at the command line:: >>> parser.parse_args([]) Namespace(foo=42) +If the target namespace already has an attribute set, the action *default* +will not over write it:: + + >>> parser = argparse.ArgumentParser() + >>> parser.add_argument('--foo', default=42) + >>> parser.parse_args([], namespace=argparse.Namespace(foo=101)) + Namespace(foo=101) + If the ``default`` value is a string, the parser parses the value as if it were a command-line argument. In particular, the parser applies any type_ conversion argument, if provided, before setting the attribute on the @@ -1042,63 +1050,70 @@ command-line argument was not present:: type ^^^^ -By default, :class:`ArgumentParser` objects read command-line arguments in as simple +By default, the parser reads command-line arguments in as simple strings. However, quite often the command-line string should instead be -interpreted as another type, like a :class:`float` or :class:`int`. The -``type`` keyword argument of :meth:`~ArgumentParser.add_argument` allows any -necessary type-checking and type conversions to be performed. Common built-in -types and functions can be used directly as the value of the ``type`` argument:: +interpreted as another type, such as a :class:`float` or :class:`int`. The +``type`` keyword for :meth:`~ArgumentParser.add_argument` allows any +necessary type-checking and type conversions to be performed. - >>> parser = argparse.ArgumentParser() - >>> parser.add_argument('foo', type=int) - >>> parser.add_argument('bar', type=open) - >>> parser.parse_args('2 temp.txt'.split()) - Namespace(bar=<_io.TextIOWrapper name='temp.txt' encoding='UTF-8'>, foo=2) +If the type_ keyword is used with the default_ keyword, the type converter +is only applied if the default is a string. -See the section on the default_ keyword argument for information on when the -``type`` argument is applied to default arguments. +The argument to ``type`` can be any callable that accepts a single string. +If the function raises :exc:`ArgumentTypeError`, :exc:`TypeError`, or +:exc:`ValueError`, the exception is caught and a nicely formatted error +message is displayed. No other exception types are handled. -To ease the use of various types of files, the argparse module provides the -factory FileType which takes the ``mode=``, ``bufsize=``, ``encoding=`` and -``errors=`` arguments of the :func:`open` function. For example, -``FileType('w')`` can be used to create a writable file:: +Common built-in types and functions can be used as type converters: - >>> parser = argparse.ArgumentParser() - >>> parser.add_argument('bar', type=argparse.FileType('w')) - >>> parser.parse_args(['out.txt']) - Namespace(bar=<_io.TextIOWrapper name='out.txt' encoding='UTF-8'>) +.. testcode:: -``type=`` can take any callable that takes a single string argument and returns -the converted value:: + import argparse + import pathlib - >>> def perfect_square(string): - ... value = int(string) - ... sqrt = math.sqrt(value) - ... if sqrt != int(sqrt): - ... msg = "%r is not a perfect square" % string - ... raise argparse.ArgumentTypeError(msg) - ... return value + parser = argparse.ArgumentParser() + parser.add_argument('count', type=int) + parser.add_argument('distance', type=float) + parser.add_argument('street', type=ascii) + parser.add_argument('code_point', type=ord) + parser.add_argument('source_file', type=open) + parser.add_argument('dest_file', type=argparse.FileType('w', encoding='latin-1')) + parser.add_argument('datapath', type=pathlib.Path) + +User defined functions can be used as well: + +.. doctest:: + + >>> def hyphenated(string): + ... return '-'.join([word[:4] for word in string.casefold().split()]) ... - >>> parser = argparse.ArgumentParser(prog='PROG') - >>> parser.add_argument('foo', type=perfect_square) - >>> parser.parse_args(['9']) - Namespace(foo=9) - >>> parser.parse_args(['7']) - usage: PROG [-h] foo - PROG: error: argument foo: '7' is not a perfect square + >>> parser = argparse.ArgumentParser() + >>> _ = parser.add_argument('short_title', type=hyphenated) + >>> parser.parse_args(['"The Tale of Two Cities"']) + Namespace(short_title='"the-tale-of-two-citi') -The choices_ keyword argument may be more convenient for type checkers that -simply check against a range of values:: +The :func:`bool` function is not recommended as a type converter. All it does +is convert empty strings to ``False`` and non-empty strings to ``True``. +This is usually not what is desired. - >>> parser = argparse.ArgumentParser(prog='PROG') - >>> parser.add_argument('foo', type=int, choices=range(5, 10)) - >>> parser.parse_args(['7']) - Namespace(foo=7) - >>> 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) +In general, the ``type`` keyword is a convenience that should only be used for +simple conversions that can only raise one of the three supported exceptions. +Anything with more interesting error-handling or resource management should be +done downstream after the arguments are parsed. -See the choices_ section for more details. +For example, JSON or YAML conversions have complex error cases that require +better reporting than can be given by the ``type`` keyword. An +:exc:`~json.JSONDecodeError` would not be well formatted and a +:exc:`FileNotFound` exception would not be handled at all. + +Even :class:`~argparse.FileType` has its limitations for use with the ``type`` +keyword. If one argument uses *FileType* and then a subsequent argument fails, +an error is reported but the file is not automatically closed. In this case, it +would be better to wait until after the parser has run and then use the +:keyword:`with`-statement to manage the files. + +For type checkers that simply check against a fixed set of values, consider +using the choices_ keyword instead. choices @@ -1133,20 +1148,14 @@ container should match the type_ specified:: Any container can be passed as the *choices* value, so :class:`list` objects, :class:`set` objects, and custom containers are all supported. -This includes :class:`enum.Enum`, which could be used to restrain -argument's choices; if we reuse previous rock/paper/scissors game example, -this could be as follows:: - >>> from enum import Enum - >>> class GameMove(Enum): - ... ROCK = 'rock' - ... PAPER = 'paper' - ... SCISSORS = 'scissors' - ... - >>> parser = argparse.ArgumentParser(prog='game.py') - >>> parser.add_argument('move', type=GameMove, choices=GameMove) - >>> parser.parse_args(['rock']) - Namespace(move=) +Use of :class:`enum.Enum` is not recommended because it is difficult to +control its appearance in usage, help, and error messages. + +Formatted choices overrides the default *metavar* which is normally derived +from *dest*. This is usually what you want because the user never sees the +*dest* parameter. If this display isn't desirable (perhaps because there are +many choices), just specify an explicit metavar_. required @@ -1194,7 +1203,7 @@ argument:: positional arguments: bar one of the bars to be frobbled - optional arguments: + options: -h, --help show this help message and exit --foo foo the bars before frobbling @@ -1212,7 +1221,7 @@ specifiers include the program name, ``%(prog)s`` and most keyword arguments to positional arguments: bar the bar to frobble (default: 42) - optional arguments: + options: -h, --help show this help message and exit As the help string supports %-formatting, if you want a literal ``%`` to appear @@ -1226,7 +1235,7 @@ setting the ``help`` value to ``argparse.SUPPRESS``:: >>> parser.print_help() usage: frobble [-h] - optional arguments: + options: -h, --help show this help message and exit @@ -1253,7 +1262,7 @@ will be referred to as ``FOO``. An example:: positional arguments: bar - optional arguments: + options: -h, --help show this help message and exit --foo FOO @@ -1270,7 +1279,7 @@ An alternative name can be specified with ``metavar``:: positional arguments: XXX - optional arguments: + options: -h, --help show this help message and exit --foo YYY @@ -1288,7 +1297,7 @@ arguments:: >>> parser.print_help() usage: PROG [-h] [-x X X] [--foo bar baz] - optional arguments: + options: -h, --help show this help message and exit -x X X --foo bar baz @@ -1692,7 +1701,7 @@ Sub-commands a a help b b help - optional arguments: + options: -h, --help show this help message and exit --foo foo help @@ -1702,13 +1711,13 @@ Sub-commands positional arguments: bar bar help - optional arguments: + options: -h, --help show this help message and exit >>> parser.parse_args(['b', '--help']) usage: PROG b [-h] [--baz {X,Y,Z}] - optional arguments: + options: -h, --help show this help message and exit --baz {X,Y,Z} baz help @@ -1725,7 +1734,7 @@ Sub-commands >>> parser.parse_args(['-h']) usage: [-h] {foo,bar} ... - optional arguments: + options: -h, --help show this help message and exit subcommands: diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 8a5c6ec5f12..9149a53e0dc 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -1576,7 +1576,7 @@ and classes for traversing abstract syntax trees: Safely evaluate an expression node or a string containing a Python literal or container display. The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, - dicts, sets, booleans, and ``None``. + dicts, sets, booleans, ``None`` and ``Ellipsis``. This can be used for safely evaluating strings containing Python values from untrusted sources without the need to parse the values oneself. It is not @@ -1588,6 +1588,10 @@ and classes for traversing abstract syntax trees: sufficiently large/complex string due to stack depth limitations in Python's AST compiler. + It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, + :exc:`MemoryError` and :exc:`RecursionError` depending on the malformed + input. + .. versionchanged:: 3.2 Now allows bytes and set literals. diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index b1e73189a7a..7de5a0ab259 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -321,7 +321,7 @@ Creating Futures and Tasks .. versionadded:: 3.5.2 -.. method:: loop.create_task(coro, \*, name=None) +.. method:: loop.create_task(coro, *, name=None) Schedule the execution of a :ref:`coroutine`. Return a :class:`Task` object. @@ -356,7 +356,7 @@ Opening network connections ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. coroutinemethod:: loop.create_connection(protocol_factory, \ - host=None, port=None, \*, ssl=None, \ + host=None, port=None, *, ssl=None, \ family=0, proto=0, flags=0, sock=None, \ local_addr=None, server_hostname=None, \ ssl_handshake_timeout=None, \ @@ -482,7 +482,7 @@ Opening network connections that can be used directly in async/await code. .. coroutinemethod:: loop.create_datagram_endpoint(protocol_factory, \ - local_addr=None, remote_addr=None, \*, \ + local_addr=None, remote_addr=None, *, \ family=0, proto=0, flags=0, \ reuse_address=None, reuse_port=None, \ allow_broadcast=None, sock=None) @@ -559,7 +559,7 @@ Opening network connections Added support for Windows. .. coroutinemethod:: loop.create_unix_connection(protocol_factory, \ - path=None, \*, ssl=None, sock=None, \ + path=None, *, ssl=None, sock=None, \ server_hostname=None, ssl_handshake_timeout=None) Create a Unix connection. @@ -592,7 +592,7 @@ Creating network servers ^^^^^^^^^^^^^^^^^^^^^^^^ .. coroutinemethod:: loop.create_server(protocol_factory, \ - host=None, port=None, \*, \ + host=None, port=None, *, \ family=socket.AF_UNSPEC, \ flags=socket.AI_PASSIVE, \ sock=None, backlog=100, ssl=None, \ @@ -683,7 +683,7 @@ Creating network servers .. coroutinemethod:: loop.create_unix_server(protocol_factory, path=None, \ - \*, sock=None, backlog=100, ssl=None, \ + *, sock=None, backlog=100, ssl=None, \ ssl_handshake_timeout=None, start_serving=True) Similar to :meth:`loop.create_server` but works with the @@ -708,7 +708,7 @@ Creating network servers The *path* parameter can now be a :class:`~pathlib.Path` object. .. coroutinemethod:: loop.connect_accepted_socket(protocol_factory, \ - sock, \*, ssl=None, ssl_handshake_timeout=None) + sock, *, ssl=None, ssl_handshake_timeout=None) Wrap an already accepted connection into a transport/protocol pair. @@ -773,7 +773,7 @@ TLS Upgrade ^^^^^^^^^^^ .. coroutinemethod:: loop.start_tls(transport, protocol, \ - sslcontext, \*, server_side=False, \ + sslcontext, *, server_side=False, \ server_hostname=None, ssl_handshake_timeout=None) Upgrade an existing transport-based connection to TLS. @@ -806,7 +806,7 @@ TLS Upgrade Watching file descriptors ^^^^^^^^^^^^^^^^^^^^^^^^^ -.. method:: loop.add_reader(fd, callback, \*args) +.. method:: loop.add_reader(fd, callback, *args) Start monitoring the *fd* file descriptor for read availability and invoke *callback* with the specified arguments once *fd* is available for @@ -816,7 +816,7 @@ Watching file descriptors Stop monitoring the *fd* file descriptor for read availability. -.. method:: loop.add_writer(fd, callback, \*args) +.. method:: loop.add_writer(fd, callback, *args) Start monitoring the *fd* file descriptor for write availability and invoke *callback* with the specified arguments once *fd* is available for @@ -930,7 +930,7 @@ convenient. :meth:`loop.create_server` and :func:`start_server`. .. coroutinemethod:: loop.sock_sendfile(sock, file, offset=0, count=None, \ - \*, fallback=True) + *, fallback=True) Send a file using high-performance :mod:`os.sendfile` if possible. Return the total number of bytes sent. @@ -964,7 +964,7 @@ convenient. DNS ^^^ -.. coroutinemethod:: loop.getaddrinfo(host, port, \*, family=0, \ +.. coroutinemethod:: loop.getaddrinfo(host, port, *, family=0, \ type=0, proto=0, flags=0) Asynchronous version of :meth:`socket.getaddrinfo`. @@ -1029,7 +1029,7 @@ Working with pipes Unix signals ^^^^^^^^^^^^ -.. method:: loop.add_signal_handler(signum, callback, \*args) +.. method:: loop.add_signal_handler(signum, callback, *args) Set *callback* as the handler for the *signum* signal. @@ -1064,7 +1064,7 @@ Unix signals Executing code in thread or process pools ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. awaitablemethod:: loop.run_in_executor(executor, func, \*args) +.. awaitablemethod:: loop.run_in_executor(executor, func, *args) Arrange for *func* to be called in the specified executor. @@ -1184,10 +1184,13 @@ Allows customizing how exceptions are handled in the event loop. * 'message': Error message; * 'exception' (optional): Exception object; * 'future' (optional): :class:`asyncio.Future` instance; + * 'task' (optional): :class:`asyncio.Task` instance; * 'handle' (optional): :class:`asyncio.Handle` instance; * 'protocol' (optional): :ref:`Protocol ` instance; * 'transport' (optional): :ref:`Transport ` instance; - * 'socket' (optional): :class:`socket.socket` instance. + * 'socket' (optional): :class:`socket.socket` instance; + * 'asyncgen' (optional): Asynchronous generator that caused + the exception. .. note:: @@ -1234,9 +1237,9 @@ async/await code consider using the high-level subprocesses. See :ref:`Subprocess Support on Windows ` for details. -.. coroutinemethod:: loop.subprocess_exec(protocol_factory, \*args, \ +.. coroutinemethod:: loop.subprocess_exec(protocol_factory, *args, \ stdin=subprocess.PIPE, stdout=subprocess.PIPE, \ - stderr=subprocess.PIPE, \*\*kwargs) + stderr=subprocess.PIPE, **kwargs) Create a subprocess from one or more string arguments specified by *args*. @@ -1316,9 +1319,9 @@ async/await code consider using the high-level conforms to the :class:`asyncio.SubprocessTransport` base class and *protocol* is an object instantiated by the *protocol_factory*. -.. coroutinemethod:: loop.subprocess_shell(protocol_factory, cmd, \*, \ +.. coroutinemethod:: loop.subprocess_shell(protocol_factory, cmd, *, \ stdin=subprocess.PIPE, stdout=subprocess.PIPE, \ - stderr=subprocess.PIPE, \*\*kwargs) + stderr=subprocess.PIPE, **kwargs) Create a subprocess from *cmd*, which can be a :class:`str` or a :class:`bytes` string encoded to the diff --git a/Doc/library/asyncio-future.rst b/Doc/library/asyncio-future.rst index e1ac18eaf09..939d4c1a845 100644 --- a/Doc/library/asyncio-future.rst +++ b/Doc/library/asyncio-future.rst @@ -31,7 +31,7 @@ Future Functions .. versionadded:: 3.5 -.. function:: ensure_future(obj, \*, loop=None) +.. function:: ensure_future(obj, *, loop=None) Return: @@ -58,7 +58,7 @@ Future Functions The function accepts any :term:`awaitable` object. -.. function:: wrap_future(future, \*, loop=None) +.. function:: wrap_future(future, *, loop=None) Wrap a :class:`concurrent.futures.Future` object in a :class:`asyncio.Future` object. @@ -67,7 +67,7 @@ Future Functions Future Object ============= -.. class:: Future(\*, loop=None) +.. class:: Future(*, loop=None) A Future represents an eventual result of an asynchronous operation. Not thread-safe. diff --git a/Doc/library/asyncio-policy.rst b/Doc/library/asyncio-policy.rst index 5e69525e90d..ef6a0588506 100644 --- a/Doc/library/asyncio-policy.rst +++ b/Doc/library/asyncio-policy.rst @@ -159,7 +159,7 @@ implementation used by the asyncio event loop: .. class:: AbstractChildWatcher - .. method:: add_child_handler(pid, callback, \*args) + .. method:: add_child_handler(pid, callback, *args) Register a new child handler. diff --git a/Doc/library/asyncio-queue.rst b/Doc/library/asyncio-queue.rst index 524560b691d..289ad1b014c 100644 --- a/Doc/library/asyncio-queue.rst +++ b/Doc/library/asyncio-queue.rst @@ -23,7 +23,7 @@ See also the `Examples`_ section below. Queue ===== -.. class:: Queue(maxsize=0, \*, loop=None) +.. class:: Queue(maxsize=0) A first in, first out (FIFO) queue. @@ -36,9 +36,6 @@ Queue the queue is always known and can be returned by calling the :meth:`qsize` method. - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - This class is :ref:`not thread safe `. diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index b76ed379c7f..9b456c14351 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -48,9 +48,9 @@ The following top-level asyncio functions can be used to create and work with streams: -.. coroutinefunction:: open_connection(host=None, port=None, \*, \ - loop=None, limit=None, ssl=None, family=0, \ - proto=0, flags=0, sock=None, local_addr=None, \ +.. coroutinefunction:: open_connection(host=None, port=None, *, \ + limit=None, ssl=None, family=0, proto=0, \ + flags=0, sock=None, local_addr=None, \ server_hostname=None, ssl_handshake_timeout=None) Establish a network connection and return a pair of @@ -59,9 +59,6 @@ and work with streams: The returned *reader* and *writer* objects are instances of :class:`StreamReader` and :class:`StreamWriter` classes. - The *loop* argument is optional and can always be determined - automatically when this function is awaited from a coroutine. - *limit* determines the buffer size limit used by the returned :class:`StreamReader` instance. By default the *limit* is set to 64 KiB. @@ -74,7 +71,7 @@ and work with streams: The *ssl_handshake_timeout* parameter. .. coroutinefunction:: start_server(client_connected_cb, host=None, \ - port=None, \*, loop=None, limit=None, \ + port=None, *, limit=None, \ family=socket.AF_UNSPEC, \ flags=socket.AI_PASSIVE, sock=None, \ backlog=100, ssl=None, reuse_address=None, \ @@ -92,9 +89,6 @@ and work with streams: :ref:`coroutine function `; if it is a coroutine function, it will be automatically scheduled as a :class:`Task`. - The *loop* argument is optional and can always be determined - automatically when this method is awaited from a coroutine. - *limit* determines the buffer size limit used by the returned :class:`StreamReader` instance. By default the *limit* is set to 64 KiB. @@ -109,9 +103,9 @@ and work with streams: .. rubric:: Unix Sockets -.. coroutinefunction:: open_unix_connection(path=None, \*, loop=None, \ - limit=None, ssl=None, sock=None, \ - server_hostname=None, ssl_handshake_timeout=None) +.. coroutinefunction:: open_unix_connection(path=None, *, limit=None, \ + ssl=None, sock=None, server_hostname=None, \ + ssl_handshake_timeout=None) Establish a Unix socket connection and return a pair of ``(reader, writer)``. @@ -132,9 +126,8 @@ and work with streams: .. coroutinefunction:: start_unix_server(client_connected_cb, path=None, \ - \*, loop=None, limit=None, sock=None, \ - backlog=100, ssl=None, ssl_handshake_timeout=None, \ - start_serving=True) + *, limit=None, sock=None, backlog=100, ssl=None, \ + ssl_handshake_timeout=None, start_serving=True) Start a Unix socket server. @@ -192,7 +185,7 @@ StreamReader can be read. Use the :attr:`IncompleteReadError.partial` attribute to get the partially read data. - .. coroutinemethod:: readuntil(separator=b'\\n') + .. coroutinemethod:: readuntil(separator=b'\n') Read data from the stream until *separator* is found. diff --git a/Doc/library/asyncio-subprocess.rst b/Doc/library/asyncio-subprocess.rst index b0330349dfb..f955a292e15 100644 --- a/Doc/library/asyncio-subprocess.rst +++ b/Doc/library/asyncio-subprocess.rst @@ -61,9 +61,8 @@ See also the `Examples`_ subsection. Creating Subprocesses ===================== -.. coroutinefunction:: create_subprocess_exec(program, \*args, stdin=None, \ - stdout=None, stderr=None, loop=None, \ - limit=None, \*\*kwds) +.. coroutinefunction:: create_subprocess_exec(program, *args, stdin=None, \ + stdout=None, stderr=None, limit=None, **kwds) Create a subprocess. @@ -76,13 +75,9 @@ Creating Subprocesses See the documentation of :meth:`loop.subprocess_exec` for other parameters. - .. deprecated-removed:: 3.8 3.10 - - The *loop* parameter. .. coroutinefunction:: create_subprocess_shell(cmd, stdin=None, \ - stdout=None, stderr=None, loop=None, \ - limit=None, \*\*kwds) + stdout=None, stderr=None, limit=None, **kwds) Run the *cmd* shell command. @@ -104,10 +99,6 @@ Creating Subprocesses escape whitespace and special shell characters in strings that are going to be used to construct shell commands. - .. deprecated-removed:: 3.8 3.10 - - The *loop* parameter. - .. note:: Subprocesses are available for Windows if a :class:`ProactorEventLoop` is diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst index 84a52cb2d57..d12630afc6a 100644 --- a/Doc/library/asyncio-sync.rst +++ b/Doc/library/asyncio-sync.rst @@ -36,7 +36,7 @@ asyncio has the following basic synchronization primitives: Lock ==== -.. class:: Lock(\*, loop=None) +.. class:: Lock() Implements a mutex lock for asyncio tasks. Not thread-safe. @@ -63,9 +63,6 @@ Lock finally: lock.release() - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - .. coroutinemethod:: acquire() Acquire the lock. @@ -96,7 +93,7 @@ Lock Event ===== -.. class:: Event(\*, loop=None) +.. class:: Event() An event object. Not thread-safe. @@ -104,14 +101,10 @@ Event that some event has happened. An Event object manages an internal flag that can be set to *true* - with the :meth:`set` method and reset to *false* with the - :meth:`clear` method. The :meth:`wait` method blocks until the + with the :meth:`~Event.set` method and reset to *false* with the + :meth:`clear` method. The :meth:`~Event.wait` method blocks until the flag is set to *true*. The flag is set to *false* initially. - - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - .. _asyncio_example_sync_event: Example:: @@ -142,7 +135,7 @@ Event Wait until the event is set. If the event is set, return ``True`` immediately. - Otherwise block until another task calls :meth:`set`. + Otherwise block until another task calls :meth:`~Event.set`. .. method:: set() @@ -155,8 +148,8 @@ Event Clear (unset) the event. - Tasks awaiting on :meth:`wait` will now block until the - :meth:`set` method is called again. + Tasks awaiting on :meth:`~Event.wait` will now block until the + :meth:`~Event.set` method is called again. .. method:: is_set() @@ -166,7 +159,7 @@ Event Condition ========= -.. class:: Condition(lock=None, \*, loop=None) +.. class:: Condition(lock=None) A Condition object. Not thread-safe. @@ -184,10 +177,6 @@ Condition ``None``. In the latter case a new Lock object is created automatically. - - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - The preferred way to use a Condition is an :keyword:`async with` statement:: @@ -270,7 +259,7 @@ Condition Semaphore ========= -.. class:: Semaphore(value=1, \*, loop=None) +.. class:: Semaphore(value=1) A Semaphore object. Not thread-safe. @@ -284,10 +273,6 @@ Semaphore internal counter (``1`` by default). If the given value is less than ``0`` a :exc:`ValueError` is raised. - - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - The preferred way to use a Semaphore is an :keyword:`async with` statement:: @@ -332,7 +317,7 @@ Semaphore BoundedSemaphore ================ -.. class:: BoundedSemaphore(value=1, \*, loop=None) +.. class:: BoundedSemaphore(value=1) A bounded semaphore object. Not thread-safe. @@ -340,10 +325,6 @@ BoundedSemaphore a :exc:`ValueError` in :meth:`~Semaphore.release` if it increases the internal counter above the initial *value*. - - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - --------- diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index c638f1263fd..45e58437e03 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -210,7 +210,7 @@ is :meth:`loop.run_in_executor`. Running an asyncio Program ========================== -.. function:: run(coro, \*, debug=False) +.. function:: run(coro, *, debug=False) Execute the :term:`coroutine` *coro* and return the result. @@ -247,7 +247,7 @@ Running an asyncio Program Creating Tasks ============== -.. function:: create_task(coro, \*, name=None) +.. function:: create_task(coro, *, name=None) Wrap the *coro* :ref:`coroutine ` into a :class:`Task` and schedule its execution. Return the Task object. @@ -283,7 +283,7 @@ Creating Tasks Sleeping ======== -.. coroutinefunction:: sleep(delay, result=None, \*, loop=None) +.. coroutinefunction:: sleep(delay, result=None) Block for *delay* seconds. @@ -293,9 +293,6 @@ Sleeping ``sleep()`` always suspends the current task, allowing other tasks to run. - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - .. _asyncio_example_sleep: Example of coroutine displaying the current date every second @@ -319,7 +316,7 @@ Sleeping Running Tasks Concurrently ========================== -.. awaitablefunction:: gather(\*aws, loop=None, return_exceptions=False) +.. awaitablefunction:: gather(*aws, return_exceptions=False) Run :ref:`awaitable objects ` in the *aws* sequence *concurrently*. @@ -348,9 +345,6 @@ Running Tasks Concurrently cancellation of one submitted Task/Future to cause other Tasks/Futures to be cancelled. - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - .. _asyncio_example_gather: Example:: @@ -403,7 +397,7 @@ Running Tasks Concurrently Shielding From Cancellation =========================== -.. awaitablefunction:: shield(aw, \*, loop=None) +.. awaitablefunction:: shield(aw) Protect an :ref:`awaitable object ` from being :meth:`cancelled `. @@ -436,14 +430,11 @@ Shielding From Cancellation except CancelledError: res = None - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - Timeouts ======== -.. coroutinefunction:: wait_for(aw, timeout, \*, loop=None) +.. coroutinefunction:: wait_for(aw, timeout) Wait for the *aw* :ref:`awaitable ` to complete with a timeout. @@ -466,9 +457,6 @@ Timeouts If the wait is cancelled, the future *aw* is also cancelled. - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - .. _asyncio_example_waitfor: Example:: @@ -500,8 +488,7 @@ Timeouts Waiting Primitives ================== -.. coroutinefunction:: wait(aws, \*, loop=None, timeout=None,\ - return_when=ALL_COMPLETED) +.. coroutinefunction:: wait(aws, *, timeout=None, return_when=ALL_COMPLETED) Run :ref:`awaitable objects ` in the *aws* iterable concurrently and block until the condition specified @@ -553,10 +540,6 @@ Waiting Primitives ``wait()`` directly is deprecated as it leads to :ref:`confusing behavior `. - .. deprecated-removed:: 3.8 3.10 - - The *loop* parameter. - .. _asyncio_example_wait_coroutine: .. note:: @@ -590,7 +573,7 @@ Waiting Primitives deprecated. -.. function:: as_completed(aws, \*, loop=None, timeout=None) +.. function:: as_completed(aws, *, timeout=None) Run :ref:`awaitable objects ` in the *aws* iterable concurrently. Return an iterator of coroutines. @@ -600,9 +583,6 @@ Waiting Primitives Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures are done. - .. deprecated-removed:: 3.8 3.10 - The *loop* parameter. - Example:: for coro in as_completed(aws): @@ -613,7 +593,7 @@ Waiting Primitives Running in Threads ================== -.. coroutinefunction:: to_thread(func, /, \*args, \*\*kwargs) +.. coroutinefunction:: to_thread(func, /, *args, **kwargs) Asynchronously run function *func* in a separate thread. @@ -743,7 +723,7 @@ Introspection Task Object =========== -.. class:: Task(coro, \*, loop=None, name=None) +.. class:: Task(coro, *, loop=None, name=None) A :class:`Future-like ` object that runs a Python :ref:`coroutine `. Not thread-safe. @@ -909,7 +889,7 @@ Task Object See the documentation of :meth:`Future.remove_done_callback` for more details. - .. method:: get_stack(\*, limit=None) + .. method:: get_stack(*, limit=None) Return the list of stack frames for this Task. @@ -930,7 +910,7 @@ Task Object stack are returned, but the oldest frames of a traceback are returned. (This matches the behavior of the traceback module.) - .. method:: print_stack(\*, limit=None, file=None) + .. method:: print_stack(*, limit=None, file=None) Print the stack or traceback for this Task. diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst index 2f24bb63912..25b3a4ca296 100644 --- a/Doc/library/base64.rst +++ b/Doc/library/base64.rst @@ -199,7 +199,7 @@ The modern interface provides: .. versionadded:: 3.4 -.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \\t\\n\\r\\v') +.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v') Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and return the decoded :class:`bytes`. diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst index 85cdc16a7d7..637baf49da1 100644 --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -266,7 +266,6 @@ Below are some examples of typical usage of the :mod:`bz2` module. Using :func:`compress` and :func:`decompress` to demonstrate round-trip compression: >>> import bz2 - >>> data = b"""\ ... Donec rhoncus quis sapien sit amet molestie. Fusce scelerisque vel augue ... nec ullamcorper. Nam rutrum pretium placerat. Aliquam vel tristique lorem, @@ -275,11 +274,9 @@ Using :func:`compress` and :func:`decompress` to demonstrate round-trip compress ... Aliquam pharetra lacus non risus vehicula rutrum. Maecenas aliquam leo ... felis. Pellentesque semper nunc sit amet nibh ullamcorper, ac elementum ... dolor luctus. Curabitur lacinia mi ornare consectetur vestibulum.""" - >>> c = bz2.compress(data) >>> len(data) / len(c) # Data compression ratio 1.513595166163142 - >>> d = bz2.decompress(c) >>> data == d # Check equality to original object after round-trip True @@ -287,7 +284,6 @@ Using :func:`compress` and :func:`decompress` to demonstrate round-trip compress Using :class:`BZ2Compressor` for incremental compression: >>> import bz2 - >>> def gen_data(chunks=10, chunksize=1000): ... """Yield incremental blocks of chunksize bytes.""" ... for _ in range(chunks): @@ -310,7 +306,6 @@ while ordered, repetitive data usually yields a high compression ratio. Writing and reading a bzip2-compressed file in binary mode: >>> import bz2 - >>> data = b"""\ ... Donec rhoncus quis sapien sit amet molestie. Fusce scelerisque vel augue ... nec ullamcorper. Nam rutrum pretium placerat. Aliquam vel tristique lorem, @@ -319,14 +314,11 @@ Writing and reading a bzip2-compressed file in binary mode: ... Aliquam pharetra lacus non risus vehicula rutrum. Maecenas aliquam leo ... felis. Pellentesque semper nunc sit amet nibh ullamcorper, ac elementum ... dolor luctus. Curabitur lacinia mi ornare consectetur vestibulum.""" - >>> with bz2.open("myfile.bz2", "wb") as f: ... # Write compressed data to file ... unused = f.write(data) - >>> with bz2.open("myfile.bz2", "rb") as f: ... # Decompress data from file ... content = f.read() - >>> content == data # Check equality to original object after round-trip True diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index 9b914b1f0d9..5c6e68f9304 100644 --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -148,7 +148,7 @@ runtime. Public functions ---------------- -.. function:: compile_dir(dir, maxlevels=sys.getrecursionlimit(), ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None, \*, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False) +.. function:: compile_dir(dir, maxlevels=sys.getrecursionlimit(), ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None, *, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False) Recursively descend the directory tree named by *dir*, compiling all :file:`.py` files along the way. Return a true value if all the files compiled successfully, @@ -231,7 +231,7 @@ Public functions Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* arguments. Default value of *maxlevels* was changed from ``10`` to ``sys.getrecursionlimit()`` -.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None, \*, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False) +.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None, *, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False) Compile the file with path *fullname*. Return a true value if the file compiled successfully, and a false value otherwise. diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 61d6c1143cf..d57f8ce23d1 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -67,7 +67,7 @@ Executor Objects .. versionchanged:: 3.5 Added the *chunksize* argument. - .. method:: shutdown(wait=True, \*, cancel_futures=False) + .. method:: shutdown(wait=True, *, cancel_futures=False) Signal the executor that it should free any resources that it is using when the currently pending futures are done executing. Calls to diff --git a/Doc/library/contextvars.rst b/Doc/library/contextvars.rst index 8805661c456..14ac47f4c9e 100644 --- a/Doc/library/contextvars.rst +++ b/Doc/library/contextvars.rst @@ -26,7 +26,7 @@ See also :pep:`567` for additional details. Context Variables ----------------- -.. class:: ContextVar(name, [\*, default]) +.. class:: ContextVar(name, [*, default]) This class is used to declare a new Context Variable, e.g.:: @@ -146,7 +146,7 @@ Manual Context Management Context implements the :class:`collections.abc.Mapping` interface. - .. method:: run(callable, \*args, \*\*kwargs) + .. method:: run(callable, *args, **kwargs) Execute ``callable(*args, **kwargs)`` code in the context object the *run* method is called on. Return the result of the execution diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index bf32d3e549b..7313148721d 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -2508,7 +2508,7 @@ other data types containing pointer type fields. Arrays and pointers ^^^^^^^^^^^^^^^^^^^ -.. class:: Array(\*args) +.. class:: Array(*args) Abstract base class for arrays. diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 508bc88e7f4..dae0dd7aa55 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1219,7 +1219,7 @@ Instance methods: .. method:: datetime.replace(year=self.year, month=self.month, day=self.day, \ hour=self.hour, minute=self.minute, second=self.second, microsecond=self.microsecond, \ - tzinfo=self.tzinfo, * fold=0) + tzinfo=self.tzinfo, *, fold=0) Return a datetime with the same attributes, except for those attributes given new values by whichever keyword arguments are specified. Note that @@ -1783,7 +1783,7 @@ Other constructor: Instance methods: .. method:: time.replace(hour=self.hour, minute=self.minute, second=self.second, \ - microsecond=self.microsecond, tzinfo=self.tzinfo, * fold=0) + microsecond=self.microsecond, tzinfo=self.tzinfo, *, fold=0) Return a :class:`.time` with the same value, except for those attributes given new values by whichever keyword arguments are specified. Note that diff --git a/Doc/library/dialog.rst b/Doc/library/dialog.rst index dc82a974ce0..53f98c10189 100644 --- a/Doc/library/dialog.rst +++ b/Doc/library/dialog.rst @@ -198,7 +198,7 @@ These do not emulate the native look-and-feel of the platform. A subclass of FileDialog that creates a dialog window for selecting a destination file. - .. method:: ok_command() + .. method:: ok_command() Test whether or not the selection points to a valid file that is not a directory. Confirmation is required if an already existing file is diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index aa08988c8b3..a5ee0fb5389 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -149,7 +149,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. contains a good example of its use. -.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n') +.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n') Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` generating the delta lines) in context diff format. @@ -279,7 +279,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. emu -.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n') +.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n') Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` generating the delta lines) in unified diff format. @@ -321,7 +321,7 @@ 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') +.. 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*. diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 8347c50ce3e..c09d8338d2c 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -708,7 +708,8 @@ iterations of the loop. .. opcode:: RERAISE - Re-raises the exception currently on top of the stack. + Re-raises the exception currently on top of the stack. If oparg is non-zero, + restores ``f_lasti`` of the current frame to its value when the exception was raised. .. versionadded:: 3.9 @@ -861,7 +862,7 @@ All of the following opcodes use their arguments. .. opcode:: LIST_TO_TUPLE - Pops a list from the stack and pushes a tuple containing the same values. + Pops a list from the stack and pushes a tuple containing the same values. .. versionadded:: 3.9 @@ -889,7 +890,7 @@ All of the following opcodes use their arguments. .. opcode:: DICT_MERGE - Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys. + Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys. .. versionadded:: 3.9 @@ -907,14 +908,14 @@ All of the following opcodes use their arguments. .. opcode:: IS_OP (invert) - Performs ``is`` comparison, or ``is not`` if ``invert`` is 1. + Performs ``is`` comparison, or ``is not`` if ``invert`` is 1. .. versionadded:: 3.9 .. opcode:: CONTAINS_OP (invert) - Performs ``in`` comparison, or ``not in`` if ``invert`` is 1. + Performs ``in`` comparison, or ``not in`` if ``invert`` is 1. .. versionadded:: 3.9 @@ -955,8 +956,8 @@ All of the following opcodes use their arguments. .. opcode:: JUMP_IF_NOT_EXC_MATCH (target) - Tests whether the second value on the stack is an exception matching TOS, - and jumps if it is not. Pops two values from the stack. + Tests whether the second value on the stack is an exception matching TOS, + and jumps if it is not. Pops two values from the stack. .. versionadded:: 3.9 diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index a77322f83ac..42ad0c9f06e 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -719,36 +719,51 @@ above. An example's doctest directives modify doctest's behavior for that single example. Use ``+`` to enable the named behavior, or ``-`` to disable it. -For example, this test passes:: +For example, this test passes: - >>> print(list(range(20))) # doctest: +NORMALIZE_WHITESPACE +.. doctest:: + :no-trim-doctest-flags: + + >>> print(list(range(20))) # doctest: +NORMALIZE_WHITESPACE [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] Without the directive it would fail, both because the actual output doesn't have two blanks before the single-digit list elements, and because the actual output is on a single line. This test also passes, and also requires a directive to do -so:: +so: - >>> print(list(range(20))) # doctest: +ELLIPSIS +.. doctest:: + :no-trim-doctest-flags: + + >>> print(list(range(20))) # doctest: +ELLIPSIS [0, 1, ..., 18, 19] Multiple directives can be used on a single physical line, separated by -commas:: +commas: - >>> print(list(range(20))) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE +.. doctest:: + :no-trim-doctest-flags: + + >>> print(list(range(20))) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE [0, 1, ..., 18, 19] If multiple directive comments are used for a single example, then they are -combined:: +combined: - >>> print(list(range(20))) # doctest: +ELLIPSIS - ... # doctest: +NORMALIZE_WHITESPACE +.. doctest:: + :no-trim-doctest-flags: + + >>> print(list(range(20))) # doctest: +ELLIPSIS + ... # doctest: +NORMALIZE_WHITESPACE [0, 1, ..., 18, 19] As the previous example shows, you can add ``...`` lines to your example containing only directives. This can be useful when an example is too long for -a directive to comfortably fit on the same line:: +a directive to comfortably fit on the same line: + +.. doctest:: + :no-trim-doctest-flags: >>> print(list(range(5)) + list(range(10, 20)) + list(range(30, 40))) ... # doctest: +ELLIPSIS @@ -793,18 +808,23 @@ instead. Another is to do :: There are others, but you get the idea. -Another bad idea is to print things that embed an object address, like :: +Another bad idea is to print things that embed an object address, like - >>> id(1.0) # certain to fail some of the time +.. doctest:: + + >>> id(1.0) # certain to fail some of the time # doctest: +SKIP 7948648 >>> class C: pass - >>> C() # the default repr() for instances embeds an address - <__main__.C instance at 0x00AC18F0> + >>> C() # the default repr() for instances embeds an address # doctest: +SKIP + -The :const:`ELLIPSIS` directive gives a nice approach for the last example:: +The :const:`ELLIPSIS` directive gives a nice approach for the last example: - >>> C() #doctest: +ELLIPSIS - <__main__.C instance at 0x...> +.. doctest:: + :no-trim-doctest-flags: + + >>> C() # doctest: +ELLIPSIS + Floating-point numbers are also subject to small output variations across platforms, because Python defers to the platform C library for float formatting, diff --git a/Doc/library/email.contentmanager.rst b/Doc/library/email.contentmanager.rst index e09c7c0e402..918fc55677e 100644 --- a/Doc/library/email.contentmanager.rst +++ b/Doc/library/email.contentmanager.rst @@ -116,7 +116,7 @@ Currently the email package provides only one concrete content manager, decoding the payload to unicode. The default error handler is ``replace``. - .. method:: set_content(msg, <'str'>, subtype="plain", charset='utf-8' \ + .. method:: set_content(msg, <'str'>, subtype="plain", charset='utf-8', \ cte=None, \ disposition=None, filename=None, cid=None, \ params=None, headers=None) diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst index 07152c224f2..e093f138936 100644 --- a/Doc/library/email.header.rst +++ b/Doc/library/email.header.rst @@ -116,7 +116,7 @@ Here is the :class:`Header` class description: if *s* is a byte string. - .. method:: encode(splitchars=';, \\t', maxlinelen=None, linesep='\\n') + .. method:: encode(splitchars=';, \t', maxlinelen=None, linesep='\n') Encode a message header into an RFC-compliant format, possibly wrapping long lines and encapsulating non-ASCII parts in base64 or quoted-printable diff --git a/Doc/library/email.headerregistry.rst b/Doc/library/email.headerregistry.rst index 9376da2b8d3..3e1d97a0326 100644 --- a/Doc/library/email.headerregistry.rst +++ b/Doc/library/email.headerregistry.rst @@ -289,7 +289,7 @@ variant, :attr:`~.BaseHeader.max_count` is set to 1. A :class:`ParameterizedMIMEHeader` class that handles the :mailheader:`Content-Disposition` header. - .. attribute:: content-disposition + .. attribute:: content_disposition ``inline`` and ``attachment`` are the only valid values in common use. diff --git a/Doc/library/email.policy.rst b/Doc/library/email.policy.rst index 8e707625981..bf53b9520fc 100644 --- a/Doc/library/email.policy.rst +++ b/Doc/library/email.policy.rst @@ -210,7 +210,7 @@ added matters. To illustrate:: :meth:`register_defect` method. - .. attribute:: mangle_from\_ + .. 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 diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 118002bef19..c532e2caec4 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -61,16 +61,18 @@ helper, :class:`auto`. the bitwise operations without losing their :class:`Flag` membership. .. function:: unique - :noindex: + :noindex: Enum class decorator that ensures only one name is bound to any one value. .. class:: auto - Instances are replaced with an appropriate value for Enum members. By default, the initial value starts at 1. + Instances are replaced with an appropriate value for Enum members. + :class:`StrEnum` defaults to the lower-cased version of the member name, + while other Enums default to 1 and increase from there. .. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto`` - +.. versionadded:: 3.10 ``StrEnum`` Creating an Enum ---------------- @@ -1164,6 +1166,15 @@ and raise an error if the two do not match:: In Python 2 code the :attr:`_order_` attribute is necessary as definition order is lost before it can be recorded. + +_Private__names +""""""""""""""" + +Private names are not converted to Enum members, but remain normal attributes. + +.. versionchanged:: 3.10 + + ``Enum`` member type """""""""""""""""""" diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 8fb25a50e2d..1028213699d 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -90,8 +90,13 @@ The following exceptions are used mostly as base classes for other exceptions. .. method:: with_traceback(tb) This method sets *tb* as the new traceback for the exception and returns - the exception object. It is usually used in exception handling code like - this:: + the exception object. It was more commonly used before the exception + chaining features of :pep:`3134` became available. The following example + shows how we can convert an instance of ``SomeException`` into an + instance of ``OtherException`` while preserving the traceback. Once + raised, the current frame is pushed onto the traceback of the + ``OtherException``, as would have happened to the traceback of the + original ``SomeException`` had we allowed it to propagate to the caller. try: ... diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst index ce07d326b39..925f08e9146 100644 --- a/Doc/library/fnmatch.rst +++ b/Doc/library/fnmatch.rst @@ -75,7 +75,7 @@ patterns. .. function:: filter(names, pattern) - Return the subset of the list of *names* that match *pattern*. It is the same as + Construct a list from those elements of the iterable *names* that match *pattern*. It is the same as ``[n for n in names if fnmatch(n, pattern)]``, but implemented more efficiently. diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 5b55d61f709..134f7dff6e1 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -478,14 +478,15 @@ are always available. They are listed here in alphabetical order. dictionaries as global and local namespace. If the *globals* dictionary is present and does not contain a value for the key ``__builtins__``, a reference to the dictionary of the built-in module :mod:`builtins` is - inserted under that key before *expression* is parsed. This means that - *expression* normally has full access to the standard :mod:`builtins` - module and restricted environments are propagated. If the *locals* - dictionary is omitted it defaults to the *globals* dictionary. If both - dictionaries are omitted, the expression is executed with the *globals* and - *locals* in the environment where :func:`eval` is called. Note, *eval()* - does not have access to the :term:`nested scopes ` (non-locals) in the - enclosing environment. + inserted under that key before *expression* is parsed. That way you can + control what builtins are available to the executed code by inserting your + own ``__builtins__`` dictionary into *globals* before passing it to + :func:`eval`. If the *locals* dictionary is omitted it defaults to the + *globals* dictionary. If both dictionaries are omitted, the expression is + executed with the *globals* and *locals* in the environment where + :func:`eval` is called. Note, *eval()* does not have access to the + :term:`nested scopes ` (non-locals) in the enclosing + environment. The return value is the result of the evaluated expression. Syntax errors are reported as exceptions. Example: @@ -1340,7 +1341,7 @@ are always available. They are listed here in alphabetical order. supported. -.. function:: print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False) +.. function:: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) Print *objects* to the text stream *file*, separated by *sep* and followed by *end*. *sep*, *end*, *file* and *flush*, if present, must be given as keyword diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 75c9d41b43a..e981bcdf6f2 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -62,16 +62,26 @@ The :mod:`functools` module defines the following functions: Example:: class DataSet: + def __init__(self, sequence_of_numbers): - self._data = sequence_of_numbers + self._data = tuple(sequence_of_numbers) @cached_property def stdev(self): return statistics.stdev(self._data) - @cached_property - def variance(self): - return statistics.variance(self._data) + The mechanics of :func:`cached_property` are somewhat different from + :func:`property`. A regular property blocks attribute writes unless a + setter is defined. In contrast, a *cached_property* allows writes. + + The *cached_property* decorator only runs on lookups and only when an + attribute of the same name doesn't exist. When it does run, the + *cached_property* writes to the attribute with the same name. Subsequent + attribute reads and writes take precedence over the *cached_property* + method and it works like a normal attribute. + + The cached value can be cleared by deleting the attribute. This + allows the *cached_property* method to run again. Note, this decorator interferes with the operation of :pep:`412` key-sharing dictionaries. This means that instance dictionaries diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst index 17792b20059..a2c1eb00d8b 100644 --- a/Doc/library/http.cookies.rst +++ b/Doc/library/http.cookies.rst @@ -93,7 +93,7 @@ Cookie Objects :meth:`value_decode` are inverses on the range of *value_decode*. -.. method:: BaseCookie.output(attrs=None, header='Set-Cookie:', sep='\\r\\n') +.. method:: BaseCookie.output(attrs=None, header='Set-Cookie:', sep='\r\n') Return a string representation suitable to be sent as HTTP headers. *attrs* and *header* are sent to each :class:`Morsel`'s :meth:`output` method. *sep* is used diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst index 21da143f3be..7f154ea02cc 100644 --- a/Doc/library/importlib.metadata.rst +++ b/Doc/library/importlib.metadata.rst @@ -115,8 +115,9 @@ Every distribution includes some metadata, which you can extract using the >>> wheel_metadata = metadata('wheel') # doctest: +SKIP -The keys of the returned data structure [#f1]_ name the metadata keywords, and -their values are returned unparsed from the distribution metadata:: +The keys of the returned data structure, a ``PackageMetadata``, +name the metadata keywords, and +the values are returned unparsed from the distribution metadata:: >>> wheel_metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' @@ -206,9 +207,9 @@ Thus, an alternative way to get the version number is through the There are all kinds of additional metadata available on the ``Distribution`` instance:: - >>> d.metadata['Requires-Python'] # doctest: +SKIP + >>> dist.metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' - >>> d.metadata['License'] # doctest: +SKIP + >>> dist.metadata['License'] # doctest: +SKIP 'MIT' The full set of available metadata is not described here. See :pep:`566` @@ -259,9 +260,3 @@ a custom finder, return instances of this derived ``Distribution`` in the .. rubric:: Footnotes - -.. [#f1] Technically, the returned distribution metadata object is an - :class:`email.message.EmailMessage` - instance, but this is an implementation detail, and not part of the - stable API. You should only use dictionary-like methods and syntax - to access the metadata contents. diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 45b62aec9ef..f1c444fe823 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -1138,7 +1138,7 @@ find and load modules. directory for ``''`` (i.e. the empty string). -.. class:: FileFinder(path, \*loader_details) +.. class:: FileFinder(path, *loader_details) A concrete implementation of :class:`importlib.abc.PathEntryFinder` which caches results from the file system. @@ -1181,7 +1181,7 @@ find and load modules. Clear out the internal cache. - .. classmethod:: path_hook(\*loader_details) + .. classmethod:: path_hook(*loader_details) A class method which returns a closure for use on :attr:`sys.path_hooks`. An instance of :class:`FileFinder` is returned by the closure using the diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index d00a30ff004..850d6018bab 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -556,7 +556,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, \*, follow_wrapped=True) +.. function:: signature(callable, *, follow_wrapped=True, globalns=None, localns=None) Return a :class:`Signature` object for the given ``callable``:: @@ -581,6 +581,9 @@ function. Raises :exc:`ValueError` if no signature can be provided, and :exc:`TypeError` if that type of object is not supported. + ``globalns`` and ``localns`` are passed into + :func:`typing.get_type_hints` when resolving the annotations. + A slash(/) in the signature of a function denotes that the parameters prior to it are positional-only. For more info, see :ref:`the FAQ entry on positional-only parameters `. @@ -590,14 +593,23 @@ function. ``callable`` specifically (``callable.__wrapped__`` will not be used to unwrap decorated callables.) + .. versionadded:: 3.10 + ``globalns`` and ``localns`` parameters. + .. note:: Some callables may not be introspectable in certain implementations of Python. For example, in CPython, some built-in functions defined in C provide no metadata about their arguments. + .. note:: -.. class:: Signature(parameters=None, \*, return_annotation=Signature.empty) + Will first try to resolve the annotations, but when it fails and + encounters with an error while that operation, the annotations will be + returned unchanged (as strings). + + +.. class:: Signature(parameters=None, *, return_annotation=Signature.empty) A Signature object represents the call signature of a function and its return annotation. For each parameter accepted by the function it stores a @@ -668,11 +680,12 @@ function. >>> str(new_sig) "(a, b) -> 'new return anno'" - .. classmethod:: Signature.from_callable(obj, \*, follow_wrapped=True) + .. classmethod:: Signature.from_callable(obj, *, follow_wrapped=True, globalns=None, localns=None) 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. + without unwrapping its ``__wrapped__`` chain. ``globalns`` and + ``localns`` will be used as the namespaces when resolving annotations. This method simplifies subclassing of :class:`Signature`:: @@ -683,8 +696,11 @@ function. .. versionadded:: 3.5 + .. versionadded:: 3.10 + ``globalns`` and ``localns`` parameters. -.. class:: Parameter(name, kind, \*, default=Parameter.empty, annotation=Parameter.empty) + +.. 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. diff --git a/Doc/library/io.rst b/Doc/library/io.rst index aecbec56866..048cb2a7ff6 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -964,7 +964,7 @@ Text I/O .. versionadded:: 3.7 -.. class:: StringIO(initial_value='', newline='\\n') +.. class:: StringIO(initial_value='', newline='\n') A text stream using an in-memory text buffer. It inherits :class:`TextIOBase`. diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 107bc515a67..fd77f99a88f 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -55,6 +55,7 @@ Iterator Arguments Results :func:`filterfalse` pred, seq elements of seq where pred(elem) is false ``filterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8`` :func:`groupby` iterable[, key] sub-iterators grouped by value of key(v) :func:`islice` seq, [start,] stop [, step] elements from seq[start:stop:step] ``islice('ABCDEFG', 2, None) --> C D E F G`` +:func:`pairwise` iterable (p[0], p[1]), (p[1], p[2]) ``pairwise('ABCDEFG') --> AB BC CD DE EF FG`` :func:`starmap` func, seq func(\*seq[0]), func(\*seq[1]), ... ``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000`` :func:`takewhile` pred, seq seq[0], seq[1], until pred fails ``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4`` :func:`tee` it, n it1, it2, ... itn splits one iterator into n @@ -475,6 +476,22 @@ loops that truncate the stream. If *start* is ``None``, then iteration starts at zero. If *step* is ``None``, then the step defaults to one. +.. function:: pairwise(iterable) + + Return successive overlapping pairs taken from the input *iterable*. + + The number of 2-tuples in the output iterator will be one fewer than the + number of inputs. It will be empty if the input iterable has fewer than + two values. + + Roughly equivalent to:: + + def pairwise(iterable): + # pairwise('ABCDEFG') --> AB BC CD DE EF FG + a, b = tee(iterable) + next(b, None) + return zip(a, b) + .. function:: permutations(iterable, r=None) @@ -565,7 +582,7 @@ loops that truncate the stream. Before :func:`product` runs, it completely consumes the input iterables, keeping pools of values in memory to generate the products. Accordingly, - it only useful with finite inputs. + it is only useful with finite inputs. .. function:: repeat(object[, times]) @@ -755,7 +772,7 @@ which incur interpreter overhead. "Count how many times the predicate is true" return sum(map(pred, iterable)) - def padnone(iterable): + def pad_none(iterable): """Returns the sequence elements and then returns None indefinitely. Useful for emulating the behavior of the built-in map() function. @@ -769,6 +786,18 @@ which incur interpreter overhead. def dotproduct(vec1, vec2): return sum(map(operator.mul, vec1, vec2)) + def convolve(signal, kernel): + # See: https://betterexplained.com/articles/intuitive-convolution/ + # convolve(data, [0.25, 0.25, 0.25, 0.25]) --> Moving average (blur) + # convolve(data, [1, -1]) --> 1st finite difference (1st derivative) + # convolve(data, [1, -2, 1]) --> 2nd finite difference (2nd derivative) + kernel = tuple(kernel)[::-1] + n = len(kernel) + window = collections.deque([0], maxlen=n) * n + for x in chain(signal, repeat(0, n-1)): + window.append(x) + yield sum(map(operator.mul, kernel, window)) + def flatten(list_of_lists): "Flatten one level of nesting" return chain.from_iterable(list_of_lists) @@ -782,12 +811,6 @@ which incur interpreter overhead. return starmap(func, repeat(args)) return starmap(func, repeat(args, times)) - def pairwise(iterable): - "s -> (s0,s1), (s1,s2), (s2, s3), ..." - a, b = tee(iterable) - next(b, None) - return zip(a, b) - def grouper(iterable, n, fillvalue=None): "Collect data into fixed-length chunks or blocks" # grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx" @@ -809,7 +832,7 @@ which incur interpreter overhead. nexts = cycle(islice(nexts, num_active)) def partition(pred, iterable): - 'Use a predicate to partition entries into false entries and true entries' + "Use a predicate to partition entries into false entries and true entries" # partition(is_odd, range(10)) --> 0 2 4 6 8 and 1 3 5 7 9 t1, t2 = tee(iterable) return filterfalse(pred, t1), filter(pred, t2) @@ -881,7 +904,7 @@ which incur interpreter overhead. def random_product(*args, repeat=1): "Random selection from itertools.product(*args, **kwds)" pools = [tuple(pool) for pool in args] * repeat - return tuple(random.choice(pool) for pool in pools) + return tuple(map(random.choice, pools)) def random_permutation(iterable, r=None): "Random selection from itertools.permutations(iterable, r)" @@ -900,11 +923,11 @@ which incur interpreter overhead. "Random selection from itertools.combinations_with_replacement(iterable, r)" pool = tuple(iterable) n = len(pool) - indices = sorted(random.randrange(n) for i in range(r)) + indices = sorted(random.choices(range(n), k=r)) return tuple(pool[i] for i in indices) def nth_combination(iterable, r, index): - 'Equivalent to list(combinations(iterable, r))[index]' + "Equivalent to list(combinations(iterable, r))[index]" pool = tuple(iterable) n = len(pool) if r < 0 or r > n: diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst index 683d6ed5e8b..0b5e2fc2a65 100644 --- a/Doc/library/logging.config.rst +++ b/Doc/library/logging.config.rst @@ -35,45 +35,45 @@ in :mod:`logging` itself) and defining handlers which are declared either in .. function:: dictConfig(config) - Takes the logging configuration from a dictionary. The contents of - this dictionary are described in :ref:`logging-config-dictschema` - below. + Takes the logging configuration from a dictionary. The contents of + this dictionary are described in :ref:`logging-config-dictschema` + below. - If an error is encountered during configuration, this function will - raise a :exc:`ValueError`, :exc:`TypeError`, :exc:`AttributeError` - or :exc:`ImportError` with a suitably descriptive message. The - following is a (possibly incomplete) list of conditions which will - raise an error: + If an error is encountered during configuration, this function will + raise a :exc:`ValueError`, :exc:`TypeError`, :exc:`AttributeError` + or :exc:`ImportError` with a suitably descriptive message. The + following is a (possibly incomplete) list of conditions which will + raise an error: - * A ``level`` which is not a string or which is a string not - corresponding to an actual logging level. - * A ``propagate`` value which is not a boolean. - * An id which does not have a corresponding destination. - * A non-existent handler id found during an incremental call. - * An invalid logger name. - * Inability to resolve to an internal or external object. + * A ``level`` which is not a string or which is a string not + corresponding to an actual logging level. + * A ``propagate`` value which is not a boolean. + * An id which does not have a corresponding destination. + * A non-existent handler id found during an incremental call. + * An invalid logger name. + * Inability to resolve to an internal or external object. - Parsing is performed by the :class:`DictConfigurator` class, whose - constructor is passed the dictionary used for configuration, and - has a :meth:`configure` method. The :mod:`logging.config` module - has a callable attribute :attr:`dictConfigClass` - which is initially set to :class:`DictConfigurator`. - You can replace the value of :attr:`dictConfigClass` with a - suitable implementation of your own. + Parsing is performed by the :class:`DictConfigurator` class, whose + constructor is passed the dictionary used for configuration, and + has a :meth:`configure` method. The :mod:`logging.config` module + has a callable attribute :attr:`dictConfigClass` + which is initially set to :class:`DictConfigurator`. + You can replace the value of :attr:`dictConfigClass` with a + suitable implementation of your own. - :func:`dictConfig` calls :attr:`dictConfigClass` passing - the specified dictionary, and then calls the :meth:`configure` method on - the returned object to put the configuration into effect:: + :func:`dictConfig` calls :attr:`dictConfigClass` passing + the specified dictionary, and then calls the :meth:`configure` method on + the returned object to put the configuration into effect:: - def dictConfig(config): - dictConfigClass(config).configure() + def dictConfig(config): + dictConfigClass(config).configure() - For example, a subclass of :class:`DictConfigurator` could call - ``DictConfigurator.__init__()`` in its own :meth:`__init__()`, then - set up custom prefixes which would be usable in the subsequent - :meth:`configure` call. :attr:`dictConfigClass` would be bound to - this new subclass, and then :func:`dictConfig` could be called exactly as - in the default, uncustomized state. + For example, a subclass of :class:`DictConfigurator` could call + ``DictConfigurator.__init__()`` in its own :meth:`__init__()`, then + set up custom prefixes which would be usable in the subsequent + :meth:`configure` call. :attr:`dictConfigClass` would be bound to + this new subclass, and then :func:`dictConfig` could be called exactly as + in the default, uncustomized state. .. versionadded:: 3.2 diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index fb8ea705b04..431a5849fa9 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -1096,8 +1096,8 @@ functions. suitable value. .. versionchanged:: 3.7 - The *level* parameter was defaulted to level ``CRITICAL``. See Issue - #28524 for more information about this change. + The *level* parameter was defaulted to level ``CRITICAL``. See + :issue:`28524` for more information about this change. .. function:: addLevelName(level, levelName) @@ -1174,7 +1174,9 @@ functions. | | to ``'a'``. | +--------------+---------------------------------------------+ | *format* | Use the specified format string for the | - | | handler. | + | | handler. Defaults to attributes | + | | ``levelname``, ``name`` and ``message`` | + | | separated by colons. | +--------------+---------------------------------------------+ | *datefmt* | Use the specified date/time format, as | | | accepted by :func:`time.strftime`. | diff --git a/Doc/library/lzma.rst b/Doc/library/lzma.rst index 4bfff9c6147..633c87873cd 100644 --- a/Doc/library/lzma.rst +++ b/Doc/library/lzma.rst @@ -33,7 +33,7 @@ from multiple threads, it is necessary to protect it with a lock. Reading and writing compressed files ------------------------------------ -.. function:: open(filename, mode="rb", \*, format=None, check=-1, preset=None, filters=None, encoding=None, errors=None, newline=None) +.. function:: open(filename, mode="rb", *, format=None, check=-1, preset=None, filters=None, encoding=None, errors=None, newline=None) Open an LZMA-compressed file in binary or text mode, returning a :term:`file object`. @@ -69,7 +69,7 @@ Reading and writing compressed files Accepts a :term:`path-like object`. -.. class:: LZMAFile(filename=None, mode="r", \*, format=None, check=-1, preset=None, filters=None) +.. class:: LZMAFile(filename=None, mode="r", *, format=None, check=-1, preset=None, filters=None) Open an LZMA-compressed file in binary mode. diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 20cd99d8ce2..e109b1ebe1c 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -2569,9 +2569,9 @@ Address Formats filesystem. * An ``'AF_PIPE'`` address is a string of the form - :samp:`r'\\\\.\\pipe\\{PipeName}'`. To use :func:`Client` to connect to a named - pipe on a remote computer called *ServerName* one should use an address of the - form :samp:`r'\\\\{ServerName}\\pipe\\{PipeName}'` instead. + :samp:`r'\\\\.\\pipe\\{PipeName}'`. To use :func:`Client` to connect to a named + pipe on a remote computer called *ServerName* one should use an address of the + form :samp:`r'\\\\{ServerName}\\pipe\\{PipeName}'` instead. Note that any string beginning with two backslashes is assumed by default to be an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address. @@ -2661,6 +2661,46 @@ The :mod:`multiprocessing.dummy` module :mod:`multiprocessing.dummy` replicates the API of :mod:`multiprocessing` but is no more than a wrapper around the :mod:`threading` module. +.. currentmodule:: multiprocessing.pool + +In particular, the ``Pool`` function provided by :mod:`multiprocessing.dummy` +returns an instance of :class:`ThreadPool`, which is a subclass of +:class:`Pool` that supports all the same method calls but uses a pool of +worker threads rather than worker processes. + + +.. class:: ThreadPool([processes[, initializer[, initargs]]]) + + A thread pool object which controls a pool of worker threads to which jobs + can be submitted. :class:`ThreadPool` instances are fully interface + compatible with :class:`Pool` instances, and their resources must also be + properly managed, either by using the pool as a context manager or by + calling :meth:`~multiprocessing.pool.Pool.close` and + :meth:`~multiprocessing.pool.Pool.terminate` manually. + + *processes* is the number of worker threads to use. If *processes* is + ``None`` then the number returned by :func:`os.cpu_count` is used. + + If *initializer* is not ``None`` then each worker process will call + ``initializer(*initargs)`` when it starts. + + Unlike :class:`Pool`, *maxtasksperchild* and *context* cannot be provided. + + .. note:: + + A :class:`ThreadPool` shares the same interface as :class:`Pool`, which + is designed around a pool of processes and predates the introduction of + the :class:`concurrent.futures` module. As such, it inherits some + operations that don't make sense for a pool backed by threads, and it + has its own type for representing the status of asynchronous jobs, + :class:`AsyncResult`, that is not understood by any other libraries. + + Users should generally prefer to use + :class:`concurrent.futures.ThreadPoolExecutor`, which has a simpler + interface that was designed around threads from the start, and which + returns :class:`concurrent.futures.Future` instances that are + compatible with many other libraries, including :mod:`asyncio`. + .. _multiprocessing-programming: diff --git a/Doc/library/os.rst b/Doc/library/os.rst index a4c5fbb4815..35cf7c0a0ba 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -32,7 +32,7 @@ Notes on the availability of these functions: objects, and result in an object of the same type, if a path or file name is returned. -* On VxWorks, os.fork, os.execv and os.spawn*p* are not supported. +* On VxWorks, os.popen, os.fork, os.execv and os.spawn*p* are not supported. .. note:: @@ -1323,12 +1323,12 @@ or `the MSDN `_ on Windo .. data:: RWF_APPEND - Provide a per-write equivalent of the :data:`O_APPEND` :func:`os.open` - flag. This flag is meaningful only for :func:`os.pwritev`, and its - effect applies only to the data range written by the system call. The - *offset* argument does not affect the write operation; the data is always - appended to the end of the file. However, if the *offset* argument is - ``-1``, the current file *offset* is updated. + Provide a per-write equivalent of the :data:`O_APPEND` :func:`os.open` + flag. This flag is meaningful only for :func:`os.pwritev`, and its + effect applies only to the data range written by the system call. The + *offset* argument does not affect the write operation; the data is always + appended to the end of the file. However, if the *offset* argument is + ``-1``, the current file *offset* is updated. .. availability:: Linux 4.16 and newer. @@ -1991,7 +1991,7 @@ features: Accepts a :term:`path-like object`. -.. function:: lstat(path, \*, dir_fd=None) +.. function:: lstat(path, *, dir_fd=None) Perform the equivalent of an :c:func:`lstat` system call on the given path. Similar to :func:`~os.stat`, but does not follow symbolic links. Return a @@ -2498,7 +2498,7 @@ features: On the first, uncached call, a system call is required on Windows but not on Unix. - .. method:: is_dir(\*, follow_symlinks=True) + .. 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 @@ -2522,7 +2522,7 @@ features: This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :exc:`FileNotFoundError` is caught and not raised. - .. method:: is_file(\*, follow_symlinks=True) + .. 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 @@ -2552,7 +2552,7 @@ features: This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :exc:`FileNotFoundError` is caught and not raised. - .. method:: stat(\*, follow_symlinks=True) + .. 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 @@ -2584,7 +2584,7 @@ features: for :class:`bytes` paths on Windows. -.. function:: stat(path, \*, dir_fd=None, follow_symlinks=True) +.. function:: stat(path, *, dir_fd=None, follow_symlinks=True) Get the status of a file or a file descriptor. Perform the equivalent of a :c:func:`stat` system call on the given path. *path* may be specified as diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst index b7c34527719..be48561ed10 100644 --- a/Doc/library/pickle.rst +++ b/Doc/library/pickle.rst @@ -213,7 +213,7 @@ The :mod:`pickle` module provides the following constants: The :mod:`pickle` module provides the following functions to make the pickling process more convenient: -.. function:: dump(obj, file, protocol=None, \*, fix_imports=True, buffer_callback=None) +.. function:: dump(obj, file, protocol=None, *, fix_imports=True, buffer_callback=None) Write the pickled representation of the object *obj* to the open :term:`file object` *file*. This is equivalent to @@ -225,7 +225,7 @@ process more convenient: .. versionchanged:: 3.8 The *buffer_callback* argument was added. -.. function:: dumps(obj, protocol=None, \*, fix_imports=True, buffer_callback=None) +.. function:: dumps(obj, protocol=None, *, fix_imports=True, buffer_callback=None) Return the pickled representation of the object *obj* as a :class:`bytes` object, instead of writing it to a file. @@ -236,7 +236,7 @@ process more convenient: .. versionchanged:: 3.8 The *buffer_callback* argument was added. -.. function:: load(file, \*, fix_imports=True, encoding="ASCII", errors="strict", buffers=None) +.. function:: load(file, *, fix_imports=True, encoding="ASCII", errors="strict", buffers=None) Read the pickled representation of an object from the open :term:`file object` *file* and return the reconstituted object hierarchy specified therein. @@ -252,7 +252,7 @@ process more convenient: .. versionchanged:: 3.8 The *buffers* argument was added. -.. function:: loads(data, /, \*, fix_imports=True, encoding="ASCII", errors="strict", buffers=None) +.. function:: loads(data, /, *, fix_imports=True, encoding="ASCII", errors="strict", buffers=None) Return the reconstituted object hierarchy of the pickled representation *data* of an object. *data* must be a :term:`bytes-like object`. @@ -296,7 +296,7 @@ The :mod:`pickle` module defines three exceptions: The :mod:`pickle` module exports three classes, :class:`Pickler`, :class:`Unpickler` and :class:`PickleBuffer`: -.. class:: Pickler(file, protocol=None, \*, fix_imports=True, buffer_callback=None) +.. class:: Pickler(file, protocol=None, *, fix_imports=True, buffer_callback=None) This takes a binary file for writing a pickle data stream. @@ -391,7 +391,7 @@ The :mod:`pickle` module exports three classes, :class:`Pickler`, Use :func:`pickletools.optimize` if you need more compact pickles. -.. class:: Unpickler(file, \*, fix_imports=True, encoding="ASCII", errors="strict", buffers=None) +.. class:: Unpickler(file, *, fix_imports=True, encoding="ASCII", errors="strict", buffers=None) This takes a binary file for reading a pickle data stream. diff --git a/Doc/library/pipes.rst b/Doc/library/pipes.rst index 0a22da1f555..57e27a6acf4 100644 --- a/Doc/library/pipes.rst +++ b/Doc/library/pipes.rst @@ -17,6 +17,8 @@ The :mod:`pipes` module defines a class to abstract the concept of a *pipeline* Because the module uses :program:`/bin/sh` command lines, a POSIX or compatible shell for :func:`os.system` and :func:`os.popen` is required. +.. availability:: Unix. Not available on VxWorks. + The :mod:`pipes` module defines the following class: diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index b293adf48e6..be86e568c18 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -253,3 +253,41 @@ Unix Platforms using :program:`gcc`. The file is read and scanned in chunks of *chunksize* bytes. + + +Linux Platforms +--------------- + +.. function:: freedesktop_os_release() + + Get operating system identification from ``os-release`` file and return + it as a dict. The ``os-release`` file is a `freedesktop.org standard + `_ and + is available in most Linux distributions. A noticeable exception is + Android and Android-based distributions. + + Raises :exc:`OSError` or subclass when neither ``/etc/os-release`` nor + ``/usr/lib/os-release`` can be read. + + On success, the function returns a dictionary where keys and values are + strings. Values have their special characters like ``"`` and ``$`` + unquoted. The fields ``NAME``, ``ID``, and ``PRETTY_NAME`` are always + defined according to the standard. All other fields are optional. Vendors + may include additional fields. + + Note that fields like ``NAME``, ``VERSION``, and ``VARIANT`` are strings + suitable for presentation to users. Programs should use fields like + ``ID``, ``ID_LIKE``, ``VERSION_ID``, or ``VARIANT_ID`` to identify + Linux distributions. + + Example:: + + def get_like_distro(): + info = platform.freedesktop_os_release() + ids = [info["ID"]] + if "ID_LIKE" in info: + # ids are space separated and ordered by precedence + ids.extend(info["ID_LIKE"].split()) + return ids + + .. versionadded:: 3.10 diff --git a/Doc/library/plistlib.rst b/Doc/library/plistlib.rst index 6def72b3736..ce6d4a85bf5 100644 --- a/Doc/library/plistlib.rst +++ b/Doc/library/plistlib.rst @@ -52,7 +52,7 @@ or :class:`datetime.datetime` objects. This module defines the following functions: -.. function:: load(fp, \*, fmt=None, dict_type=dict) +.. function:: load(fp, *, fmt=None, dict_type=dict) Read a plist file. *fp* should be a readable and binary file object. Return the unpacked root object (which usually is a @@ -80,7 +80,7 @@ This module defines the following functions: .. versionadded:: 3.4 -.. function:: loads(data, \*, fmt=None, dict_type=dict) +.. function:: loads(data, *, fmt=None, dict_type=dict) Load a plist from a bytes object. See :func:`load` for an explanation of the keyword arguments. @@ -88,7 +88,7 @@ This module defines the following functions: .. versionadded:: 3.4 -.. function:: dump(value, fp, \*, fmt=FMT_XML, sort_keys=True, skipkeys=False) +.. function:: dump(value, fp, *, fmt=FMT_XML, sort_keys=True, skipkeys=False) Write *value* to a plist file. *Fp* should be a writable, binary file object. @@ -116,7 +116,7 @@ This module defines the following functions: .. versionadded:: 3.4 -.. function:: dumps(value, \*, fmt=FMT_XML, sort_keys=True, skipkeys=False) +.. function:: dumps(value, *, fmt=FMT_XML, sort_keys=True, skipkeys=False) Return *value* as a plist-formatted bytes object. See the documentation for :func:`dump` for an explanation of the keyword diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index 34525a96f55..774d46d0e96 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -525,16 +525,16 @@ Analysis of the profiler data is done using the :class:`~pstats.Stats` class. ordering are identical to the :meth:`~pstats.Stats.print_callers` method. - .. method:: get_stats_profile() + .. method:: get_stats_profile() This method returns an instance of StatsProfile, which contains a mapping of function names to instances of FunctionProfile. Each FunctionProfile instance holds information related to the function's profile such as how long the function took to run, how many times it was called, etc... - .. versionadded:: 3.9 - Added the following dataclasses: StatsProfile, FunctionProfile. - Added the following function: get_stats_profile. + .. versionadded:: 3.9 + Added the following dataclasses: StatsProfile, FunctionProfile. + Added the following function: get_stats_profile. .. _deterministic-profiling: diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst index e43b9aecd86..034e579315d 100644 --- a/Doc/library/pyexpat.rst +++ b/Doc/library/pyexpat.rst @@ -665,14 +665,14 @@ The ``errors`` module has the following attributes: .. data:: codes - A dictionary mapping numeric error codes to their string descriptions. + A dictionary mapping string descriptions to their error codes. .. versionadded:: 3.2 .. data:: messages - A dictionary mapping string descriptions to their error codes. + A dictionary mapping numeric error codes to their string descriptions. .. versionadded:: 3.2 diff --git a/Doc/library/random.rst b/Doc/library/random.rst index c243aced986..07ee0115214 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -135,6 +135,15 @@ Functions for integers values. Formerly it used a style like ``int(random()*n)`` which could produce slightly uneven distributions. + .. deprecated:: 3.10 + The automatic conversion of non-integer types to equivalent integers is + deprecated. Currently ``randrange(10.0)`` is losslessly converted to + ``randrange(10)``. In the future, this will raise a :exc:`TypeError`. + + .. deprecated:: 3.10 + The exception raised for non-integral values such as ``range(10.5)`` + will be changed from :exc:`ValueError` to :exc:`TypeError`. + .. function:: randint(a, b) Return a random integer *N* such that ``a <= N <= b``. Alias for @@ -142,10 +151,11 @@ Functions for integers .. function:: getrandbits(k) - Returns a Python integer with *k* random bits. This method is supplied with - the MersenneTwister generator and some other generators may also provide it - as an optional part of the API. When available, :meth:`getrandbits` enables - :meth:`randrange` to handle arbitrarily large ranges. + Returns a non-negative Python integer with *k* random bits. This method + is supplied with the MersenneTwister generator and some other generators + may also provide it as an optional part of the API. When available, + :meth:`getrandbits` enables :meth:`randrange` to handle arbitrarily large + ranges. .. versionchanged:: 3.9 This method now accepts zero for *k*. diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 3f5122760ee..435787c2766 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -218,7 +218,7 @@ Directory and files operations copy the file more efficiently. See :ref:`shutil-platform-dependent-efficient-copy-operations` section. -.. function:: ignore_patterns(\*patterns) +.. function:: ignore_patterns(*patterns) This factory function creates a function that can be used as a callable for :func:`copytree`\'s *ignore* argument, ignoring files and directories that diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index d52b84f610e..2255b827aa8 100755 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -56,12 +56,12 @@ created. Socket addresses are represented as follows: 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.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. + .. versionchanged:: 3.5 + Writable :term:`bytes-like object` is now accepted. .. _host_port: @@ -907,11 +907,9 @@ The :mod:`socket` module also offers various network-related services: where the host byte order is the same as network byte order, this is a no-op; otherwise, it performs a 2-byte swap operation. - .. deprecated:: 3.7 - In case *x* does not fit in 16-bit unsigned integer, but does fit in a - positive C int, it is silently truncated to 16-bit unsigned integer. - This silent truncation feature is deprecated, and will raise an - exception in future versions of Python. + .. versionchanged:: 3.10 + Raises :exc:`OverflowError` if *x* does not fit in a 16-bit unsigned + integer. .. function:: htonl(x) @@ -927,11 +925,9 @@ The :mod:`socket` module also offers various network-related services: where the host byte order is the same as network byte order, this is a no-op; otherwise, it performs a 2-byte swap operation. - .. deprecated:: 3.7 - In case *x* does not fit in 16-bit unsigned integer, but does fit in a - positive C int, it is silently truncated to 16-bit unsigned integer. - This silent truncation feature is deprecated, and will raise an - exception in future versions of Python. + .. versionchanged:: 3.10 + Raises :exc:`OverflowError` if *x* does not fit in a 16-bit unsigned + integer. .. function:: inet_aton(ip_string) diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 13aa8c512d0..950df60b202 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -198,7 +198,9 @@ Module functions and constants *detect_types* defaults to 0 (i. e. off, no type detection), you can set it to any combination of :const:`PARSE_DECLTYPES` and :const:`PARSE_COLNAMES` to turn - type detection on. + type detection on. Due to SQLite behaviour, types can't be detected for generated + fields (for example ``max(data)``), even when *detect_types* parameter is set. In + such case, the returned type is :class:`str`. 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 @@ -544,7 +546,7 @@ Connection Objects con.close() - .. method:: backup(target, *, pages=0, progress=None, name="main", sleep=0.250) + .. method:: backup(target, *, pages=-1, progress=None, name="main", sleep=0.250) This method makes a backup of a SQLite database even while it's being accessed by other clients, or concurrently by the same connection. The copy will be diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst index 38a499ab37e..6467704006d 100644 --- a/Doc/library/statistics.rst +++ b/Doc/library/statistics.rst @@ -156,10 +156,11 @@ However, for reading convenience, most of the examples show sorted sequences. .. versionadded:: 3.8 -.. function:: harmonic_mean(data) +.. function:: harmonic_mean(data, weights=None) Return the harmonic mean of *data*, a sequence or iterable of - real-valued numbers. + real-valued numbers. If *weights* is omitted or *None*, then + equal weighting is assumed. The harmonic mean, sometimes called the subcontrary mean, is the reciprocal of the arithmetic :func:`mean` of the reciprocals of the @@ -179,17 +180,17 @@ However, for reading convenience, most of the examples show sorted sequences. >>> harmonic_mean([40, 60]) 48.0 - Suppose an investor purchases an equal value of shares in each of - three companies, with P/E (price/earning) ratios of 2.5, 3 and 10. - What is the average P/E ratio for the investor's portfolio? + Suppose a car travels 40 km/hr for 5 km, and when traffic clears, + speeds-up to 60 km/hr for the remaining 30 km of the journey. What + is the average speed? .. doctest:: - >>> harmonic_mean([2.5, 3, 10]) # For an equal investment portfolio. - 3.6 + >>> harmonic_mean([40, 60], weights=[5, 30]) + 56.0 - :exc:`StatisticsError` is raised if *data* is empty, or any element - is less than zero. + :exc:`StatisticsError` is raised if *data* is empty, any element + is less than zero, or if the weighted sum isn't positive. The current algorithm has an early-out when it encounters a zero in the input. This means that the subsequent inputs are not tested @@ -197,6 +198,8 @@ However, for reading convenience, most of the examples show sorted sequences. .. versionadded:: 3.6 + .. versionchanged:: 3.8 + Added support for *weights*. .. function:: median(data) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 59c2b84b527..2869378bbda 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -499,7 +499,7 @@ class`. In addition, it provides a few more methods: .. versionadded:: 3.10 -.. method:: int.to_bytes(length, byteorder, \*, signed=False) +.. method:: int.to_bytes(length, byteorder, *, signed=False) Return an array of bytes representing an integer. @@ -531,7 +531,7 @@ class`. In addition, it provides a few more methods: .. versionadded:: 3.2 -.. classmethod:: int.from_bytes(bytes, byteorder, \*, signed=False) +.. classmethod:: int.from_bytes(bytes, byteorder, *, signed=False) Return the integer represented by the given array of bytes. @@ -5353,8 +5353,8 @@ types, where they are relevant. Some of these are not reported by the .. method:: class.__subclasses__ Each class keeps a list of weak references to its immediate subclasses. This - method returns a list of all those references still alive. - Example:: + method returns a list of all those references still alive. The list is in + definition order. Example:: >>> int.__subclasses__() [] diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 91f43e9353d..54786d0c2ab 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -384,10 +384,10 @@ following: The ``'#'`` option causes the "alternate form" to be used for the conversion. The alternate form is defined differently for different -types. This option is only valid for integer, float, complex and -Decimal types. For integers, when binary, octal, or hexadecimal output +types. This option is only valid for integer, float and complex +types. For integers, when binary, octal, or hexadecimal output is used, this option adds the prefix respective ``'0b'``, ``'0o'``, or -``'0x'`` to the output value. For floats, complex and Decimal the +``'0x'`` to the output value. For float and complex the alternate form causes the result of the conversion to always contain a decimal-point character, even if no digits follow it. Normally, a decimal-point character appears in the result of these conversions @@ -476,20 +476,36 @@ with the floating point presentation types listed below (except ``'n'`` and ``None``). When doing so, :func:`float` is used to convert the integer to a floating point number before formatting. -The available presentation types for floating point and decimal values are: +The available presentation types for :class:`float` and +:class:`~decimal.Decimal` values are: +---------+----------------------------------------------------------+ | Type | Meaning | +=========+==========================================================+ - | ``'e'`` | Exponent notation. Prints the number in scientific | - | | notation using the letter 'e' to indicate the exponent. | - | | The default precision is ``6``. | + | ``'e'`` | Scientific notation. For a given precision ``p``, | + | | formats the number in scientific notation with the | + | | letter 'e' separating the coefficient from the exponent. | + | | The coefficient has one digit before and ``p`` digits | + | | after the decimal point, for a total of ``p + 1`` | + | | significant digits. With no precision given, uses a | + | | precision of ``6`` digits after the decimal point for | + | | :class:`float`, and shows all coefficient digits | + | | for :class:`~decimal.Decimal`. If no digits follow the | + | | decimal point, the decimal point is also removed unless | + | | the ``#`` option is used. | +---------+----------------------------------------------------------+ - | ``'E'`` | Exponent notation. Same as ``'e'`` except it uses an | - | | upper case 'E' as the separator character. | + | ``'E'`` | Scientific notation. Same as ``'e'`` except it uses | + | | an upper case 'E' as the separator character. | +---------+----------------------------------------------------------+ - | ``'f'`` | Fixed-point notation. Displays the number as a | - | | fixed-point number. The default precision is ``6``. | + | ``'f'`` | Fixed-point notation. For a given precision ``p``, | + | | formats the number as a decimal number with exactly | + | | ``p`` digits following the decimal point. With no | + | | precision given, uses a precision of ``6`` digits after | + | | the decimal point for :class:`float`, and uses a | + | | precision large enough to show all coefficient digits | + | | for :class:`~decimal.Decimal`. If no digits follow the | + | | decimal point, the decimal point is also removed unless | + | | the ``#`` option is used. | +---------+----------------------------------------------------------+ | ``'F'`` | Fixed-point notation. Same as ``'f'``, but converts | | | ``nan`` to ``NAN`` and ``inf`` to ``INF``. | @@ -498,6 +514,8 @@ The available presentation types for floating point and decimal values are: | | this rounds the number to ``p`` significant digits and | | | then formats the result in either fixed-point format | | | or in scientific notation, depending on its magnitude. | + | | A precision of ``0`` is treated as equivalent to a | + | | precision of ``1``. | | | | | | The precise rules are as follows: suppose that the | | | result formatted with presentation type ``'e'`` and | @@ -512,13 +530,19 @@ The available presentation types for floating point and decimal values are: | | removed if there are no remaining digits following it, | | | unless the ``'#'`` option is used. | | | | + | | With no precision given, uses a precision of ``6`` | + | | significant digits for :class:`float`. For | + | | :class:`~decimal.Decimal`, the coefficient of the result | + | | is formed from the coefficient digits of the value; | + | | scientific notation is used for values smaller than | + | | ``1e-6`` in absolute value and values where the place | + | | value of the least significant digit is larger than 1, | + | | and fixed-point notation is used otherwise. | + | | | | | Positive and negative infinity, positive and negative | | | zero, and nans, are formatted as ``inf``, ``-inf``, | | | ``0``, ``-0`` and ``nan`` respectively, regardless of | | | the precision. | - | | | - | | A precision of ``0`` is treated as equivalent to a | - | | precision of ``1``. The default precision is ``6``. | +---------+----------------------------------------------------------+ | ``'G'`` | General format. Same as ``'g'`` except switches to | | | ``'E'`` if the number gets too large. The | @@ -531,12 +555,18 @@ The available presentation types for floating point and decimal values are: | ``'%'`` | Percentage. Multiplies the number by 100 and displays | | | in fixed (``'f'``) format, followed by a percent sign. | +---------+----------------------------------------------------------+ - | None | Similar to ``'g'``, except that fixed-point notation, | - | | when used, has at least one digit past the decimal point.| - | | The default precision is as high as needed to represent | - | | the particular value. The overall effect is to match the | - | | output of :func:`str` as altered by the other format | - | | modifiers. | + | None | For :class:`float` this is the same as ``'g'``, except | + | | that when fixed-point notation is used to format the | + | | result, it always includes at least one digit past the | + | | decimal point. The precision used is as large as needed | + | | to represent the given value faithfully. | + | | | + | | For :class:`~decimal.Decimal`, this is the same as | + | | either ``'g'`` or ``'G'`` depending on the value of | + | | ``context.capitals`` for the current decimal context. | + | | | + | | The overall effect is to match the output of :func:`str` | + | | as altered by the other format modifiers. | +---------+----------------------------------------------------------+ diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 292f8be20aa..07b8ad77655 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -339,7 +339,7 @@ functions. stderr=None, preexec_fn=None, close_fds=True, shell=False, \ cwd=None, env=None, universal_newlines=None, \ startupinfo=None, creationflags=0, restore_signals=True, \ - start_new_session=False, pass_fds=(), \*, group=None, \ + start_new_session=False, pass_fds=(), *, group=None, \ extra_groups=None, user=None, umask=-1, \ encoding=None, errors=None, text=None, pipesize=-1) @@ -1187,8 +1187,9 @@ calls these functions. The arguments shown above are merely some 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. + One API deviation from :func:`run` behavior exists: passing ``input=None`` + will behave the same as ``input=b''`` (or ``input=''``, depending on other + arguments) rather than using the parent's standard input file handle. 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 @@ -1281,7 +1282,7 @@ be used directly: becomes:: - output=check_output("dmesg | grep hda", shell=True) + output = check_output("dmesg | grep hda", shell=True) Replacing :func:`os.system` diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst index c9521d649b8..e364232247c 100644 --- a/Doc/library/symtable.rst +++ b/Doc/library/symtable.rst @@ -156,10 +156,12 @@ Examining Symbol Tables Return ``True`` if the symbol is local to its block. - .. method:: is_annotated() + .. method:: is_annotated() Return ``True`` if the symbol is annotated. + .. versionadded:: 3.6 + .. method:: is_free() Return ``True`` if the symbol is referenced in its block, but not assigned diff --git a/Doc/library/sysconfig.rst b/Doc/library/sysconfig.rst index 78a1dfce9ae..c9306e9bf9d 100644 --- a/Doc/library/sysconfig.rst +++ b/Doc/library/sysconfig.rst @@ -32,7 +32,7 @@ can be accessed using :func:`get_config_vars` or :func:`get_config_var`. Notice that on Windows, it's a much smaller set. -.. function:: get_config_vars(\*args) +.. function:: get_config_vars(*args) With no arguments, return a dictionary of all configuration variables relevant for the current platform. diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index 7a114fdf5d5..13088a10d77 100644 --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -37,7 +37,7 @@ Some facts and figures: Added support for :mod:`lzma` compression. -.. function:: open(name=None, mode='r', fileobj=None, bufsize=10240, \*\*kwargs) +.. function:: open(name=None, mode='r', fileobj=None, bufsize=10240, **kwargs) Return a :class:`TarFile` object for the pathname *name*. For detailed information on :class:`TarFile` objects and the keyword arguments that are diff --git a/Doc/library/test.rst b/Doc/library/test.rst index ce6b868458e..e4f779bd83e 100644 --- a/Doc/library/test.rst +++ b/Doc/library/test.rst @@ -453,7 +453,7 @@ The :mod:`test.support` module defines the following functions: Define match test with regular expression *patterns*. -.. function:: run_unittest(\*classes) +.. function:: run_unittest(*classes) Execute :class:`unittest.TestCase` subclasses passed to the function. The function scans the classes for methods starting with the prefix ``test_`` @@ -1599,7 +1599,7 @@ The :mod:`test.support.warnings_helper` module provides support for warnings tes .. versionadded:: 3.8 -.. function:: check_warnings(\*filters, quiet=True) +.. function:: check_warnings(*filters, quiet=True) A convenience wrapper for :func:`warnings.catch_warnings()` that makes it easier to test that a warning was correctly raised. It is approximately diff --git a/Doc/library/tkinter.font.rst b/Doc/library/tkinter.font.rst index b0f4505e9e3..c7c2b7b566c 100644 --- a/Doc/library/tkinter.font.rst +++ b/Doc/library/tkinter.font.rst @@ -91,6 +91,9 @@ The different font weights and slants are: Return the names of defined fonts. -.. function:: nametofont(name) +.. function:: nametofont(name, root=None) - Return a :class:`Font` representation of a tk named font. \ No newline at end of file + Return a :class:`Font` representation of a tk named font. + + .. versionchanged:: 3.10 + The *root* parameter was added. diff --git a/Doc/library/trace.rst b/Doc/library/trace.rst index c2732d900bc..40cf198f128 100644 --- a/Doc/library/trace.rst +++ b/Doc/library/trace.rst @@ -153,47 +153,47 @@ Programmatic Interface count information. *timing* enables a timestamp relative to when tracing was started to be displayed. - .. method:: run(cmd) + .. method:: run(cmd) - Execute the command and gather statistics from the execution with - the current tracing parameters. *cmd* must be a string or code object, - suitable for passing into :func:`exec`. + Execute the command and gather statistics from the execution with + the current tracing parameters. *cmd* must be a string or code object, + suitable for passing into :func:`exec`. - .. method:: runctx(cmd, globals=None, locals=None) + .. method:: runctx(cmd, globals=None, locals=None) - Execute the command and gather statistics from the execution with the - current tracing parameters, in the defined global and local - environments. If not defined, *globals* and *locals* default to empty - dictionaries. + Execute the command and gather statistics from the execution with the + current tracing parameters, in the defined global and local + environments. If not defined, *globals* and *locals* default to empty + dictionaries. - .. method:: runfunc(func, /, *args, **kwds) + .. method:: runfunc(func, /, *args, **kwds) - Call *func* with the given arguments under control of the :class:`Trace` - object with the current tracing parameters. + Call *func* with the given arguments under control of the :class:`Trace` + object with the current tracing parameters. - .. method:: results() + .. method:: results() - Return a :class:`CoverageResults` object that contains the cumulative - results of all previous calls to ``run``, ``runctx`` and ``runfunc`` - for the given :class:`Trace` instance. Does not reset the accumulated - trace results. + Return a :class:`CoverageResults` object that contains the cumulative + results of all previous calls to ``run``, ``runctx`` and ``runfunc`` + for the given :class:`Trace` instance. Does not reset the accumulated + trace results. .. class:: CoverageResults A container for coverage results, created by :meth:`Trace.results`. Should not be created directly by the user. - .. method:: update(other) + .. method:: update(other) - Merge in data from another :class:`CoverageResults` object. + Merge in data from another :class:`CoverageResults` object. - .. method:: write_results(show_missing=True, summary=False, coverdir=None) + .. method:: write_results(show_missing=True, summary=False, coverdir=None) - Write coverage results. Set *show_missing* to show lines that had no - hits. Set *summary* to include in the output the coverage summary per - module. *coverdir* specifies the directory into which the coverage - result files will be output. If ``None``, the results for each source - file are placed in its directory. + Write coverage results. Set *show_missing* to show lines that had no + hits. Set *summary* to include in the output the coverage summary per + module. *coverdir* specifies the directory into which the coverage + result files will be output. If ``None``, the results for each source + file are placed in its directory. A simple example demonstrating the use of the programmatic interface:: diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index d3487537df9..2084d75b3a5 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -913,8 +913,8 @@ Color control Set pencolor to the RGB color represented by *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode. - If turtleshape is a polygon, the outline of that polygon is drawn with the - newly set pencolor. + If turtleshape is a polygon, the outline of that polygon is drawn with the + newly set pencolor. .. doctest:: :skipif: _tkinter is None @@ -962,8 +962,8 @@ Color control Set fillcolor to the RGB color represented by *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode. - If turtleshape is a polygon, the interior of that polygon is drawn - with the newly set fillcolor. + If turtleshape is a polygon, the interior of that polygon is drawn + with the newly set fillcolor. .. doctest:: :skipif: _tkinter is None @@ -1001,8 +1001,8 @@ Color control Equivalent to ``pencolor(colorstring1)`` and ``fillcolor(colorstring2)`` and analogously if the other input format is used. - If turtleshape is a polygon, outline and interior of that polygon is drawn - with the newly set colors. + If turtleshape is a polygon, outline and interior of that polygon is drawn + with the newly set colors. .. doctest:: :skipif: _tkinter is None diff --git a/Doc/library/types.rst b/Doc/library/types.rst index 6f0dc259303..8e05f8408e5 100644 --- a/Doc/library/types.rst +++ b/Doc/library/types.rst @@ -280,6 +280,10 @@ Standard names are defined for the following types: .. versionadded:: 3.9 + .. versionchanged:: 3.9.2 + This type can now be subclassed. + + .. data:: Union The type of :ref:`union type expressions`. diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index c5360f91f51..f795a2e8c1a 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -262,9 +262,10 @@ 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. + * *unsafe*: By default, accessing any attribute with name starting with + *assert*, *assret*, *asert*, *aseert* or *assrt* will raise an + :exc:`AttributeError`. Passing ``unsafe=True`` will allow access to + these attributes. .. versionadded:: 3.5 diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst index a481a3509d4..9c1743cad23 100644 --- a/Doc/library/warnings.rst +++ b/Doc/library/warnings.rst @@ -491,7 +491,7 @@ Available Functions Available Context Managers -------------------------- -.. class:: catch_warnings(\*, record=False, module=None) +.. class:: catch_warnings(*, record=False, module=None) A context manager that copies and, upon exit, restores the warnings filter and the :func:`showwarning` function. diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst index dccb7db27e9..487856a3ac6 100644 --- a/Doc/library/winreg.rst +++ b/Doc/library/winreg.rst @@ -791,7 +791,7 @@ integer handle, and also disconnect the Windows handle from the handle object. .. method:: PyHKEY.__enter__() - PyHKEY.__exit__(\*exc_info) + PyHKEY.__exit__(*exc_info) The HKEY object implements :meth:`~object.__enter__` and :meth:`~object.__exit__` and thus supports the context protocol for the diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst index bf72c46561b..e1cc9679422 100644 --- a/Doc/library/xml.dom.minidom.rst +++ b/Doc/library/xml.dom.minidom.rst @@ -174,7 +174,7 @@ module documentation. This section lists the differences between the API and The :meth:`toxml` method now preserves the attribute order specified by the user. -.. method:: Node.toprettyxml(indent="\\t", newl="\\n", encoding=None, \ +.. method:: Node.toprettyxml(indent="\t", newl="\n", encoding=None, \ standalone=None) Return a pretty-printed version of the document. *indent* specifies the diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 7126d8bd703..3db55e646c4 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -483,7 +483,7 @@ Path Objects Path objects expose the following features of :mod:`pathlib.Path` objects: -Path objects are traversable using the ``/`` operator. +Path objects are traversable using the ``/`` operator or ``joinpath``. .. attribute:: Path.name @@ -532,6 +532,19 @@ Path objects are traversable using the ``/`` operator. Read the current file as bytes. +.. method:: Path.joinpath(*other) + + Return a new Path object with each of the *other* arguments + joined. The following are equivalent:: + + >>> Path(...).joinpath('child').joinpath('grandchild') + >>> Path(...).joinpath('child', 'grandchild') + >>> Path(...) / 'child' / 'grandchild' + + .. versionchanged:: 3.10 + Prior to 3.10, ``joinpath`` was undocumented and accepted + exactly one parameter. + .. _pyzipfile-objects: diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst index 8d579f21c7e..62e1e47e980 100644 --- a/Doc/library/zipimport.rst +++ b/Doc/library/zipimport.rst @@ -121,7 +121,7 @@ zipimporter Objects .. method:: get_code(fullname) Return the code object for the specified module. Raise - :exc:`ZipImportError` if the module couldn't be found. + :exc:`ZipImportError` if the module couldn't be imported. .. method:: get_data(pathname) @@ -137,7 +137,7 @@ zipimporter Objects Return the value ``__file__`` would be set to if the specified module was imported. Raise :exc:`ZipImportError` if the module couldn't be - found. + imported. .. versionadded:: 3.1 @@ -159,14 +159,13 @@ zipimporter Objects .. method:: load_module(fullname) Load the module specified by *fullname*. *fullname* must be the fully - qualified (dotted) module name. It returns the imported module, or raises - :exc:`ZipImportError` if it wasn't found. + qualified (dotted) module name. Returns the imported module on success, + raises :exc:`ZipImportError` on failure. .. deprecated:: 3.10 Use :meth:`exec_module` instead. - .. attribute:: archive The file name of the importer's associated ZIP file, without a possible diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 62986cb1519..5bba3eea6f6 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -254,7 +254,8 @@ present, must be last; it matches any exception. For an except clause with an expression, that expression is evaluated, and the clause matches the exception if the resulting object is "compatible" with the exception. An object is compatible with an exception if it is the class or a base class of the exception -object or a tuple containing an item compatible with the exception. +object, or a tuple containing an item that is the class or a base class of +the exception object. If no except clause matches the exception, the search for an exception handler continues in the surrounding code and on the invocation stack. [#]_ @@ -301,9 +302,27 @@ Before an except clause's suite is executed, details about the exception are stored in the :mod:`sys` module and can be accessed via :func:`sys.exc_info`. :func:`sys.exc_info` returns a 3-tuple consisting of the exception class, the exception instance and a traceback object (see section :ref:`types`) identifying -the point in the program where the exception occurred. :func:`sys.exc_info` -values are restored to their previous values (before the call) when returning -from a function that handled an exception. +the point in the program where the exception occurred. The details about the +exception accessed via :func:`sys.exc_info` are restored to their previous values +when leaving an exception handler:: + + >>> print(sys.exc_info()) + (None, None, None) + >>> try: + ... raise TypeError + ... except: + ... print(sys.exc_info()) + ... try: + ... raise ValueError + ... except: + ... print(sys.exc_info()) + ... print(sys.exc_info()) + ... + (, TypeError(), ) + (, ValueError(), ) + (, TypeError(), ) + >>> print(sys.exc_info()) + (None, None, None) .. index:: keyword: else @@ -796,12 +815,12 @@ The :keyword:`!async for` statement .. productionlist:: python-grammar 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. +An :term:`asynchronous iterable` provides an ``__aiter__`` method that directly +returns an :term:`asynchronous iterator`, which can call asynchronous code in +its ``__anext__`` method. The ``async for`` statement allows convenient iteration over asynchronous -iterators. +iterables. The following code:: diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index c882301ad3a..62f85295362 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -217,7 +217,6 @@ Ellipsis There are two types of integers: Integers (:class:`int`) - These represent numbers in an unlimited range, subject to available (virtual) memory only. For the purpose of shift and mask operations, a binary representation is assumed, and negative numbers are represented in a variant of diff --git a/Doc/reference/grammar.rst b/Doc/reference/grammar.rst index acf83765b57..59b45005836 100644 --- a/Doc/reference/grammar.rst +++ b/Doc/reference/grammar.rst @@ -13,7 +13,8 @@ In particular, ``&`` followed by a symbol, token or parenthesized group indicates a positive lookahead (i.e., is required to match but not consumed), while ``!`` indicates a negative lookahead (i.e., is required _not_ to match). We use the ``|`` separator to mean PEG's -"ordered choice" (written as ``/`` in traditional PEG grammars). +"ordered choice" (written as ``/`` in traditional PEG grammars). See +:pep:`617` for more details on the grammar's syntax. .. literalinclude:: ../../Grammar/python.gram :language: peg diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index f8ab2e918c6..2c6c9014020 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -950,7 +950,7 @@ Names listed in a :keyword:`global` statement must not be used in the same code block textually preceding that :keyword:`!global` statement. Names listed in a :keyword:`global` statement must not be defined as formal -parameters or in a :keyword:`for` loop control target, :keyword:`class` +parameters, or as targets in :keyword:`with` statements or :keyword:`except` clauses, or in a :keyword:`for` target list, :keyword:`class` definition, function definition, :keyword:`import` statement, or variable annotation. diff --git a/Doc/tools/extensions/glossary_search.py b/Doc/tools/extensions/glossary_search.py new file mode 100644 index 00000000000..34d227d6702 --- /dev/null +++ b/Doc/tools/extensions/glossary_search.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +""" + glossary_search.py + ~~~~~~~~~~~~~~~~ + + Feature search results for glossary items prominently. + + :license: Python license. +""" +from os import path +from sphinx.addnodes import glossary +from sphinx.util import logging +from docutils.nodes import definition_list_item +import json + + +logger = logging.getLogger(__name__) + + +def process_glossary_nodes(app, doctree, fromdocname): + if app.builder.format != 'html': + return + + terms = {} + + for node in doctree.traverse(glossary): + for glossary_item in node.traverse(definition_list_item): + term = glossary_item[0].astext().lower() + definition = glossary_item[1] + + rendered = app.builder.render_partial(definition) + terms[term] = { + 'title': glossary_item[0].astext(), + 'body': rendered['html_body'] + } + + if hasattr(app.env, 'glossary_terms'): + app.env.glossary_terms.update(terms) + else: + app.env.glossary_terms = terms + +def on_build_finish(app, exc): + if not hasattr(app.env, 'glossary_terms'): + return + if not app.env.glossary_terms: + return + + logger.info('Writing glossary.json', color='green') + with open(path.join(app.outdir, '_static', 'glossary.json'), 'w') as f: + json.dump(app.env.glossary_terms, f) + + +def setup(app): + app.connect('doctree-resolved', process_glossary_nodes) + app.connect('build-finished', on_build_finish) + + return {'version': '0.1', 'parallel_read_safe': True} diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py index 80fbd96d56f..28994399e25 100644 --- a/Doc/tools/extensions/pyspecific.py +++ b/Doc/tools/extensions/pyspecific.py @@ -394,7 +394,12 @@ class DeprecatedRemoved(Directive): translatable=False) node.append(para) env = self.state.document.settings.env - env.get_domain('changeset').note_changeset(node) + # deprecated pre-Sphinx-2 method + if hasattr(env, 'note_versionchange'): + env.note_versionchange('deprecated', version[0], node, self.lineno) + # new method + else: + env.get_domain('changeset').note_changeset(node) return [node] + messages diff --git a/Doc/tools/rstlint.py b/Doc/tools/rstlint.py index a3024d6734d..cbcb8eb801b 100755 --- a/Doc/tools/rstlint.py +++ b/Doc/tools/rstlint.py @@ -13,6 +13,7 @@ import os import re import sys import getopt +from string import ascii_letters from os.path import join, splitext, abspath, exists from collections import defaultdict @@ -128,6 +129,81 @@ def check_leaked_markup(fn, lines): yield lno+1, 'possibly leaked markup: %r' % line +def hide_literal_blocks(lines): + """Tool to remove literal blocks from given lines. + + It yields empty lines in place of blocks, so line numbers are + still meaningful. + """ + in_block = False + for line in lines: + if line.endswith("::\n"): + in_block = True + elif in_block: + if line == "\n" or line.startswith(" "): + line = "\n" + else: + in_block = False + yield line + + +def type_of_explicit_markup(line): + if re.match(fr'\.\. {all_directives}::', line): + return 'directive' + if re.match(r'\.\. \[[0-9]+\] ', line): + return 'footnote' + if re.match(r'\.\. \[[^\]]+\] ', line): + return 'citation' + if re.match(r'\.\. _.*[^_]: ', line): + return 'target' + if re.match(r'\.\. \|[^\|]*\| ', line): + return 'substitution_definition' + return 'comment' + + +def hide_comments(lines): + """Tool to remove comments from given lines. + + It yields empty lines in place of comments, so line numbers are + still meaningfull. + """ + in_multiline_comment = False + for line in lines: + if line == "..\n": + in_multiline_comment = True + elif in_multiline_comment: + if line == "\n" or line.startswith(" "): + line = "\n" + else: + in_multiline_comment = False + if line.startswith(".. ") and type_of_explicit_markup(line) == 'comment': + line = "\n" + yield line + + + +@checker(".rst", severity=2) +def check_missing_surrogate_space_on_plural(fn, lines): + r"""Check for missing 'backslash-space' between a code sample a letter. + + Good: ``Point``\ s + Bad: ``Point``s + """ + in_code_sample = False + check_next_one = False + for lno, line in enumerate(hide_comments(hide_literal_blocks(lines))): + tokens = line.split("``") + for token_no, token in enumerate(tokens): + if check_next_one: + if token[0] in ascii_letters: + yield lno + 1, f"Missing backslash-space between code sample and {token!r}." + check_next_one = False + if token_no == len(tokens) - 1: + continue + if in_code_sample: + check_next_one = True + in_code_sample = not in_code_sample + def main(argv): usage = '''\ Usage: %s [-v] [-f] [-s sev] [-i path]* [path] diff --git a/Doc/tools/templates/search.html b/Doc/tools/templates/search.html new file mode 100644 index 00000000000..cf20c2e1d4f --- /dev/null +++ b/Doc/tools/templates/search.html @@ -0,0 +1,48 @@ +{% extends "!search.html" %} +{% block extrahead %} + {{ super() }} + +{% endblock %} \ No newline at end of file diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index ff4c797f66c..5c6b65f05e1 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -78,7 +78,7 @@ objects: Return the number of times *x* appears in the list. -.. method:: list.sort(key=None, reverse=False) +.. method:: list.sort(*, key=None, reverse=False) :noindex: Sort the items of the list in place (the arguments can be used for sort diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index efe44da3043..4a25861a050 100644 --- a/Doc/tutorial/errors.rst +++ b/Doc/tutorial/errors.rst @@ -281,17 +281,17 @@ chaining exceptions. For example:: This can be useful when you are transforming exceptions. For example:: >>> def func(): - ... raise IOError + ... raise ConnectionError ... >>> try: ... func() - ... except IOError as exc: + ... except ConnectionError as exc: ... raise RuntimeError('Failed to open database') from exc ... Traceback (most recent call last): File "", line 2, in File "", line 2, in func - OSError + ConnectionError The above exception was the direct cause of the following exception: @@ -300,7 +300,7 @@ This can be useful when you are transforming exceptions. For example:: RuntimeError: Failed to open database Exception chaining happens automatically when an exception is raised inside an -:keyword:`except` or :keyword:`finally` section. Exception chaining can be +:keyword:`except` or :keyword:`finally` section. This can be disabled by using ``from None`` idiom: >>> try: diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst index 366a532e817..4e27cff83ce 100644 --- a/Doc/tutorial/inputoutput.rst +++ b/Doc/tutorial/inputoutput.rst @@ -329,11 +329,16 @@ equivalent :keyword:`try`\ -\ :keyword:`finally` blocks:: If you're not using the :keyword:`with` keyword, then you should call ``f.close()`` to close the file and immediately free up any system -resources used by it. If you don't explicitly close a file, Python's -garbage collector will eventually destroy the object and close the -open file for you, but the file may stay open for a while. Another -risk is that different Python implementations will do this clean-up at -different times. +resources used by it. + +.. warning:: + Calling ``f.write()`` without using the :keyword:`!with` keyword or calling + ``f.close()`` **might** result in the arguments + of ``f.write()`` not being completely written to the disk, even if the + program exits successfully. + +.. + See also https://bugs.python.org/issue17852 After a file object is closed, either by a :keyword:`with` statement or by calling ``f.close()``, attempts to use the file object will diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index 78c1e03f746..265c07c7099 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -23,8 +23,8 @@ available for application-local distributions. 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 |version| supports Windows Vista and newer. If you require Windows XP -support then please install Python 3.4. +Python |version| supports Windows 8.1 and newer. If you require Windows 7 +support, please install Python 3.8. There are a number of different installers available for Windows, each with certain benefits and downsides. diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index f96a3bcbca9..aa547ff4648 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -179,6 +179,21 @@ codecs Add a :func:`codecs.unregister` function to unregister a codec search function. (Contributed by Hai Shi in :issue:`41842`.) +collections.abc +--------------- + +The ``__args__`` of the :ref:`parameterized generic ` for +:class:`collections.abc.Callable` are now consistent with :data:`typing.Callable`. +:class:`collections.abc.Callable` generic now flattens type parameters, similar +to what :data:`typing.Callable` currently does. This means that +``collections.abc.Callable[[int, str], str]`` will have ``__args__`` of +``(int, str, str)``; previously this was ``([int, str], str)``. To allow this +change, :class:`types.GenericAlias` can now be subclassed, and a subclass will +be returned when subscripting the :class:`collections.abc.Callable` type. Note +that a :exc:`TypeError` may be raised for invalid forms of parameterizing +:class:`collections.abc.Callable` which may have passed silently in Python 3.9. +(Contributed by Ken Jin in :issue:`42195`.) + contextlib ---------- @@ -223,6 +238,11 @@ inspect When a module does not define ``__loader__``, fall back to ``__spec__.loader``. (Contributed by Brett Cannon in :issue:`42133`.) +Added *globalns* and *localns* parameters in :func:`~inspect.signature` and +:meth:`inspect.Signature.from_callable` to retrieve the annotations in given +local and global namespaces. +(Contributed by Batuhan Taskaya in :issue:`41960`.) + linecache --------- @@ -254,6 +274,14 @@ Added negative indexing support to :attr:`PurePath.parents `. (Contributed by Yaroslav Pankovych in :issue:`21041`) +platform +-------- + +Added :func:`platform.freedesktop_os_release()` to retrieve operation system +identification from `freedesktop.org os-release +`_ standard file. +(Contributed by Christian Heimes in :issue:`28468`) + py_compile ---------- @@ -386,7 +414,8 @@ Optimizations with ``gcc`` by up to 30%. See `this article `_ for more details. (Contributed by Victor Stinner and Pablo Galindo in - :issue:`38980`) + :issue:`38980`.) + * Function parameters and their annotations are no longer computed at runtime, but rather at compilation time. They are stored as a tuple of strings at the @@ -413,6 +442,21 @@ Deprecated as appropriate to help identify code which needs updating during this transition. +* The various ``load_module()`` methods of :mod:`importlib` have been + documented as deprecated since Python 3.6, but will now also trigger + a :exc:`DeprecationWarning`. Use + :meth:`~importlib.abc.Loader.exec_module` instead. + (Contributed by Brett Cannon in :issue:`26131`.) + +* :meth:`zimport.zipimporter.load_module` has been deprecated in + preference for :meth:`~zipimport.zipimporter.exec_module`. + (Contributed by Brett Cannon in :issue:`26131`.) + +* The use of :meth:`~importlib.abc.Loader.load_module` by the import + system now triggers an :exc:`ImportWarning` as + :meth:`~importlib.abc.Loader.exec_module` is preferred. + (Contributed by Brett Cannon in :issue:`26131`.) + * ``sqlite3.OptimizedUnicode`` has been undocumented and obsolete since Python 3.3, when it was made an alias to :class:`str`. It is now deprecated, scheduled for removal in Python 3.12. @@ -456,6 +500,11 @@ Removed into their code. (Contributed by Dong-hee Na and Terry J. Reedy in :issue:`42299`.) +* Removed the :c:func:`PyModule_GetWarningsModule` function that was useless + now due to the _warnings module was converted to a builtin module in 2.6. + (Contributed by Hai Shi in :issue:`42599`.) + + Porting to Python 3.10 ====================== @@ -472,6 +521,28 @@ Changes in the Python API have been renamed to *exc*. (Contributed by Zackery Spytz and Matthias Bussonnier in :issue:`26389`.) +* :mod:`atexit`: At Python exit, if a callback registered with + :func:`atexit.register` fails, its exception is now logged. Previously, only + some exceptions were logged, and the last exception was always silently + ignored. + (Contributed by Victor Stinner in :issue:`42639`.) + +* :class:`collections.abc.Callable` generic now flattens type parameters, similar + to what :data:`typing.Callable` currently does. This means that + ``collections.abc.Callable[[int, str], str]`` will have ``__args__`` of + ``(int, str, str)``; previously this was ``([int, str], str)``. Code which + accesses the arguments via :func:`typing.get_args` or ``__args__`` need to account + for this change. Furthermore, :exc:`TypeError` may be raised for invalid forms + of parameterizing :class:`collections.abc.Callable` which may have passed + silently in Python 3.9. + (Contributed by Ken Jin in :issue:`42195`.) + +* :meth:`socket.htons` and :meth:`socket.ntohs` now raise :exc:`OverflowError` + instead of :exc:`DeprecationWarning` if the given parameter will not fit in + a 16-bit unsigned integer. + (Contributed by Erlend E. Aasland in :issue:`42393`.) + + CPython bytecode changes ======================== @@ -490,6 +561,12 @@ Build Changes * :mod:`sqlite3` requires SQLite 3.7.3 or higher. (Contributed by Sergey Fedoseev and Erlend E. Aasland :issue:`40744`.) +* The :mod:`atexit` module must now always be built as a built-in module. + (Contributed by Victor Stinner in :issue:`42639`.) + +* Added ``--disable-test-modules`` option to the ``configure`` script: + don't build nor install test modules. + (Contributed by Xavier de Gaye, Thomas Petazzoni and Peixing Xin in :issue:`27640`.) C API Changes @@ -587,6 +664,13 @@ Porting to Python 3.10 :ref:`Python Path Configuration. `. (Contributed by Victor Stinner in :issue:`42260`.) +* :c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and + :c:func:`PyCell_SET` macros can no longer be used as l-value or r-value. + For example, ``x = PyList_SET_ITEM(a, b, c)`` and + ``PyList_SET_ITEM(a, b, c) = x`` now fail with a compiler error. It prevents + bugs like ``if (PyList_SET_ITEM (a, b, c) < 0) ...`` test. + (Contributed by Zackery Spytz and Victor Stinner in :issue:`30459`.) + Deprecated ---------- diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index 6a9fa341569..0b4820f3333 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -2113,9 +2113,6 @@ Changes in the C API (Contributed by Antoine Pitrou in :issue:`32388`.) -* The :c:func:`PyCode_New` has a new parameter in the second position (*posonlyargcount*) - to support :pep:`570`, indicating the number of positional-only arguments. - * The functions :c:func:`PyNode_AddChild` and :c:func:`PyParser_AddToken` now accept two additional ``int`` arguments *end_lineno* and *end_col_offset*. diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index a638e544cb3..b94f1bfaddf 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -1482,4 +1482,37 @@ and to match the behavior of static type checkers specified in the PEP. File "", line 1, in TypeError: unhashable type: 'set' -(Contributed by Yurii Karabas in :issue:`42345`.) \ No newline at end of file +(Contributed by Yurii Karabas in :issue:`42345`.) + +macOS 11.0 (Big Sur) and Apple Silicon Mac support +-------------------------------------------------- + +As of 3.9.1, Python now fully supports building and running on macOS 11.0 +(Big Sur) and on Apple Silicon Macs (based on the ``ARM64`` architecture). +A new universal build variant, ``universal2``, is now available to natively +support both ``ARM64`` and ``Intel 64`` in one set of executables. Binaries +can also now be built on current versions of macOS to be deployed on a range +of older macOS versions (tested to 10.9) while making some newer OS +functions and options conditionally available based on the operating system +version in use at runtime ("weaklinking"). + +(Contributed by Ronald Oussoren and Lawrence D'Anna in :issue:`41100`.) + +Notable changes in Python 3.9.2 +=============================== + +collections.abc +--------------- + +:class:`collections.abc.Callable` generic now flattens type parameters, similar +to what :data:`typing.Callable` currently does. This means that +``collections.abc.Callable[[int, str], str]`` will have ``__args__`` of +``(int, str, str)``; previously this was ``([int, str], str)``. To allow this +change, :class:`types.GenericAlias` can now be subclassed, and a subclass will +be returned when subscripting the :class:`collections.abc.Callable` type. +Code which accesses the arguments via :func:`typing.get_args` or ``__args__`` +need to account for this change. A :exc:`DeprecationWarning` may be emitted for +invalid forms of parameterizing :class:`collections.abc.Callable` which may have +passed silently in Python 3.9.1. This :exc:`DeprecationWarning` will +become a :exc:`TypeError` in Python 3.10. +(Contributed by Ken Jin in :issue:`42195`.) \ No newline at end of file diff --git a/Grammar/python.gram b/Grammar/python.gram index 9e915acf5db..4915cc43e84 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -52,18 +52,18 @@ type_expressions[asdl_expr_seq*]: | a[asdl_expr_seq*]=','.expression+ {a} statements[asdl_stmt_seq*]: a=statement+ { (asdl_stmt_seq*)_PyPegen_seq_flatten(p, a) } -statement[asdl_stmt_seq*]: a=compound_stmt { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } | a[asdl_stmt_seq*]=simple_stmt { a } +statement[asdl_stmt_seq*]: a=compound_stmt { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } | a[asdl_stmt_seq*]=simple_stmts { a } statement_newline[asdl_stmt_seq*]: | a=compound_stmt NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } - | simple_stmt + | simple_stmts | NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, CHECK(stmt_ty, _Py_Pass(EXTRA))) } | ENDMARKER { _PyPegen_interactive_exit(p) } -simple_stmt[asdl_stmt_seq*]: - | a=small_stmt !';' NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } # Not needed, there for speedup - | a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a } +simple_stmts[asdl_stmt_seq*]: + | a=simple_stmt !';' NEWLINE { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) } # Not needed, there for speedup + | a[asdl_stmt_seq*]=';'.simple_stmt+ [';'] NEWLINE { a } # NOTE: assignment MUST precede expression, else parsing a simple assignment # will throw a SyntaxError. -small_stmt[stmt_ty] (memo): +simple_stmt[stmt_ty] (memo): | assignment | e=star_expressions { _Py_Expr(e, EXTRA) } | &'return' return_stmt @@ -308,7 +308,7 @@ class_def_raw[stmt_ty]: block[asdl_stmt_seq*] (memo): | NEWLINE INDENT a=statements DEDENT { a } - | simple_stmt + | simple_stmts | invalid_block star_expressions[expr_ty]: @@ -646,7 +646,7 @@ invalid_arguments: RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "Generator expression must be parenthesized") } | a=args ',' args { _PyPegen_arguments_parsing_error(p, a) } invalid_kwarg: - | a=expression '=' { + | expression a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION( a, "expression cannot contain assignment, perhaps you meant \"==\"?") } invalid_named_expression: diff --git a/Include/bytesobject.h b/Include/bytesobject.h index 5062d8d123a..39c241a2dcf 100644 --- a/Include/bytesobject.h +++ b/Include/bytesobject.h @@ -1,5 +1,5 @@ -/* Bytes (String) object interface */ +/* Bytes object interface */ #ifndef Py_BYTESOBJECT_H #define Py_BYTESOBJECT_H @@ -10,23 +10,20 @@ extern "C" { #include /* -Type PyBytesObject represents a character string. An extra zero byte is +Type PyBytesObject represents a byte string. An extra zero byte is reserved at the end to ensure it is zero-terminated, but a size is present so strings with null bytes in them can be represented. This is an immutable object type. -There are functions to create new string objects, to test -an object for string-ness, and to get the -string value. The latter function returns a null pointer +There are functions to create new bytes objects, to test +an object for bytes-ness, and to get the +byte string value. The latter function returns a null pointer if the object is not of the proper type. There is a variant that takes an explicit size as well as a variant that assumes a zero-terminated string. Note that none of the -functions should be applied to nil objects. +functions should be applied to NULL pointer. */ -/* Caching the hash (ob_shash) saves recalculation of a string's hash value. - This significantly speeds up dict lookups. */ - PyAPI_DATA(PyTypeObject) PyBytes_Type; PyAPI_DATA(PyTypeObject) PyBytesIter_Type; @@ -50,26 +47,16 @@ PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t, const char *, Py_ssize_t, const char *); -/* Provides access to the internal data buffer and size of a string - 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 +/* Provides access to the internal data buffer and size of a bytes object. + Passing NULL as len parameter will force the string buffer to be + 0-terminated (passing a string with embedded NUL characters will cause an exception). */ PyAPI_FUNC(int) PyBytes_AsStringAndSize( - PyObject *obj, /* string or Unicode object */ + PyObject *obj, /* bytes object */ char **s, /* pointer to buffer variable */ - Py_ssize_t *len /* pointer to length variable or NULL - (only possible for 0-terminated - strings) */ + Py_ssize_t *len /* pointer to length variable or NULL */ ); -/* Flags used by string formatting */ -#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) - #ifndef Py_LIMITED_API # define Py_CPYTHON_BYTESOBJECT_H # include "cpython/bytesobject.h" diff --git a/Include/cellobject.h b/Include/cellobject.h index f12aa90a42a..81bc784d36f 100644 --- a/Include/cellobject.h +++ b/Include/cellobject.h @@ -20,7 +20,7 @@ PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref) -#define PyCell_SET(op, v) (((PyCellObject *)(op))->ob_ref = v) +#define PyCell_SET(op, v) ((void)(((PyCellObject *)(op))->ob_ref = v)) #ifdef __cplusplus } diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index b5b6e481978..1083942c149 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -63,7 +63,7 @@ PyVectorcall_Function(PyObject *callable) { PyTypeObject *tp; Py_ssize_t offset; - vectorcallfunc *ptr; + vectorcallfunc ptr; assert(callable != NULL); tp = Py_TYPE(callable); @@ -73,8 +73,8 @@ PyVectorcall_Function(PyObject *callable) assert(PyCallable_Check(callable)); offset = tp->tp_vectorcall_offset; assert(offset > 0); - ptr = (vectorcallfunc *)(((char *)callable) + offset); - return *ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; } /* Call the callable object 'callable' with the "vectorcall" calling diff --git a/Include/cpython/bytesobject.h b/Include/cpython/bytesobject.h index f284c5835df..6b3f55224fc 100644 --- a/Include/cpython/bytesobject.h +++ b/Include/cpython/bytesobject.h @@ -10,7 +10,7 @@ typedef struct { /* Invariants: * ob_sval contains space for 'ob_size+1' elements. * ob_sval[ob_size] == 0. - * ob_shash is the hash of the string or -1 if not computed yet. + * ob_shash is the hash of the byte string or -1 if not computed yet. */ } PyBytesObject; diff --git a/Include/cpython/fileutils.h b/Include/cpython/fileutils.h index e79d03e24f5..312fd958284 100644 --- a/Include/cpython/fileutils.h +++ b/Include/cpython/fileutils.h @@ -95,10 +95,6 @@ PyAPI_FUNC(FILE *) _Py_wfopen( const wchar_t *path, const wchar_t *mode); -PyAPI_FUNC(FILE*) _Py_fopen( - const char *pathname, - const char *mode); - PyAPI_FUNC(FILE*) _Py_fopen_obj( PyObject *path, const char *mode); diff --git a/Include/cpython/listobject.h b/Include/cpython/listobject.h index e1b9462d5b3..e3239152c49 100644 --- a/Include/cpython/listobject.h +++ b/Include/cpython/listobject.h @@ -30,5 +30,5 @@ PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out); #define _PyList_CAST(op) (assert(PyList_Check(op)), (PyListObject *)(op)) #define PyList_GET_ITEM(op, i) (_PyList_CAST(op)->ob_item[i]) -#define PyList_SET_ITEM(op, i, v) (_PyList_CAST(op)->ob_item[i] = (v)) +#define PyList_SET_ITEM(op, i, v) ((void)(_PyList_CAST(op)->ob_item[i] = (v))) #define PyList_GET_SIZE(op) Py_SIZE(_PyList_CAST(op)) diff --git a/Include/cpython/object.h b/Include/cpython/object.h index 19c066b0ab7..86889f85768 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -35,12 +35,13 @@ PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void); _PyObject_{Get,Set,Has}AttrId are __getattr__ versions using _Py_Identifier*. */ typedef struct _Py_Identifier { - struct _Py_Identifier *next; const char* string; - PyObject *object; + // Index in PyInterpreterState.unicode.ids.array. It is process-wide + // unique and must be initialized to -1. + Py_ssize_t index; } _Py_Identifier; -#define _Py_static_string_init(value) { .next = NULL, .string = value, .object = NULL } +#define _Py_static_string_init(value) { .string = value, .index = -1 } #define _Py_static_string(varname, value) static _Py_Identifier varname = _Py_static_string_init(value) #define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname) diff --git a/Include/cpython/pylifecycle.h b/Include/cpython/pylifecycle.h index f38ec5a4ae3..13f7a26ba12 100644 --- a/Include/cpython/pylifecycle.h +++ b/Include/cpython/pylifecycle.h @@ -35,15 +35,11 @@ PyAPI_FUNC(int) Py_RunMain(void); PyAPI_FUNC(void) _Py_NO_RETURN Py_ExitStatusException(PyStatus err); -/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level - * exit functions. - */ -PyAPI_FUNC(void) _Py_PyAtExit(void (*func)(PyObject *), PyObject *); - /* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */ PyAPI_FUNC(void) _Py_RestoreSignals(void); PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *); +PyAPI_FUNC(int) _Py_FdIsInteractive(FILE *fp, PyObject *filename); PyAPI_FUNC(void) _Py_SetProgramFullPath(const wchar_t *); diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index 0e6cc290912..cfaee890f97 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -54,8 +54,7 @@ struct _ts { /* Borrowed reference to the current frame (it can be NULL) */ PyFrameObject *frame; int recursion_depth; - char overflowed; /* The stack has overflowed. Allow 50 more calls - to handle the runtime error. */ + int recursion_headroom; /* Allow 50 more calls to handle any errors. */ int stackcheck_counter; /* 'tracing' keeps track of the execution depth when tracing/profiling. diff --git a/Include/cpython/pythonrun.h b/Include/cpython/pythonrun.h new file mode 100644 index 00000000000..e396a674bc4 --- /dev/null +++ b/Include/cpython/pythonrun.h @@ -0,0 +1,131 @@ +#ifndef Py_CPYTHON_PYTHONRUN_H +# error "this header file must not be included directly" +#endif + +PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); +PyAPI_FUNC(int) _PyRun_SimpleFileObject( + FILE *fp, + PyObject *filename, + int closeit, + PyCompilerFlags *flags); +PyAPI_FUNC(int) PyRun_AnyFileExFlags( + FILE *fp, + const char *filename, /* decoded from the filesystem encoding */ + int closeit, + PyCompilerFlags *flags); +PyAPI_FUNC(int) _PyRun_AnyFileObject( + FILE *fp, + PyObject *filename, + int closeit, + PyCompilerFlags *flags); +PyAPI_FUNC(int) PyRun_SimpleFileExFlags( + FILE *fp, + const char *filename, /* decoded from the filesystem encoding */ + int closeit, + PyCompilerFlags *flags); +PyAPI_FUNC(int) PyRun_InteractiveOneFlags( + FILE *fp, + const char *filename, /* decoded from the filesystem encoding */ + PyCompilerFlags *flags); +PyAPI_FUNC(int) PyRun_InteractiveOneObject( + FILE *fp, + PyObject *filename, + PyCompilerFlags *flags); +PyAPI_FUNC(int) PyRun_InteractiveLoopFlags( + FILE *fp, + const char *filename, /* decoded from the filesystem encoding */ + PyCompilerFlags *flags); +PyAPI_FUNC(int) _PyRun_InteractiveLoopObject( + FILE *fp, + PyObject *filename, + PyCompilerFlags *flags); + + +PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *, + PyObject *, PyCompilerFlags *); + +PyAPI_FUNC(PyObject *) PyRun_FileExFlags( + FILE *fp, + const char *filename, /* decoded from the filesystem encoding */ + int start, + PyObject *globals, + PyObject *locals, + int closeit, + PyCompilerFlags *flags); + + +PyAPI_FUNC(PyObject *) Py_CompileStringExFlags( + const char *str, + const char *filename, /* decoded from the filesystem encoding */ + int start, + PyCompilerFlags *flags, + int optimize); +PyAPI_FUNC(PyObject *) Py_CompileStringObject( + const char *str, + PyObject *filename, int start, + PyCompilerFlags *flags, + int optimize); + +#define Py_CompileString(str, p, s) Py_CompileStringExFlags(str, p, s, NULL, -1) +#define Py_CompileStringFlags(str, p, s, f) Py_CompileStringExFlags(str, p, s, f, -1) + + +PyAPI_FUNC(const char *) _Py_SourceAsString( + PyObject *cmd, + const char *funcname, + const char *what, + PyCompilerFlags *cf, + PyObject **cmd_copy); + +PyAPI_FUNC(struct symtable *) Py_SymtableStringObject( + const char *str, + PyObject *filename, + int start); + +PyAPI_FUNC(struct symtable *) _Py_SymtableStringObjectFlags( + const char *str, + PyObject *filename, + int start, + PyCompilerFlags *flags); + + +/* A function flavor is also exported by libpython. It is required when + libpython is accessed directly rather than using header files which defines + macros below. On Windows, for example, PyAPI_FUNC() uses dllexport to + export functions in pythonXX.dll. */ +PyAPI_FUNC(PyObject *) PyRun_String(const char *str, int s, PyObject *g, PyObject *l); +PyAPI_FUNC(int) PyRun_AnyFile(FILE *fp, const char *name); +PyAPI_FUNC(int) PyRun_AnyFileEx(FILE *fp, const char *name, int closeit); +PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); +PyAPI_FUNC(int) PyRun_SimpleString(const char *s); +PyAPI_FUNC(int) PyRun_SimpleFile(FILE *f, const char *p); +PyAPI_FUNC(int) PyRun_SimpleFileEx(FILE *f, const char *p, int c); +PyAPI_FUNC(int) PyRun_InteractiveOne(FILE *f, const char *p); +PyAPI_FUNC(int) PyRun_InteractiveLoop(FILE *f, const char *p); +PyAPI_FUNC(PyObject *) PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l); +PyAPI_FUNC(PyObject *) PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c); +PyAPI_FUNC(PyObject *) PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, PyCompilerFlags *flags); + +/* Use macros for a bunch of old variants */ +#define PyRun_String(str, s, g, l) PyRun_StringFlags(str, s, g, l, NULL) +#define PyRun_AnyFile(fp, name) PyRun_AnyFileExFlags(fp, name, 0, NULL) +#define PyRun_AnyFileEx(fp, name, closeit) \ + PyRun_AnyFileExFlags(fp, name, closeit, NULL) +#define PyRun_AnyFileFlags(fp, name, flags) \ + PyRun_AnyFileExFlags(fp, name, 0, flags) +#define PyRun_SimpleString(s) PyRun_SimpleStringFlags(s, NULL) +#define PyRun_SimpleFile(f, p) PyRun_SimpleFileExFlags(f, p, 0, NULL) +#define PyRun_SimpleFileEx(f, p, c) PyRun_SimpleFileExFlags(f, p, c, NULL) +#define PyRun_InteractiveOne(f, p) PyRun_InteractiveOneFlags(f, p, NULL) +#define PyRun_InteractiveLoop(f, p) PyRun_InteractiveLoopFlags(f, p, NULL) +#define PyRun_File(fp, p, s, g, l) \ + PyRun_FileExFlags(fp, p, s, g, l, 0, NULL) +#define PyRun_FileEx(fp, p, s, g, l, c) \ + PyRun_FileExFlags(fp, p, s, g, l, c, NULL) +#define PyRun_FileFlags(fp, p, s, g, l, flags) \ + PyRun_FileExFlags(fp, p, s, g, l, 0, flags) + + +/* Stuff with no proper home (yet) */ +PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, const char *); +PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState; diff --git a/Include/cpython/tupleobject.h b/Include/cpython/tupleobject.h index 51dcd4237be..7cada8848c4 100644 --- a/Include/cpython/tupleobject.h +++ b/Include/cpython/tupleobject.h @@ -23,6 +23,6 @@ PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *); #define PyTuple_GET_ITEM(op, i) (_PyTuple_CAST(op)->ob_item[i]) /* Macro, *only* to be used to fill in brand new tuples */ -#define PyTuple_SET_ITEM(op, i, v) (_PyTuple_CAST(op)->ob_item[i] = v) +#define PyTuple_SET_ITEM(op, i, v) ((void)(_PyTuple_CAST(op)->ob_item[i] = v)) PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out); diff --git a/Include/internal/pycore_atomic.h b/Include/internal/pycore_atomic.h index 1d5c5621677..3d42e54464c 100644 --- a/Include/internal/pycore_atomic.h +++ b/Include/internal/pycore_atomic.h @@ -11,8 +11,8 @@ extern "C" { #include "dynamic_annotations.h" /* _Py_ANNOTATE_MEMORY_ORDER */ #include "pyconfig.h" -#if defined(HAVE_STD_ATOMIC) -#include +#ifdef HAVE_STD_ATOMIC +# include #endif @@ -62,7 +62,7 @@ typedef struct _Py_atomic_int { #define _Py_atomic_load_explicit(ATOMIC_VAL, ORDER) \ atomic_load_explicit(&((ATOMIC_VAL)->_value), ORDER) -/* Use builtin atomic operations in GCC >= 4.7 */ +// Use builtin atomic operations in GCC >= 4.7 and clang #elif defined(HAVE_BUILTIN_ATOMIC) typedef enum _Py_memory_order { diff --git a/Include/internal/pycore_atomic_funcs.h b/Include/internal/pycore_atomic_funcs.h new file mode 100644 index 00000000000..a708789cea7 --- /dev/null +++ b/Include/internal/pycore_atomic_funcs.h @@ -0,0 +1,94 @@ +/* Atomic functions: similar to pycore_atomic.h, but don't need + to declare variables as atomic. + + Py_ssize_t type: + + * value = _Py_atomic_size_get(&var) + * _Py_atomic_size_set(&var, value) + + Use sequentially-consistent ordering (__ATOMIC_SEQ_CST memory order): + enforce total ordering with all other atomic functions. +*/ +#ifndef Py_ATOMIC_FUNC_H +#define Py_ATOMIC_FUNC_H +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef Py_BUILD_CORE +# error "this header requires Py_BUILD_CORE define" +#endif + +#if defined(_MSC_VER) +# include // _InterlockedExchange() +#endif + + +// Use builtin atomic operations in GCC >= 4.7 and clang +#ifdef HAVE_BUILTIN_ATOMIC + +static inline Py_ssize_t _Py_atomic_size_get(Py_ssize_t *var) +{ + return __atomic_load_n(var, __ATOMIC_SEQ_CST); +} + +static inline void _Py_atomic_size_set(Py_ssize_t *var, Py_ssize_t value) +{ + __atomic_store_n(var, value, __ATOMIC_SEQ_CST); +} + +#elif defined(_MSC_VER) + +static inline Py_ssize_t _Py_atomic_size_get(Py_ssize_t *var) +{ +#if SIZEOF_VOID_P == 8 + Py_BUILD_ASSERT(sizeof(__int64) == sizeof(*var)); + volatile __int64 *volatile_var = (volatile __int64 *)var; + __int64 old; + do { + old = *volatile_var; + } while(_InterlockedCompareExchange64(volatile_var, old, old) != old); +#else + Py_BUILD_ASSERT(sizeof(long) == sizeof(*var)); + volatile long *volatile_var = (volatile long *)var; + long old; + do { + old = *volatile_var; + } while(_InterlockedCompareExchange(volatile_var, old, old) != old); +#endif + return old; +} + +static inline void _Py_atomic_size_set(Py_ssize_t *var, Py_ssize_t value) +{ +#if SIZEOF_VOID_P == 8 + Py_BUILD_ASSERT(sizeof(__int64) == sizeof(*var)); + volatile __int64 *volatile_var = (volatile __int64 *)var; + _InterlockedExchange64(volatile_var, value); +#else + Py_BUILD_ASSERT(sizeof(long) == sizeof(*var)); + volatile long *volatile_var = (volatile long *)var; + _InterlockedExchange(volatile_var, value); +#endif +} + +#else +// Fallback implementation using volatile + +static inline Py_ssize_t _Py_atomic_size_get(Py_ssize_t *var) +{ + volatile Py_ssize_t *volatile_var = (volatile Py_ssize_t *)var; + return *volatile_var; +} + +static inline void _Py_atomic_size_set(Py_ssize_t *var, Py_ssize_t value) +{ + volatile Py_ssize_t *volatile_var = (volatile Py_ssize_t *)var; + *volatile_var = value; +} +#endif + +#ifdef __cplusplus +} +#endif +#endif /* Py_ATOMIC_FUNC_H */ diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h index bbb667ea32d..38fd681f20c 100644 --- a/Include/internal/pycore_ceval.h +++ b/Include/internal/pycore_ceval.h @@ -92,24 +92,8 @@ static inline int _Py_EnterRecursiveCall_inline(const char *where) { #define Py_EnterRecursiveCall(where) _Py_EnterRecursiveCall_inline(where) -/* 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. */ -static inline int _Py_RecursionLimitLowerWaterMark(int limit) { - if (limit > 200) { - return (limit - 50); - } - else { - return (3 * (limit >> 2)); - } -} - static inline void _Py_LeaveRecursiveCall(PyThreadState *tstate) { tstate->recursion_depth--; - int limit = tstate->interp->ceval.recursion_limit; - if (tstate->recursion_depth < _Py_RecursionLimitLowerWaterMark(limit)) { - tstate->overflowed = 0; - } } static inline void _Py_LeaveRecursiveCall_inline(void) { diff --git a/Include/internal/pycore_format.h b/Include/internal/pycore_format.h new file mode 100644 index 00000000000..1b8d57539ca --- /dev/null +++ b/Include/internal/pycore_format.h @@ -0,0 +1,27 @@ +#ifndef Py_INTERNAL_FORMAT_H +#define Py_INTERNAL_FORMAT_H +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef Py_BUILD_CORE +# error "this header requires Py_BUILD_CORE define" +#endif + +/* 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) + +#ifdef __cplusplus +} +#endif +#endif /* !Py_INTERNAL_FORMAT_H */ diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h index 184878ce146..58b11267126 100644 --- a/Include/internal/pycore_interp.h +++ b/Include/internal/pycore_interp.h @@ -64,6 +64,11 @@ struct _Py_bytes_state { PyBytesObject *characters[256]; }; +struct _Py_unicode_ids { + Py_ssize_t size; + PyObject **array; +}; + struct _Py_unicode_state { // The empty Unicode object is a singleton to improve performance. PyObject *empty_string; @@ -71,6 +76,19 @@ struct _Py_unicode_state { shared as well. */ PyObject *latin1[256]; struct _Py_unicode_fs_codec fs_codec; + + /* This dictionary holds all interned unicode strings. Note that references + to strings in this dictionary are *not* counted in the string's ob_refcnt. + When the interned string reaches a refcnt of 0 the string deallocation + function will delete the reference from this dictionary. + + Another way to look at this is that to say that the actual reference + count of a string is: s->ob_refcnt + (s->state ? 2 : 0) + */ + PyObject *interned; + + // Unicode identifiers (_Py_Identifier): see _PyUnicode_FromId() + struct _Py_unicode_ids ids; }; struct _Py_float_state { @@ -159,6 +177,41 @@ struct _Py_exc_state { }; +// atexit state +typedef struct { + PyObject *func; + PyObject *args; + PyObject *kwargs; +} atexit_callback; + +struct atexit_state { + atexit_callback **callbacks; + int ncallbacks; + int callback_len; +}; + + +// Type attribute lookup cache: speed up attribute and method lookups, +// see _PyType_Lookup(). +struct type_cache_entry { + unsigned int version; // initialized from type->tp_version_tag + PyObject *name; // reference to exactly a str or None + PyObject *value; // borrowed reference or NULL +}; + +#define MCACHE_SIZE_EXP 12 +#define MCACHE_STATS 0 + +struct type_cache { + struct type_cache_entry hashtable[1 << MCACHE_SIZE_EXP]; +#if MCACHE_STATS + size_t hits; + size_t misses; + size_t collisions; +#endif +}; + + /* interpreter state */ #define _PY_NSMALLPOSINTS 257 @@ -233,13 +286,11 @@ struct _is { PyObject *after_forkers_parent; PyObject *after_forkers_child; #endif - /* AtExit module */ - void (*pyexitfunc)(PyObject *); - PyObject *pyexitmodule; uint64_t tstate_next_unique_id; struct _warnings_runtime_state warnings; + struct atexit_state atexit; PyObject *audit_hooks; @@ -265,6 +316,7 @@ struct _is { struct _Py_exc_state exc_state; struct ast_state ast; + struct type_cache type_cache; }; extern void _PyInterpreterState_ClearModules(PyInterpreterState *interp); diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index edd0031c3ef..3975765a46c 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -27,6 +27,9 @@ _PyType_HasFeature(PyTypeObject *type, unsigned long feature) { return ((type->tp_flags & feature) != 0); } +extern void _PyType_InitCache(PyInterpreterState *interp); + + /* Inline functions trading binary compatibility for speed: _PyObject_Init() is the fast version of PyObject_Init(), and _PyObject_InitVar() is the fast version of PyObject_InitVar(). diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h index b691e632578..c9e6947ae6c 100644 --- a/Include/internal/pycore_pylifecycle.h +++ b/Include/internal/pycore_pylifecycle.h @@ -55,6 +55,7 @@ extern PyStatus _PyTypes_Init(void); extern PyStatus _PyTypes_InitSlotDefs(void); extern PyStatus _PyImportZip_Init(PyThreadState *tstate); extern PyStatus _PyGC_Init(PyThreadState *tstate); +extern PyStatus _PyAtExit_Init(PyThreadState *tstate); /* Various internal finalizers */ @@ -75,7 +76,7 @@ extern void _PyExc_Fini(PyThreadState *tstate); extern void _PyImport_Fini(void); extern void _PyImport_Fini2(void); extern void _PyGC_Fini(PyThreadState *tstate); -extern void _PyType_Fini(void); +extern void _PyType_Fini(PyThreadState *tstate); extern void _Py_HashRandomization_Fini(void); extern void _PyUnicode_Fini(PyThreadState *tstate); extern void _PyUnicode_ClearInterned(PyThreadState *tstate); @@ -85,6 +86,7 @@ extern void _PyHash_Fini(void); extern void _PyTraceMalloc_Fini(void); extern void _PyWarnings_Fini(PyInterpreterState *interp); extern void _PyAST_Fini(PyInterpreterState *interp); +extern void _PyAtExit_Fini(PyInterpreterState *interp); extern PyStatus _PyGILState_Init(PyThreadState *tstate); extern void _PyGILState_Fini(PyThreadState *tstate); @@ -109,6 +111,8 @@ PyAPI_FUNC(void) _PyErr_Display(PyObject *file, PyObject *exception, PyAPI_FUNC(void) _PyThreadState_DeleteCurrent(PyThreadState *tstate); +extern void _PyAtExit_Call(PyThreadState *tstate); + #ifdef __cplusplus } #endif diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h index 3a01d64e63d..8c54abbb069 100644 --- a/Include/internal/pycore_runtime.h +++ b/Include/internal/pycore_runtime.h @@ -49,6 +49,11 @@ typedef struct _Py_AuditHookEntry { void *userData; } _Py_AuditHookEntry; +struct _Py_unicode_runtime_ids { + PyThread_type_lock lock; + Py_ssize_t next_index; +}; + /* Full Python runtime state */ typedef struct pyruntimestate { @@ -106,6 +111,8 @@ typedef struct pyruntimestate { void *open_code_userdata; _Py_AuditHookEntry *audit_hook_head; + struct _Py_unicode_runtime_ids unicode_ids; + // XXX Consolidate globals found via the check-c-globals script. } _PyRuntimeState; diff --git a/Include/object.h b/Include/object.h index f68423a09c4..8d0039428e7 100644 --- a/Include/object.h +++ b/Include/object.h @@ -426,7 +426,6 @@ static inline void _Py_INCREF(PyObject *op) #endif op->ob_refcnt++; } - #define Py_INCREF(op) _Py_INCREF(_PyObject_CAST(op)) static inline void _Py_DECREF( @@ -449,7 +448,6 @@ static inline void _Py_DECREF( _Py_Dealloc(op); } } - #ifdef Py_REF_DEBUG # define Py_DECREF(op) _Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op)) #else @@ -548,8 +546,8 @@ static inline PyObject* _Py_XNewRef(PyObject *obj) // Py_NewRef() and Py_XNewRef() are exported as functions for the stable ABI. // Names overriden with macros by static inline functions for best // performances. -#define Py_NewRef(obj) _Py_NewRef(obj) -#define Py_XNewRef(obj) _Py_XNewRef(obj) +#define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) +#define Py_XNewRef(obj) _Py_XNewRef(_PyObject_CAST(obj)) /* diff --git a/Include/objimpl.h b/Include/objimpl.h index af537175bfe..1408d051ba7 100644 --- a/Include/objimpl.h +++ b/Include/objimpl.h @@ -38,7 +38,7 @@ Functions and macros for modules that implement new object types. object with room for n items. In addition to the refcount and type pointer fields, this also fills in the ob_size field. - - PyObject_Del(op) releases the memory allocated for an object. It does not + - PyObject_Free(op) releases the memory allocated for an object. It does not run a destructor -- it only frees the memory. PyObject_Free is identical. - PyObject_Init(op, typeobj) and PyObject_InitVar(op, typeobj, n) don't @@ -102,7 +102,9 @@ PyAPI_FUNC(void *) PyObject_Realloc(void *ptr, size_t new_size); PyAPI_FUNC(void) PyObject_Free(void *ptr); -/* Macros */ +// Deprecated aliases only kept for backward compatibility. +// PyObject_Del and PyObject_DEL are defined with no parameter to be able to +// use them as function pointers (ex: tp_free = PyObject_Del). #define PyObject_MALLOC PyObject_Malloc #define PyObject_REALLOC PyObject_Realloc #define PyObject_FREE PyObject_Free @@ -138,8 +140,8 @@ PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t); #define PyObject_NewVar(type, typeobj, n) \ ( (type *) _PyObject_NewVar((typeobj), (n)) ) -// Alias to PyObject_New(). In Python 3.8, PyObject_NEW() called directly -// PyObject_MALLOC() with _PyObject_VAR_SIZE(). +// Alias to PyObject_NewVar(). In Python 3.8, PyObject_NEW_VAR() called +// directly PyObject_MALLOC() with _PyObject_VAR_SIZE(). #define PyObject_NEW_VAR(type, typeobj, n) PyObject_NewVar(type, typeobj, n) diff --git a/Include/opcode.h b/Include/opcode.h index 420c87aa0f2..998a5ce492d 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -30,7 +30,6 @@ extern "C" { #define BINARY_TRUE_DIVIDE 27 #define INPLACE_FLOOR_DIVIDE 28 #define INPLACE_TRUE_DIVIDE 29 -#define RERAISE 48 #define WITH_EXCEPT_START 49 #define GET_AITER 50 #define GET_ANEXT 51 @@ -96,6 +95,7 @@ extern "C" { #define LOAD_GLOBAL 116 #define IS_OP 117 #define CONTAINS_OP 118 +#define RERAISE 119 #define JUMP_IF_NOT_EXC_MATCH 121 #define SETUP_FINALLY 122 #define LOAD_FAST 124 diff --git a/Include/patchlevel.h b/Include/patchlevel.h index b7d2a9aa2e1..1af225ca093 100644 --- a/Include/patchlevel.h +++ b/Include/patchlevel.h @@ -20,10 +20,10 @@ #define PY_MINOR_VERSION 10 #define PY_MICRO_VERSION 0 #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA -#define PY_RELEASE_SERIAL 2 +#define PY_RELEASE_SERIAL 3 /* Version as a string */ -#define PY_VERSION "3.10.0a2+" +#define PY_VERSION "3.10.0a3+" /*--end constants--*/ /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h index c5368b3c5ed..783fcb455eb 100644 --- a/Include/pylifecycle.h +++ b/Include/pylifecycle.h @@ -32,6 +32,8 @@ PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int); /* Bootstrap __main__ (defined in Modules/main.c) */ PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv); +PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv); + PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv); /* In pathconfig.c */ diff --git a/Include/pymem.h b/Include/pymem.h index 607feb9484f..92cd5369589 100644 --- a/Include/pymem.h +++ b/Include/pymem.h @@ -53,18 +53,6 @@ PyAPI_FUNC(void *) PyMem_Malloc(size_t size); PyAPI_FUNC(void *) PyMem_Realloc(void *ptr, size_t new_size); PyAPI_FUNC(void) PyMem_Free(void *ptr); -/* Macros. */ - -/* PyMem_MALLOC(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. */ -/* Returns NULL to indicate error if a negative size or size larger than - Py_ssize_t can represent is supplied. Helps prevents security holes. */ -#define PyMem_MALLOC(n) PyMem_Malloc(n) -#define PyMem_REALLOC(p, n) PyMem_Realloc(p, n) -#define PyMem_FREE(p) PyMem_Free(p) - /* * Type-oriented memory interface * ============================== @@ -78,9 +66,6 @@ PyAPI_FUNC(void) PyMem_Free(void *ptr); #define PyMem_New(type, n) \ ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ ( (type *) PyMem_Malloc((n) * sizeof(type)) ) ) -#define PyMem_NEW(type, n) \ - ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ - ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) ) /* * The value of (p) is always clobbered by this macro regardless of success. @@ -91,15 +76,18 @@ PyAPI_FUNC(void) PyMem_Free(void *ptr); #define PyMem_Resize(p, type, n) \ ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ (type *) PyMem_Realloc((p), (n) * sizeof(type)) ) -#define PyMem_RESIZE(p, type, n) \ - ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ - (type *) PyMem_REALLOC((p), (n) * sizeof(type)) ) -/* PyMem{Del,DEL} are left over from ancient days, and shouldn't be used - * anymore. They're just confusing aliases for PyMem_{Free,FREE} now. - */ -#define PyMem_Del PyMem_Free -#define PyMem_DEL PyMem_FREE + +// Deprecated aliases only kept for backward compatibility. +// PyMem_Del and PyMem_DEL are defined with no parameter to be able to use +// them as function pointers (ex: dealloc = PyMem_Del). +#define PyMem_MALLOC(n) PyMem_Malloc(n) +#define PyMem_NEW(type, n) PyMem_New(type, n) +#define PyMem_REALLOC(p, n) PyMem_Realloc(p, n) +#define PyMem_RESIZE(p, type, n) PyMem_Resize(p, type, n) +#define PyMem_FREE(p) PyMem_Free(p) +#define PyMem_Del PyMem_Free +#define PyMem_DEL PyMem_Free #ifndef Py_LIMITED_API diff --git a/Include/pythonrun.h b/Include/pythonrun.h index d43734b5a12..cc6c745a4d3 100644 --- a/Include/pythonrun.h +++ b/Include/pythonrun.h @@ -7,137 +7,21 @@ extern "C" { #endif -#ifndef Py_LIMITED_API -PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); -PyAPI_FUNC(int) PyRun_AnyFileExFlags( - FILE *fp, - const char *filename, /* decoded from the filesystem encoding */ - int closeit, - PyCompilerFlags *flags); -PyAPI_FUNC(int) PyRun_SimpleFileExFlags( - FILE *fp, - const char *filename, /* decoded from the filesystem encoding */ - int closeit, - PyCompilerFlags *flags); -PyAPI_FUNC(int) PyRun_InteractiveOneFlags( - FILE *fp, - const char *filename, /* decoded from the filesystem encoding */ - PyCompilerFlags *flags); -PyAPI_FUNC(int) PyRun_InteractiveOneObject( - FILE *fp, - PyObject *filename, - PyCompilerFlags *flags); -PyAPI_FUNC(int) PyRun_InteractiveLoopFlags( - FILE *fp, - const char *filename, /* decoded from the filesystem encoding */ - PyCompilerFlags *flags); - - -PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *, - PyObject *, PyCompilerFlags *); - -PyAPI_FUNC(PyObject *) PyRun_FileExFlags( - FILE *fp, - const char *filename, /* decoded from the filesystem encoding */ - int start, - PyObject *globals, - PyObject *locals, - int closeit, - PyCompilerFlags *flags); -#endif - -#ifdef Py_LIMITED_API PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int); -#else -#define Py_CompileString(str, p, s) Py_CompileStringExFlags(str, p, s, NULL, -1) -#define Py_CompileStringFlags(str, p, s, f) Py_CompileStringExFlags(str, p, s, f, -1) -PyAPI_FUNC(PyObject *) Py_CompileStringExFlags( - const char *str, - const char *filename, /* decoded from the filesystem encoding */ - int start, - PyCompilerFlags *flags, - int optimize); -PyAPI_FUNC(PyObject *) Py_CompileStringObject( - const char *str, - PyObject *filename, int start, - PyCompilerFlags *flags, - int optimize); -#endif + PyAPI_FUNC(struct symtable *) Py_SymtableString( const char *str, const char *filename, /* decoded from the filesystem encoding */ int start); -#ifndef Py_LIMITED_API -PyAPI_FUNC(const char *) _Py_SourceAsString( - PyObject *cmd, - const char *funcname, - const char *what, - PyCompilerFlags *cf, - PyObject **cmd_copy); - -PyAPI_FUNC(struct symtable *) Py_SymtableStringObject( - const char *str, - PyObject *filename, - int start); - -PyAPI_FUNC(struct symtable *) _Py_SymtableStringObjectFlags( - const char *str, - PyObject *filename, - int start, - PyCompilerFlags *flags); -#endif PyAPI_FUNC(void) PyErr_Print(void); PyAPI_FUNC(void) PyErr_PrintEx(int); PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *); -#ifndef Py_LIMITED_API -/* A function flavor is also exported by libpython. It is required when - libpython is accessed directly rather than using header files which defines - macros below. On Windows, for example, PyAPI_FUNC() uses dllexport to - export functions in pythonXX.dll. */ -PyAPI_FUNC(PyObject *) PyRun_String(const char *str, int s, PyObject *g, PyObject *l); -PyAPI_FUNC(int) PyRun_AnyFile(FILE *fp, const char *name); -PyAPI_FUNC(int) PyRun_AnyFileEx(FILE *fp, const char *name, int closeit); -PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); -PyAPI_FUNC(int) PyRun_SimpleString(const char *s); -PyAPI_FUNC(int) PyRun_SimpleFile(FILE *f, const char *p); -PyAPI_FUNC(int) PyRun_SimpleFileEx(FILE *f, const char *p, int c); -PyAPI_FUNC(int) PyRun_InteractiveOne(FILE *f, const char *p); -PyAPI_FUNC(int) PyRun_InteractiveLoop(FILE *f, const char *p); -PyAPI_FUNC(PyObject *) PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l); -PyAPI_FUNC(PyObject *) PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c); -PyAPI_FUNC(PyObject *) PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, PyCompilerFlags *flags); - -/* Use macros for a bunch of old variants */ -#define PyRun_String(str, s, g, l) PyRun_StringFlags(str, s, g, l, NULL) -#define PyRun_AnyFile(fp, name) PyRun_AnyFileExFlags(fp, name, 0, NULL) -#define PyRun_AnyFileEx(fp, name, closeit) \ - PyRun_AnyFileExFlags(fp, name, closeit, NULL) -#define PyRun_AnyFileFlags(fp, name, flags) \ - PyRun_AnyFileExFlags(fp, name, 0, flags) -#define PyRun_SimpleString(s) PyRun_SimpleStringFlags(s, NULL) -#define PyRun_SimpleFile(f, p) PyRun_SimpleFileExFlags(f, p, 0, NULL) -#define PyRun_SimpleFileEx(f, p, c) PyRun_SimpleFileExFlags(f, p, c, NULL) -#define PyRun_InteractiveOne(f, p) PyRun_InteractiveOneFlags(f, p, NULL) -#define PyRun_InteractiveLoop(f, p) PyRun_InteractiveLoopFlags(f, p, NULL) -#define PyRun_File(fp, p, s, g, l) \ - PyRun_FileExFlags(fp, p, s, g, l, 0, NULL) -#define PyRun_FileEx(fp, p, s, g, l, c) \ - PyRun_FileExFlags(fp, p, s, g, l, c, NULL) -#define PyRun_FileFlags(fp, p, s, g, l, flags) \ - PyRun_FileExFlags(fp, p, s, g, l, 0, flags) -#endif /* Stuff with no proper home (yet) */ -#ifndef Py_LIMITED_API -PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, const char *); -#endif PyAPI_DATA(int) (*PyOS_InputHook)(void); PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *); -#ifndef Py_LIMITED_API -PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState; -#endif /* Stack size, in "pointers" (so we get extra safety margins on 64-bit platforms). On a 32-bit platform, this translates @@ -154,6 +38,12 @@ PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState; PyAPI_FUNC(int) PyOS_CheckStack(void); #endif +#ifndef Py_LIMITED_API +# define Py_CPYTHON_PYTHONRUN_H +# include "cpython/pythonrun.h" +# undef Py_CPYTHON_PYTHONRUN_H +#endif + #ifdef __cplusplus } #endif diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index 28690f8c0bd..87302ac76d8 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -10,6 +10,10 @@ from abc import ABCMeta, abstractmethod import sys GenericAlias = type(list[int]) +EllipsisType = type(...) +def _f(): pass +FunctionType = type(_f) +del _f __all__ = ["Awaitable", "Coroutine", "AsyncIterable", "AsyncIterator", "AsyncGenerator", @@ -409,6 +413,95 @@ class Collection(Sized, Iterable, Container): return NotImplemented +class _CallableGenericAlias(GenericAlias): + """ Represent `Callable[argtypes, resulttype]`. + + This sets ``__args__`` to a tuple containing the flattened ``argtypes`` + followed by ``resulttype``. + + Example: ``Callable[[int, str], float]`` sets ``__args__`` to + ``(int, str, float)``. + """ + + __slots__ = () + + def __new__(cls, origin, args): + return cls.__create_ga(origin, args) + + @classmethod + def __create_ga(cls, origin, args): + if not isinstance(args, tuple) or len(args) != 2: + raise TypeError( + "Callable must be used as Callable[[arg, ...], result].") + t_args, t_result = args + if isinstance(t_args, (list, tuple)): + ga_args = tuple(t_args) + (t_result,) + # This relaxes what t_args can be on purpose to allow things like + # PEP 612 ParamSpec. Responsibility for whether a user is using + # Callable[...] properly is deferred to static type checkers. + else: + ga_args = args + return super().__new__(cls, origin, ga_args) + + def __repr__(self): + if _has_special_args(self.__args__): + return super().__repr__() + return (f'collections.abc.Callable' + f'[[{", ".join([_type_repr(a) for a in self.__args__[:-1]])}], ' + f'{_type_repr(self.__args__[-1])}]') + + def __reduce__(self): + args = self.__args__ + if not _has_special_args(args): + args = list(args[:-1]), args[-1] + return _CallableGenericAlias, (Callable, args) + + def __getitem__(self, item): + # Called during TypeVar substitution, returns the custom subclass + # rather than the default types.GenericAlias object. + ga = super().__getitem__(item) + args = ga.__args__ + # args[0] occurs due to things like Z[[int, str, bool]] from PEP 612 + if not isinstance(ga.__args__[0], tuple): + t_result = ga.__args__[-1] + t_args = ga.__args__[:-1] + args = (t_args, t_result) + return _CallableGenericAlias(Callable, args) + + +def _has_special_args(args): + """Checks if args[0] matches either ``...``, ``ParamSpec`` or + ``_ConcatenateGenericAlias`` from typing.py + """ + if len(args) != 2: + return False + obj = args[0] + if obj is Ellipsis: + return True + obj = type(obj) + names = ('ParamSpec', '_ConcatenateGenericAlias') + return obj.__module__ == 'typing' and any(obj.__name__ == name for name in names) + + +def _type_repr(obj): + """Return the repr() of an object, special-casing types (internal helper). + + Copied from :mod:`typing` since collections.abc + shouldn't depend on that module. + """ + if isinstance(obj, GenericAlias): + return repr(obj) + if isinstance(obj, type): + if obj.__module__ == 'builtins': + return obj.__qualname__ + return f'{obj.__module__}.{obj.__qualname__}' + if obj is Ellipsis: + return '...' + if isinstance(obj, FunctionType): + return obj.__name__ + return repr(obj) + + class Callable(metaclass=ABCMeta): __slots__ = () @@ -423,7 +516,7 @@ class Callable(metaclass=ABCMeta): return _check_methods(C, "__call__") return NotImplemented - __class_getitem__ = classmethod(GenericAlias) + __class_getitem__ = classmethod(_CallableGenericAlias) ### SETS ### diff --git a/Lib/argparse.py b/Lib/argparse.py index 2fb1da59f94..8a12dea7668 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -1719,7 +1719,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer): add_group = self.add_argument_group self._positionals = add_group(_('positional arguments')) - self._optionals = add_group(_('optional arguments')) + self._optionals = add_group(_('options')) self._subparsers = None # register types diff --git a/Lib/ast.py b/Lib/ast.py index 7275fe28ba8..845c80c2bbc 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -63,7 +63,10 @@ def literal_eval(node_or_string): if isinstance(node_or_string, Expression): node_or_string = node_or_string.body def _raise_malformed_node(node): - raise ValueError(f'malformed node or string: {node!r}') + msg = "malformed node or string" + if lno := getattr(node, 'lineno', None): + msg += f' on line {lno}' + raise ValueError(msg + f': {node!r}') def _convert_num(node): if not isinstance(node, Constant) or type(node.value) not in (int, float, complex): _raise_malformed_node(node) diff --git a/Lib/asyncio/__init__.py b/Lib/asyncio/__init__.py index eb84bfb189c..200b14c2a3f 100644 --- a/Lib/asyncio/__init__.py +++ b/Lib/asyncio/__init__.py @@ -20,10 +20,6 @@ from .tasks import * from .threads import * from .transports import * -# Exposed for _asynciomodule.c to implement now deprecated -# Task.all_tasks() method. This function will be removed in 3.9. -from .tasks import _all_tasks_compat # NoQA - __all__ = (base_events.__all__ + coroutines.__all__ + events.__all__ + diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index b2d446a51fe..f789635e0f8 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -350,7 +350,7 @@ class Server(events.AbstractServer): self._start_serving() # Skip one loop iteration so that all 'loop.add_reader' # go through. - await tasks.sleep(0, loop=self._loop) + await tasks.sleep(0) async def serve_forever(self): if self._serving_forever_fut is not None: @@ -541,8 +541,7 @@ class BaseEventLoop(events.AbstractEventLoop): results = await tasks.gather( *[ag.aclose() for ag in closing_agens], - return_exceptions=True, - loop=self) + return_exceptions=True) for result, agen in zip(results, closing_agens): if isinstance(result, Exception): @@ -1457,7 +1456,7 @@ class BaseEventLoop(events.AbstractEventLoop): fs = [self._create_server_getaddrinfo(host, port, family=family, flags=flags) for host in hosts] - infos = await tasks.gather(*fs, loop=self) + infos = await tasks.gather(*fs) infos = set(itertools.chain.from_iterable(infos)) completed = False @@ -1515,7 +1514,7 @@ class BaseEventLoop(events.AbstractEventLoop): server._start_serving() # Skip one loop iteration so that all 'loop.add_reader' # go through. - await tasks.sleep(0, loop=self) + await tasks.sleep(0) if self._debug: logger.info("%r is serving", server) @@ -1525,14 +1524,6 @@ class BaseEventLoop(events.AbstractEventLoop): self, protocol_factory, sock, *, ssl=None, ssl_handshake_timeout=None): - """Handle an accepted connection. - - This is used by servers that accept connections outside of - asyncio but that use asyncio to handle connections. - - This method is a coroutine. When completed, the coroutine - returns a (transport, protocol) pair. - """ if sock.type != socket.SOCK_STREAM: raise ValueError(f'A Stream Socket was expected, got {sock!r}') diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py index 0dce87b8ecc..1a20f362ec3 100644 --- a/Lib/asyncio/events.py +++ b/Lib/asyncio/events.py @@ -418,6 +418,20 @@ class AbstractEventLoop: """ raise NotImplementedError + async def connect_accepted_socket( + self, protocol_factory, sock, + *, ssl=None, + ssl_handshake_timeout=None): + """Handle an accepted connection. + + This is used by servers that accept connections outside of + asyncio, but use asyncio to handle connections. + + This method is a coroutine. When completed, the coroutine + returns a (transport, protocol) pair. + """ + raise NotImplementedError + async def create_datagram_endpoint(self, protocol_factory, local_addr=None, remote_addr=None, *, family=0, proto=0, flags=0, diff --git a/Lib/asyncio/exceptions.py b/Lib/asyncio/exceptions.py index e03602ef576..f07e4486577 100644 --- a/Lib/asyncio/exceptions.py +++ b/Lib/asyncio/exceptions.py @@ -34,8 +34,9 @@ class IncompleteReadError(EOFError): - expected: total number of expected bytes (or None if unknown) """ def __init__(self, partial, expected): + r_expected = 'undefined' if expected is None else repr(expected) super().__init__(f'{len(partial)} bytes read on a total of ' - f'{expected!r} expected bytes') + f'{r_expected} expected bytes') self.partial = partial self.expected = expected diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py index bed4da52fd4..2d22ef66c9c 100644 --- a/Lib/asyncio/futures.py +++ b/Lib/asyncio/futures.py @@ -115,7 +115,7 @@ class Future: @_log_traceback.setter def _log_traceback(self, val): - if bool(val): + if val: raise ValueError('_log_traceback can only be set to False') self.__log_traceback = False diff --git a/Lib/asyncio/runners.py b/Lib/asyncio/runners.py index 268635d68fb..9a5e9a48479 100644 --- a/Lib/asyncio/runners.py +++ b/Lib/asyncio/runners.py @@ -60,8 +60,7 @@ def _cancel_all_tasks(loop): for task in to_cancel: task.cancel() - loop.run_until_complete( - tasks.gather(*to_cancel, loop=loop, return_exceptions=True)) + loop.run_until_complete(tasks.gather(*to_cancel, return_exceptions=True)) for task in to_cancel: if task.cancelled(): diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 3c80bb88925..96a9f97200d 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -23,7 +23,7 @@ _DEFAULT_LIMIT = 2 ** 16 # 64 KiB async def open_connection(host=None, port=None, *, - loop=None, limit=_DEFAULT_LIMIT, **kwds): + limit=_DEFAULT_LIMIT, **kwds): """A wrapper for create_connection() returning a (reader, writer) pair. The reader returned is a StreamReader instance; the writer is a @@ -41,12 +41,7 @@ async def open_connection(host=None, port=None, *, StreamReaderProtocol classes, just copy the code -- there's really nothing special here except some convenience.) """ - if loop is None: - loop = events.get_event_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) + loop = events.get_running_loop() reader = StreamReader(limit=limit, loop=loop) protocol = StreamReaderProtocol(reader, loop=loop) transport, _ = await loop.create_connection( @@ -56,7 +51,7 @@ async def open_connection(host=None, port=None, *, async def start_server(client_connected_cb, host=None, port=None, *, - loop=None, limit=_DEFAULT_LIMIT, **kwds): + limit=_DEFAULT_LIMIT, **kwds): """Start a socket server, call back for each client connected. The first parameter, `client_connected_cb`, takes two parameters: @@ -78,12 +73,7 @@ async def start_server(client_connected_cb, host=None, port=None, *, The return value is the same as loop.create_server(), i.e. a Server object which can be used to stop the service. """ - if loop is None: - loop = events.get_event_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) + loop = events.get_running_loop() def factory(): reader = StreamReader(limit=limit, loop=loop) @@ -98,14 +88,10 @@ if hasattr(socket, 'AF_UNIX'): # UNIX Domain Sockets are supported on this platform async def open_unix_connection(path=None, *, - loop=None, limit=_DEFAULT_LIMIT, **kwds): + limit=_DEFAULT_LIMIT, **kwds): """Similar to `open_connection` but works with UNIX Domain Sockets.""" - if loop is None: - loop = events.get_event_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) + loop = events.get_running_loop() + reader = StreamReader(limit=limit, loop=loop) protocol = StreamReaderProtocol(reader, loop=loop) transport, _ = await loop.create_unix_connection( @@ -114,14 +100,9 @@ if hasattr(socket, 'AF_UNIX'): return reader, writer async def start_unix_server(client_connected_cb, path=None, *, - loop=None, limit=_DEFAULT_LIMIT, **kwds): + limit=_DEFAULT_LIMIT, **kwds): """Similar to `start_server` but works with UNIX Domain Sockets.""" - if loop is None: - loop = events.get_event_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) + loop = events.get_running_loop() def factory(): reader = StreamReader(limit=limit, loop=loop) diff --git a/Lib/asyncio/subprocess.py b/Lib/asyncio/subprocess.py index c9506b15830..cd10231f710 100644 --- a/Lib/asyncio/subprocess.py +++ b/Lib/asyncio/subprocess.py @@ -1,7 +1,6 @@ __all__ = 'create_subprocess_exec', 'create_subprocess_shell' import subprocess -import warnings from . import events from . import protocols @@ -193,24 +192,14 @@ class Process: stderr = self._read_stream(2) else: stderr = self._noop() - stdin, stdout, stderr = await tasks.gather(stdin, stdout, stderr, - loop=self._loop) + stdin, stdout, stderr = await tasks.gather(stdin, stdout, stderr) await self.wait() return (stdout, stderr) async def create_subprocess_shell(cmd, stdin=None, stdout=None, stderr=None, - loop=None, limit=streams._DEFAULT_LIMIT, - **kwds): - if loop is None: - loop = events.get_event_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8 " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, - stacklevel=2 - ) - + limit=streams._DEFAULT_LIMIT, **kwds): + loop = events.get_running_loop() protocol_factory = lambda: SubprocessStreamProtocol(limit=limit, loop=loop) transport, protocol = await loop.subprocess_shell( @@ -221,16 +210,9 @@ async def create_subprocess_shell(cmd, stdin=None, stdout=None, stderr=None, async def create_subprocess_exec(program, *args, stdin=None, stdout=None, - stderr=None, loop=None, - limit=streams._DEFAULT_LIMIT, **kwds): - if loop is None: - loop = events.get_event_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8 " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, - stacklevel=2 - ) + stderr=None, limit=streams._DEFAULT_LIMIT, + **kwds): + loop = events.get_running_loop() protocol_factory = lambda: SubprocessStreamProtocol(limit=limit, loop=loop) transport, protocol = await loop.subprocess_exec( diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 03d8451fa17..52f1e6629e2 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -61,30 +61,6 @@ def all_tasks(loop=None): if futures._get_loop(t) is loop and not t.done()} -def _all_tasks_compat(loop=None): - # Different from "all_task()" by returning *all* Tasks, including - # the completed ones. Used to implement deprecated "Tasks.all_task()" - # method. - if loop is None: - loop = events.get_event_loop() - # Looping over a WeakSet (_all_tasks) isn't safe as it can be updated from another - # thread while we do so. Therefore we cast it to list prior to filtering. The list - # cast itself requires iteration, so we repeat it several times ignoring - # RuntimeErrors (which are not very likely to occur). See issues 34970 and 36607 for - # details. - i = 0 - while True: - try: - tasks = list(_all_tasks) - except RuntimeError: - i += 1 - if i >= 1000: - raise - else: - break - return {t for t in tasks if futures._get_loop(t) is loop} - - def _set_task_name(task, name): if name is not None: try: @@ -370,7 +346,7 @@ FIRST_EXCEPTION = concurrent.futures.FIRST_EXCEPTION ALL_COMPLETED = concurrent.futures.ALL_COMPLETED -async def wait(fs, *, loop=None, timeout=None, return_when=ALL_COMPLETED): +async def wait(fs, *, timeout=None, return_when=ALL_COMPLETED): """Wait for the Futures and coroutines given by fs to complete. The fs iterable must not be empty. @@ -393,12 +369,7 @@ async def wait(fs, *, loop=None, timeout=None, return_when=ALL_COMPLETED): if return_when not in (FIRST_COMPLETED, FIRST_EXCEPTION, ALL_COMPLETED): raise ValueError(f'Invalid return_when value: {return_when}') - if loop is None: - loop = events.get_running_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) + loop = events.get_running_loop() fs = set(fs) @@ -418,7 +389,7 @@ def _release_waiter(waiter, *args): waiter.set_result(None) -async def wait_for(fut, timeout, *, loop=None): +async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. @@ -431,12 +402,7 @@ async def wait_for(fut, timeout, *, loop=None): This function is a coroutine. """ - if loop is None: - loop = events.get_running_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) + loop = events.get_running_loop() if timeout is None: return await fut @@ -471,7 +437,10 @@ async def wait_for(fut, timeout, *, loop=None): return fut.result() else: fut.remove_done_callback(cb) - fut.cancel() + # We must ensure that the task is not running + # after wait_for() returns. + # See https://bugs.python.org/issue32751 + await _cancel_and_wait(fut, loop=loop) raise if fut.done(): @@ -556,7 +525,7 @@ async def _cancel_and_wait(fut, loop): # This is *not* a @coroutine! It is just an iterator (yielding Futures). -def as_completed(fs, *, loop=None, timeout=None): +def as_completed(fs, *, timeout=None): """Return an iterator whose values are coroutines. When waiting for the yielded coroutines you'll get the results (or @@ -580,12 +549,7 @@ def as_completed(fs, *, loop=None, timeout=None): from .queues import Queue # Import here to avoid circular import problem. done = Queue() - if loop is None: - loop = events.get_event_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) + loop = events.get_event_loop() todo = {ensure_future(f, loop=loop) for f in set(fs)} timeout_handle = None @@ -630,19 +594,13 @@ def __sleep0(): yield -async def sleep(delay, result=None, *, loop=None): +async def sleep(delay, result=None): """Coroutine that completes after a given time (in seconds).""" if delay <= 0: await __sleep0() return result - if loop is None: - loop = events.get_running_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) - + loop = events.get_running_loop() future = loop.create_future() h = loop.call_later(delay, futures._set_result_unless_cancelled, @@ -717,7 +675,7 @@ class _GatheringFuture(futures.Future): return ret -def gather(*coros_or_futures, loop=None, return_exceptions=False): +def gather(*coros_or_futures, return_exceptions=False): """Return a future aggregating results from the given coroutines/futures. Coroutines will be wrapped in a future and scheduled in the event @@ -748,12 +706,7 @@ def gather(*coros_or_futures, loop=None, return_exceptions=False): gather won't cancel any other awaitables. """ if not coros_or_futures: - if loop is None: - loop = events.get_event_loop() - else: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) + loop = events.get_event_loop() outer = loop.create_future() outer.set_result([]) return outer @@ -817,6 +770,7 @@ def gather(*coros_or_futures, loop=None, return_exceptions=False): children = [] nfuts = 0 nfinished = 0 + loop = None for arg in coros_or_futures: if arg not in arg_to_fut: fut = ensure_future(arg, loop=loop) @@ -843,7 +797,7 @@ def gather(*coros_or_futures, loop=None, return_exceptions=False): return outer -def shield(arg, *, loop=None): +def shield(arg): """Wait for a future, shielding it from cancellation. The statement @@ -869,11 +823,7 @@ def shield(arg, *, loop=None): except CancelledError: res = None """ - if loop is not None: - warnings.warn("The loop argument is deprecated since Python 3.8, " - "and scheduled for removal in Python 3.10.", - DeprecationWarning, stacklevel=2) - inner = ensure_future(arg, loop=loop) + inner = ensure_future(arg) if inner.done(): # Shortcut. return inner diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index f34a5b4b443..e4f445e9502 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -44,6 +44,16 @@ def _sighandler_noop(signum, frame): pass +def waitstatus_to_exitcode(status): + try: + return os.waitstatus_to_exitcode(status) + except ValueError: + # The child exited, but we don't understand its status. + # This shouldn't happen, but if it does, let's just + # return that status; perhaps that helps debug it. + return status + + class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop): """Unix event loop. @@ -323,7 +333,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop): server._start_serving() # Skip one loop iteration so that all 'loop.add_reader' # go through. - await tasks.sleep(0, loop=self) + await tasks.sleep(0) return server @@ -941,7 +951,7 @@ class PidfdChildWatcher(AbstractChildWatcher): " will report returncode 255", pid) else: - returncode = _compute_returncode(status) + returncode = waitstatus_to_exitcode(status) os.close(pidfd) callback(pid, returncode, *args) @@ -956,20 +966,6 @@ class PidfdChildWatcher(AbstractChildWatcher): return True -def _compute_returncode(status): - if os.WIFSIGNALED(status): - # The child process died because of a signal. - return -os.WTERMSIG(status) - elif os.WIFEXITED(status): - # The child process exited (e.g sys.exit()). - return os.WEXITSTATUS(status) - else: - # The child exited, but we don't understand its status. - # This shouldn't happen, but if it does, let's just - # return that status; perhaps that helps debug it. - return status - - class BaseChildWatcher(AbstractChildWatcher): def __init__(self): @@ -1080,7 +1076,7 @@ class SafeChildWatcher(BaseChildWatcher): # The child process is still alive. return - returncode = _compute_returncode(status) + returncode = waitstatus_to_exitcode(status) if self._loop.get_debug(): logger.debug('process %s exited with returncode %s', expected_pid, returncode) @@ -1173,7 +1169,7 @@ class FastChildWatcher(BaseChildWatcher): # A child process is still alive. return - returncode = _compute_returncode(status) + returncode = waitstatus_to_exitcode(status) with self._lock: try: @@ -1230,13 +1226,15 @@ class MultiLoopChildWatcher(AbstractChildWatcher): def close(self): self._callbacks.clear() - if self._saved_sighandler is not None: - handler = signal.getsignal(signal.SIGCHLD) - if handler != self._sig_chld: - logger.warning("SIGCHLD handler was changed by outside code") - else: - signal.signal(signal.SIGCHLD, self._saved_sighandler) - self._saved_sighandler = None + if self._saved_sighandler is None: + return + + handler = signal.getsignal(signal.SIGCHLD) + if handler != self._sig_chld: + logger.warning("SIGCHLD handler was changed by outside code") + else: + signal.signal(signal.SIGCHLD, self._saved_sighandler) + self._saved_sighandler = None def __enter__(self): return self @@ -1263,15 +1261,17 @@ class MultiLoopChildWatcher(AbstractChildWatcher): # The reason to do it here is that attach_loop() is called from # unix policy only for the main thread. # Main thread is required for subscription on SIGCHLD signal - if self._saved_sighandler is None: - self._saved_sighandler = signal.signal(signal.SIGCHLD, self._sig_chld) - if self._saved_sighandler is None: - logger.warning("Previous SIGCHLD handler was set by non-Python code, " - "restore to default handler on watcher close.") - self._saved_sighandler = signal.SIG_DFL + if self._saved_sighandler is not None: + return - # Set SA_RESTART to limit EINTR occurrences. - signal.siginterrupt(signal.SIGCHLD, False) + self._saved_sighandler = signal.signal(signal.SIGCHLD, self._sig_chld) + if self._saved_sighandler is None: + logger.warning("Previous SIGCHLD handler was set by non-Python code, " + "restore to default handler on watcher close.") + self._saved_sighandler = signal.SIG_DFL + + # Set SA_RESTART to limit EINTR occurrences. + signal.siginterrupt(signal.SIGCHLD, False) def _do_waitpid_all(self): for pid in list(self._callbacks): @@ -1296,7 +1296,7 @@ class MultiLoopChildWatcher(AbstractChildWatcher): # The child process is still alive. return - returncode = _compute_returncode(status) + returncode = waitstatus_to_exitcode(status) debug_log = True try: loop, callback, args = self._callbacks.pop(pid) @@ -1399,7 +1399,7 @@ class ThreadedChildWatcher(AbstractChildWatcher): "Unknown child process pid %d, will report returncode 255", pid) else: - returncode = _compute_returncode(status) + returncode = waitstatus_to_exitcode(status) if loop.get_debug(): logger.debug('process %s exited with returncode %s', expected_pid, returncode) diff --git a/Lib/base64.py b/Lib/base64.py index 539ad16f0e8..e1256ad9358 100755 --- a/Lib/base64.py +++ b/Lib/base64.py @@ -344,7 +344,7 @@ def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False): global _a85chars, _a85chars2 # Delay the initialization of tables to not waste memory # if the function is never called - if _a85chars is None: + if _a85chars2 is None: _a85chars = [bytes((i,)) for i in range(33, 118)] _a85chars2 = [(a + b) for a in _a85chars for b in _a85chars] @@ -452,7 +452,7 @@ def b85encode(b, pad=False): global _b85chars, _b85chars2 # Delay the initialization of tables to not waste memory # if the function is never called - if _b85chars is None: + if _b85chars2 is None: _b85chars = [bytes((i,)) for i in _b85alphabet] _b85chars2 = [(a + b) for a in _b85chars for b in _b85chars] return _85encode(b, _b85chars, _b85chars2, pad) diff --git a/Lib/cgi.py b/Lib/cgi.py index 77ab703cc03..6018c360869 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -194,7 +194,7 @@ def parse_multipart(fp, pdict, encoding="utf-8", errors="replace"): value is a list of values for that field. For non-file fields, the value is a list of strings. """ - # RFC 2026, Section 5.1 : The "multipart" boundary delimiters are always + # RFC 2046, Section 5.1 : The "multipart" boundary delimiters are always # represented as 7bit US-ASCII. boundary = pdict['boundary'].decode('ascii') ctype = "multipart/form-data; boundary={}".format(boundary) diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 5d75501645f..9c25a2d2784 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -1001,7 +1001,7 @@ class ChainMap(_collections_abc.MutableMapping): def __iter__(self): d = {} for mapping in reversed(self.maps): - d.update(mapping) # reuses stored hash values if possible + d.update(dict.fromkeys(mapping)) # reuses stored hash values if possible return iter(d) def __contains__(self, key): diff --git a/Lib/collections/abc.py b/Lib/collections/abc.py index 891600d16be..86ca8b8a841 100644 --- a/Lib/collections/abc.py +++ b/Lib/collections/abc.py @@ -1,2 +1,3 @@ from _collections_abc import * from _collections_abc import __all__ +from _collections_abc import _CallableGenericAlias diff --git a/Lib/colorsys.py b/Lib/colorsys.py index b93e3844067..0f52512a67d 100644 --- a/Lib/colorsys.py +++ b/Lib/colorsys.py @@ -75,17 +75,18 @@ def yiq_to_rgb(y, i, q): def rgb_to_hls(r, g, b): maxc = max(r, g, b) minc = min(r, g, b) - # XXX Can optimize (maxc+minc) and (maxc-minc) - l = (minc+maxc)/2.0 + sumc = (maxc+minc) + rangec = (maxc-minc) + l = sumc/2.0 if minc == maxc: return 0.0, l, 0.0 if l <= 0.5: - s = (maxc-minc) / (maxc+minc) + s = rangec / sumc else: - s = (maxc-minc) / (2.0-maxc-minc) - rc = (maxc-r) / (maxc-minc) - gc = (maxc-g) / (maxc-minc) - bc = (maxc-b) / (maxc-minc) + s = rangec / (2.0-sumc) + rc = (maxc-r) / rangec + gc = (maxc-g) / rangec + bc = (maxc-b) / rangec if r == maxc: h = bc-gc elif g == maxc: diff --git a/Lib/dis.py b/Lib/dis.py index ea50f564c87..ccbd65be732 100644 --- a/Lib/dis.py +++ b/Lib/dis.py @@ -384,7 +384,7 @@ def _disassemble_bytes(code, lasti=-1, varnames=None, names=None, constants=None, cells=None, linestarts=None, *, file=None, line_offset=0): # Omit the line number column entirely if we have no line number info - show_lineno = linestarts is not None + show_lineno = bool(linestarts) if show_lineno: maxlineno = max(linestarts.values()) + line_offset if maxlineno >= 1000: diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index aaa300efa96..bdead133bd3 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -17,7 +17,8 @@ from distutils.errors import DistutilsOptionError from site import USER_BASE from site import USER_SITE -HAS_USER_SITE = True + +HAS_USER_SITE = (USER_SITE is not None) WINDOWS_SCHEME = { 'purelib': '$base/Lib/site-packages', @@ -169,8 +170,9 @@ class install(Command): self.install_lib = None # set to either purelib or platlib self.install_scripts = None self.install_data = None - self.install_userbase = USER_BASE - self.install_usersite = USER_SITE + if HAS_USER_SITE: + self.install_userbase = USER_BASE + self.install_usersite = USER_SITE self.compile = None self.optimize = None @@ -343,8 +345,9 @@ class install(Command): # Convert directories from Unix /-separated syntax to the local # convention. self.convert_paths('lib', 'purelib', 'platlib', - 'scripts', 'data', 'headers', - 'userbase', 'usersite') + 'scripts', 'data', 'headers') + if HAS_USER_SITE: + self.convert_paths('userbase', 'usersite') # Deprecated # Well, we're not actually fully completely finalized yet: we still diff --git a/Lib/distutils/spawn.py b/Lib/distutils/spawn.py index 0d1bd0391e6..f50edd2da97 100644 --- a/Lib/distutils/spawn.py +++ b/Lib/distutils/spawn.py @@ -54,8 +54,8 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): global _cfg_target, _cfg_target_split if _cfg_target is None: from distutils import sysconfig - _cfg_target = sysconfig.get_config_var( - 'MACOSX_DEPLOYMENT_TARGET') or '' + _cfg_target = str(sysconfig.get_config_var( + 'MACOSX_DEPLOYMENT_TARGET') or '') if _cfg_target: _cfg_target_split = [int(x) for x in _cfg_target.split('.')] if _cfg_target: diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 6bb009a86f4..a3055c19840 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -456,7 +456,7 @@ class BuildExtTestCase(TempdirManager, deptarget = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') if deptarget: # increment the minor version number (i.e. 10.6 -> 10.7) - deptarget = [int(x) for x in deptarget.split('.')] + deptarget = [int(x) for x in str(deptarget).split('.')] deptarget[-1] += 1 deptarget = '.'.join(str(i) for i in deptarget) self._try_compile_deployment_target('<', deptarget) @@ -489,7 +489,7 @@ class BuildExtTestCase(TempdirManager, # get the deployment target that the interpreter was built with target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') - target = tuple(map(int, target.split('.')[0:2])) + target = tuple(map(int, str(target).split('.')[0:2])) # format the target value as defined in the Apple # Availability Macros. We can't use the macro names since # at least one value we test with will not exist yet. @@ -498,7 +498,11 @@ class BuildExtTestCase(TempdirManager, target = '%02d%01d0' % target else: # for 10.10 and beyond -> "10nn00" - target = '%02d%02d00' % target + if len(target) >= 2: + target = '%02d%02d00' % target + else: + # 11 and later can have no minor version (11 instead of 11.0) + target = '%02d0000' % target deptarget_ext = Extension( 'deptarget', [deptarget_c], diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py index 51c80e0421a..21a7b7c85c4 100644 --- a/Lib/distutils/tests/test_install.py +++ b/Lib/distutils/tests/test_install.py @@ -8,7 +8,7 @@ import site from test.support import captured_stdout, run_unittest from distutils import sysconfig -from distutils.command.install import install +from distutils.command.install import install, HAS_USER_SITE from distutils.command import install as install_module from distutils.command.build_ext import build_ext from distutils.command.install import INSTALL_SCHEMES @@ -66,6 +66,7 @@ class InstallTestCase(support.TempdirManager, check_path(cmd.install_scripts, os.path.join(destination, "bin")) check_path(cmd.install_data, destination) + @unittest.skipUnless(HAS_USER_SITE, 'need user site') def test_user_site(self): # test install with --user # preparing the environment for the test @@ -93,8 +94,9 @@ class InstallTestCase(support.TempdirManager, self.addCleanup(cleanup) - for key in ('nt_user', 'unix_user'): - self.assertIn(key, INSTALL_SCHEMES) + if HAS_USER_SITE: + for key in ('nt_user', 'unix_user'): + self.assertIn(key, INSTALL_SCHEMES) dist = Distribution({'name': 'xx'}) cmd = install(dist) diff --git a/Lib/enum.py b/Lib/enum.py index 40ff25b9cda..75249bfdc1b 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -9,32 +9,63 @@ __all__ = [ ] +class _NoInitSubclass: + """ + temporary base class to suppress calling __init_subclass__ + """ + @classmethod + def __init_subclass__(cls, **kwds): + pass + def _is_descriptor(obj): - """Returns True if obj is a descriptor, False otherwise.""" + """ + Returns True if obj is a descriptor, False otherwise. + """ return ( hasattr(obj, '__get__') or hasattr(obj, '__set__') or - hasattr(obj, '__delete__')) - + hasattr(obj, '__delete__') + ) def _is_dunder(name): - """Returns True if a __dunder__ name, False otherwise.""" - return (len(name) > 4 and + """ + Returns True if a __dunder__ name, False otherwise. + """ + return ( + len(name) > 4 and name[:2] == name[-2:] == '__' and name[2] != '_' and - name[-3] != '_') - + name[-3] != '_' + ) def _is_sunder(name): - """Returns True if a _sunder_ name, False otherwise.""" - return (len(name) > 2 and + """ + Returns True if a _sunder_ name, False otherwise. + """ + return ( + len(name) > 2 and name[0] == name[-1] == '_' and name[1:2] != '_' and - name[-2:-1] != '_') + name[-2:-1] != '_' + ) +def _is_private(cls_name, name): + # do not use `re` as `re` imports `enum` + pattern = '_%s__' % (cls_name, ) + if ( + len(name) >= 5 + and name.startswith(pattern) + and name[len(pattern)] != '_' + and (name[-1] != '_' or name[-2] != '_') + ): + return True + else: + return False def _make_class_unpicklable(cls): - """Make the given class un-picklable.""" + """ + Make the given class un-picklable. + """ def _break_on_call_reduce(self, proto): raise TypeError('%r cannot be pickled' % self) cls.__reduce_ex__ = _break_on_call_reduce @@ -49,11 +80,11 @@ class auto: class _EnumDict(dict): - """Track enum member order and ensure member names are not reused. + """ + Track enum member order and ensure member names are not reused. EnumMeta will use the names found in self._member_names as the enumeration member names. - """ def __init__(self): super().__init__() @@ -63,21 +94,26 @@ class _EnumDict(dict): self._auto_called = False def __setitem__(self, key, value): - """Changes anything not dundered or not a descriptor. + """ + Changes anything not dundered or not a descriptor. If an enum member name is used twice, an error is raised; duplicate values are not checked for. Single underscore (sunder) names are reserved. - """ - if _is_sunder(key): + if _is_private(self._cls_name, key): + # do nothing, name will be a normal attribute + pass + elif _is_sunder(key): if key not in ( '_order_', '_create_pseudo_member_', '_generate_next_value_', '_missing_', '_ignore_', ): - raise ValueError(f'_sunder_ names, such as "{key}", are ' - 'reserved for future Enum use') + raise ValueError( + '_sunder_ names, such as %r, are reserved for future Enum use' + % (key, ) + ) if key == '_generate_next_value_': # check if members already defined as auto() if self._auto_called: @@ -91,13 +127,16 @@ class _EnumDict(dict): self._ignore = value already = set(value) & set(self._member_names) if already: - raise ValueError('_ignore_ cannot specify already set names: %r' % (already, )) + raise ValueError( + '_ignore_ cannot specify already set names: %r' + % (already, ) + ) elif _is_dunder(key): if key == '__order__': key = '_order_' elif key in self._member_names: # descriptor overwriting an enum? - raise TypeError('Attempted to reuse key: %r' % key) + raise TypeError('%r already defined as: %r' % (key, self[key])) elif key in self._ignore: pass elif not _is_descriptor(value): @@ -106,35 +145,54 @@ class _EnumDict(dict): raise TypeError('%r already defined as: %r' % (key, self[key])) if isinstance(value, auto): if value.value == _auto_null: - value.value = self._generate_next_value(key, 1, len(self._member_names), self._last_values[:]) + value.value = self._generate_next_value( + key, + 1, + len(self._member_names), + self._last_values[:], + ) self._auto_called = True value = value.value self._member_names.append(key) self._last_values.append(value) super().__setitem__(key, value) + def update(self, members, **more_members): + try: + for name in members.keys(): + self[name] = members[name] + except AttributeError: + for name, value in members: + self[name] = value + for name, value in more_members.items(): + self[name] = value + # Dummy value for Enum as EnumMeta explicitly checks for it, but of course # until EnumMeta finishes running the first time the Enum class doesn't exist. # This is also why there are checks in EnumMeta like `if Enum is not None` Enum = None - class EnumMeta(type): - """Metaclass for Enum""" + """ + Metaclass for Enum + """ @classmethod - def __prepare__(metacls, cls, bases): + def __prepare__(metacls, cls, bases, **kwds): # check that previous enum members do not exist metacls._check_for_existing_members(cls, bases) # create the namespace dict enum_dict = _EnumDict() + enum_dict._cls_name = cls # inherit previous flags and _generate_next_value_ function member_type, first_enum = metacls._get_mixins_(cls, bases) if first_enum is not None: - enum_dict['_generate_next_value_'] = getattr(first_enum, '_generate_next_value_', None) + enum_dict['_generate_next_value_'] = getattr( + first_enum, '_generate_next_value_', None, + ) return enum_dict - def __new__(metacls, cls, bases, classdict): + def __new__(metacls, cls, bases, classdict, **kwds): # an Enum class is final once enumeration items have been defined; it # cannot be mixed with other types (int, float, etc.) if it has an # inherited __new__ unless a new __new__ is defined (or the resulting @@ -146,8 +204,9 @@ class EnumMeta(type): for key in ignore: classdict.pop(key, None) member_type, first_enum = metacls._get_mixins_(cls, bases) - __new__, save_new, use_args = metacls._find_new_(classdict, member_type, - first_enum) + __new__, save_new, use_args = metacls._find_new_( + classdict, member_type, first_enum, + ) # save enum items into separate mapping so they don't get baked into # the new class @@ -168,17 +227,33 @@ class EnumMeta(type): if '__doc__' not in classdict: classdict['__doc__'] = 'An enumeration.' + # postpone calling __init_subclass__ + if '__init_subclass__' in classdict and classdict['__init_subclass__'] is None: + raise TypeError('%s.__init_subclass__ cannot be None') + # remove current __init_subclass__ so previous one can be found with getattr + new_init_subclass = classdict.pop('__init_subclass__', None) # create our new Enum type - enum_class = super().__new__(metacls, cls, bases, classdict) + if bases: + bases = (_NoInitSubclass, ) + bases + enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) + enum_class.__bases__ = enum_class.__bases__[1:] #or (object, ) + else: + enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) + old_init_subclass = getattr(enum_class, '__init_subclass__', None) + # and restore the new one (if there was one) + if new_init_subclass is not None: + enum_class.__init_subclass__ = classmethod(new_init_subclass) enum_class._member_names_ = [] # names in definition order enum_class._member_map_ = {} # name->value map enum_class._member_type_ = member_type # save DynamicClassAttribute attributes from super classes so we know # if we can take the shortcut of storing members in the class dict - dynamic_attributes = {k for c in enum_class.mro() - for k, v in c.__dict__.items() - if isinstance(v, DynamicClassAttribute)} + dynamic_attributes = { + k for c in enum_class.mro() + for k, v in c.__dict__.items() + if isinstance(v, DynamicClassAttribute) + } # Reverse value->name map for hashable values. enum_class._value2member_map_ = {} @@ -279,6 +354,9 @@ class EnumMeta(type): if _order_ != enum_class._member_names_: raise TypeError('member order does not match _order_') + # finally, call parents' __init_subclass__ + if Enum is not None and old_init_subclass is not None: + old_init_subclass(**kwds) return enum_class def __bool__(self): @@ -288,7 +366,8 @@ class EnumMeta(type): return True 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. + """ + 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 to an enumeration member (i.e. Color(3)) and for the functional API @@ -310,12 +389,18 @@ class EnumMeta(type): not correct, unpickling will fail in some circumstances. `type`, if set, will be mixed in as the first base class. - """ 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, start=start) + return cls._create_( + value, + names, + module=module, + qualname=qualname, + type=type, + start=start, + ) def __contains__(cls, member): if not isinstance(member, Enum): @@ -328,22 +413,23 @@ class EnumMeta(type): # nicer error message when someone tries to delete an attribute # (see issue19025). if attr in cls._member_map_: - raise AttributeError( - "%s: cannot delete Enum member." % cls.__name__) + raise AttributeError("%s: cannot delete Enum member %r." % (cls.__name__, attr)) super().__delattr__(attr) def __dir__(self): - return (['__class__', '__doc__', '__members__', '__module__'] + - self._member_names_) + return ( + ['__class__', '__doc__', '__members__', '__module__'] + + self._member_names_ + ) def __getattr__(cls, name): - """Return the enum member matching `name` + """ + Return the enum member matching `name` We use __getattr__ instead of descriptors or inserting into the enum class' __dict__ in order to support `name` and `value` being both properties for enum members (which live in the class' __dict__) and enum members themselves. - """ if _is_dunder(name): raise AttributeError(name) @@ -356,6 +442,9 @@ class EnumMeta(type): return cls._member_map_[name] def __iter__(cls): + """ + Returns members in definition order. + """ return (cls._member_map_[name] for name in cls._member_names_) def __len__(cls): @@ -363,11 +452,11 @@ class EnumMeta(type): @property def __members__(cls): - """Returns a mapping of member name->value. + """ + Returns a mapping of member name->value. This mapping lists all enum members, including aliases. Note that this is a read-only view of the internal mapping. - """ return MappingProxyType(cls._member_map_) @@ -375,15 +464,18 @@ class EnumMeta(type): return "" % cls.__name__ def __reversed__(cls): + """ + Returns members in reverse definition order. + """ return (cls._member_map_[name] for name in reversed(cls._member_names_)) def __setattr__(cls, name, value): - """Block attempts to reassign Enum members. + """ + Block attempts to reassign Enum members. A simple assignment to the class namespace only changes one of the several possible ways to get an Enum member from the Enum class, resulting in an inconsistent Enumeration. - """ member_map = cls.__dict__.get('_member_map_', {}) if name in member_map: @@ -391,7 +483,8 @@ class EnumMeta(type): super().__setattr__(name, value) def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, start=1): - """Convenience method to create a new Enum class. + """ + Convenience method to create a new Enum class. `names` can be: @@ -400,7 +493,6 @@ class EnumMeta(type): * 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 pairs. - """ metacls = cls.__class__ bases = (cls, ) if type is None else (type, cls) @@ -481,15 +573,18 @@ class EnumMeta(type): for chain in bases: for base in chain.__mro__: if issubclass(base, Enum) and base._member_names_: - raise TypeError("%s: cannot extend enumeration %r" % (class_name, base.__name__)) + raise TypeError( + "%s: cannot extend enumeration %r" + % (class_name, base.__name__) + ) @staticmethod def _get_mixins_(class_name, bases): - """Returns the type for creating enum members, and the first inherited + """ + Returns the type for creating enum members, and the first inherited enum class. bases: the tuple of bases that was given to __new__ - """ if not bases: return object, Enum @@ -501,12 +596,16 @@ class EnumMeta(type): for base in chain.__mro__: if base is object: continue + elif issubclass(base, Enum): + if base._member_type_ is not object: + data_types.append(base._member_type_) + break elif '__new__' in base.__dict__: if issubclass(base, Enum): continue data_types.append(candidate or base) break - elif not issubclass(base, Enum): + else: candidate = base if len(data_types) > 1: raise TypeError('%r: too many data types: %r' % (class_name, data_types)) @@ -528,12 +627,12 @@ class EnumMeta(type): @staticmethod def _find_new_(classdict, member_type, first_enum): - """Returns the __new__ to be used for creating the enum members. + """ + Returns the __new__ to be used for creating the enum members. classdict: the class dictionary given to __new__ member_type: the data type whose __new__ will be used by default first_enum: enumeration to check for an overriding __new__ - """ # now find the correct __new__, checking to see of one was defined # by the user; also check earlier enum classes in case a __new__ was @@ -573,10 +672,10 @@ class EnumMeta(type): class Enum(metaclass=EnumMeta): - """Generic enumeration. + """ + Generic enumeration. Derive from this class to define new enumerations. - """ def __new__(cls, value): # all enum instances are actually created during class construction @@ -619,6 +718,14 @@ class Enum(metaclass=EnumMeta): raise exc def _generate_next_value_(name, start, count, last_values): + """ + Generate the next value when not given. + + name: the name of the member + start: the initial start value or None + count: the number of existing members + last_value: the last value assigned or None + """ for last_value in reversed(last_values): try: return last_value + 1 @@ -627,6 +734,9 @@ class Enum(metaclass=EnumMeta): else: return start + def __init_subclass__(cls, **kwds): + super().__init_subclass__(**kwds) + @classmethod def _missing_(cls, value): return None @@ -639,6 +749,9 @@ class Enum(metaclass=EnumMeta): return "%s.%s" % (self.__class__.__name__, self._name_) def __dir__(self): + """ + Returns all members and all public methods + """ added_behavior = [ m for cls in self.__class__.mro() @@ -648,12 +761,15 @@ class Enum(metaclass=EnumMeta): return (['__class__', '__doc__', '__module__'] + added_behavior) def __format__(self, format_spec): + """ + Returns format using actual value type unless __str__ has been overridden. + """ # mixed-in Enums should use the mixed-in type's __format__, otherwise # we can get strange results with the Enum name showing up instead of # the value # pure Enum branch, or branch with __str__ explicitly overridden - str_overridden = type(self).__str__ != Enum.__str__ + str_overridden = type(self).__str__ not in (Enum.__str__, Flag.__str__) if self._member_type_ is object or str_overridden: cls = str val = str(self) @@ -720,12 +836,20 @@ class StrEnum(str, Enum): __str__ = str.__str__ + def _generate_next_value_(name, start, count, last_values): + """ + Return the lower-cased version of the member name. + """ + return name.lower() + def _reduce_ex_by_name(self, proto): return self.name class Flag(Enum): - """Support for flags""" + """ + Support for flags + """ def _generate_next_value_(name, start, count, last_values): """ @@ -748,6 +872,9 @@ class Flag(Enum): @classmethod def _missing_(cls, value): + """ + Returns member (possibly creating it) if one can be found for value. + """ original_value = value if value < 0: value = ~value @@ -777,6 +904,9 @@ class Flag(Enum): return pseudo_member def __contains__(self, other): + """ + Returns True if self has at least the same flags set as other. + """ if not isinstance(other, self.__class__): raise TypeError( "unsupported operand type(s) for 'in': '%s' and '%s'" % ( @@ -784,6 +914,9 @@ class Flag(Enum): return other._value_ & self._value_ == other._value_ def __iter__(self): + """ + Returns flags in decreasing value order. + """ members, extra_flags = _decompose(self.__class__, self.value) return (m for m in members if m._value_ != 0) @@ -839,10 +972,15 @@ class Flag(Enum): class IntFlag(int, Flag): - """Support for integer-based Flags""" + """ + Support for integer-based Flags + """ @classmethod def _missing_(cls, value): + """ + Returns member (possibly creating it) if one can be found for value. + """ if not isinstance(value, int): raise ValueError("%r is not a valid %s" % (value, cls.__qualname__)) new_member = cls._create_pseudo_member_(value) @@ -850,6 +988,9 @@ class IntFlag(int, Flag): @classmethod def _create_pseudo_member_(cls, value): + """ + Create a composite member iff value contains only members. + """ pseudo_member = cls._value2member_map_.get(value, None) if pseudo_member is None: need_to_create = [value] @@ -904,11 +1045,15 @@ class IntFlag(int, Flag): def _high_bit(value): - """returns index of highest bit, or -1 if value is zero or negative""" + """ + returns index of highest bit, or -1 if value is zero or negative + """ return value.bit_length() - 1 def unique(enumeration): - """Class decorator for enumerations ensuring unique member values.""" + """ + Class decorator for enumerations ensuring unique member values. + """ duplicates = [] for name, member in enumeration.__members__.items(): if name != member.name: @@ -921,7 +1066,9 @@ def unique(enumeration): return enumeration def _decompose(flag, value): - """Extract all members from the value.""" + """ + Extract all members from the value. + """ # _decompose is only called if the value is not named not_covered = value negative = value < 0 diff --git a/Lib/fnmatch.py b/Lib/fnmatch.py index 0eb1802bdb5..7c52c23067d 100644 --- a/Lib/fnmatch.py +++ b/Lib/fnmatch.py @@ -52,7 +52,7 @@ def _compile_pattern(pat): return re.compile(res).match def filter(names, pat): - """Return the subset of the list NAMES that match PAT.""" + """Construct a list from those elements of the iterable NAMES that match PAT.""" result = [] pat = os.path.normcase(pat) match = _compile_pattern(pat) diff --git a/Lib/http/client.py b/Lib/http/client.py index a54679cf84d..4eca93ef268 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -861,7 +861,7 @@ class HTTPConnection: the endpoint passed to `set_tunnel`. This done by sending an HTTP CONNECT request to the proxy server when the connection is established. - This method must be called before the HTML connection has been + This method must be called before the HTTP connection has been established. The headers argument should be a mapping of extra HTTP headers to send diff --git a/Lib/http/server.py b/Lib/http/server.py index ee991821099..94f730ed344 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -1092,8 +1092,7 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler): env['PATH_INFO'] = uqrest env['PATH_TRANSLATED'] = self.translate_path(uqrest) env['SCRIPT_NAME'] = scriptname - if query: - env['QUERY_STRING'] = query + env['QUERY_STRING'] = query env['REMOTE_ADDR'] = self.client_address[0] authorization = self.headers.get("authorization") if authorization: @@ -1123,12 +1122,7 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler): referer = self.headers.get('referer') if referer: env['HTTP_REFERER'] = referer - accept = [] - for line in self.headers.getallmatchingheaders('accept'): - if line[:1] in "\t\n\r ": - accept.append(line.strip()) - else: - accept = accept + line[7:].split(',') + accept = self.headers.get_all('accept', ()) env['HTTP_ACCEPT'] = ','.join(accept) ua = self.headers.get('user-agent') if ua: diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 34f28d6084f..7167314ca7e 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,10 @@ Released on 2021-10-04? ====================================== +bpo-42508: Keep IDLE running on macOS. Remove obsolete workaround +that prevented running files with shortcuts when using new universal2 +installers built on macOS 11. + bpo-42426: Fix reporting offset of the RE error in searchengine. bpo-42416: Get docstrings for IDLE calltips more often diff --git a/Lib/idlelib/codecontext.py b/Lib/idlelib/codecontext.py index 989b30e5994..eb19773f56e 100644 --- a/Lib/idlelib/codecontext.py +++ b/Lib/idlelib/codecontext.py @@ -7,11 +7,14 @@ the lines which contain the block opening keywords, e.g. 'if', for the enclosing block. The number of hint lines is determined by the maxlines variable in the codecontext section of config-extensions.def. Lines which do not open blocks are not shown in the context hints pane. + +For EditorWindows, <> is bound to CodeContext(self). +toggle_code_context_event. """ import re from sys import maxsize as INFINITY -import tkinter +from tkinter import Frame, Text, TclError from tkinter.constants import NSEW, SUNKEN from idlelib.config import idleConf @@ -83,7 +86,7 @@ class CodeContext: if self.t1 is not None: try: self.text.after_cancel(self.t1) - except tkinter.TclError: # pragma: no cover + except TclError: # pragma: no cover pass self.t1 = None @@ -111,7 +114,7 @@ class CodeContext: padx += widget.tk.getint(info['padx']) padx += widget.tk.getint(widget.cget('padx')) border += widget.tk.getint(widget.cget('border')) - context = self.context = tkinter.Text( + context = self.context = Text( self.editwin.text_frame, height=1, width=1, # Don't request more than we get. @@ -127,7 +130,7 @@ class CodeContext: line_number_colors = idleConf.GetHighlight(idleConf.CurrentTheme(), 'linenumber') - self.cell00 = tkinter.Frame(self.editwin.text_frame, + self.cell00 = Frame(self.editwin.text_frame, bg=line_number_colors['background']) self.cell00.grid(row=0, column=0, sticky=NSEW) menu_status = 'Hide' @@ -221,7 +224,7 @@ class CodeContext: """ try: self.context.index("sel.first") - except tkinter.TclError: + except TclError: lines = len(self.info) if lines == 1: # No context lines are showing. newtop = 1 diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index 343d2ef32d7..abe8a85952b 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -757,7 +757,7 @@ class ModifiedInterpreter(InteractiveInterpreter): def runcode(self, code): "Override base class method" if self.tkconsole.executing: - self.interp.restart_subprocess() + self.restart_subprocess() self.checklinecache() debugger = self.debugger try: @@ -1061,8 +1061,10 @@ class PyShell(OutputWindow): (sys.version, sys.platform, self.COPYRIGHT, nosub)) self.text.focus_force() self.showprompt() + # User code should use separate default Tk root window import tkinter - tkinter._default_root = None # 03Jan04 KBK What's this? + tkinter._support_default_root = True + tkinter._default_root = None return True def stop_readline(self): diff --git a/Lib/idlelib/runscript.py b/Lib/idlelib/runscript.py index a54108794ab..028b0dbd21d 100644 --- a/Lib/idlelib/runscript.py +++ b/Lib/idlelib/runscript.py @@ -11,6 +11,7 @@ TODO: Specify command line arguments in a dialog box. """ import os import tabnanny +import time import tokenize import tkinter.messagebox as tkMessageBox @@ -42,9 +43,7 @@ class ScriptBinding: self.root = self.editwin.root # cli_args is list of strings that extends sys.argv self.cli_args = [] - - if macosx.isCocoaTk(): - self.editwin.text_frame.bind('<>', self._run_module_event) + self.perf = 0.0 # Workaround for macOS 11 Uni2; see bpo-42508. def check_module_event(self, event): if isinstance(self.editwin, outwin.OutputWindow): @@ -107,24 +106,10 @@ class ScriptBinding: finally: shell.set_warning_stream(saved_stream) - def run_module_event(self, event): - if macosx.isCocoaTk(): - # Tk-Cocoa in MacOSX is broken until at least - # Tk 8.5.9, and without this rather - # crude workaround IDLE would hang when a user - # tries to run a module using the keyboard shortcut - # (the menu item works fine). - self.editwin.text_frame.after(200, - lambda: self.editwin.text_frame.event_generate( - '<>')) - return 'break' - else: - return self._run_module_event(event) - def run_custom_event(self, event): - return self._run_module_event(event, customize=True) + return self.run_module_event(event, customize=True) - def _run_module_event(self, event, *, customize=False): + def run_module_event(self, event, *, customize=False): """Run the module after setting up the environment. First check the syntax. Next get customization. If OK, make @@ -133,6 +118,8 @@ class ScriptBinding: module being executed and also add that directory to its sys.path if not already included. """ + if macosx.isCocoaTk() and (time.perf_counter() - self.perf < .05): + return 'break' if isinstance(self.editwin, outwin.OutputWindow): self.editwin.text.bell() return 'break' @@ -218,6 +205,7 @@ class ScriptBinding: # XXX This should really be a function of EditorWindow... tkMessageBox.showerror(title, message, parent=self.editwin.text) self.editwin.text.focus_set() + self.perf = time.perf_counter() if __name__ == "__main__": diff --git a/Lib/importlib/_abc.py b/Lib/importlib/_abc.py index fb5ec727cea..7591946a4e7 100644 --- a/Lib/importlib/_abc.py +++ b/Lib/importlib/_abc.py @@ -35,6 +35,7 @@ class Loader(metaclass=abc.ABCMeta): """ if not hasattr(self, 'exec_module'): raise ImportError + # Warning implemented in _load_module_shim(). return _bootstrap._load_module_shim(self, fullname) def module_repr(self, module): diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 9b7335b7b9c..e4f893c38c1 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -20,6 +20,12 @@ work. One should use importlib as the public-facing version of this module. # reference any injected objects! This includes not only global code but also # anything specified at the class level. +def _object_name(obj): + try: + return obj.__qualname__ + except AttributeError: + return type(obj).__qualname__ + # Bootstrap-related code ###################################################### # Modules injected manually by _setup() @@ -272,6 +278,9 @@ def _load_module_shim(self, fullname): This method is deprecated. Use loader.exec_module instead. """ + msg = ("the load_module() method is deprecated and slated for removal in " + "Python 3.12; use exec_module() instead") + _warnings.warn(msg, DeprecationWarning) spec = spec_from_loader(fullname, self) if fullname in sys.modules: module = sys.modules[fullname] @@ -612,9 +621,9 @@ def _exec(spec, module): else: _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. + msg = (f"{_object_name(spec.loader)}.exec_module() not found; " + "falling back to load_module()") + _warnings.warn(msg, ImportWarning) spec.loader.load_module(name) else: spec.loader.exec_module(module) @@ -627,9 +636,8 @@ def _exec(spec, module): def _load_backward_compatible(spec): - # (issue19713) Once BuiltinImporter and ExtensionFileLoader - # have exec_module() implemented, we can add a deprecation - # warning here. + # It is assumed that all callers have been warned about using load_module() + # appropriately before calling this function. try: spec.loader.load_module(spec.name) except: @@ -668,6 +676,9 @@ def _load_unlocked(spec): if spec.loader is not None: # Not a namespace package. if not hasattr(spec.loader, 'exec_module'): + msg = (f"{_object_name(spec.loader)}.exec_module() not found; " + "falling back to load_module()") + _warnings.warn(msg, ImportWarning) return _load_backward_compatible(spec) module = module_from_spec(spec) @@ -851,6 +862,7 @@ class FrozenImporter: This method is deprecated. Use exec_module() instead. """ + # Warning about deprecation implemented in _load_module_shim(). return _load_module_shim(cls, fullname) @classmethod diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index b8dd128238f..354650011e1 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -312,6 +312,7 @@ _code_type = type(_write_atomic.__code__) # Python 3.10a1 3430 (Make 'annotations' future by default) # Python 3.10a1 3431 (New line number table format -- PEP 626) # Python 3.10a2 3432 (Function annotation for MAKE_FUNCTION is changed from dict to tuple bpo-42202) +# Python 3.10a2 3433 (RERAISE restores f_lasti if oparg != 0) # # MAGIC must change whenever the bytecode emitted by the compiler may no @@ -321,7 +322,7 @@ _code_type = type(_write_atomic.__code__) # Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array # in PC/launcher.c must also be updated. -MAGIC_NUMBER = (3432).to_bytes(2, 'little') + b'\r\n' +MAGIC_NUMBER = (3433).to_bytes(2, 'little') + b'\r\n' _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c _PYCACHE = '__pycache__' @@ -832,7 +833,8 @@ class _LoaderBasics: _bootstrap._call_with_frames_removed(exec, code, module.__dict__) def load_module(self, fullname): - """This module is deprecated.""" + """This method is deprecated.""" + # Warning implemented in _load_module_shim(). return _bootstrap._load_module_shim(self, fullname) @@ -1007,7 +1009,7 @@ class FileLoader: """ # 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 + # of that form can be updated without breaking the frozen module. return super(FileLoader, self).load_module(fullname) @_check_name @@ -1253,6 +1255,7 @@ class _NamespaceLoader: # The import system never calls this method. _bootstrap._verbose_message('namespace module loaded with path {!r}', self._path) + # Warning implemented in _load_module_shim(). return _bootstrap._load_module_shim(self, fullname) diff --git a/Lib/importlib/metadata.py b/Lib/importlib/metadata.py index 302d61d505c..36bb42ee21d 100644 --- a/Lib/importlib/metadata.py +++ b/Lib/importlib/metadata.py @@ -1,4 +1,3 @@ -import io import os import re import abc @@ -18,6 +17,7 @@ from contextlib import suppress from importlib import import_module from importlib.abc import MetaPathFinder from itertools import starmap +from typing import Any, List, Optional, Protocol, TypeVar, Union __all__ = [ @@ -31,7 +31,7 @@ __all__ = [ 'metadata', 'requires', 'version', - ] +] class PackageNotFoundError(ModuleNotFoundError): @@ -43,7 +43,7 @@ class PackageNotFoundError(ModuleNotFoundError): @property def name(self): - name, = self.args + (name,) = self.args return name @@ -60,7 +60,7 @@ class EntryPoint( r'(?P[\w.]+)\s*' r'(:\s*(?P[\w.]+))?\s*' r'(?P\[.*\])?\s*$' - ) + ) """ A regular expression describing the syntax for an entry point, which might look like: @@ -77,6 +77,8 @@ class EntryPoint( following the attr, and following any extras. """ + dist: Optional['Distribution'] = None + def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, @@ -104,23 +106,27 @@ class EntryPoint( @classmethod def _from_config(cls, config): - return [ + return ( cls(name, value, group) for group in config.sections() for name, value in config.items(group) - ] + ) @classmethod def _from_text(cls, text): config = ConfigParser(delimiters='=') # case sensitive: https://stackoverflow.com/q/1611799/812183 config.optionxform = str - try: - config.read_string(text) - except AttributeError: # pragma: nocover - # Python 2 has no read_string - config.readfp(io.StringIO(text)) - return EntryPoint._from_config(config) + config.read_string(text) + return cls._from_config(config) + + @classmethod + def _from_text_for(cls, text, dist): + return (ep._for(dist) for ep in cls._from_text(text)) + + def _for(self, dist): + self.dist = dist + return self def __iter__(self): """ @@ -132,7 +138,7 @@ class EntryPoint( return ( self.__class__, (self.name, self.value, self.group), - ) + ) class PackagePath(pathlib.PurePosixPath): @@ -159,6 +165,25 @@ class FileHash: return ''.format(self.mode, self.value) +_T = TypeVar("_T") + + +class PackageMetadata(Protocol): + def __len__(self) -> int: + ... # pragma: no cover + + def __contains__(self, item: str) -> bool: + ... # pragma: no cover + + def __getitem__(self, key: str) -> str: + ... # pragma: no cover + + def get_all(self, name: str, failobj: _T = ...) -> Union[List[Any], _T]: + """ + Return all values associated with a possibly multi-valued key. + """ + + class Distribution: """A Python distribution package.""" @@ -210,9 +235,8 @@ class Distribution: raise ValueError("cannot accept context and kwargs") context = context or DistributionFinder.Context(**kwargs) return itertools.chain.from_iterable( - resolver(context) - for resolver in cls._discover_resolvers() - ) + resolver(context) for resolver in cls._discover_resolvers() + ) @staticmethod def at(path): @@ -227,24 +251,24 @@ class Distribution: def _discover_resolvers(): """Search the meta_path for resolvers.""" declared = ( - getattr(finder, 'find_distributions', None) - for finder in sys.meta_path - ) + getattr(finder, 'find_distributions', None) for finder in sys.meta_path + ) return filter(None, declared) @classmethod def _local(cls, root='.'): from pep517 import build, meta + system = build.compat_system(root) builder = functools.partial( meta.build, source_dir=root, system=system, - ) + ) return PathDistribution(zipfile.Path(meta.build_as_zip(builder))) @property - def metadata(self): + def metadata(self) -> PackageMetadata: """Return the parsed metadata for this Distribution. The returned object will have keys that name the various bits of @@ -257,9 +281,14 @@ class Distribution: # effect is to just end up using the PathDistribution's self._path # (which points to the egg-info file) attribute unchanged. or self.read_text('') - ) + ) return email.message_from_string(text) + @property + def name(self): + """Return the 'Name' metadata for the distribution package.""" + return self.metadata['Name'] + @property def version(self): """Return the 'Version' metadata for the distribution package.""" @@ -267,7 +296,7 @@ class Distribution: @property def entry_points(self): - return EntryPoint._from_text(self.read_text('entry_points.txt')) + return list(EntryPoint._from_text_for(self.read_text('entry_points.txt'), self)) @property def files(self): @@ -324,9 +353,10 @@ class Distribution: section_pairs = cls._read_sections(source.splitlines()) sections = { section: list(map(operator.itemgetter('line'), results)) - for section, results in - itertools.groupby(section_pairs, operator.itemgetter('section')) - } + for section, results in itertools.groupby( + section_pairs, operator.itemgetter('section') + ) + } return cls._convert_egg_info_reqs_to_simple_reqs(sections) @staticmethod @@ -350,6 +380,7 @@ class Distribution: requirement. This method converts the former to the latter. See _test_deps_from_requires_text for an example. """ + def make_condition(name): return name and 'extra == "{name}"'.format(name=name) @@ -438,48 +469,69 @@ class FastPath: names = zip_path.root.namelist() self.joinpath = zip_path.joinpath - return dict.fromkeys( - child.split(posixpath.sep, 1)[0] - for child in names - ) - - def is_egg(self, search): - base = self.base - return ( - base == search.versionless_egg_name - or base.startswith(search.prefix) - and base.endswith('.egg')) + return dict.fromkeys(child.split(posixpath.sep, 1)[0] for child in names) def search(self, name): - for child in self.children(): - n_low = child.lower() - if (n_low in name.exact_matches - or n_low.startswith(name.prefix) - and n_low.endswith(name.suffixes) - # legacy case: - or self.is_egg(name) and n_low == 'egg-info'): - yield self.joinpath(child) + return ( + self.joinpath(child) + for child in self.children() + if name.matches(child, self.base) + ) class Prepared: """ A prepared search for metadata on a possibly-named package. """ - normalized = '' - prefix = '' + + normalized = None suffixes = '.dist-info', '.egg-info' exact_matches = [''][:0] - versionless_egg_name = '' def __init__(self, name): self.name = name if name is None: return - self.normalized = name.lower().replace('-', '_') - self.prefix = self.normalized + '-' - self.exact_matches = [ - self.normalized + suffix for suffix in self.suffixes] - self.versionless_egg_name = self.normalized + '.egg' + self.normalized = self.normalize(name) + self.exact_matches = [self.normalized + suffix for suffix in self.suffixes] + + @staticmethod + def normalize(name): + """ + PEP 503 normalization plus dashes as underscores. + """ + return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_') + + @staticmethod + def legacy_normalize(name): + """ + Normalize the package name as found in the convention in + older packaging tools versions and specs. + """ + return name.lower().replace('-', '_') + + def matches(self, cand, base): + low = cand.lower() + pre, ext = os.path.splitext(low) + name, sep, rest = pre.partition('-') + return ( + low in self.exact_matches + or ext in self.suffixes + and (not self.normalized or name.replace('.', '_') == self.normalized) + # legacy case: + or self.is_egg(base) + and low == 'egg-info' + ) + + def is_egg(self, base): + normalized = self.legacy_normalize(self.name or '') + prefix = normalized + '-' if normalized else '' + versionless_egg_name = normalized + '.egg' if self.name else '' + return ( + base == versionless_egg_name + or base.startswith(prefix) + and base.endswith('.egg') + ) class MetadataPathFinder(DistributionFinder): @@ -500,9 +552,8 @@ class MetadataPathFinder(DistributionFinder): def _search_paths(cls, name, paths): """Find metadata directories in paths heuristically.""" return itertools.chain.from_iterable( - path.search(Prepared(name)) - for path in map(FastPath, paths) - ) + path.search(Prepared(name)) for path in map(FastPath, paths) + ) class PathDistribution(Distribution): @@ -515,9 +566,15 @@ class PathDistribution(Distribution): self._path = path def read_text(self, filename): - with suppress(FileNotFoundError, IsADirectoryError, KeyError, - NotADirectoryError, PermissionError): + with suppress( + FileNotFoundError, + IsADirectoryError, + KeyError, + NotADirectoryError, + PermissionError, + ): return self._path.joinpath(filename).read_text(encoding='utf-8') + read_text.__doc__ = Distribution.read_text.__doc__ def locate_file(self, path): @@ -541,11 +598,11 @@ def distributions(**kwargs): return Distribution.discover(**kwargs) -def metadata(distribution_name): +def metadata(distribution_name) -> PackageMetadata: """Get the metadata for the named package. :param distribution_name: The name of the distribution package to query. - :return: An email.Message containing the parsed metadata. + :return: A PackageMetadata containing the parsed metadata. """ return Distribution.from_name(distribution_name).metadata @@ -565,15 +622,11 @@ def entry_points(): :return: EntryPoint objects for all installed packages. """ - eps = itertools.chain.from_iterable( - dist.entry_points for dist in distributions()) + eps = itertools.chain.from_iterable(dist.entry_points for dist in distributions()) by_group = operator.attrgetter('group') ordered = sorted(eps, key=by_group) grouped = itertools.groupby(ordered, by_group) - return { - group: tuple(eps) - for group, eps in grouped - } + return {group: tuple(eps) for group, eps in grouped} def files(distribution_name): diff --git a/Lib/inspect.py b/Lib/inspect.py index 7412d0e837c..70c5ef7bb64 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -868,7 +868,12 @@ def findsource(object): lnum = object.co_firstlineno - 1 pat = re.compile(r'^(\s*def\s)|(\s*async\s+def\s)|(.*(? 0: - if pat.match(lines[lnum]): break + try: + line = lines[lnum] + except IndexError: + raise OSError('lineno is out of bounds') + if pat.match(line): + break lnum = lnum - 1 return lines, lnum raise OSError('could not find code object') @@ -930,6 +935,7 @@ class BlockFinder: self.indecorator = False self.decoratorhasargs = False self.last = 1 + self.body_col0 = None def tokeneater(self, type, token, srowcol, erowcol, line): if not self.started and not self.indecorator: @@ -961,6 +967,8 @@ class BlockFinder: elif self.passline: pass elif type == tokenize.INDENT: + if self.body_col0 is None and self.started: + self.body_col0 = erowcol[1] self.indent = self.indent + 1 self.passline = True elif type == tokenize.DEDENT: @@ -970,6 +978,10 @@ class BlockFinder: # not e.g. for "if: else:" or "try: finally:" blocks) if self.indent <= 0: raise EndOfBlock + elif type == tokenize.COMMENT: + if self.body_col0 is not None and srowcol[1] >= self.body_col0: + # Include comments if indented at least as much as the block + self.last = srowcol[0] elif self.indent == 0 and type not in (tokenize.COMMENT, tokenize.NL): # any other token on the same indentation level end the previous # block as well, except the pseudo-tokens COMMENT and NL. @@ -2125,9 +2137,9 @@ def _signature_fromstr(cls, obj, s, skip_bound_arg=True): return cls(parameters, return_annotation=cls.empty) -def _get_type_hints(func): +def _get_type_hints(func, **kwargs): try: - return typing.get_type_hints(func) + return typing.get_type_hints(func, **kwargs) except Exception: # First, try to use the get_type_hints to resolve # annotations. But for keeping the behavior intact @@ -2152,7 +2164,8 @@ def _signature_from_builtin(cls, func, skip_bound_arg=True): return _signature_fromstr(cls, func, s, skip_bound_arg) -def _signature_from_function(cls, func, skip_bound_arg=True): +def _signature_from_function(cls, func, skip_bound_arg=True, + globalns=None, localns=None): """Private helper: constructs Signature for the given python function.""" is_duck_function = False @@ -2178,7 +2191,7 @@ def _signature_from_function(cls, func, skip_bound_arg=True): positional = arg_names[:pos_count] keyword_only_count = func_code.co_kwonlyargcount keyword_only = arg_names[pos_count:pos_count + keyword_only_count] - annotations = _get_type_hints(func) + annotations = _get_type_hints(func, globalns=globalns, localns=localns) defaults = func.__defaults__ kwdefaults = func.__kwdefaults__ @@ -2250,23 +2263,28 @@ def _signature_from_function(cls, func, skip_bound_arg=True): def _signature_from_callable(obj, *, follow_wrapper_chains=True, skip_bound_arg=True, + globalns=None, + localns=None, sigcls): """Private helper function to get signature for arbitrary callable objects. """ + _get_signature_of = functools.partial(_signature_from_callable, + follow_wrapper_chains=follow_wrapper_chains, + skip_bound_arg=skip_bound_arg, + globalns=globalns, + localns=localns, + sigcls=sigcls) + if not callable(obj): raise TypeError('{!r} is not a callable object'.format(obj)) if isinstance(obj, types.MethodType): # In this case we skip the first parameter of the underlying # function (usually `self` or `cls`). - sig = _signature_from_callable( - obj.__func__, - follow_wrapper_chains=follow_wrapper_chains, - skip_bound_arg=skip_bound_arg, - sigcls=sigcls) + sig = _get_signature_of(obj.__func__) if skip_bound_arg: return _signature_bound_method(sig) @@ -2280,11 +2298,7 @@ def _signature_from_callable(obj, *, # 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_from_callable( - obj, - follow_wrapper_chains=follow_wrapper_chains, - skip_bound_arg=skip_bound_arg, - sigcls=sigcls) + return _get_signature_of(obj) try: sig = obj.__signature__ @@ -2311,11 +2325,7 @@ def _signature_from_callable(obj, *, # (usually `self`, or `cls`) will not be passed # automatically (as for boundmethods) - wrapped_sig = _signature_from_callable( - partialmethod.func, - follow_wrapper_chains=follow_wrapper_chains, - skip_bound_arg=skip_bound_arg, - sigcls=sigcls) + wrapped_sig = _get_signature_of(partialmethod.func) sig = _signature_get_partial(wrapped_sig, partialmethod, (None,)) first_wrapped_param = tuple(wrapped_sig.parameters.values())[0] @@ -2334,18 +2344,15 @@ def _signature_from_callable(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(sigcls, obj, - skip_bound_arg=skip_bound_arg) + skip_bound_arg=skip_bound_arg, + globalns=globalns, localns=localns) if _signature_is_builtin(obj): return _signature_from_builtin(sigcls, obj, skip_bound_arg=skip_bound_arg) if isinstance(obj, functools.partial): - wrapped_sig = _signature_from_callable( - obj.func, - follow_wrapper_chains=follow_wrapper_chains, - skip_bound_arg=skip_bound_arg, - sigcls=sigcls) + wrapped_sig = _get_signature_of(obj.func) return _signature_get_partial(wrapped_sig, obj) sig = None @@ -2356,29 +2363,17 @@ def _signature_from_callable(obj, *, # in its metaclass call = _signature_get_user_defined_method(type(obj), '__call__') if call is not None: - sig = _signature_from_callable( - call, - follow_wrapper_chains=follow_wrapper_chains, - skip_bound_arg=skip_bound_arg, - sigcls=sigcls) + sig = _get_signature_of(call) 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_from_callable( - new, - follow_wrapper_chains=follow_wrapper_chains, - skip_bound_arg=skip_bound_arg, - sigcls=sigcls) + sig = _get_signature_of(new) else: # Finally, we should have at least __init__ implemented init = _signature_get_user_defined_method(obj, '__init__') if init is not None: - sig = _signature_from_callable( - init, - follow_wrapper_chains=follow_wrapper_chains, - skip_bound_arg=skip_bound_arg, - sigcls=sigcls) + sig = _get_signature_of(init) if sig is None: # At this point we know, that `obj` is a class, with no user- @@ -2424,11 +2419,7 @@ def _signature_from_callable(obj, *, call = _signature_get_user_defined_method(type(obj), '__call__') if call is not None: try: - sig = _signature_from_callable( - call, - follow_wrapper_chains=follow_wrapper_chains, - skip_bound_arg=skip_bound_arg, - sigcls=sigcls) + sig = _get_signature_of(call) except ValueError as ex: msg = 'no signature found for {!r}'.format(obj) raise ValueError(msg) from ex @@ -2880,10 +2871,12 @@ class Signature: return _signature_from_builtin(cls, func) @classmethod - def from_callable(cls, obj, *, follow_wrapped=True): + def from_callable(cls, obj, *, + follow_wrapped=True, globalns=None, localns=None): """Constructs Signature for the given callable object.""" return _signature_from_callable(obj, sigcls=cls, - follow_wrapper_chains=follow_wrapped) + follow_wrapper_chains=follow_wrapped, + globalns=globalns, localns=localns) @property def parameters(self): @@ -3131,9 +3124,10 @@ class Signature: return rendered -def signature(obj, *, follow_wrapped=True): +def signature(obj, *, follow_wrapped=True, globalns=None, localns=None): """Get a signature object for the passed callable.""" - return Signature.from_callable(obj, follow_wrapped=follow_wrapped) + return Signature.from_callable(obj, follow_wrapped=follow_wrapped, + globalns=globalns, localns=localns) def _main(): diff --git a/Lib/lib2to3/Grammar.txt b/Lib/lib2to3/Grammar.txt index e007dc188af..fa7b15061d9 100644 --- a/Lib/lib2to3/Grammar.txt +++ b/Lib/lib2to3/Grammar.txt @@ -18,15 +18,55 @@ decorated: decorators (classdef | funcdef | async_funcdef) async_funcdef: ASYNC funcdef funcdef: 'def' NAME parameters ['->' test] ':' suite parameters: '(' [typedargslist] ')' -typedargslist: ((tfpdef ['=' test] ',')* - ('*' [tname] (',' tname ['=' test])* [',' ['**' tname [',']]] | '**' tname [',']) - | tfpdef ['=' test] (',' tfpdef ['=' test])* [',']) + +# The following definition for typedarglist is equivalent to this set of rules: +# +# arguments = argument (',' argument)* +# argument = tfpdef ['=' test] +# kwargs = '**' tname [','] +# args = '*' [tname] +# kwonly_kwargs = (',' argument)* [',' [kwargs]] +# args_kwonly_kwargs = args kwonly_kwargs | kwargs +# poskeyword_args_kwonly_kwargs = arguments [',' [args_kwonly_kwargs]] +# typedargslist_no_posonly = poskeyword_args_kwonly_kwargs | args_kwonly_kwargs +# typedarglist = arguments ',' '/' [',' [typedargslist_no_posonly]])|(typedargslist_no_posonly)" +# +# It needs to be fully expanded to allow our LL(1) parser to work on it. + +typedargslist: tfpdef ['=' test] (',' tfpdef ['=' test])* ',' '/' [ + ',' [((tfpdef ['=' test] ',')* ('*' [tname] (',' tname ['=' test])* + [',' ['**' tname [',']]] | '**' tname [',']) + | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])] + ] | ((tfpdef ['=' test] ',')* ('*' [tname] (',' tname ['=' test])* + [',' ['**' tname [',']]] | '**' tname [',']) + | tfpdef ['=' test] (',' tfpdef ['=' test])* [',']) + tname: NAME [':' test] tfpdef: tname | '(' tfplist ')' tfplist: tfpdef (',' tfpdef)* [','] -varargslist: ((vfpdef ['=' test] ',')* - ('*' [vname] (',' vname ['=' test])* [',' ['**' vname [',']]] | '**' vname [',']) - | vfpdef ['=' test] (',' vfpdef ['=' test])* [',']) + +# The following definition for varargslist is equivalent to this set of rules: +# +# arguments = argument (',' argument )* +# argument = vfpdef ['=' test] +# kwargs = '**' vname [','] +# args = '*' [vname] +# kwonly_kwargs = (',' argument )* [',' [kwargs]] +# args_kwonly_kwargs = args kwonly_kwargs | kwargs +# poskeyword_args_kwonly_kwargs = arguments [',' [args_kwonly_kwargs]] +# vararglist_no_posonly = poskeyword_args_kwonly_kwargs | args_kwonly_kwargs +# varargslist = arguments ',' '/' [','[(vararglist_no_posonly)]] | (vararglist_no_posonly) +# +# It needs to be fully expanded to allow our LL(1) parser to work on it. + +varargslist: vfpdef ['=' test ](',' vfpdef ['=' test])* ',' '/' [',' [ + ((vfpdef ['=' test] ',')* ('*' [vname] (',' vname ['=' test])* + [',' ['**' vname [',']]] | '**' vname [',']) + | vfpdef ['=' test] (',' vfpdef ['=' test])* [',']) + ]] | ((vfpdef ['=' test] ',')* + ('*' [vname] (',' vname ['=' test])* [',' ['**' vname [',']]]| '**' vname [',']) + | vfpdef ['=' test] (',' vfpdef ['=' test])* [',']) + vname: NAME vfpdef: vname | '(' vfplist ')' vfplist: vfpdef (',' vfpdef)* [','] diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index ba2bb787332..d5db66b9b1e 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -272,6 +272,12 @@ class TestUnpackingGeneralizations(GrammarTest): def test_dict_display_2(self): self.validate("""{**{}, 3:4, **{5:6, 7:8}}""") + def test_complex_star_expression(self): + self.validate("func(* [] or [1])") + + def test_complex_double_star_expression(self): + self.validate("func(**{1: 3} if False else {x: x for x in range(3)})") + def test_argument_unpacking_1(self): self.validate("""f(a, *b, *c, d)""") @@ -630,6 +636,7 @@ class TestLiterals(GrammarTest): class TestNamedAssignments(GrammarTest): + """Also known as the walrus operator.""" def test_named_assignment_if(self): driver.parse_string("if f := x(): pass\n") @@ -644,6 +651,30 @@ class TestNamedAssignments(GrammarTest): driver.parse_string("[(lastNum := num) == 1 for num in [1, 2, 3]]\n") +class TestPositionalOnlyArgs(GrammarTest): + + def test_one_pos_only_arg(self): + driver.parse_string("def one_pos_only_arg(a, /): pass\n") + + def test_all_markers(self): + driver.parse_string( + "def all_markers(a, b=2, /, c, d=4, *, e=5, f): pass\n") + + def test_all_with_args_and_kwargs(self): + driver.parse_string( + """def all_markers_with_args_and_kwargs( + aa, b, /, _cc, d, *args, e, f_f, **kwargs, + ): + pass\n""") + + def test_lambda_soup(self): + driver.parse_string( + "lambda a, b, /, c, d, *args, e, f, **kw: kw\n") + + def test_only_positional_or_keyword(self): + driver.parse_string("def func(a,b,/,*,g,e=3): pass\n") + + class TestPickleableException(unittest.TestCase): def test_ParseError(self): err = ParseError('msg', 2, None, (1, 'context')) diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index badfd654b16..50b7378cd63 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1289,6 +1289,14 @@ class Manager(object): self.loggerClass = None self.logRecordFactory = None + @property + def disable(self): + return self._disable + + @disable.setter + def disable(self, value): + self._disable = _checkLevel(value) + def getLogger(self, name): """ Get a logger with the specified name (channel name), creating it diff --git a/Lib/opcode.py b/Lib/opcode.py index ac1aa535f66..cc321166e79 100644 --- a/Lib/opcode.py +++ b/Lib/opcode.py @@ -83,7 +83,6 @@ def_op('BINARY_TRUE_DIVIDE', 27) def_op('INPLACE_FLOOR_DIVIDE', 28) def_op('INPLACE_TRUE_DIVIDE', 29) -def_op('RERAISE', 48) def_op('WITH_EXCEPT_START', 49) def_op('GET_AITER', 50) def_op('GET_ANEXT', 51) @@ -161,6 +160,7 @@ name_op('LOAD_GLOBAL', 116) # Index in name list def_op('IS_OP', 117) def_op('CONTAINS_OP', 118) +def_op('RERAISE', 119) jabs_op('JUMP_IF_NOT_EXC_MATCH', 121) jrel_op('SETUP_FINALLY', 122) # Distance to target address diff --git a/Lib/os.py b/Lib/os.py index b794159f86c..05e9c32c5a7 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -36,7 +36,7 @@ _names = sys.builtin_module_names __all__ = ["altsep", "curdir", "pardir", "sep", "pathsep", "linesep", "defpath", "name", "path", "devnull", "SEEK_SET", "SEEK_CUR", "SEEK_END", "fsencode", "fsdecode", "get_exec_path", "fdopen", - "popen", "extsep"] + "extsep"] def _exists(name): return name in globals() @@ -969,51 +969,55 @@ otherwise return -SIG, where SIG is the signal that killed it. """ __all__.extend(["spawnlp", "spawnlpe"]) - -# Supply os.popen() -def popen(cmd, mode="r", buffering=-1): - if not isinstance(cmd, str): - raise TypeError("invalid cmd type (%s, expected string)" % type(cmd)) - if mode not in ("r", "w"): - raise ValueError("invalid mode %r" % mode) - if buffering == 0 or buffering is None: - raise ValueError("popen() does not support unbuffered streams") - import subprocess, io - if mode == "r": - proc = subprocess.Popen(cmd, - shell=True, - stdout=subprocess.PIPE, - bufsize=buffering) - return _wrap_close(io.TextIOWrapper(proc.stdout), proc) - else: - proc = subprocess.Popen(cmd, - shell=True, - stdin=subprocess.PIPE, - bufsize=buffering) - return _wrap_close(io.TextIOWrapper(proc.stdin), proc) - -# Helper for popen() -- a proxy for a file whose close waits for the process -class _wrap_close: - def __init__(self, stream, proc): - self._stream = stream - self._proc = proc - def close(self): - self._stream.close() - returncode = self._proc.wait() - if returncode == 0: - return None - if name == 'nt': - return returncode +# VxWorks has no user space shell provided. As a result, running +# command in a shell can't be supported. +if sys.platform != 'vxworks': + # Supply os.popen() + def popen(cmd, mode="r", buffering=-1): + if not isinstance(cmd, str): + raise TypeError("invalid cmd type (%s, expected string)" % type(cmd)) + if mode not in ("r", "w"): + raise ValueError("invalid mode %r" % mode) + if buffering == 0 or buffering is None: + raise ValueError("popen() does not support unbuffered streams") + import subprocess, io + if mode == "r": + proc = subprocess.Popen(cmd, + shell=True, + stdout=subprocess.PIPE, + bufsize=buffering) + return _wrap_close(io.TextIOWrapper(proc.stdout), proc) else: - return returncode << 8 # Shift left to match old behavior - def __enter__(self): - return self - def __exit__(self, *args): - self.close() - def __getattr__(self, name): - return getattr(self._stream, name) - def __iter__(self): - return iter(self._stream) + proc = subprocess.Popen(cmd, + shell=True, + stdin=subprocess.PIPE, + bufsize=buffering) + return _wrap_close(io.TextIOWrapper(proc.stdin), proc) + + # Helper for popen() -- a proxy for a file whose close waits for the process + class _wrap_close: + def __init__(self, stream, proc): + self._stream = stream + self._proc = proc + def close(self): + self._stream.close() + returncode = self._proc.wait() + if returncode == 0: + return None + if name == 'nt': + return returncode + else: + return returncode << 8 # Shift left to match old behavior + def __enter__(self): + return self + def __exit__(self, *args): + self.close() + def __getattr__(self, name): + return getattr(self._stream, name) + def __iter__(self): + return iter(self._stream) + + __all__.append("popen") # Supply os.fdopen() def fdopen(fd, *args, **kwargs): diff --git a/Lib/pickle.py b/Lib/pickle.py index cbac5f168b4..e63a8b6e4db 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -340,7 +340,9 @@ def whichmodule(obj, name): # Protect the iteration by using a list copy of sys.modules against dynamic # modules that trigger imports of other modules upon calls to getattr. for module_name, module in sys.modules.copy().items(): - if module_name == '__main__' or module is None: + if (module_name == '__main__' + or module_name == '__mp_main__' # bpo-42406 + or module is None): continue try: if _getattribute(module, name)[0] is obj: diff --git a/Lib/platform.py b/Lib/platform.py index 0eb5167d584..985e12d9684 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -769,7 +769,7 @@ class uname_result( ): """ A uname_result that's largely compatible with a - simple namedtuple except that 'platform' is + simple namedtuple except that 'processor' is resolved late and cached to avoid calling "uname" except when needed. """ @@ -784,12 +784,25 @@ class uname_result( (self.processor,) ) + @classmethod + def _make(cls, iterable): + # override factory to affect length check + num_fields = len(cls._fields) + result = cls.__new__(cls, *iterable) + if len(result) != num_fields + 1: + msg = f'Expected {num_fields} arguments, got {len(result)}' + raise TypeError(msg) + return result + def __getitem__(self, key): - return tuple(iter(self))[key] + return tuple(self)[key] def __len__(self): return len(tuple(iter(self))) + def __reduce__(self): + return uname_result, tuple(self)[:len(self._fields)] + _uname_cache = None @@ -1230,6 +1243,63 @@ def platform(aliased=0, terse=0): _platform_cache[(aliased, terse)] = platform return platform +### freedesktop.org os-release standard +# https://www.freedesktop.org/software/systemd/man/os-release.html + +# NAME=value with optional quotes (' or "). The regular expression is less +# strict than shell lexer, but that's ok. +_os_release_line = re.compile( + "^(?P[a-zA-Z0-9_]+)=(?P[\"\']?)(?P.*)(?P=quote)$" +) +# unescape five special characters mentioned in the standard +_os_release_unescape = re.compile(r"\\([\\\$\"\'`])") +# /etc takes precedence over /usr/lib +_os_release_candidates = ("/etc/os-release", "/usr/lib/os-release") +_os_release_cache = None + + +def _parse_os_release(lines): + # These fields are mandatory fields with well-known defaults + # in pratice all Linux distributions override NAME, ID, and PRETTY_NAME. + info = { + "NAME": "Linux", + "ID": "linux", + "PRETTY_NAME": "Linux", + } + + for line in lines: + mo = _os_release_line.match(line) + if mo is not None: + info[mo.group('name')] = _os_release_unescape.sub( + r"\1", mo.group('value') + ) + + return info + + +def freedesktop_os_release(): + """Return operation system identification from freedesktop.org os-release + """ + global _os_release_cache + + if _os_release_cache is None: + errno = None + for candidate in _os_release_candidates: + try: + with open(candidate, encoding="utf-8") as f: + _os_release_cache = _parse_os_release(f) + break + except OSError as e: + errno = e.errno + else: + raise OSError( + errno, + f"Unable to read files {', '.join(_os_release_candidates)}" + ) + + return _os_release_cache.copy() + + ### Command line interface if __name__ == '__main__': diff --git a/Lib/posixpath.py b/Lib/posixpath.py index ecb4e5a8f70..62afbd0ccf0 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -262,6 +262,9 @@ def expanduser(path): # password database, return the path unchanged return path userhome = pwent.pw_dir + # if no user home, return the path unchanged on VxWorks + if userhome is None and sys.platform == "vxworks": + return path if isinstance(path, bytes): userhome = os.fsencode(userhome) root = b'/' diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py index b424b1d0f9b..49630bb4b81 100644 --- a/Lib/pydoc_data/topics.py +++ b/Lib/pydoc_data/topics.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Autogenerated by Sphinx on Tue Nov 3 00:01:01 2020 +# Autogenerated by Sphinx on Mon Dec 7 19:34:00 2020 topics = {'assert': 'The "assert" statement\n' '**********************\n' '\n' @@ -5301,24 +5301,23 @@ topics = {'assert': 'The "assert" statement\n' 'for the\n' 'conversion. The alternate form is defined differently for ' 'different\n' - 'types. This option is only valid for integer, float, ' - 'complex and\n' - 'Decimal types. For integers, when binary, octal, or ' - 'hexadecimal output\n' - 'is used, this option adds the prefix respective "\'0b\'", ' - '"\'0o\'", or\n' - '"\'0x\'" to the output value. For floats, complex and ' - 'Decimal the\n' - 'alternate form causes the result of the conversion to ' - 'always contain a\n' - 'decimal-point character, even if no digits follow it. ' - 'Normally, a\n' - 'decimal-point character appears in the result of these ' - 'conversions\n' - 'only if a digit follows it. In addition, for "\'g\'" and ' - '"\'G\'"\n' - 'conversions, trailing zeros are not removed from the ' - 'result.\n' + 'types. This option is only valid for integer, float and ' + 'complex\n' + 'types. For integers, when binary, octal, or hexadecimal ' + 'output is\n' + 'used, this option adds the prefix respective "\'0b\'", ' + '"\'0o\'", or "\'0x\'"\n' + 'to the output value. For float and complex the alternate ' + 'form causes\n' + 'the result of the conversion to always contain a ' + 'decimal-point\n' + 'character, even if no digits follow it. Normally, a ' + 'decimal-point\n' + 'character appears in the result of these conversions only ' + 'if a digit\n' + 'follows it. In addition, for "\'g\'" and "\'G\'" ' + 'conversions, trailing\n' + 'zeros are not removed from the result.\n' '\n' 'The "\',\'" option signals the use of a comma for a ' 'thousands separator.\n' @@ -5456,9 +5455,8 @@ topics = {'assert': 'The "assert" statement\n' 'the integer\n' 'to a floating point number before formatting.\n' '\n' - 'The available presentation types for floating point and ' - 'decimal values\n' - 'are:\n' + 'The available presentation types for "float" and "Decimal" ' + 'values are:\n' '\n' ' ' '+-----------+------------------------------------------------------------+\n' @@ -5467,24 +5465,50 @@ topics = {'assert': 'The "assert" statement\n' '|\n' ' ' '|===========|============================================================|\n' - ' | "\'e\'" | Exponent notation. Prints the number in ' - 'scientific |\n' - ' | | notation using the letter ‘e’ to indicate ' - 'the exponent. |\n' - ' | | The default precision is ' - '"6". |\n' + ' | "\'e\'" | Scientific notation. For a given ' + 'precision "p", formats |\n' + ' | | the number in scientific notation with the ' + 'letter ‘e’ |\n' + ' | | separating the coefficient from the ' + 'exponent. The |\n' + ' | | coefficient has one digit before and "p" ' + 'digits after the |\n' + ' | | decimal point, for a total of "p + 1" ' + 'significant digits. |\n' + ' | | With no precision given, uses a precision ' + 'of "6" digits |\n' + ' | | after the decimal point for "float", and ' + 'shows all |\n' + ' | | coefficient digits for "Decimal". If no ' + 'digits follow the |\n' + ' | | decimal point, the decimal point is also ' + 'removed unless |\n' + ' | | the "#" option is ' + 'used. |\n' ' ' '+-----------+------------------------------------------------------------+\n' - ' | "\'E\'" | Exponent notation. Same as "\'e\'" ' - 'except it uses an upper |\n' + ' | "\'E\'" | Scientific notation. Same as "\'e\'" ' + 'except it uses an upper |\n' ' | | case ‘E’ as the separator ' 'character. |\n' ' ' '+-----------+------------------------------------------------------------+\n' - ' | "\'f\'" | Fixed-point notation. Displays the ' - 'number as a fixed-point |\n' - ' | | number. The default precision is ' - '"6". |\n' + ' | "\'f\'" | Fixed-point notation. For a given ' + 'precision "p", formats |\n' + ' | | the number as a decimal number with ' + 'exactly "p" digits |\n' + ' | | following the decimal point. With no ' + 'precision given, uses |\n' + ' | | a precision of "6" digits after the ' + 'decimal point for |\n' + ' | | "float", and uses a precision large enough ' + 'to show all |\n' + ' | | coefficient digits for "Decimal". If no ' + 'digits follow the |\n' + ' | | decimal point, the decimal point is also ' + 'removed unless |\n' + ' | | the "#" option is ' + 'used. |\n' ' ' '+-----------+------------------------------------------------------------+\n' ' | "\'F\'" | Fixed-point notation. Same as "\'f\'", ' @@ -5530,9 +5554,14 @@ topics = {'assert': 'The "assert" statement\n' ' | | regardless of the precision. A precision ' 'of "0" is |\n' ' | | treated as equivalent to a precision of ' - '"1". The default |\n' - ' | | precision is ' - '"6". |\n' + '"1". With no |\n' + ' | | precision given, uses a precision of "6" ' + 'significant |\n' + ' | | digits for "float", and shows all ' + 'coefficient digits for |\n' + ' | | ' + '"Decimal". ' + '|\n' ' ' '+-----------+------------------------------------------------------------+\n' ' | "\'G\'" | General format. Same as "\'g\'" except ' diff --git a/Lib/random.py b/Lib/random.py index 139e8a40bb2..a4128c28fb2 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -51,6 +51,7 @@ from math import sqrt as _sqrt, acos as _acos, cos as _cos, sin as _sin from math import tau as TWOPI, floor as _floor, isfinite as _isfinite from os import urandom as _urandom from _collections_abc import Set as _Set, Sequence as _Sequence +from operator import index as _index from itertools import accumulate as _accumulate, repeat as _repeat from bisect import bisect as _bisect import os as _os @@ -297,28 +298,59 @@ class Random(_random.Random): # This code is a bit messy to make it fast for the # common case while still doing adequate error checking. - istart = int(start) - if istart != start: - raise ValueError("non-integer arg 1 for randrange()") + try: + istart = _index(start) + except TypeError: + if int(start) == start: + istart = int(start) + _warn('Float arguments to randrange() have been deprecated\n' + 'since Python 3.10 and will be removed in a subsequent ' + 'version.', + DeprecationWarning, 2) + else: + _warn('randrange() will raise TypeError in the future', + DeprecationWarning, 2) + raise ValueError("non-integer arg 1 for randrange()") if stop is None: if istart > 0: return self._randbelow(istart) raise ValueError("empty range for randrange()") # stop argument supplied. - istop = int(stop) - if istop != stop: - raise ValueError("non-integer stop for randrange()") + try: + istop = _index(stop) + except TypeError: + if int(stop) == stop: + istop = int(stop) + _warn('Float arguments to randrange() have been deprecated\n' + 'since Python 3.10 and will be removed in a subsequent ' + 'version.', + DeprecationWarning, 2) + else: + _warn('randrange() will raise TypeError in the future', + DeprecationWarning, 2) + raise ValueError("non-integer stop for randrange()") + + try: + istep = _index(step) + except TypeError: + if int(step) == step: + istep = int(step) + _warn('Float arguments to randrange() have been deprecated\n' + 'since Python 3.10 and will be removed in a subsequent ' + 'version.', + DeprecationWarning, 2) + else: + _warn('randrange() will raise TypeError in the future', + DeprecationWarning, 2) + raise ValueError("non-integer step for randrange()") width = istop - istart - if step == 1 and width > 0: + if istep == 1 and width > 0: return istart + self._randbelow(width) - if step == 1: + if istep == 1: raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width)) # Non-unit step argument supplied. - istep = int(step) - if istep != step: - raise ValueError("non-integer step for randrange()") if istep > 0: n = (width + istep - 1) // istep elif istep < 0: @@ -424,13 +456,14 @@ class Random(_random.Random): # too many calls to _randbelow(), making them slower and # causing them to eat more entropy than necessary. - if isinstance(population, _Set): - _warn('Sampling from a set deprecated\n' - 'since Python 3.9 and will be removed in a subsequent version.', - DeprecationWarning, 2) - population = tuple(population) if not isinstance(population, _Sequence): - raise TypeError("Population must be a sequence. For dicts or sets, use sorted(d).") + if isinstance(population, _Set): + _warn('Sampling from a set deprecated\n' + 'since Python 3.9 and will be removed in a subsequent version.', + DeprecationWarning, 2) + population = tuple(population) + else: + raise TypeError("Population must be a sequence. For dicts or sets, use sorted(d).") n = len(population) if counts is not None: cum_counts = list(_accumulate(counts)) diff --git a/Lib/site.py b/Lib/site.py index 3a0f619d71c..5f1b31e73d9 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -264,6 +264,10 @@ def _getuserbase(): if env_base: return env_base + # VxWorks has no home directories + if sys.platform == "vxworks": + return None + def joinuser(*args): return os.path.expanduser(os.path.join(*args)) @@ -311,11 +315,14 @@ def getusersitepackages(): If the global variable ``USER_SITE`` is not initialized yet, this function will also set it. """ - global USER_SITE + global USER_SITE, ENABLE_USER_SITE userbase = getuserbase() # this will also set USER_BASE if USER_SITE is None: - USER_SITE = _get_path(userbase) + if userbase is None: + ENABLE_USER_SITE = False # disable user site and return None + else: + USER_SITE = _get_path(userbase) return USER_SITE @@ -630,11 +637,14 @@ def _script(): for dir in sys.path: print(" %r," % (dir,)) print("]") - print("USER_BASE: %r (%s)" % (user_base, - "exists" if os.path.isdir(user_base) else "doesn't exist")) - print("USER_SITE: %r (%s)" % (user_site, - "exists" if os.path.isdir(user_site) else "doesn't exist")) - print("ENABLE_USER_SITE: %r" % ENABLE_USER_SITE) + def exists(path): + if path is not None and os.path.isdir(path): + return "exists" + else: + return "doesn't exist" + print(f"USER_BASE: {user_base!r} ({exists(user_base)})") + print(f"USER_SITE: {user_site!r} ({exists(user_site)})") + print(f"ENABLE_USER_SITE: {ENABLE_USER_SITE!r}") sys.exit(0) buffer = [] diff --git a/Lib/socketserver.py b/Lib/socketserver.py index 57c1ae6e9e8..0d9583d56a4 100644 --- a/Lib/socketserver.py +++ b/Lib/socketserver.py @@ -628,6 +628,39 @@ if hasattr(os, "fork"): self.collect_children(blocking=self.block_on_close) +class _Threads(list): + """ + Joinable list of all non-daemon threads. + """ + def append(self, thread): + self.reap() + if thread.daemon: + return + super().append(thread) + + def pop_all(self): + self[:], result = [], self[:] + return result + + def join(self): + for thread in self.pop_all(): + thread.join() + + def reap(self): + self[:] = (thread for thread in self if thread.is_alive()) + + +class _NoThreads: + """ + Degenerate version of _Threads. + """ + def append(self, thread): + pass + + def join(self): + pass + + class ThreadingMixIn: """Mix-in class to handle each request in a new thread.""" @@ -636,9 +669,9 @@ class ThreadingMixIn: daemon_threads = False # If true, server_close() waits until all non-daemonic threads terminate. block_on_close = True - # For non-daemonic threads, list of threading.Threading objects + # Threads object # used by server_close() to wait for all threads completion. - _threads = None + _threads = _NoThreads() def process_request_thread(self, request, client_address): """Same as in BaseServer but as a thread. @@ -655,23 +688,17 @@ class ThreadingMixIn: def process_request(self, request, client_address): """Start a new thread to process the request.""" + if self.block_on_close: + vars(self).setdefault('_threads', _Threads()) t = threading.Thread(target = self.process_request_thread, args = (request, client_address)) t.daemon = self.daemon_threads - if not t.daemon and self.block_on_close: - if self._threads is None: - self._threads = [] - self._threads.append(t) + self._threads.append(t) t.start() def server_close(self): super().server_close() - if self.block_on_close: - threads = self._threads - self._threads = None - if threads: - for thread in threads: - thread.join() + self._threads.join() if hasattr(os, "fork"): diff --git a/Lib/statistics.py b/Lib/statistics.py index f9d3802ec5f..4b054b96114 100644 --- a/Lib/statistics.py +++ b/Lib/statistics.py @@ -106,7 +106,7 @@ import random from fractions import Fraction from decimal import Decimal -from itertools import groupby +from itertools import groupby, repeat from bisect import bisect_left, bisect_right from math import hypot, sqrt, fabs, exp, erf, tau, log, fsum from operator import itemgetter @@ -364,37 +364,37 @@ def geometric_mean(data): ' containing positive numbers') from None -def harmonic_mean(data): +def harmonic_mean(data, weights=None): """Return the harmonic mean of data. The harmonic mean, sometimes called the subcontrary mean, is the reciprocal of the arithmetic mean of the reciprocals of the data, and is often appropriate when averaging quantities which are rates - or ratios, for example speeds. Example: + or ratios, for example speeds. - Suppose an investor purchases an equal value of shares in each of - three companies, with P/E (price/earning) ratios of 2.5, 3 and 10. - What is the average P/E ratio for the investor's portfolio? + Suppose a car travels 40 km/hr for 5 km and then speeds-up to + 60 km/hr for another 5 km. What is the average speed? - >>> harmonic_mean([2.5, 3, 10]) # For an equal investment portfolio. - 3.6 + >>> harmonic_mean([40, 60]) + 48.0 - Using the arithmetic mean would give an average of about 5.167, which - is too high. + Suppose a car travels 40 km/hr for 5 km, and when traffic clears, + speeds-up to 60 km/hr for the remaining 30 km of the journey. What + is the average speed? + + >>> harmonic_mean([40, 60], weights=[5, 30]) + 56.0 If ``data`` is empty, or any element is less than zero, ``harmonic_mean`` will raise ``StatisticsError``. """ - # For a justification for using harmonic mean for P/E ratios, see - # http://fixthepitch.pellucid.com/comps-analysis-the-missing-harmony-of-summary-statistics/ - # http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2621087 if iter(data) is data: data = list(data) errmsg = 'harmonic mean does not support negative values' n = len(data) if n < 1: raise StatisticsError('harmonic_mean requires at least one data point') - elif n == 1: + elif n == 1 and weights is None: x = data[0] if isinstance(x, (numbers.Real, Decimal)): if x < 0: @@ -402,13 +402,23 @@ def harmonic_mean(data): return x else: raise TypeError('unsupported type') + if weights is None: + weights = repeat(1, n) + sum_weights = n + else: + if iter(weights) is weights: + weights = list(weights) + if len(weights) != n: + raise StatisticsError('Number of weights does not match data size') + _, sum_weights, _ = _sum(w for w in _fail_neg(weights, errmsg)) try: - T, total, count = _sum(1 / x for x in _fail_neg(data, errmsg)) + data = _fail_neg(data, errmsg) + T, total, count = _sum(w / x if w else 0 for w, x in zip(weights, data)) except ZeroDivisionError: return 0 - assert count == n - return _convert(n / total, T) - + if total <= 0: + raise StatisticsError('Weighted sum must be positive') + return _convert(sum_weights / total, T) # FIXME: investigate ways to calculate medians without sorting? Quickselect? def median(data): diff --git a/Lib/subprocess.py b/Lib/subprocess.py index e259dc3a8e5..aa107cb60e4 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -420,7 +420,11 @@ def check_output(*popenargs, timeout=None, **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'' + if kwargs.get('universal_newlines') or kwargs.get('text'): + empty = '' + else: + empty = b'' + kwargs['input'] = empty return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, **kwargs).stdout diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 6c87b06634c..c1aaf79a677 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -51,34 +51,65 @@ _INSTALL_SCHEMES = { 'scripts': '{base}/Scripts', 'data': '{base}', }, - # NOTE: When modifying "purelib" scheme, update site._get_path() too. - 'nt_user': { - 'stdlib': '{userbase}/Python{py_version_nodot_plat}', - 'platstdlib': '{userbase}/Python{py_version_nodot_plat}', - 'purelib': '{userbase}/Python{py_version_nodot_plat}/site-packages', - 'platlib': '{userbase}/Python{py_version_nodot_plat}/site-packages', - 'include': '{userbase}/Python{py_version_nodot_plat}/Include', - 'scripts': '{userbase}/Python{py_version_nodot_plat}/Scripts', - 'data': '{userbase}', - }, - 'posix_user': { - 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', - 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', - 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', - 'include': '{userbase}/include/python{py_version_short}', - 'scripts': '{userbase}/bin', - 'data': '{userbase}', - }, - 'osx_framework_user': { - 'stdlib': '{userbase}/lib/python', - 'platstdlib': '{userbase}/lib/python', - 'purelib': '{userbase}/lib/python/site-packages', - 'platlib': '{userbase}/lib/python/site-packages', - 'include': '{userbase}/include', - 'scripts': '{userbase}/bin', - 'data': '{userbase}', - }, + } + + +# NOTE: site.py has copy of this function. +# Sync it when modify this function. +def _getuserbase(): + env_base = os.environ.get("PYTHONUSERBASE", None) + if env_base: + return env_base + + # VxWorks has no home directories + if sys.platform == "vxworks": + return None + + def joinuser(*args): + return os.path.expanduser(os.path.join(*args)) + + if os.name == "nt": + base = os.environ.get("APPDATA") or "~" + return joinuser(base, "Python") + + if sys.platform == "darwin" and sys._framework: + return joinuser("~", "Library", sys._framework, + "%d.%d" % sys.version_info[:2]) + + return joinuser("~", ".local") + +_HAS_USER_BASE = (_getuserbase() is not None) + +if _HAS_USER_BASE: + _INSTALL_SCHEMES |= { + # NOTE: When modifying "purelib" scheme, update site._get_path() too. + 'nt_user': { + 'stdlib': '{userbase}/Python{py_version_nodot_plat}', + 'platstdlib': '{userbase}/Python{py_version_nodot_plat}', + 'purelib': '{userbase}/Python{py_version_nodot_plat}/site-packages', + 'platlib': '{userbase}/Python{py_version_nodot_plat}/site-packages', + 'include': '{userbase}/Python{py_version_nodot_plat}/Include', + 'scripts': '{userbase}/Python{py_version_nodot_plat}/Scripts', + 'data': '{userbase}', + }, + 'posix_user': { + 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', + 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', + 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', + 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', + 'data': '{userbase}', + }, + 'osx_framework_user': { + 'stdlib': '{userbase}/lib/python', + 'platstdlib': '{userbase}/lib/python', + 'purelib': '{userbase}/lib/python/site-packages', + 'platlib': '{userbase}/lib/python/site-packages', + 'include': '{userbase}/include', + 'scripts': '{userbase}/bin', + 'data': '{userbase}', + }, } _SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include', @@ -183,25 +214,6 @@ def _get_default_scheme(): return os.name -# NOTE: site.py has copy of this function. -# Sync it when modify this function. -def _getuserbase(): - env_base = os.environ.get("PYTHONUSERBASE", None) - if env_base: - return env_base - - def joinuser(*args): - return os.path.expanduser(os.path.join(*args)) - - if os.name == "nt": - base = os.environ.get("APPDATA") or "~" - return joinuser(base, "Python") - - if sys.platform == "darwin" and sys._framework: - return joinuser("~", "Library", sys._framework, - "%d.%d" % sys.version_info[:2]) - - return joinuser("~", ".local") def _parse_makefile(filename, vars=None): @@ -424,10 +436,11 @@ def _init_posix(vars): def _init_non_posix(vars): """Initialize the module as appropriate for NT""" # set basic install directories + import _imp vars['LIBDEST'] = get_path('stdlib') vars['BINLIBDEST'] = get_path('platstdlib') vars['INCLUDEPY'] = get_path('include') - vars['EXT_SUFFIX'] = '.pyd' + vars['EXT_SUFFIX'] = _imp.extension_suffixes()[0] vars['EXE'] = '.exe' vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable)) @@ -557,10 +570,11 @@ def get_config_vars(*args): SO = _CONFIG_VARS.get('EXT_SUFFIX') if SO is not None: _CONFIG_VARS['SO'] = SO - # Setting 'userbase' is done below the call to the - # init function to enable using 'get_config_var' in - # the init-function. - _CONFIG_VARS['userbase'] = _getuserbase() + if _HAS_USER_BASE: + # Setting 'userbase' is done below the call to the + # init function to enable using 'get_config_var' in + # the init-function. + _CONFIG_VARS['userbase'] = _getuserbase() # Always convert srcdir to an absolute path srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE) diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 1d15612616f..395c0f1d300 100755 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -200,6 +200,7 @@ def itn(n, digits=8, format=DEFAULT_FORMAT): # base-256 representation. This allows values up to (256**(digits-1))-1. # A 0o200 byte indicates a positive number, a 0o377 byte a negative # number. + original_n = n n = int(n) if 0 <= n < 8 ** (digits - 1): s = bytes("%0*o" % (digits - 1, n), "ascii") + NUL @@ -363,7 +364,7 @@ class _Stream: try: import zlib except ImportError: - raise CompressionError("zlib module is not available") + raise CompressionError("zlib module is not available") from None self.zlib = zlib self.crc = zlib.crc32(b"") if mode == "r": @@ -376,7 +377,7 @@ class _Stream: try: import bz2 except ImportError: - raise CompressionError("bz2 module is not available") + raise CompressionError("bz2 module is not available") from None if mode == "r": self.dbuf = b"" self.cmp = bz2.BZ2Decompressor() @@ -388,7 +389,7 @@ class _Stream: try: import lzma except ImportError: - raise CompressionError("lzma module is not available") + raise CompressionError("lzma module is not available") from None if mode == "r": self.dbuf = b"" self.cmp = lzma.LZMADecompressor() @@ -541,8 +542,8 @@ class _Stream: break try: buf = self.cmp.decompress(buf) - except self.exception: - raise ReadError("invalid compressed data") + except self.exception as e: + raise ReadError("invalid compressed data") from e t.append(buf) c += len(buf) t = b"".join(t) @@ -1164,8 +1165,8 @@ class TarInfo(object): # Fetch the next header and process it. try: next = self.fromtarfile(tarfile) - except HeaderError: - raise SubsequentHeaderError("missing or bad subsequent header") + except HeaderError as e: + raise SubsequentHeaderError(str(e)) from None # Patch the TarInfo object from the next header with # the longname information. @@ -1277,8 +1278,8 @@ class TarInfo(object): # Fetch the next header. try: next = self.fromtarfile(tarfile) - except HeaderError: - raise SubsequentHeaderError("missing or bad subsequent header") + except HeaderError as e: + raise SubsequentHeaderError(str(e)) from None # Process GNU sparse information. if "GNU.sparse.map" in pax_headers: @@ -1533,7 +1534,7 @@ class TarFile(object): self.fileobj.seek(self.offset) break except HeaderError as e: - raise ReadError(str(e)) + raise ReadError(str(e)) from None if self.mode in ("a", "w", "x"): self._loaded = True @@ -1669,21 +1670,21 @@ class TarFile(object): try: from gzip import GzipFile except ImportError: - raise CompressionError("gzip module is not available") + raise CompressionError("gzip module is not available") from None try: fileobj = GzipFile(name, mode + "b", compresslevel, fileobj) - except OSError: + except OSError as e: if fileobj is not None and mode == 'r': - raise ReadError("not a gzip file") + raise ReadError("not a gzip file") from e raise try: t = cls.taropen(name, mode, fileobj, **kwargs) - except OSError: + except OSError as e: fileobj.close() if mode == 'r': - raise ReadError("not a gzip file") + raise ReadError("not a gzip file") from e raise except: fileobj.close() @@ -1702,16 +1703,16 @@ class TarFile(object): try: from bz2 import BZ2File except ImportError: - raise CompressionError("bz2 module is not available") + raise CompressionError("bz2 module is not available") from None fileobj = BZ2File(fileobj or name, mode, compresslevel=compresslevel) try: t = cls.taropen(name, mode, fileobj, **kwargs) - except (OSError, EOFError): + except (OSError, EOFError) as e: fileobj.close() if mode == 'r': - raise ReadError("not a bzip2 file") + raise ReadError("not a bzip2 file") from e raise except: fileobj.close() @@ -1730,16 +1731,16 @@ class TarFile(object): try: from lzma import LZMAFile, LZMAError except ImportError: - raise CompressionError("lzma module is not available") + raise CompressionError("lzma module is not available") from None fileobj = LZMAFile(fileobj or name, mode, preset=preset) try: t = cls.taropen(name, mode, fileobj, **kwargs) - except (LZMAError, EOFError): + except (LZMAError, EOFError) as e: fileobj.close() if mode == 'r': - raise ReadError("not an lzma file") + raise ReadError("not an lzma file") from e raise except: fileobj.close() @@ -2253,7 +2254,7 @@ class TarFile(object): self._extract_member(self._find_link_target(tarinfo), targetpath) except KeyError: - raise ExtractError("unable to resolve link inside archive") + raise ExtractError("unable to resolve link inside archive") from None def chown(self, tarinfo, targetpath, numeric_owner): """Set owner of targetpath according to tarinfo. If numeric_owner @@ -2281,16 +2282,16 @@ class TarFile(object): os.lchown(targetpath, u, g) else: os.chown(targetpath, u, g) - except OSError: - raise ExtractError("could not change owner") + except OSError as e: + raise ExtractError("could not change owner") from e def chmod(self, tarinfo, targetpath): """Set file permissions of targetpath according to tarinfo. """ try: os.chmod(targetpath, tarinfo.mode) - except OSError: - raise ExtractError("could not change mode") + except OSError as e: + raise ExtractError("could not change mode") from e def utime(self, tarinfo, targetpath): """Set modification time of targetpath according to tarinfo. @@ -2299,8 +2300,8 @@ class TarFile(object): return try: os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime)) - except OSError: - raise ExtractError("could not change modification time") + except OSError as e: + raise ExtractError("could not change modification time") from e #-------------------------------------------------------------------------- def next(self): @@ -2336,15 +2337,15 @@ class TarFile(object): self.offset += BLOCKSIZE continue elif self.offset == 0: - raise ReadError(str(e)) + raise ReadError(str(e)) from None except EmptyHeaderError: if self.offset == 0: - raise ReadError("empty file") + raise ReadError("empty file") from None except TruncatedHeaderError as e: if self.offset == 0: - raise ReadError(str(e)) + raise ReadError(str(e)) from None except SubsequentHeaderError as e: - raise ReadError(str(e)) + raise ReadError(str(e)) from None break if tarinfo is not None: diff --git a/Lib/test/_test_atexit.py b/Lib/test/_test_atexit.py new file mode 100644 index 00000000000..a3165853111 --- /dev/null +++ b/Lib/test/_test_atexit.py @@ -0,0 +1,121 @@ +""" +Tests run by test_atexit in a subprocess since it clears atexit callbacks. +""" +import atexit +import sys +import unittest +from test import support + + +class GeneralTest(unittest.TestCase): + def setUp(self): + atexit._clear() + + def tearDown(self): + atexit._clear() + + def assert_raises_unraisable(self, exc_type, func, *args): + with support.catch_unraisable_exception() as cm: + atexit.register(func, *args) + atexit._run_exitfuncs() + + self.assertEqual(cm.unraisable.object, func) + self.assertEqual(cm.unraisable.exc_type, exc_type) + self.assertEqual(type(cm.unraisable.exc_value), exc_type) + + def test_order(self): + # Check that callbacks are called in reverse order with the expected + # positional and keyword arguments. + calls = [] + + def func1(*args, **kwargs): + calls.append(('func1', args, kwargs)) + + def func2(*args, **kwargs): + calls.append(('func2', args, kwargs)) + + # be sure args are handled properly + atexit.register(func1, 1, 2) + atexit.register(func2) + atexit.register(func2, 3, key="value") + atexit._run_exitfuncs() + + self.assertEqual(calls, + [('func2', (3,), {'key': 'value'}), + ('func2', (), {}), + ('func1', (1, 2), {})]) + + def test_badargs(self): + def func(): + pass + + # func() has no parameter, but it's called with 2 parameters + self.assert_raises_unraisable(TypeError, func, 1 ,2) + + def test_raise(self): + def raise_type_error(): + raise TypeError + + self.assert_raises_unraisable(TypeError, raise_type_error) + + def test_raise_unnormalized(self): + # bpo-10756: Make sure that an unnormalized exception is handled + # properly. + def div_zero(): + 1 / 0 + + self.assert_raises_unraisable(ZeroDivisionError, div_zero) + + def test_exit(self): + self.assert_raises_unraisable(SystemExit, sys.exit) + + def test_stress(self): + a = [0] + def inc(): + a[0] += 1 + + for i in range(128): + atexit.register(inc) + atexit._run_exitfuncs() + + self.assertEqual(a[0], 128) + + def test_clear(self): + a = [0] + def inc(): + a[0] += 1 + + atexit.register(inc) + atexit._clear() + atexit._run_exitfuncs() + + self.assertEqual(a[0], 0) + + def test_unregister(self): + a = [0] + def inc(): + a[0] += 1 + def dec(): + a[0] -= 1 + + for i in range(4): + atexit.register(inc) + atexit.register(dec) + atexit.unregister(inc) + atexit._run_exitfuncs() + + self.assertEqual(a[0], -1) + + def test_bound_methods(self): + l = [] + atexit.register(l.append, 5) + atexit._run_exitfuncs() + self.assertEqual(l, [5]) + + atexit.unregister(l.append) + atexit._run_exitfuncs() + self.assertEqual(l, [5]) + + +if __name__ == "__main__": + unittest.main() diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/_test_eintr.py similarity index 100% rename from Lib/test/eintrdata/eintr_tester.py rename to Lib/test/_test_eintr.py diff --git a/Lib/test/crashers/bogus_code_obj.py b/Lib/test/crashers/bogus_code_obj.py index 198d229491b..e71b3582cf2 100644 --- a/Lib/test/crashers/bogus_code_obj.py +++ b/Lib/test/crashers/bogus_code_obj.py @@ -14,6 +14,6 @@ the user build or load random bytecodes anyway. Otherwise, this is a import types -co = types.CodeType(0, 0, 0, 0, 0, b'\x04\x71\x00\x00', +co = types.CodeType(0, 0, 0, 0, 0, 0, b'\x04\x00\x71\x00', (), (), (), '', '', 1, b'') exec(co) diff --git a/Lib/test/inspect_fodder.py b/Lib/test/inspect_fodder.py index 96a0257bfdf..e1287a31590 100644 --- a/Lib/test/inspect_fodder.py +++ b/Lib/test/inspect_fodder.py @@ -91,3 +91,25 @@ class Callable: custom_method = Callable().as_method_of(42) del Callable + +# line 95 +class WhichComments: + # line 97 + # before f + def f(self): + # line 100 + # start f + return 1 + # line 103 + # end f + # line 105 + # after f + + # before asyncf - line 108 + async def asyncf(self): + # start asyncf + return 2 + # end asyncf + # after asyncf - line 113 + # end of WhichComments - line 114 + # after WhichComments - line 115 diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 4ba749454c1..5a45d78be91 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -421,7 +421,7 @@ is_jython = sys.platform.startswith('java') is_android = hasattr(sys, 'getandroidapilevel') -if sys.platform != 'win32': +if sys.platform not in ('win32', 'vxworks'): unix_shell = '/system/bin/sh' if is_android else '/bin/sh' else: unix_shell = None diff --git a/Lib/test/support/bytecode_helper.py b/Lib/test/support/bytecode_helper.py index 348e277c165..471d4a68f91 100644 --- a/Lib/test/support/bytecode_helper.py +++ b/Lib/test/support/bytecode_helper.py @@ -35,7 +35,8 @@ class BytecodeTestCase(unittest.TestCase): disassembly = self.get_disassembly_as_string(x) if argval is _UNSPECIFIED: msg = '%s occurs in bytecode:\n%s' % (opname, disassembly) + self.fail(msg) elif instr.argval == argval: msg = '(%s,%r) occurs in bytecode:\n%s' msg = msg % (opname, argval, disassembly) - self.fail(msg) + self.fail(msg) diff --git a/Lib/test/support/script_helper.py b/Lib/test/support/script_helper.py index 09bb586dcf7..6d699c8486c 100644 --- a/Lib/test/support/script_helper.py +++ b/Lib/test/support/script_helper.py @@ -11,12 +11,14 @@ import py_compile import zipfile from importlib.util import source_from_cache +from test import support from test.support.import_helper import make_legacy_pyc # Cached result of the expensive test performed in the function below. __cached_interp_requires_environment = None + def interpreter_requires_environment(): """ Returns True if our sys.executable interpreter requires environment @@ -136,12 +138,14 @@ def run_python_until_end(*args, **env_vars): rc = proc.returncode return _PythonRunResult(rc, out, err), cmd_line + 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): res.fail(cmd_line) return res + def assert_python_ok(*args, **env_vars): """ Assert that running the interpreter with `args` and optional environment @@ -155,6 +159,7 @@ def assert_python_ok(*args, **env_vars): """ return _assert_python(True, *args, **env_vars) + def assert_python_failure(*args, **env_vars): """ Assert that running the interpreter with `args` and optional environment @@ -165,6 +170,7 @@ def assert_python_failure(*args, **env_vars): """ return _assert_python(False, *args, **env_vars) + def spawn_python(*args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kw): """Run a Python subprocess with the given arguments. @@ -187,6 +193,7 @@ def spawn_python(*args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kw): stdout=stdout, stderr=stderr, **kw) + def kill_python(p): """Run the given Popen process until completion and return stdout.""" p.stdin.close() @@ -198,6 +205,7 @@ def kill_python(p): subprocess._cleanup() return data + def make_script(script_dir, script_basename, source, omit_suffix=False): script_filename = script_basename if not omit_suffix: @@ -209,6 +217,7 @@ def make_script(script_dir, script_basename, source, omit_suffix=False): importlib.invalidate_caches() return script_name + def make_zip_script(zip_dir, zip_basename, script_name, name_in_zip=None): zip_filename = zip_basename+os.extsep+'zip' zip_name = os.path.join(zip_dir, zip_filename) @@ -228,10 +237,12 @@ def make_zip_script(zip_dir, zip_basename, script_name, name_in_zip=None): # zip_file.printdir() return zip_name, os.path.join(zip_name, name_in_zip) + def make_pkg(pkg_dir, init_source=''): os.mkdir(pkg_dir) make_script(pkg_dir, '__init__', init_source) + def make_zip_pkg(zip_dir, zip_basename, pkg_name, script_basename, source, depth=1, compiled=False): unlink = [] @@ -260,3 +271,24 @@ def make_zip_pkg(zip_dir, zip_basename, pkg_name, script_basename, # print 'Contents of %r:' % zip_name # zip_file.printdir() return zip_name, os.path.join(zip_name, script_name_in_zip) + + +def run_test_script(script): + # use -u to try to get the full output if the test hangs or crash + if support.verbose: + def title(text): + return f"===== {text} ======" + + name = f"script {os.path.basename(script)}" + print() + print(title(name), flush=True) + # In verbose mode, the child process inherit stdout and stdout, + # to see output in realtime and reduce the risk of losing output. + args = [sys.executable, "-E", "-X", "faulthandler", "-u", script, "-v"] + proc = subprocess.run(args) + print(title(f"{name} completed: exit code {proc.returncode}"), + flush=True) + if proc.returncode: + raise AssertionError(f"{name} failed") + else: + assert_python_ok("-u", script, "-v") diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index e98c15b11af..ec9711e4f6a 100644 --- a/Lib/test/test_argparse.py +++ b/Lib/test/test_argparse.py @@ -2078,7 +2078,7 @@ class TestAddSubparsers(TestCase): bar bar help {1,2,3} command help - optional arguments: + options: -h, --help show this help message and exit --foo foo help ''')) @@ -2097,7 +2097,7 @@ class TestAddSubparsers(TestCase): bar bar help {1,2,3} command help - optional arguments: + options: -h, --help show this help message and exit ++foo foo help ''')) @@ -2114,7 +2114,7 @@ class TestAddSubparsers(TestCase): main description - optional arguments: + options: -h, --help show this help message and exit --non-breaking help message containing non-breaking spaces shall not wrap\N{NO-BREAK SPACE}at non-breaking spaces @@ -2133,7 +2133,7 @@ class TestAddSubparsers(TestCase): bar bar help {1,2,3} command help - optional arguments: + options: +h, ++help show this help message and exit ++foo foo help ''')) @@ -2154,7 +2154,7 @@ class TestAddSubparsers(TestCase): 2 2 help 3 3 help - optional arguments: + options: -h, --help show this help message and exit --foo foo help ''')) @@ -2179,7 +2179,7 @@ class TestAddSubparsers(TestCase): positional arguments: bar bar help - optional arguments: + options: -h, --help show this help message and exit --foo foo help @@ -2203,7 +2203,7 @@ class TestAddSubparsers(TestCase): positional arguments: {a,b,c} x help - optional arguments: + options: -h, --help show this help message and exit -w W w help ''')) @@ -2217,7 +2217,7 @@ class TestAddSubparsers(TestCase): positional arguments: z z help - optional arguments: + options: -h, --help show this help message and exit -y {1,2,3} y help ''')) @@ -2249,7 +2249,7 @@ class TestAddSubparsers(TestCase): positional arguments: bar bar help - optional arguments: + options: -h, --help show this help message and exit --foo foo help @@ -2437,7 +2437,7 @@ class TestParentParsers(TestCase): a z - optional arguments: + options: -h, --help show this help message and exit -b B --w W @@ -2467,7 +2467,7 @@ class TestParentParsers(TestCase): self.assertEqual(parser_help, textwrap.dedent('''\ usage: {}{}[-h] [-w W] [-x X] [-y Y | -z Z] - optional arguments: + options: -h, --help show this help message and exit -y Y -z Z @@ -2512,7 +2512,7 @@ class TestMutuallyExclusiveGroupErrors(TestCase): expected = '''\ usage: PROG [-h] [--foo | --bar] [--soup | --nuts] - optional arguments: + options: -h, --help show this help message and exit --foo --bar @@ -2597,7 +2597,7 @@ class TestMutuallyExclusiveSimple(MEMixin, TestCase): ''' help = '''\ - optional arguments: + options: -h, --help show this help message and exit --bar BAR bar help --baz [BAZ] baz help @@ -2638,7 +2638,7 @@ class TestMutuallyExclusiveLong(MEMixin, TestCase): ''' help = '''\ - optional arguments: + options: -h, --help show this help message and exit --abcde ABCDE abcde help --fghij FGHIJ fghij help @@ -2674,7 +2674,7 @@ class TestMutuallyExclusiveFirstSuppressed(MEMixin, TestCase): ''' help = '''\ - optional arguments: + options: -h, --help show this help message and exit -y y help ''' @@ -2711,7 +2711,7 @@ class TestMutuallyExclusiveManySuppressed(MEMixin, TestCase): ''' help = '''\ - optional arguments: + options: -h, --help show this help message and exit ''' @@ -2754,7 +2754,7 @@ class TestMutuallyExclusiveOptionalAndPositional(MEMixin, TestCase): positional arguments: badger BADGER - optional arguments: + options: -h, --help show this help message and exit --foo FOO --spam SPAM SPAM @@ -2793,7 +2793,7 @@ class TestMutuallyExclusiveOptionalsMixed(MEMixin, TestCase): ''' help = '''\ - optional arguments: + options: -h, --help show this help message and exit -x x help -a a help @@ -2832,7 +2832,7 @@ class TestMutuallyExclusiveInGroup(MEMixin, TestCase): ''' help = '''\ - optional arguments: + options: -h, --help show this help message and exit Titled group: @@ -2877,7 +2877,7 @@ class TestMutuallyExclusiveOptionalsAndPositionalsMixed(MEMixin, TestCase): x x help a a help - optional arguments: + options: -h, --help show this help message and exit -y y help -b b help @@ -2908,7 +2908,7 @@ class TestMutuallyExclusiveNested(MEMixin, TestCase): help = '''\ - optional arguments: + options: -h, --help show this help message and exit -a A -b B @@ -3226,7 +3226,7 @@ class TestHelpBiggerOptionals(HelpTestCase): foo FOO HELP bar BAR HELP - optional arguments: + options: -h, --help show this help message and exit -v, --version show program's version number and exit -x X HELP @@ -3271,7 +3271,7 @@ class TestShortColumns(HelpTestCase): bar BAR HELP - optional arguments: + options: -h, --help show this help @@ -3321,7 +3321,7 @@ class TestHelpBiggerOptionalGroups(HelpTestCase): foo FOO HELP bar BAR HELP - optional arguments: + options: -h, --help show this help message and exit -v, --version show program's version number and exit -x X HELP @@ -3362,7 +3362,7 @@ class TestHelpBiggerPositionals(HelpTestCase): ekiekiekifekang EKI HELP bar BAR HELP - optional arguments: + options: -h, --help show this help message and exit -x X HELP --y Y Y HELP @@ -3409,7 +3409,7 @@ multiple positional arguments: yyy normal y help - optional arguments: + options: -h, --help show this help message and exit -x XX oddly formatted -x help @@ -3449,7 +3449,7 @@ DD DD DD YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YH - optional arguments: + options: -h, --help show this help message and exit -x XX XHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH \ HXXHH HXXHH @@ -3492,7 +3492,7 @@ DD DD DD YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YH - optional arguments: + options: -h, --help show this help message and exit -v, --version show program's version number and exit -x XXXXXXXXXXXXXXXXXXXXXXXXX @@ -3554,7 +3554,7 @@ class TestHelpUsage(HelpTestCase): b b c c - optional arguments: + options: -h, --help show this help message and exit -w W [W ...] w -x [X ...] x @@ -3623,7 +3623,7 @@ class TestHelpUsageLongProg(HelpTestCase): a b - optional arguments: + options: -h, --help show this help message and exit -w W -x X @@ -3657,7 +3657,7 @@ class TestHelpUsageLongProgOptionsWrap(HelpTestCase): a b - optional arguments: + options: -h, --help show this help message and exit -w WWWWWWWWWWWWWWWWWWWWWWWWW -x XXXXXXXXXXXXXXXXXXXXXXXXX @@ -3720,7 +3720,7 @@ class TestHelpUsageOptionalsWrap(HelpTestCase): b c - optional arguments: + options: -h, --help show this help message and exit -w WWWWWWWWWWWWWWWWWWWWWWWWW -x XXXXXXXXXXXXXXXXXXXXXXXXX @@ -3755,7 +3755,7 @@ class TestHelpUsagePositionalsWrap(HelpTestCase): bbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccccccccccccc - optional arguments: + options: -h, --help show this help message and exit -x X -y Y @@ -3791,7 +3791,7 @@ class TestHelpUsageOptionalsPositionalsWrap(HelpTestCase): bbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccccccccccccc - optional arguments: + options: -h, --help show this help message and exit -x XXXXXXXXXXXXXXXXXXXXXXXXX -y YYYYYYYYYYYYYYYYYYYYYYYYY @@ -3817,7 +3817,7 @@ class TestHelpUsageOptionalsOnlyWrap(HelpTestCase): ''' help = usage + '''\ - optional arguments: + options: -h, --help show this help message and exit -x XXXXXXXXXXXXXXXXXXXXXXXXX -y YYYYYYYYYYYYYYYYYYYYYYYYY @@ -3882,7 +3882,7 @@ class TestHelpVariableExpansion(HelpTestCase): spam spam PROG None badger badger PROG 0.5 - optional arguments: + options: -h, --help show this help message and exit -x X x PROG None int % -y y PROG 42 XXX @@ -3907,7 +3907,7 @@ class TestHelpVariableExpansionUsageSupplied(HelpTestCase): ''') help = usage + '''\ - optional arguments: + options: -h, --help show this help message and exit ''' version = '' @@ -3939,7 +3939,7 @@ class TestHelpSuppressUsage(HelpTestCase): positional arguments: spam spam help - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help ''' @@ -3986,7 +3986,7 @@ class TestHelpSuppressOptionalGroup(HelpTestCase): positional arguments: spam spam help - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help ''' @@ -4007,7 +4007,7 @@ class TestHelpSuppressPositional(HelpTestCase): ''' help = usage + '''\ - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help ''' @@ -4027,7 +4027,7 @@ class TestHelpRequiredOptional(HelpTestCase): ''' help = usage + '''\ - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help ''' @@ -4048,7 +4048,7 @@ class TestHelpAlternatePrefixChars(HelpTestCase): ''' help = usage + '''\ - optional arguments: + options: ^^foo foo help ;b BAR, ;;bar BAR bar help ''' @@ -4072,7 +4072,7 @@ class TestHelpNoHelpOptional(HelpTestCase): positional arguments: spam spam help - optional arguments: + options: --foo FOO foo help ''' version = '' @@ -4095,7 +4095,7 @@ class TestHelpNone(HelpTestCase): positional arguments: spam - optional arguments: + options: -h, --help show this help message and exit --foo FOO ''' @@ -4119,7 +4119,7 @@ class TestHelpTupleMetavar(HelpTestCase): ''' help = usage + '''\ - optional arguments: + options: -h, --help show this help message and exit -w W1 [W2 ...] w -x [X1 [X2 ...]] x @@ -4163,7 +4163,7 @@ class TestHelpRawText(HelpTestCase): positional arguments: spam spam help - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help should also appear as given here @@ -4212,7 +4212,7 @@ class TestHelpRawDescription(HelpTestCase): positional arguments: spam spam help - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help should not retain this odd formatting @@ -4254,7 +4254,7 @@ class TestHelpArgumentDefaults(HelpTestCase): spam spam help badger badger help (default: wooden) - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help - oh and by the way, None --bar bar help (default: False) @@ -4279,7 +4279,7 @@ class TestHelpVersionAction(HelpTestCase): description - optional arguments: + options: -h, --help show this help message and exit -V, --version show program's version number and exit ''' @@ -4305,7 +4305,7 @@ class TestHelpVersionActionSuppress(HelpTestCase): positional arguments: spam spam help - optional arguments: + options: -h, --help show this help message and exit --foo FOO foo help ''' @@ -4331,7 +4331,7 @@ class TestHelpSubparsersOrdering(HelpTestCase): positional arguments: {a,b,c,d,e} - optional arguments: + options: -h, --help show this help message and exit -v, --version show program's version number and exit ''' @@ -4372,7 +4372,7 @@ class TestHelpSubparsersWithHelpOrdering(HelpTestCase): d d subcommand help e e subcommand help - optional arguments: + options: -h, --help show this help message and exit -v, --version show program's version number and exit ''' @@ -4404,7 +4404,7 @@ class TestHelpMetavarTypeFormatter(HelpTestCase): positional arguments: int - optional arguments: + options: -h, --help show this help message and exit -b custom_type -c SOME FLOAT @@ -4596,7 +4596,7 @@ class TestConflictHandling(TestCase): self.assertEqual(parser.format_help(), textwrap.dedent('''\ usage: PROG [-h] [-x X] - optional arguments: + options: -h, --help show this help message and exit -x X NEW X ''')) @@ -4606,7 +4606,7 @@ class TestConflictHandling(TestCase): self.assertEqual(parser.format_help(), textwrap.dedent('''\ usage: PROG [-h] [-x X] [--spam NEW_SPAM] - optional arguments: + options: -h, --help show this help message and exit -x X NEW X --spam NEW_SPAM @@ -5337,7 +5337,7 @@ class TestWrappingMetavar(TestCase): usage: this_is_spammy_prog_with_a_long_name_sorry_about_the_name [-h] [--proxy ] - optional arguments: + options: -h, --help show this help message and exit --proxy ''')) diff --git a/Lib/test/test_asdl_parser.py b/Lib/test/test_asdl_parser.py index 2c14817aae9..d2c2b513347 100644 --- a/Lib/test/test_asdl_parser.py +++ b/Lib/test/test_asdl_parser.py @@ -1,6 +1,7 @@ """Tests for the asdl parser in Parser/asdl.py""" import importlib.machinery +import importlib.util import os from os.path import dirname import sys @@ -26,7 +27,10 @@ class TestAsdlParser(unittest.TestCase): sys.path.insert(0, parser_dir) loader = importlib.machinery.SourceFileLoader( 'asdl', os.path.join(parser_dir, 'asdl.py')) - cls.asdl = loader.load_module() + spec = importlib.util.spec_from_loader('asdl', loader) + module = importlib.util.module_from_spec(spec) + loader.exec_module(module) + cls.asdl = module cls.mod = cls.asdl.parse(os.path.join(parser_dir, 'Python.asdl')) cls.assertTrue(cls.asdl.check(cls.mod), 'Module validation failed') diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index be4b0f78ce9..451f40d1f88 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -1011,6 +1011,18 @@ Module( self.assertEqual(ast.literal_eval(" \t -1"), -1) self.assertRaises(IndentationError, ast.literal_eval, "\n -1") + def test_literal_eval_malformed_lineno(self): + msg = r'malformed node or string on line 3:' + with self.assertRaisesRegex(ValueError, msg): + ast.literal_eval("{'a': 1,\n'b':2,\n'c':++3,\n'd':4}") + + node = ast.UnaryOp( + ast.UAdd(), ast.UnaryOp(ast.UAdd(), ast.Constant(6))) + self.assertIsNone(getattr(node, 'lineno', None)) + msg = r'malformed node or string:' + with self.assertRaisesRegex(ValueError, msg): + ast.literal_eval(node) + def test_bad_integer(self): # issue13436: Bad error message with invalid numeric values body = [ast.ImportFrom(module='time', diff --git a/Lib/test/test_asyncio/test_asyncio_waitfor.py b/Lib/test/test_asyncio/test_asyncio_waitfor.py new file mode 100644 index 00000000000..2ca64abbeb5 --- /dev/null +++ b/Lib/test/test_asyncio/test_asyncio_waitfor.py @@ -0,0 +1,61 @@ +import asyncio +import unittest +import time + +def tearDownModule(): + asyncio.set_event_loop_policy(None) + + +class SlowTask: + """ Task will run for this defined time, ignoring cancel requests """ + TASK_TIMEOUT = 0.2 + + def __init__(self): + self.exited = False + + async def run(self): + exitat = time.monotonic() + self.TASK_TIMEOUT + + while True: + tosleep = exitat - time.monotonic() + if tosleep <= 0: + break + + try: + await asyncio.sleep(tosleep) + except asyncio.CancelledError: + pass + + self.exited = True + +class AsyncioWaitForTest(unittest.TestCase): + + async def atest_asyncio_wait_for_cancelled(self): + t = SlowTask() + + waitfortask = asyncio.create_task(asyncio.wait_for(t.run(), t.TASK_TIMEOUT * 2)) + await asyncio.sleep(0) + waitfortask.cancel() + await asyncio.wait({waitfortask}) + + self.assertTrue(t.exited) + + def test_asyncio_wait_for_cancelled(self): + asyncio.run(self.atest_asyncio_wait_for_cancelled()) + + async def atest_asyncio_wait_for_timeout(self): + t = SlowTask() + + try: + await asyncio.wait_for(t.run(), t.TASK_TIMEOUT / 2) + except asyncio.TimeoutError: + pass + + self.assertTrue(t.exited) + + def test_asyncio_wait_for_timeout(self): + asyncio.run(self.atest_asyncio_wait_for_timeout()) + + +if __name__ == '__main__': + unittest.main() diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py index f74dabc2db9..e40e7999b64 100644 --- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -1160,9 +1160,7 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase): @unittest.skipUnless(socket_helper.IPV6_ENABLED, 'no IPv6 support') def test_create_server_ipv6(self): async def main(): - with self.assertWarns(DeprecationWarning): - srv = await asyncio.start_server( - lambda: None, '::1', 0, loop=self.loop) + srv = await asyncio.start_server(lambda: None, '::1', 0) try: self.assertGreater(len(srv.sockets), 0) finally: @@ -1747,6 +1745,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase): MyDatagramProto, allow_broadcast=True, sock=FakeSock()) self.assertRaises(ValueError, self.loop.run_until_complete, fut) + @unittest.skipIf(sys.platform == 'vxworks', + "SO_BROADCAST is enabled by default on VxWorks") def test_create_datagram_endpoint_sockopts(self): # Socket options should not be applied unless asked for. # SO_REUSEPORT is not available on all platforms. diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 7f76011d2b9..6523a79b4a6 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -22,7 +22,7 @@ import unittest from unittest import mock import weakref -if sys.platform != 'win32': +if sys.platform not in ('win32', 'vxworks'): import tty import asyncio @@ -294,11 +294,8 @@ class EventLoopTestsMixin: self.loop.stop() self.loop.call_later(0.1, callback, 'hello world') - t0 = time.monotonic() self.loop.run_forever() - t1 = time.monotonic() self.assertEqual(results, ['hello world']) - self.assertTrue(0.08 <= t1-t0 <= 0.8, t1-t0) def test_call_soon(self): results = [] @@ -468,6 +465,8 @@ class EventLoopTestsMixin: self.assertFalse(self.loop.remove_signal_handler(signal.SIGINT)) @unittest.skipUnless(hasattr(signal, 'SIGALRM'), 'No SIGALRM') + @unittest.skipUnless(hasattr(signal, 'setitimer'), + 'need signal.setitimer()') def test_signal_handling_while_selecting(self): # Test with a signal actually arriving during a select() call. caught = 0 @@ -485,6 +484,8 @@ class EventLoopTestsMixin: self.assertEqual(caught, 1) @unittest.skipUnless(hasattr(signal, 'SIGALRM'), 'No SIGALRM') + @unittest.skipUnless(hasattr(signal, 'setitimer'), + 'need signal.setitimer()') def test_signal_handling_args(self): some_args = (42,) caught = 0 @@ -1374,6 +1375,7 @@ class EventLoopTestsMixin: @unittest.skipUnless(sys.platform != 'win32', "Don't support pipes for Windows") + @unittest.skipUnless(hasattr(os, 'openpty'), 'need os.openpty()') def test_read_pty_output(self): proto = MyReadPipeProto(loop=self.loop) @@ -1471,6 +1473,7 @@ class EventLoopTestsMixin: @unittest.skipUnless(sys.platform != 'win32', "Don't support pipes for Windows") + @unittest.skipUnless(hasattr(os, 'openpty'), 'need os.openpty()') # 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) @@ -1515,6 +1518,7 @@ class EventLoopTestsMixin: @unittest.skipUnless(sys.platform != 'win32', "Don't support pipes for Windows") + @unittest.skipUnless(hasattr(os, 'openpty'), 'need os.openpty()') # 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) diff --git a/Lib/test/test_asyncio/test_queues.py b/Lib/test/test_asyncio/test_queues.py index dc97673b6f1..0a0b529f621 100644 --- a/Lib/test/test_asyncio/test_queues.py +++ b/Lib/test/test_asyncio/test_queues.py @@ -255,6 +255,7 @@ class QueueGetTests(_QueueTestBase): def test_why_are_getters_waiting(self): # From issue #268. + asyncio.set_event_loop(self.loop) async def consumer(queue, num_expected): for _ in range(num_expected): @@ -276,8 +277,7 @@ class QueueGetTests(_QueueTestBase): self.loop.run_until_complete( asyncio.gather(producer(q, producer_num_items), - consumer(q, producer_num_items), - loop=self.loop), + consumer(q, producer_num_items)), ) def test_cancelled_getters_not_being_held_in_self_getters(self): @@ -498,6 +498,7 @@ class QueuePutTests(_QueueTestBase): def test_why_are_putters_waiting(self): # From issue #265. + asyncio.set_event_loop(self.loop) async def create_queue(): q = asyncio.Queue(2) @@ -519,8 +520,7 @@ class QueuePutTests(_QueueTestBase): t1 = putter(1) t2 = putter(2) t3 = putter(3) - self.loop.run_until_complete( - asyncio.gather(getter(), t0, t1, t2, t3, loop=self.loop)) + self.loop.run_until_complete(asyncio.gather(getter(), t0, t1, t2, t3)) def test_cancelled_puts_not_being_held_in_self_putters(self): def a_generator(): diff --git a/Lib/test/test_asyncio/test_server.py b/Lib/test/test_asyncio/test_server.py index 2de4dcad17c..860d62d52ef 100644 --- a/Lib/test/test_asyncio/test_server.py +++ b/Lib/test/test_asyncio/test_server.py @@ -45,9 +45,8 @@ class BaseStartServer(func_tests.FunctionalTestCaseMixin): async with srv: await srv.serve_forever() - with self.assertWarns(DeprecationWarning): - srv = self.loop.run_until_complete(asyncio.start_server( - serve, socket_helper.HOSTv4, 0, loop=self.loop, start_serving=False)) + srv = self.loop.run_until_complete(asyncio.start_server( + serve, socket_helper.HOSTv4, 0, start_serving=False)) self.assertFalse(srv.is_serving()) @@ -102,9 +101,8 @@ class SelectorStartServerTests(BaseStartServer, unittest.TestCase): await srv.serve_forever() with test_utils.unix_socket_path() as addr: - with self.assertWarns(DeprecationWarning): - srv = self.loop.run_until_complete(asyncio.start_unix_server( - serve, addr, loop=self.loop, start_serving=False)) + srv = self.loop.run_until_complete(asyncio.start_unix_server( + serve, addr, start_serving=False)) main_task = self.loop.create_task(main(srv)) diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py index 948820c82f3..e87863eb712 100644 --- a/Lib/test/test_asyncio/test_sslproto.py +++ b/Lib/test/test_asyncio/test_sslproto.py @@ -657,13 +657,11 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin): sock.close() async def client(addr): - with self.assertWarns(DeprecationWarning): - reader, writer = await asyncio.open_connection( - *addr, - ssl=client_sslctx, - server_hostname='', - loop=self.loop, - ssl_handshake_timeout=1.0) + reader, writer = await asyncio.open_connection( + *addr, + ssl=client_sslctx, + server_hostname='', + ssl_handshake_timeout=1.0) with self.tcp_server(server, max_clients=1, @@ -697,13 +695,11 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin): sock.close() async def client(addr): - with self.assertWarns(DeprecationWarning): - reader, writer = await asyncio.open_connection( - *addr, - ssl=client_sslctx, - server_hostname='', - loop=self.loop, - ssl_handshake_timeout=support.LOOPBACK_TIMEOUT) + reader, writer = await asyncio.open_connection( + *addr, + ssl=client_sslctx, + server_hostname='', + ssl_handshake_timeout=support.LOOPBACK_TIMEOUT) with self.tcp_server(server, max_clients=1, @@ -734,12 +730,10 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin): sock.close() async def client(addr): - with self.assertWarns(DeprecationWarning): - reader, writer = await asyncio.open_connection( - *addr, - ssl=client_sslctx, - server_hostname='', - loop=self.loop) + reader, writer = await asyncio.open_connection( + *addr, + ssl=client_sslctx, + server_hostname='') self.assertEqual(await reader.readline(), b'A\n') writer.write(b'B') diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py index 1e9d115661d..aa397797758 100644 --- a/Lib/test/test_asyncio/test_streams.py +++ b/Lib/test/test_asyncio/test_streams.py @@ -48,8 +48,7 @@ class StreamTests(test_utils.TestCase): def _basetest_open_connection(self, open_connection_fut): messages = [] self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx)) - with self.assertWarns(DeprecationWarning): - reader, writer = self.loop.run_until_complete(open_connection_fut) + reader, writer = self.loop.run_until_complete(open_connection_fut) writer.write(b'GET / HTTP/1.0\r\n\r\n') f = reader.readline() data = self.loop.run_until_complete(f) @@ -62,23 +61,20 @@ class StreamTests(test_utils.TestCase): def test_open_connection(self): with test_utils.run_test_server() as httpd: - conn_fut = asyncio.open_connection(*httpd.address, - loop=self.loop) + conn_fut = asyncio.open_connection(*httpd.address) self._basetest_open_connection(conn_fut) @socket_helper.skip_unless_bind_unix_socket def test_open_unix_connection(self): with test_utils.run_test_unix_server() as httpd: - conn_fut = asyncio.open_unix_connection(httpd.address, - loop=self.loop) + conn_fut = asyncio.open_unix_connection(httpd.address) self._basetest_open_connection(conn_fut) def _basetest_open_connection_no_loop_ssl(self, open_connection_fut): messages = [] self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx)) try: - with self.assertWarns(DeprecationWarning): - reader, writer = self.loop.run_until_complete(open_connection_fut) + reader, writer = self.loop.run_until_complete(open_connection_fut) finally: asyncio.set_event_loop(None) writer.write(b'GET / HTTP/1.0\r\n\r\n') @@ -94,8 +90,7 @@ class StreamTests(test_utils.TestCase): with test_utils.run_test_server(use_ssl=True) as httpd: conn_fut = asyncio.open_connection( *httpd.address, - ssl=test_utils.dummy_ssl_context(), - loop=self.loop) + ssl=test_utils.dummy_ssl_context()) self._basetest_open_connection_no_loop_ssl(conn_fut) @@ -107,15 +102,14 @@ class StreamTests(test_utils.TestCase): httpd.address, ssl=test_utils.dummy_ssl_context(), server_hostname='', - loop=self.loop) + ) self._basetest_open_connection_no_loop_ssl(conn_fut) def _basetest_open_connection_error(self, open_connection_fut): messages = [] self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx)) - with self.assertWarns(DeprecationWarning): - reader, writer = self.loop.run_until_complete(open_connection_fut) + reader, writer = self.loop.run_until_complete(open_connection_fut) writer._protocol.connection_lost(ZeroDivisionError()) f = reader.read() with self.assertRaises(ZeroDivisionError): @@ -126,15 +120,13 @@ class StreamTests(test_utils.TestCase): def test_open_connection_error(self): with test_utils.run_test_server() as httpd: - conn_fut = asyncio.open_connection(*httpd.address, - loop=self.loop) + conn_fut = asyncio.open_connection(*httpd.address) self._basetest_open_connection_error(conn_fut) @socket_helper.skip_unless_bind_unix_socket def test_open_unix_connection_error(self): with test_utils.run_test_unix_server() as httpd: - conn_fut = asyncio.open_unix_connection(httpd.address, - loop=self.loop) + conn_fut = asyncio.open_unix_connection(httpd.address) self._basetest_open_connection_error(conn_fut) def test_feed_empty_data(self): @@ -452,12 +444,14 @@ class StreamTests(test_utils.TestCase): def test_readuntil_eof(self): stream = asyncio.StreamReader(loop=self.loop) - stream.feed_data(b'some dataAA') + data = b'some dataAA' + stream.feed_data(data) stream.feed_eof() - with self.assertRaises(asyncio.IncompleteReadError) as cm: + with self.assertRaisesRegex(asyncio.IncompleteReadError, + 'undefined expected bytes') as cm: self.loop.run_until_complete(stream.readuntil(b'AAA')) - self.assertEqual(cm.exception.partial, b'some dataAA') + self.assertEqual(cm.exception.partial, data) self.assertIsNone(cm.exception.expected) self.assertEqual(b'', stream._buffer) @@ -596,8 +590,7 @@ class StreamTests(test_utils.TestCase): sock = socket.create_server(('127.0.0.1', 0)) self.server = self.loop.run_until_complete( asyncio.start_server(self.handle_client, - sock=sock, - loop=self.loop)) + sock=sock)) return sock.getsockname() def handle_client_callback(self, client_reader, client_writer): @@ -610,8 +603,7 @@ class StreamTests(test_utils.TestCase): sock.close() self.server = self.loop.run_until_complete( asyncio.start_server(self.handle_client_callback, - host=addr[0], port=addr[1], - loop=self.loop)) + host=addr[0], port=addr[1])) return addr def stop(self): @@ -621,9 +613,7 @@ class StreamTests(test_utils.TestCase): self.server = None async def client(addr): - with self.assertWarns(DeprecationWarning): - reader, writer = await asyncio.open_connection( - *addr, loop=self.loop) + reader, writer = await asyncio.open_connection(*addr) # send a line writer.write(b"hello world!\n") # read it back @@ -637,16 +627,14 @@ class StreamTests(test_utils.TestCase): # test the server variant with a coroutine as client handler server = MyServer(self.loop) - with self.assertWarns(DeprecationWarning): - addr = server.start() + addr = server.start() msg = self.loop.run_until_complete(self.loop.create_task(client(addr))) server.stop() self.assertEqual(msg, b"hello world!\n") # test the server variant with a callback as client handler server = MyServer(self.loop) - with self.assertWarns(DeprecationWarning): - addr = server.start_callback() + addr = server.start_callback() msg = self.loop.run_until_complete(self.loop.create_task(client(addr))) server.stop() self.assertEqual(msg, b"hello world!\n") @@ -673,8 +661,7 @@ class StreamTests(test_utils.TestCase): def start(self): self.server = self.loop.run_until_complete( asyncio.start_unix_server(self.handle_client, - path=self.path, - loop=self.loop)) + path=self.path)) def handle_client_callback(self, client_reader, client_writer): self.loop.create_task(self.handle_client(client_reader, @@ -682,8 +669,7 @@ class StreamTests(test_utils.TestCase): def start_callback(self): start = asyncio.start_unix_server(self.handle_client_callback, - path=self.path, - loop=self.loop) + path=self.path) self.server = self.loop.run_until_complete(start) def stop(self): @@ -693,9 +679,7 @@ class StreamTests(test_utils.TestCase): self.server = None async def client(path): - with self.assertWarns(DeprecationWarning): - reader, writer = await asyncio.open_unix_connection( - path, loop=self.loop) + reader, writer = await asyncio.open_unix_connection(path) # send a line writer.write(b"hello world!\n") # read it back @@ -710,8 +694,7 @@ class StreamTests(test_utils.TestCase): # test the server variant with a coroutine as client handler with test_utils.unix_socket_path() as path: server = MyServer(self.loop, path) - with self.assertWarns(DeprecationWarning): - server.start() + server.start() msg = self.loop.run_until_complete( self.loop.create_task(client(path))) server.stop() @@ -720,8 +703,7 @@ class StreamTests(test_utils.TestCase): # test the server variant with a callback as client handler with test_utils.unix_socket_path() as path: server = MyServer(self.loop, path) - with self.assertWarns(DeprecationWarning): - server.start_callback() + server.start_callback() msg = self.loop.run_until_complete( self.loop.create_task(client(path))) server.stop() @@ -809,9 +791,7 @@ os.close(fd) clt.close() async def client(host, port): - with self.assertWarns(DeprecationWarning): - reader, writer = await asyncio.open_connection( - host, port, loop=self.loop) + reader, writer = await asyncio.open_connection(host, port) while True: writer.write(b"foo\n") @@ -895,9 +875,8 @@ os.close(fd) def test_wait_closed_on_close(self): with test_utils.run_test_server() as httpd: - with self.assertWarns(DeprecationWarning): - rd, wr = self.loop.run_until_complete( - asyncio.open_connection(*httpd.address, loop=self.loop)) + rd, wr = self.loop.run_until_complete( + asyncio.open_connection(*httpd.address)) wr.write(b'GET / HTTP/1.0\r\n\r\n') f = rd.readline() @@ -913,9 +892,8 @@ os.close(fd) def test_wait_closed_on_close_with_unread_data(self): with test_utils.run_test_server() as httpd: - with self.assertWarns(DeprecationWarning): - rd, wr = self.loop.run_until_complete( - asyncio.open_connection(*httpd.address, loop=self.loop)) + rd, wr = self.loop.run_until_complete( + asyncio.open_connection(*httpd.address)) wr.write(b'GET / HTTP/1.0\r\n\r\n') f = rd.readline() @@ -972,10 +950,8 @@ os.close(fd) self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx)) with test_utils.run_test_server() as httpd: - with self.assertWarns(DeprecationWarning): - rd, wr = self.loop.run_until_complete( - asyncio.open_connection(*httpd.address, - loop=self.loop)) + rd, wr = self.loop.run_until_complete( + asyncio.open_connection(*httpd.address)) wr.close() f = wr.wait_closed() diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index 177a02cdcc1..225a3babc84 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -635,26 +635,6 @@ class SubprocessMixin: self.assertIsNone(self.loop.run_until_complete(execute())) - def test_exec_loop_deprecated(self): - async def go(): - with self.assertWarns(DeprecationWarning): - proc = await asyncio.create_subprocess_exec( - sys.executable, '-c', 'pass', - loop=self.loop, - ) - await proc.wait() - self.loop.run_until_complete(go()) - - def test_shell_loop_deprecated(self): - async def go(): - with self.assertWarns(DeprecationWarning): - proc = await asyncio.create_subprocess_shell( - "exit 0", - loop=self.loop, - ) - await proc.wait() - self.loop.run_until_complete(go()) - if sys.platform != 'win32': # Unix diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py index 01f62b7f408..7c2e85ceefd 100644 --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -155,7 +155,7 @@ class BaseTaskTests: self.loop.run_until_complete( asyncio.gather(*[ self.new_task(self.loop, run()) for _ in range(100) - ], loop=self.loop)) + ])) def test_other_loop_future(self): other_loop = asyncio.new_event_loop() @@ -1603,19 +1603,18 @@ class BaseTaskTests: async def foo(): values = [] - for f in asyncio.as_completed([b, c, a], loop=loop): + for f in asyncio.as_completed([b, c, a]): values.append(await f) return values - with self.assertWarns(DeprecationWarning): - res = loop.run_until_complete(self.new_task(loop, foo())) + + res = loop.run_until_complete(self.new_task(loop, foo())) self.assertAlmostEqual(0.15, loop.time()) self.assertTrue('a' in res[:2]) self.assertTrue('b' in res[:2]) self.assertEqual(res[2], 'c') # Doing it again should take no time and exercise a different path. - with self.assertWarns(DeprecationWarning): - res = loop.run_until_complete(self.new_task(loop, foo())) + res = loop.run_until_complete(self.new_task(loop, foo())) self.assertAlmostEqual(0.15, loop.time()) def test_as_completed_with_timeout(self): @@ -1633,7 +1632,7 @@ class BaseTaskTests: async def foo(): values = [] - for f in asyncio.as_completed([a, b], timeout=0.12, loop=loop): + for f in asyncio.as_completed([a, b], timeout=0.12): if values: loop.advance_time(0.02) try: @@ -1643,8 +1642,7 @@ class BaseTaskTests: values.append((2, exc)) return values - with self.assertWarns(DeprecationWarning): - res = loop.run_until_complete(self.new_task(loop, foo())) + res = loop.run_until_complete(self.new_task(loop, foo())) self.assertEqual(len(res), 2, res) self.assertEqual(res[0], (1, 'a')) self.assertEqual(res[1][0], 2) @@ -1667,12 +1665,11 @@ class BaseTaskTests: a = asyncio.sleep(0.01, 'a') async def foo(): - for f in asyncio.as_completed([a], timeout=1, loop=loop): + for f in asyncio.as_completed([a], timeout=1): v = await f self.assertEqual(v, 'a') - with self.assertWarns(DeprecationWarning): - loop.run_until_complete(self.new_task(loop, foo())) + loop.run_until_complete(self.new_task(loop, foo())) def test_as_completed_reverse_wait(self): @@ -1682,13 +1679,13 @@ class BaseTaskTests: yield 0 loop = self.new_test_loop(gen) + asyncio.set_event_loop(loop) a = asyncio.sleep(0.05, 'a') b = asyncio.sleep(0.10, 'b') fs = {a, b} - with self.assertWarns(DeprecationWarning): - futs = list(asyncio.as_completed(fs, loop=loop)) + futs = list(asyncio.as_completed(fs)) self.assertEqual(len(futs), 2) x = loop.run_until_complete(futs[1]) @@ -1709,12 +1706,13 @@ class BaseTaskTests: yield 0.05 loop = self.new_test_loop(gen) + asyncio.set_event_loop(loop) a = asyncio.sleep(0.05, 'a') b = asyncio.sleep(0.05, 'b') fs = {a, b} - with self.assertWarns(DeprecationWarning): - futs = list(asyncio.as_completed(fs, loop=loop)) + + futs = list(asyncio.as_completed(fs)) self.assertEqual(len(futs), 2) waiter = asyncio.wait(futs) # Deprecation from passing coros in futs to asyncio.wait() @@ -1734,14 +1732,12 @@ class BaseTaskTests: def runner(): result = [] c = coro('ham') - for f in asyncio.as_completed([c, c, coro('spam')], - loop=self.loop): + for f in asyncio.as_completed([c, c, coro('spam')]): result.append((yield from f)) return result - with self.assertWarns(DeprecationWarning): - fut = self.new_task(self.loop, runner()) - self.loop.run_until_complete(fut) + fut = self.new_task(self.loop, runner()) + self.loop.run_until_complete(fut) result = fut.result() self.assertEqual(set(result), {'ham', 'spam'}) self.assertEqual(len(result), 2) @@ -2018,7 +2014,7 @@ class BaseTaskTests: self.assertIsNone(asyncio.current_task(loop=self.loop)) async def coro(loop): - self.assertIs(asyncio.current_task(loop=loop), task) + self.assertIs(asyncio.current_task(), task) self.assertIs(asyncio.current_task(None), task) self.assertIs(asyncio.current_task(), task) @@ -2034,16 +2030,16 @@ class BaseTaskTests: fut2 = self.new_future(self.loop) async def coro1(loop): - self.assertTrue(asyncio.current_task(loop=loop) is task1) + self.assertTrue(asyncio.current_task() is task1) await fut1 - self.assertTrue(asyncio.current_task(loop=loop) is task1) + self.assertTrue(asyncio.current_task() is task1) fut2.set_result(True) async def coro2(loop): - self.assertTrue(asyncio.current_task(loop=loop) is task2) + self.assertTrue(asyncio.current_task() is task2) fut1.set_result(True) await fut2 - self.assertTrue(asyncio.current_task(loop=loop) is task2) + self.assertTrue(asyncio.current_task() is task2) task1 = self.new_task(self.loop, coro1(self.loop)) task2 = self.new_task(self.loop, coro2(self.loop)) @@ -2210,10 +2206,10 @@ class BaseTaskTests: # as_completed() expects a list of futures, not a future instance self.assertRaises(TypeError, self.loop.run_until_complete, - asyncio.as_completed(fut, loop=self.loop)) + asyncio.as_completed(fut)) coro = coroutine_function() self.assertRaises(TypeError, self.loop.run_until_complete, - asyncio.as_completed(coro, loop=self.loop)) + asyncio.as_completed(coro)) coro.close() def test_wait_invalid_args(self): @@ -2511,6 +2507,7 @@ class BaseTaskTests: """Ensure that a gathering future refuses to be cancelled once all children are done""" loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) self.addCleanup(loop.close) fut = self.new_future(loop) @@ -2518,7 +2515,7 @@ class BaseTaskTests: # gathering task is done at the same time as the child future def child_coro(): return (yield from fut) - gather_future = asyncio.gather(child_coro(), loop=loop) + gather_future = asyncio.gather(child_coro()) gather_task = asyncio.ensure_future(gather_future, loop=loop) cancel_result = None @@ -2555,8 +2552,7 @@ class BaseTaskTests: while True: time += 0.05 await asyncio.gather(asyncio.sleep(0.05), - return_exceptions=True, - loop=loop) + return_exceptions=True) if time > 1: return @@ -2771,7 +2767,7 @@ class BaseTaskTests: task = loop.create_task(sub(random.randint(0, 10))) tasks.append(task) - await asyncio.gather(*tasks, loop=loop) + await asyncio.gather(*tasks) loop = asyncio.new_event_loop() try: @@ -3328,9 +3324,6 @@ class FutureGatherTests(GatherTestsBase, test_utils.TestCase): self._run_loop(self.one_loop) self.assertTrue(fut.done()) self.assertEqual(fut.result(), []) - with self.assertWarns(DeprecationWarning): - fut = asyncio.gather(*seq_or_iter, loop=self.other_loop) - self.assertIs(fut._loop, self.other_loop) def test_constructor_empty_sequence(self): self._check_empty_sequence([]) @@ -3343,8 +3336,6 @@ class FutureGatherTests(GatherTestsBase, test_utils.TestCase): fut2 = self.other_loop.create_future() with self.assertRaises(ValueError): asyncio.gather(fut1, fut2) - with self.assertRaises(ValueError): - asyncio.gather(fut1, loop=self.other_loop) def test_constructor_homogenous_futures(self): children = [self.other_loop.create_future() for i in range(3)] @@ -3352,7 +3343,7 @@ class FutureGatherTests(GatherTestsBase, test_utils.TestCase): self.assertIs(fut._loop, self.other_loop) self._run_loop(self.other_loop) self.assertFalse(fut.done()) - fut = asyncio.gather(*children, loop=self.other_loop) + fut = asyncio.gather(*children) self.assertIs(fut._loop, self.other_loop) self._run_loop(self.other_loop) self.assertFalse(fut.done()) @@ -3423,9 +3414,10 @@ class CoroutineGatherTests(GatherTestsBase, test_utils.TestCase): self.one_loop.run_until_complete(fut) self.set_event_loop(self.other_loop, cleanup=False) + asyncio.set_event_loop(self.other_loop) gen3 = coro() gen4 = coro() - fut2 = asyncio.gather(gen3, gen4, loop=self.other_loop) + fut2 = asyncio.gather(gen3, gen4) self.assertIs(fut2._loop, self.other_loop) self.other_loop.run_until_complete(fut2) @@ -3435,7 +3427,7 @@ class CoroutineGatherTests(GatherTestsBase, test_utils.TestCase): def coro(s): return s c = coro('abc') - fut = asyncio.gather(c, c, coro('def'), c, loop=self.one_loop) + fut = asyncio.gather(c, c, coro('def'), c) self._run_loop(self.one_loop) self.assertEqual(fut.result(), ['abc', 'abc', 'def', 'abc']) @@ -3455,7 +3447,7 @@ class CoroutineGatherTests(GatherTestsBase, test_utils.TestCase): async def outer(): nonlocal proof, gatherer - gatherer = asyncio.gather(child1, child2, loop=self.one_loop) + gatherer = asyncio.gather(child1, child2) await gatherer proof += 100 @@ -3482,7 +3474,7 @@ class CoroutineGatherTests(GatherTestsBase, test_utils.TestCase): b = self.one_loop.create_future() async def outer(): - await asyncio.gather(inner(a), inner(b), loop=self.one_loop) + await asyncio.gather(inner(a), inner(b)) f = asyncio.ensure_future(outer(), loop=self.one_loop) test_utils.run_briefly(self.one_loop) @@ -3621,11 +3613,6 @@ class SleepTests(test_utils.TestCase): self.loop.run_until_complete(coro()) self.assertEqual(result, 11) - def test_loop_argument_is_deprecated(self): - # Remove test when loop argument is removed in Python 3.10 - with self.assertWarns(DeprecationWarning): - self.loop.run_until_complete(asyncio.sleep(0.01, loop=self.loop)) - class WaitTests(test_utils.TestCase): def setUp(self): @@ -3638,18 +3625,6 @@ class WaitTests(test_utils.TestCase): self.loop = None super().tearDown() - def test_loop_argument_is_deprecated_in_wait(self): - # Remove test when loop argument is removed in Python 3.10 - with self.assertWarns(DeprecationWarning): - self.loop.run_until_complete( - asyncio.wait([coroutine_function()], loop=self.loop)) - - def test_loop_argument_is_deprecated_in_wait_for(self): - # Remove test when loop argument is removed in Python 3.10 - with self.assertWarns(DeprecationWarning): - self.loop.run_until_complete( - asyncio.wait_for(coroutine_function(), 0.01, loop=self.loop)) - def test_coro_is_deprecated_in_wait(self): # Remove test when passing coros to asyncio.wait() is removed in 3.11 with self.assertWarns(DeprecationWarning): @@ -3701,7 +3676,7 @@ class CompatibilityTests(test_utils.TestCase): return 'ok2' async def inner(): - return await asyncio.gather(coro1(), coro2(), loop=self.loop) + return await asyncio.gather(coro1(), coro2()) result = self.loop.run_until_complete(inner()) self.assertEqual(['ok1', 'ok2'], result) diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py index 2c7d52a15bb..643638564e3 100644 --- a/Lib/test/test_asyncio/test_unix_events.py +++ b/Lib/test/test_asyncio/test_unix_events.py @@ -1,6 +1,5 @@ """Tests for unix_events.py.""" -import collections import contextlib import errno import io @@ -30,6 +29,15 @@ from test.test_asyncio import utils as test_utils MOCK_ANY = mock.ANY +def EXITCODE(exitcode): + return 32768 + exitcode + + +def SIGNAL(signum): + assert 1 <= signum <= 68 + return 32768 - signum + + def tearDownModule(): asyncio.set_event_loop_policy(None) @@ -1125,15 +1133,6 @@ class BaseChildWatcherTests(unittest.TestCase): NotImplementedError, watcher._do_waitpid, f) -WaitPidMocks = collections.namedtuple("WaitPidMocks", - ("waitpid", - "WIFEXITED", - "WIFSIGNALED", - "WEXITSTATUS", - "WTERMSIG", - )) - - class ChildWatcherTestsMixin: ignore_warnings = mock.patch.object(log.logger, "warning") @@ -1164,22 +1163,16 @@ class ChildWatcherTestsMixin: else: raise ChildProcessError() - def add_zombie(self, pid, returncode): - self.zombies[pid] = returncode + 32768 + def add_zombie(self, pid, status): + self.zombies[pid] = status - def WIFEXITED(self, status): - return status >= 32768 - - def WIFSIGNALED(self, status): - return 32700 < status < 32768 - - def WEXITSTATUS(self, status): - self.assertTrue(self.WIFEXITED(status)) - return status - 32768 - - def WTERMSIG(self, status): - self.assertTrue(self.WIFSIGNALED(status)) - return 32768 - status + def waitstatus_to_exitcode(self, status): + if status > 32768: + return status - 32768 + elif 32700 < status < 32768: + return status - 32768 + else: + return status def test_create_watcher(self): self.m_add_signal_handler.assert_called_once_with( @@ -1191,19 +1184,13 @@ class ChildWatcherTestsMixin: return mock.patch(target, wraps=wrapper, new_callable=mock.Mock) - with patch('os.WTERMSIG', self.WTERMSIG) as m_WTERMSIG, \ - patch('os.WEXITSTATUS', self.WEXITSTATUS) as m_WEXITSTATUS, \ - patch('os.WIFSIGNALED', self.WIFSIGNALED) as m_WIFSIGNALED, \ - patch('os.WIFEXITED', self.WIFEXITED) as m_WIFEXITED, \ + with patch('asyncio.unix_events.waitstatus_to_exitcode', self.waitstatus_to_exitcode), \ patch('os.waitpid', self.waitpid) as m_waitpid: - func(self, WaitPidMocks(m_waitpid, - m_WIFEXITED, m_WIFSIGNALED, - m_WEXITSTATUS, m_WTERMSIG, - )) + func(self, m_waitpid) return wrapped_func @waitpid_mocks - def test_sigchld(self, m): + def test_sigchld(self, m_waitpid): # register a child callback = mock.Mock() @@ -1212,59 +1199,36 @@ class ChildWatcherTestsMixin: self.watcher.add_child_handler(42, callback, 9, 10, 14) self.assertFalse(callback.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # child is running self.watcher._sig_chld() self.assertFalse(callback.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # child terminates (returncode 12) self.running = False - self.add_zombie(42, 12) + self.add_zombie(42, EXITCODE(12)) self.watcher._sig_chld() - self.assertTrue(m.WIFEXITED.called) - self.assertTrue(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) callback.assert_called_once_with(42, 12, 9, 10, 14) - m.WIFSIGNALED.reset_mock() - m.WIFEXITED.reset_mock() - m.WEXITSTATUS.reset_mock() callback.reset_mock() # ensure that the child is effectively reaped - self.add_zombie(42, 13) + self.add_zombie(42, EXITCODE(13)) with self.ignore_warnings: self.watcher._sig_chld() self.assertFalse(callback.called) - self.assertFalse(m.WTERMSIG.called) - - m.WIFSIGNALED.reset_mock() - m.WIFEXITED.reset_mock() - m.WEXITSTATUS.reset_mock() # sigchld called again self.zombies.clear() self.watcher._sig_chld() self.assertFalse(callback.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) @waitpid_mocks - def test_sigchld_two_children(self, m): + def test_sigchld_two_children(self, m_waitpid): callback1 = mock.Mock() callback2 = mock.Mock() @@ -1275,10 +1239,6 @@ class ChildWatcherTestsMixin: self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # register child 2 with self.watcher: @@ -1286,34 +1246,20 @@ class ChildWatcherTestsMixin: self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # children are running self.watcher._sig_chld() self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # child 1 terminates (signal 3) - self.add_zombie(43, -3) + self.add_zombie(43, SIGNAL(3)) self.watcher._sig_chld() callback1.assert_called_once_with(43, -3, 7, 8) self.assertFalse(callback2.called) - self.assertTrue(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertTrue(m.WTERMSIG.called) - m.WIFSIGNALED.reset_mock() - m.WIFEXITED.reset_mock() - m.WTERMSIG.reset_mock() callback1.reset_mock() # child 2 still running @@ -1321,40 +1267,25 @@ class ChildWatcherTestsMixin: self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # child 2 terminates (code 108) - self.add_zombie(44, 108) + self.add_zombie(44, EXITCODE(108)) self.running = False self.watcher._sig_chld() callback2.assert_called_once_with(44, 108, 147, 18) self.assertFalse(callback1.called) - self.assertTrue(m.WIFEXITED.called) - self.assertTrue(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) - m.WIFSIGNALED.reset_mock() - m.WIFEXITED.reset_mock() - m.WEXITSTATUS.reset_mock() callback2.reset_mock() # ensure that the children are effectively reaped - self.add_zombie(43, 14) - self.add_zombie(44, 15) + self.add_zombie(43, EXITCODE(14)) + self.add_zombie(44, EXITCODE(15)) with self.ignore_warnings: self.watcher._sig_chld() self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WTERMSIG.called) - - m.WIFSIGNALED.reset_mock() - m.WIFEXITED.reset_mock() - m.WEXITSTATUS.reset_mock() # sigchld called again self.zombies.clear() @@ -1362,13 +1293,9 @@ class ChildWatcherTestsMixin: self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) @waitpid_mocks - def test_sigchld_two_children_terminating_together(self, m): + def test_sigchld_two_children_terminating_together(self, m_waitpid): callback1 = mock.Mock() callback2 = mock.Mock() @@ -1379,10 +1306,6 @@ class ChildWatcherTestsMixin: self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # register child 2 with self.watcher: @@ -1390,60 +1313,43 @@ class ChildWatcherTestsMixin: self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # children are running self.watcher._sig_chld() self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # child 1 terminates (code 78) # child 2 terminates (signal 5) - self.add_zombie(45, 78) - self.add_zombie(46, -5) + self.add_zombie(45, EXITCODE(78)) + self.add_zombie(46, SIGNAL(5)) self.running = False self.watcher._sig_chld() callback1.assert_called_once_with(45, 78, 17, 8) callback2.assert_called_once_with(46, -5, 1147, 18) - self.assertTrue(m.WIFSIGNALED.called) - self.assertTrue(m.WIFEXITED.called) - self.assertTrue(m.WEXITSTATUS.called) - self.assertTrue(m.WTERMSIG.called) - m.WIFSIGNALED.reset_mock() - m.WIFEXITED.reset_mock() - m.WTERMSIG.reset_mock() - m.WEXITSTATUS.reset_mock() callback1.reset_mock() callback2.reset_mock() # ensure that the children are effectively reaped - self.add_zombie(45, 14) - self.add_zombie(46, 15) + self.add_zombie(45, EXITCODE(14)) + self.add_zombie(46, EXITCODE(15)) with self.ignore_warnings: self.watcher._sig_chld() self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WTERMSIG.called) @waitpid_mocks - def test_sigchld_race_condition(self, m): + def test_sigchld_race_condition(self, m_waitpid): # register a child callback = mock.Mock() with self.watcher: # child terminates before being registered - self.add_zombie(50, 4) + self.add_zombie(50, EXITCODE(4)) self.watcher._sig_chld() self.watcher.add_child_handler(50, callback, 1, 12) @@ -1452,14 +1358,14 @@ class ChildWatcherTestsMixin: callback.reset_mock() # ensure that the child is effectively reaped - self.add_zombie(50, -1) + self.add_zombie(50, SIGNAL(1)) with self.ignore_warnings: self.watcher._sig_chld() self.assertFalse(callback.called) @waitpid_mocks - def test_sigchld_replace_handler(self, m): + def test_sigchld_replace_handler(self, m_waitpid): callback1 = mock.Mock() callback2 = mock.Mock() @@ -1470,10 +1376,6 @@ class ChildWatcherTestsMixin: self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # register the same child again with self.watcher: @@ -1481,38 +1383,27 @@ class ChildWatcherTestsMixin: self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # child terminates (signal 8) self.running = False - self.add_zombie(51, -8) + self.add_zombie(51, SIGNAL(8)) self.watcher._sig_chld() callback2.assert_called_once_with(51, -8, 21) self.assertFalse(callback1.called) - self.assertTrue(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertTrue(m.WTERMSIG.called) - m.WIFSIGNALED.reset_mock() - m.WIFEXITED.reset_mock() - m.WTERMSIG.reset_mock() callback2.reset_mock() # ensure that the child is effectively reaped - self.add_zombie(51, 13) + self.add_zombie(51, EXITCODE(13)) with self.ignore_warnings: self.watcher._sig_chld() self.assertFalse(callback1.called) self.assertFalse(callback2.called) - self.assertFalse(m.WTERMSIG.called) @waitpid_mocks - def test_sigchld_remove_handler(self, m): + def test_sigchld_remove_handler(self, m_waitpid): callback = mock.Mock() # register a child @@ -1521,30 +1412,22 @@ class ChildWatcherTestsMixin: self.watcher.add_child_handler(52, callback, 1984) self.assertFalse(callback.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # unregister the child self.watcher.remove_child_handler(52) self.assertFalse(callback.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # child terminates (code 99) self.running = False - self.add_zombie(52, 99) + self.add_zombie(52, EXITCODE(99)) with self.ignore_warnings: self.watcher._sig_chld() self.assertFalse(callback.called) @waitpid_mocks - def test_sigchld_unknown_status(self, m): + def test_sigchld_unknown_status(self, m_waitpid): callback = mock.Mock() # register a child @@ -1553,10 +1436,6 @@ class ChildWatcherTestsMixin: self.watcher.add_child_handler(53, callback, -19) self.assertFalse(callback.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # terminate with unknown status self.zombies[53] = 1178 @@ -1564,24 +1443,18 @@ class ChildWatcherTestsMixin: self.watcher._sig_chld() callback.assert_called_once_with(53, 1178, -19) - self.assertTrue(m.WIFEXITED.called) - self.assertTrue(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) callback.reset_mock() - m.WIFEXITED.reset_mock() - m.WIFSIGNALED.reset_mock() # ensure that the child is effectively reaped - self.add_zombie(53, 101) + self.add_zombie(53, EXITCODE(101)) with self.ignore_warnings: self.watcher._sig_chld() self.assertFalse(callback.called) @waitpid_mocks - def test_remove_child_handler(self, m): + def test_remove_child_handler(self, m_waitpid): callback1 = mock.Mock() callback2 = mock.Mock() callback3 = mock.Mock() @@ -1602,9 +1475,9 @@ class ChildWatcherTestsMixin: self.assertFalse(self.watcher.remove_child_handler(55)) # all children terminate - self.add_zombie(54, 0) - self.add_zombie(55, 1) - self.add_zombie(56, 2) + self.add_zombie(54, EXITCODE(0)) + self.add_zombie(55, EXITCODE(1)) + self.add_zombie(56, EXITCODE(2)) self.running = False with self.ignore_warnings: self.watcher._sig_chld() @@ -1614,7 +1487,7 @@ class ChildWatcherTestsMixin: callback3.assert_called_once_with(56, 2, 3) @waitpid_mocks - def test_sigchld_unhandled_exception(self, m): + def test_sigchld_unhandled_exception(self, m_waitpid): callback = mock.Mock() # register a child @@ -1623,7 +1496,7 @@ class ChildWatcherTestsMixin: self.watcher.add_child_handler(57, callback) # raise an exception - m.waitpid.side_effect = ValueError + m_waitpid.side_effect = ValueError with mock.patch.object(log.logger, 'error') as m_error: @@ -1632,7 +1505,7 @@ class ChildWatcherTestsMixin: self.assertTrue(m_error.called) @waitpid_mocks - def test_sigchld_child_reaped_elsewhere(self, m): + def test_sigchld_child_reaped_elsewhere(self, m_waitpid): # register a child callback = mock.Mock() @@ -1641,19 +1514,15 @@ class ChildWatcherTestsMixin: self.watcher.add_child_handler(58, callback) self.assertFalse(callback.called) - self.assertFalse(m.WIFEXITED.called) - self.assertFalse(m.WIFSIGNALED.called) - self.assertFalse(m.WEXITSTATUS.called) - self.assertFalse(m.WTERMSIG.called) # child terminates self.running = False - self.add_zombie(58, 4) + self.add_zombie(58, EXITCODE(4)) # waitpid is called elsewhere os.waitpid(58, os.WNOHANG) - m.waitpid.reset_mock() + m_waitpid.reset_mock() # sigchld with self.ignore_warnings: @@ -1667,7 +1536,7 @@ class ChildWatcherTestsMixin: callback.assert_called_once_with(58, 255) @waitpid_mocks - def test_sigchld_unknown_pid_during_registration(self, m): + def test_sigchld_unknown_pid_during_registration(self, m_waitpid): # register two children callback1 = mock.Mock() callback2 = mock.Mock() @@ -1675,9 +1544,9 @@ class ChildWatcherTestsMixin: with self.ignore_warnings, self.watcher: self.running = True # child 1 terminates - self.add_zombie(591, 7) + self.add_zombie(591, EXITCODE(7)) # an unknown child terminates - self.add_zombie(593, 17) + self.add_zombie(593, EXITCODE(17)) self.watcher._sig_chld() @@ -1688,7 +1557,7 @@ class ChildWatcherTestsMixin: self.assertFalse(callback2.called) @waitpid_mocks - def test_set_loop(self, m): + def test_set_loop(self, m_waitpid): # register a child callback = mock.Mock() @@ -1713,13 +1582,13 @@ class ChildWatcherTestsMixin: # child terminates self.running = False - self.add_zombie(60, 9) + self.add_zombie(60, EXITCODE(9)) self.watcher._sig_chld() callback.assert_called_once_with(60, 9) @waitpid_mocks - def test_set_loop_race_condition(self, m): + def test_set_loop_race_condition(self, m_waitpid): # register 3 children callback1 = mock.Mock() callback2 = mock.Mock() @@ -1746,8 +1615,8 @@ class ChildWatcherTestsMixin: signal.SIGCHLD) # child 1 & 2 terminate - self.add_zombie(61, 11) - self.add_zombie(62, -5) + self.add_zombie(61, EXITCODE(11)) + self.add_zombie(62, SIGNAL(5)) # SIGCHLD was not caught self.assertFalse(callback1.called) @@ -1773,7 +1642,7 @@ class ChildWatcherTestsMixin: # child 3 terminates self.running = False - self.add_zombie(622, 19) + self.add_zombie(622, EXITCODE(19)) self.watcher._sig_chld() self.assertFalse(callback1.called) @@ -1781,16 +1650,16 @@ class ChildWatcherTestsMixin: callback3.assert_called_once_with(622, 19) @waitpid_mocks - def test_close(self, m): + def test_close(self, m_waitpid): # register two children callback1 = mock.Mock() with self.watcher: self.running = True # child 1 terminates - self.add_zombie(63, 9) + self.add_zombie(63, EXITCODE(9)) # other child terminates - self.add_zombie(65, 18) + self.add_zombie(65, EXITCODE(18)) self.watcher._sig_chld() self.watcher.add_child_handler(63, callback1) diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index 3105f6c3781..e0feef7c653 100644 --- a/Lib/test/test_atexit.py +++ b/Lib/test/test_atexit.py @@ -1,162 +1,22 @@ -import sys -import unittest -import io import atexit import os +import sys +import textwrap +import unittest from test import support from test.support import script_helper -### helpers -def h1(): - print("h1") - -def h2(): - print("h2") - -def h3(): - print("h3") - -def h4(*args, **kwargs): - print("h4", args, kwargs) - -def raise1(): - raise TypeError - -def raise2(): - raise SystemError - -def exit(): - raise SystemExit - class GeneralTest(unittest.TestCase): + def test_general(self): + # Run _test_atexit.py in a subprocess since it calls atexit._clear() + script = support.findfile("_test_atexit.py") + script_helper.run_test_script(script) - def setUp(self): - self.save_stdout = sys.stdout - self.save_stderr = sys.stderr - self.stream = io.StringIO() - sys.stdout = sys.stderr = self.stream - atexit._clear() - - def tearDown(self): - sys.stdout = self.save_stdout - sys.stderr = self.save_stderr - atexit._clear() - - def test_args(self): - # be sure args are handled properly - atexit.register(h1) - atexit.register(h4) - atexit.register(h4, 4, kw="abc") - atexit._run_exitfuncs() - - self.assertEqual(self.stream.getvalue(), - "h4 (4,) {'kw': 'abc'}\nh4 () {}\nh1\n") - - def test_badargs(self): - atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0) - self.assertRaises(TypeError, atexit._run_exitfuncs) - - def test_order(self): - # be sure handlers are executed in reverse order - atexit.register(h1) - atexit.register(h2) - atexit.register(h3) - atexit._run_exitfuncs() - - self.assertEqual(self.stream.getvalue(), "h3\nh2\nh1\n") - - def test_raise(self): - # be sure raises are handled properly - atexit.register(raise1) - atexit.register(raise2) - - self.assertRaises(TypeError, atexit._run_exitfuncs) - - def test_raise_unnormalized(self): - # Issue #10756: Make sure that an unnormalized exception is - # handled properly - atexit.register(lambda: 1 / 0) - - self.assertRaises(ZeroDivisionError, atexit._run_exitfuncs) - self.assertIn("ZeroDivisionError", self.stream.getvalue()) - - def test_exit(self): - # be sure a SystemExit is handled properly - atexit.register(exit) - - self.assertRaises(SystemExit, atexit._run_exitfuncs) - self.assertEqual(self.stream.getvalue(), '') - - def test_print_tracebacks(self): - # Issue #18776: the tracebacks should be printed when errors occur. - def f(): - 1/0 # one - def g(): - 1/0 # two - def h(): - 1/0 # three - atexit.register(f) - atexit.register(g) - atexit.register(h) - - self.assertRaises(ZeroDivisionError, atexit._run_exitfuncs) - stderr = self.stream.getvalue() - self.assertEqual(stderr.count("ZeroDivisionError"), 3) - self.assertIn("# one", stderr) - self.assertIn("# two", stderr) - self.assertIn("# three", stderr) - - def test_stress(self): - a = [0] - def inc(): - a[0] += 1 - - for i in range(128): - atexit.register(inc) - atexit._run_exitfuncs() - - self.assertEqual(a[0], 128) - - def test_clear(self): - a = [0] - def inc(): - a[0] += 1 - - atexit.register(inc) - atexit._clear() - atexit._run_exitfuncs() - - self.assertEqual(a[0], 0) - - def test_unregister(self): - a = [0] - def inc(): - a[0] += 1 - def dec(): - a[0] -= 1 - - for i in range(4): - atexit.register(inc) - atexit.register(dec) - atexit.unregister(inc) - atexit._run_exitfuncs() - - self.assertEqual(a[0], -1) - - def test_bound_methods(self): - l = [] - atexit.register(l.append, 5) - atexit._run_exitfuncs() - self.assertEqual(l, [5]) - - atexit.unregister(l.append) - atexit._run_exitfuncs() - self.assertEqual(l, [5]) - +class FunctionalTest(unittest.TestCase): def test_shutdown(self): # Actually test the shutdown mechanism in a subprocess - code = """if 1: + code = textwrap.dedent(""" import atexit def f(msg): @@ -164,11 +24,29 @@ class GeneralTest(unittest.TestCase): atexit.register(f, "one") atexit.register(f, "two") - """ + """) res = script_helper.assert_python_ok("-c", code) self.assertEqual(res.out.decode().splitlines(), ["two", "one"]) self.assertFalse(res.err) + def test_atexit_instances(self): + # bpo-42639: It is safe to have more than one atexit instance. + code = textwrap.dedent(""" + import sys + import atexit as atexit1 + del sys.modules['atexit'] + import atexit as atexit2 + del sys.modules['atexit'] + + assert atexit2 is not atexit1 + + atexit1.register(print, "atexit1") + atexit2.register(print, "atexit2") + """) + res = script_helper.assert_python_ok("-c", code) + self.assertEqual(res.out.decode().splitlines(), ["atexit2", "atexit1"]) + self.assertFalse(res.err) + @support.cpython_only class SubinterpreterTest(unittest.TestCase): @@ -178,13 +56,13 @@ class SubinterpreterTest(unittest.TestCase): # take care to free callbacks in its per-subinterpreter module # state. n = atexit._ncallbacks() - code = r"""if 1: + code = textwrap.dedent(r""" import atexit def f(): pass atexit.register(f) del atexit - """ + """) ret = support.run_in_subinterp(code) self.assertEqual(ret, 0) self.assertEqual(atexit._ncallbacks(), n) @@ -193,13 +71,13 @@ class SubinterpreterTest(unittest.TestCase): # Similar to the above, but with a refcycle through the atexit # module. n = atexit._ncallbacks() - code = r"""if 1: + code = textwrap.dedent(r""" import atexit def f(): pass atexit.register(f) atexit.__atexit = atexit - """ + """) ret = support.run_in_subinterp(code) self.assertEqual(ret, 0) self.assertEqual(atexit._ncallbacks(), n) @@ -210,13 +88,13 @@ class SubinterpreterTest(unittest.TestCase): expected = b"The test has passed!" r, w = os.pipe() - code = r"""if 1: + code = textwrap.dedent(r""" import os import atexit def callback(): os.write({:d}, b"The test has passed!") atexit.register(callback) - """.format(w) + """.format(w)) ret = support.run_in_subinterp(code) os.close(w) self.assertEqual(os.read(r, len(expected)), expected) diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index edb4ec092e3..8c9573731ae 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -6,6 +6,7 @@ import builtins import collections import decimal import fractions +import gc import io import locale import os @@ -1756,6 +1757,18 @@ class BuiltinTest(unittest.TestCase): l8 = self.iter_error(zip(Iter(3), "AB", strict=True), ValueError) self.assertEqual(l8, [(2, "A"), (1, "B")]) + @support.cpython_only + def test_zip_result_gc(self): + # bpo-42536: zip's tuple-reuse speed trick breaks the GC's assumptions + # about what can be untracked. Make sure we re-track result tuples + # whenever we reuse them. + it = zip([[]]) + gc.collect() + # That GC collection probably untracked the recycled internal result + # tuple, which is initialized to (None,). Make sure it's re-tracked when + # it's mutated and returned from __next__: + self.assertTrue(gc.is_tracked(next(it))) + def test_format(self): # Test the basic machinery of the format() builtin. Don't test # the specifics of the various formatters diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index fa3329efa28..f12dff3202f 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -153,6 +153,14 @@ class CmdLineTest(unittest.TestCase): % (os_helper.FS_NONASCII, ord(os_helper.FS_NONASCII))) assert_python_ok('-c', command) + @unittest.skipUnless(os_helper.FS_NONASCII, 'need os_helper.FS_NONASCII') + def test_coding(self): + # bpo-32381: the -c command ignores the coding cookie + ch = os_helper.FS_NONASCII + cmd = f"# coding: latin1\nprint(ascii('{ch}'))" + res = assert_python_ok('-c', cmd) + self.assertEqual(res.out.rstrip(), ascii(ch).encode('ascii')) + # On Windows, pass bytes to subprocess doesn't test how Python decodes the # command line, but how subprocess does decode bytes to unicode. Python # doesn't decode the command line because Windows provides directly the diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 150c2a1c0e3..a1ca958257a 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -196,6 +196,22 @@ class TestChainMap(unittest.TestCase): ('e', 55), ('f', 666), ('g', 777), ('h', 88888), ('i', 9999), ('j', 0)]) + def test_iter_not_calling_getitem_on_maps(self): + class DictWithGetItem(UserDict): + def __init__(self, *args, **kwds): + self.called = False + UserDict.__init__(self, *args, **kwds) + def __getitem__(self, item): + self.called = True + UserDict.__getitem__(self, item) + + d = DictWithGetItem(a=1) + c = ChainMap(d) + d.called = False + + set(c) # iterate over chain map + self.assertFalse(d.called, '__getitem__ was called') + def test_dict_coercion(self): d = ChainMap(dict(a=1, b=2), dict(b=20, c=30)) self.assertEqual(dict(d), dict(a=1, b=2, c=30)) diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 190e1a66610..3e826b9accf 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -156,7 +156,7 @@ if 1: s256 = "".join(["\n"] * 256 + ["spam"]) co = compile(s256, 'fn', 'exec') self.assertEqual(co.co_firstlineno, 1) - self.assertEqual(list(co.co_lines()), [(0, 4, 257), (4, 8, None)]) + self.assertEqual(list(co.co_lines()), [(0, 8, 257)]) def test_literals_with_leading_zeroes(self): for arg in ["077787", "0xj", "0x.", "0e", "090000000000000", @@ -728,10 +728,10 @@ if 1: for func in funcs: opcodes = list(dis.get_instructions(func)) - self.assertEqual(2, len(opcodes)) - self.assertEqual('LOAD_CONST', opcodes[0].opname) - self.assertEqual(None, opcodes[0].argval) - self.assertEqual('RETURN_VALUE', opcodes[1].opname) + self.assertLessEqual(len(opcodes), 3) + self.assertEqual('LOAD_CONST', opcodes[-2].opname) + self.assertEqual(None, opcodes[-2].argval) + self.assertEqual('RETURN_VALUE', opcodes[-1].opname) def test_false_while_loop(self): def break_in_while(): @@ -775,6 +775,57 @@ if 1: self.assertIn('LOAD_', opcodes[0].opname) self.assertEqual('RETURN_VALUE', opcodes[1].opname) + def test_lineno_after_implicit_return(self): + TRUE = True + # Don't use constant True or False, as compiler will remove test + def if1(x): + x() + if TRUE: + pass + def if2(x): + x() + if TRUE: + pass + else: + pass + def if3(x): + x() + if TRUE: + pass + else: + return None + def if4(x): + x() + if not TRUE: + pass + funcs = [ if1, if2, if3, if4] + lastlines = [ 3, 3, 3, 2] + frame = None + def save_caller_frame(): + nonlocal frame + frame = sys._getframe(1) + for func, lastline in zip(funcs, lastlines, strict=True): + with self.subTest(func=func): + func(save_caller_frame) + self.assertEqual(frame.f_lineno-frame.f_code.co_firstlineno, lastline) + + def test_lineno_after_no_code(self): + def no_code1(): + "doc string" + + def no_code2(): + a: int + + for func in (no_code1, no_code2): + with self.subTest(func=func): + code = func.__code__ + lines = list(code.co_lines()) + self.assertEqual(len(lines), 1) + start, end, line = lines[0] + self.assertEqual(start, 0) + self.assertEqual(end, len(code.co_code)) + self.assertEqual(line, code.co_firstlineno) + def test_big_dict_literal(self): # The compiler has a flushing point in "compiler_dict" that calls compiles @@ -786,6 +837,34 @@ if 1: the_dict = "{" + ",".join(f"{x}:{x}" for x in range(dict_size)) + "}" self.assertEqual(len(eval(the_dict)), dict_size) + def test_redundant_jump_in_if_else_break(self): + # Check if bytecode containing jumps that simply point to the next line + # is generated around if-else-break style structures. See bpo-42615. + + def if_else_break(): + val = 1 + while True: + if val > 0: + val -= 1 + else: + break + val = -1 + + INSTR_SIZE = 2 + HANDLED_JUMPS = ( + 'POP_JUMP_IF_FALSE', + 'POP_JUMP_IF_TRUE', + 'JUMP_ABSOLUTE', + 'JUMP_FORWARD', + ) + + for line, instr in enumerate(dis.Bytecode(if_else_break)): + if instr.opname == 'JUMP_FORWARD': + self.assertNotEqual(instr.arg, 0) + elif instr.opname in HANDLED_JUMPS: + self.assertNotEqual(instr.arg, (line + 1)*INSTR_SIZE) + + class TestExpressionStackSize(unittest.TestCase): # These tests check that the computed stack size for a code object # stays within reasonable bounds (see issue #21523 for an example diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 307416c3300..f0048f42f88 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -4,6 +4,8 @@ import gc import itertools import math import pickle +import random +import string import sys import types import unittest @@ -845,6 +847,14 @@ class ClassPropertiesAndMethods(unittest.TestCase): self.fail("inheriting from ModuleType and str at the same time " "should fail") + # Issue 34805: Verify that definition order is retained + def random_name(): + return ''.join(random.choices(string.ascii_letters, k=10)) + class A: + pass + subclasses = [type(random_name(), (A,), {}) for i in range(100)] + self.assertEqual(A.__subclasses__(), subclasses) + def test_multiple_inheritance(self): # Testing multiple inheritance... class C(object): diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py index 9ff8b7d501a..4b31cdc7941 100644 --- a/Lib/test/test_dict.py +++ b/Lib/test/test_dict.py @@ -1452,6 +1452,25 @@ class DictTest(unittest.TestCase): d = CustomReversedDict(pairs) self.assertEqual(pairs[::-1], list(dict(d).items())) + @support.cpython_only + def test_dict_items_result_gc(self): + # bpo-42536: dict.items's tuple-reuse speed trick breaks the GC's + # assumptions about what can be untracked. Make sure we re-track result + # tuples whenever we reuse them. + it = iter({None: []}.items()) + gc.collect() + # That GC collection probably untracked the recycled internal result + # tuple, which is initialized to (None, None). Make sure it's re-tracked + # when it's mutated and returned from __next__: + self.assertTrue(gc.is_tracked(next(it))) + + @support.cpython_only + def test_dict_items_result_gc(self): + # Same as test_dict_items_result_gc above, but reversed. + it = reversed({None: []}.items()) + gc.collect() + self.assertTrue(gc.is_tracked(next(it))) + class CAPITest(unittest.TestCase): diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py index 9cd11d3118b..0383124464f 100644 --- a/Lib/test/test_dis.py +++ b/Lib/test/test_dis.py @@ -131,12 +131,14 @@ dis_bug708901 = """\ 12 STORE_FAST 0 (res) %3d 14 JUMP_ABSOLUTE 10 - >> 16 LOAD_CONST 0 (None) + +%3d >> 16 LOAD_CONST 0 (None) 18 RETURN_VALUE """ % (bug708901.__code__.co_firstlineno + 1, bug708901.__code__.co_firstlineno + 2, bug708901.__code__.co_firstlineno + 1, - bug708901.__code__.co_firstlineno + 3) + bug708901.__code__.co_firstlineno + 3, + bug708901.__code__.co_firstlineno + 1) def bug1333982(x=[]): @@ -164,6 +166,20 @@ dis_bug1333982 = """\ bug1333982.__code__.co_firstlineno + 2, bug1333982.__code__.co_firstlineno + 1) + +def bug42562(): + pass + + +# Set line number for 'pass' to None +bug42562.__code__ = bug42562.__code__.replace(co_linetable=b'\x04\x80\xff\x80') + + +dis_bug42562 = """\ + 0 LOAD_CONST 0 (None) + 2 RETURN_VALUE +""" + _BIG_LINENO_FORMAT = """\ %3d 0 LOAD_GLOBAL 0 (spam) 2 POP_TOP @@ -253,11 +269,14 @@ dis_compound_stmt_str = """\ 1 0 LOAD_CONST 0 (0) 2 STORE_NAME 0 (x) - 3 >> 4 LOAD_NAME 0 (x) - 6 LOAD_CONST 1 (1) - 8 INPLACE_ADD - 10 STORE_NAME 0 (x) - 12 JUMP_ABSOLUTE 4 + 2 4 NOP + + 3 >> 6 LOAD_NAME 0 (x) + 8 LOAD_CONST 1 (1) + 10 INPLACE_ADD + 12 STORE_NAME 0 (x) + + 2 14 JUMP_ABSOLUTE 6 """ dis_traceback = """\ @@ -294,14 +313,16 @@ dis_traceback = """\ >> 50 LOAD_CONST 0 (None) 52 STORE_FAST 0 (e) 54 DELETE_FAST 0 (e) - 56 RERAISE - >> 58 RERAISE + 56 RERAISE 1 + +%3d >> 58 RERAISE 0 """ % (TRACEBACK_CODE.co_firstlineno + 1, TRACEBACK_CODE.co_firstlineno + 2, TRACEBACK_CODE.co_firstlineno + 5, TRACEBACK_CODE.co_firstlineno + 3, TRACEBACK_CODE.co_firstlineno + 4, - TRACEBACK_CODE.co_firstlineno + 5) + TRACEBACK_CODE.co_firstlineno + 5, + TRACEBACK_CODE.co_firstlineno + 3) def _fstring(a, b, c, d): return f'{a} {b:4} {c!r} {d!r:4}' @@ -345,16 +366,12 @@ dis_tryfinally = """\ %3d 6 LOAD_FAST 1 (b) 8 CALL_FUNCTION 0 10 POP_TOP - -%3d 12 RETURN_VALUE - -%3d >> 14 LOAD_FAST 1 (b) + 12 RETURN_VALUE + >> 14 LOAD_FAST 1 (b) 16 CALL_FUNCTION 0 18 POP_TOP - 20 RERAISE + 20 RERAISE 0 """ % (_tryfinally.__code__.co_firstlineno + 1, - _tryfinally.__code__.co_firstlineno + 2, - _tryfinally.__code__.co_firstlineno + 4, _tryfinally.__code__.co_firstlineno + 2, _tryfinally.__code__.co_firstlineno + 4, ) @@ -367,17 +384,13 @@ dis_tryfinallyconst = """\ %3d 4 LOAD_FAST 0 (b) 6 CALL_FUNCTION 0 8 POP_TOP - -%3d 10 LOAD_CONST 1 (1) + 10 LOAD_CONST 1 (1) 12 RETURN_VALUE - -%3d >> 14 LOAD_FAST 0 (b) + >> 14 LOAD_FAST 0 (b) 16 CALL_FUNCTION 0 18 POP_TOP - 20 RERAISE + 20 RERAISE 0 """ % (_tryfinallyconst.__code__.co_firstlineno + 1, - _tryfinallyconst.__code__.co_firstlineno + 2, - _tryfinallyconst.__code__.co_firstlineno + 4, _tryfinallyconst.__code__.co_firstlineno + 2, _tryfinallyconst.__code__.co_firstlineno + 4, ) @@ -516,6 +529,9 @@ class DisTests(unittest.TestCase): self.do_disassembly_test(bug1333982, dis_bug1333982) + def test_bug_42562(self): + self.do_disassembly_test(bug42562, dis_bug42562) + def test_big_linenos(self): def func(count): namespace = {} @@ -993,7 +1009,7 @@ expected_opinfo_jumpy = [ Instruction(opname='LOAD_CONST', opcode=100, arg=1, argval=10, argrepr='10', offset=2, starts_line=None, is_jump_target=False), Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=4, starts_line=None, is_jump_target=False), Instruction(opname='GET_ITER', opcode=68, arg=None, argval=None, argrepr='', offset=6, starts_line=None, is_jump_target=False), - Instruction(opname='FOR_ITER', opcode=93, arg=32, argval=42, argrepr='to 42', offset=8, starts_line=None, is_jump_target=True), + Instruction(opname='FOR_ITER', opcode=93, arg=34, argval=44, argrepr='to 44', offset=8, starts_line=None, is_jump_target=True), Instruction(opname='STORE_FAST', opcode=125, arg=0, argval='i', argrepr='i', offset=10, starts_line=None, is_jump_target=False), Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=12, starts_line=4, is_jump_target=False), Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=14, starts_line=None, is_jump_target=False), @@ -1007,92 +1023,95 @@ expected_opinfo_jumpy = [ Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=30, starts_line=7, is_jump_target=True), Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=32, starts_line=None, is_jump_target=False), Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=34, starts_line=None, is_jump_target=False), - Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=8, argval=8, argrepr='', offset=36, starts_line=None, is_jump_target=False), + Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=42, argval=42, argrepr='', offset=36, starts_line=None, is_jump_target=False), Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=38, starts_line=8, is_jump_target=False), - Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=50, argval=50, argrepr='', offset=40, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=42, starts_line=10, is_jump_target=True), - Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='I can haz else clause?', argrepr="'I can haz else clause?'", offset=44, starts_line=None, is_jump_target=False), - Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=46, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=48, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=50, starts_line=11, is_jump_target=True), - Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=90, argval=90, argrepr='', offset=52, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=54, starts_line=12, is_jump_target=False), - Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=56, starts_line=None, is_jump_target=False), - Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=58, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=60, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=62, starts_line=13, is_jump_target=False), - Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=64, starts_line=None, is_jump_target=False), - Instruction(opname='INPLACE_SUBTRACT', opcode=56, arg=None, argval=None, argrepr='', offset=66, starts_line=None, is_jump_target=False), - Instruction(opname='STORE_FAST', opcode=125, arg=0, argval='i', argrepr='i', offset=68, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=70, starts_line=14, is_jump_target=False), - Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=72, starts_line=None, is_jump_target=False), - Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=74, starts_line=None, is_jump_target=False), - Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=80, argval=80, argrepr='', offset=76, starts_line=None, is_jump_target=False), - Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=50, argval=50, argrepr='', offset=78, starts_line=15, is_jump_target=False), - Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=80, starts_line=16, is_jump_target=True), - Instruction(opname='LOAD_CONST', opcode=100, arg=2, argval=4, argrepr='4', offset=82, starts_line=None, is_jump_target=False), - Instruction(opname='COMPARE_OP', opcode=107, arg=0, argval='<', argrepr='<', offset=84, starts_line=None, is_jump_target=False), - Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=50, argval=50, argrepr='', offset=86, starts_line=None, is_jump_target=False), - Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=98, argval=98, argrepr='', offset=88, starts_line=17, is_jump_target=False), - Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=90, starts_line=19, is_jump_target=True), - 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=92, starts_line=None, is_jump_target=False), - Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=94, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=96, starts_line=None, is_jump_target=False), - Instruction(opname='SETUP_FINALLY', opcode=122, arg=98, argval=198, argrepr='to 198', offset=98, starts_line=20, is_jump_target=True), - Instruction(opname='SETUP_FINALLY', opcode=122, arg=12, argval=114, argrepr='to 114', offset=100, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=102, starts_line=21, is_jump_target=False), - Instruction(opname='LOAD_CONST', opcode=100, arg=7, argval=0, argrepr='0', offset=104, starts_line=None, is_jump_target=False), - Instruction(opname='BINARY_TRUE_DIVIDE', opcode=27, arg=None, argval=None, argrepr='', offset=106, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=108, starts_line=None, is_jump_target=False), - Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=110, starts_line=None, is_jump_target=False), - Instruction(opname='JUMP_FORWARD', opcode=110, arg=26, argval=140, argrepr='to 140', offset=112, starts_line=None, is_jump_target=False), - Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=114, starts_line=22, is_jump_target=True), - Instruction(opname='LOAD_GLOBAL', opcode=116, arg=2, argval='ZeroDivisionError', argrepr='ZeroDivisionError', offset=116, starts_line=None, is_jump_target=False), - Instruction(opname='JUMP_IF_NOT_EXC_MATCH', opcode=121, arg=138, argval=138, argrepr='', offset=118, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=120, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=122, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=124, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=126, 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=128, starts_line=None, is_jump_target=False), - Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=130, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=132, starts_line=None, is_jump_target=False), - Instruction(opname='POP_EXCEPT', opcode=89, arg=None, argval=None, argrepr='', offset=134, starts_line=None, is_jump_target=False), - Instruction(opname='JUMP_FORWARD', opcode=110, arg=46, argval=184, argrepr='to 184', offset=136, starts_line=None, is_jump_target=False), - Instruction(opname='RERAISE', opcode=48, arg=None, argval=None, argrepr='', offset=138, starts_line=None, is_jump_target=True), - Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=140, starts_line=25, is_jump_target=True), - Instruction(opname='SETUP_WITH', opcode=143, arg=24, argval=168, argrepr='to 168', offset=142, starts_line=None, is_jump_target=False), - Instruction(opname='STORE_FAST', opcode=125, arg=1, argval='dodgy', argrepr='dodgy', offset=144, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=146, starts_line=26, is_jump_target=False), - Instruction(opname='LOAD_CONST', opcode=100, arg=9, argval='Never reach this', argrepr="'Never reach this'", offset=148, starts_line=None, is_jump_target=False), - Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=150, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=152, starts_line=None, is_jump_target=False), - Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=154, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=156, starts_line=None, is_jump_target=False), - Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=158, starts_line=None, is_jump_target=False), - Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=160, starts_line=None, is_jump_target=False), - Instruction(opname='CALL_FUNCTION', opcode=131, arg=3, argval=3, argrepr='', offset=162, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=164, starts_line=None, is_jump_target=False), - Instruction(opname='JUMP_FORWARD', opcode=110, arg=16, argval=184, argrepr='to 184', offset=166, starts_line=None, is_jump_target=False), - Instruction(opname='WITH_EXCEPT_START', opcode=49, arg=None, argval=None, argrepr='', offset=168, starts_line=None, is_jump_target=True), - Instruction(opname='POP_JUMP_IF_TRUE', opcode=115, arg=174, argval=174, argrepr='', offset=170, starts_line=None, is_jump_target=False), - Instruction(opname='RERAISE', opcode=48, arg=None, argval=None, argrepr='', offset=172, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=174, starts_line=None, is_jump_target=True), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=176, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=178, starts_line=None, is_jump_target=False), - Instruction(opname='POP_EXCEPT', opcode=89, arg=None, argval=None, argrepr='', offset=180, starts_line=None, is_jump_target=False), + Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=52, argval=52, argrepr='', offset=40, starts_line=None, is_jump_target=False), + Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=8, argval=8, argrepr='', offset=42, starts_line=None, is_jump_target=True), + Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=44, starts_line=10, is_jump_target=True), + Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='I can haz else clause?', argrepr="'I can haz else clause?'", offset=46, starts_line=None, is_jump_target=False), + Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=48, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=50, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=52, starts_line=11, is_jump_target=True), + Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=96, argval=96, argrepr='', offset=54, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=56, starts_line=12, is_jump_target=True), + Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=58, starts_line=None, is_jump_target=False), + Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=60, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=62, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=64, starts_line=13, is_jump_target=False), + Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=66, starts_line=None, is_jump_target=False), + Instruction(opname='INPLACE_SUBTRACT', opcode=56, arg=None, argval=None, argrepr='', offset=68, starts_line=None, is_jump_target=False), + Instruction(opname='STORE_FAST', opcode=125, arg=0, argval='i', argrepr='i', offset=70, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=72, starts_line=14, is_jump_target=False), + Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=74, starts_line=None, is_jump_target=False), + Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=76, starts_line=None, is_jump_target=False), + Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=82, argval=82, argrepr='', offset=78, starts_line=None, is_jump_target=False), + Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=52, argval=52, argrepr='', offset=80, starts_line=15, is_jump_target=False), + Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=82, starts_line=16, is_jump_target=True), + Instruction(opname='LOAD_CONST', opcode=100, arg=2, argval=4, argrepr='4', offset=84, starts_line=None, is_jump_target=False), + Instruction(opname='COMPARE_OP', opcode=107, arg=0, argval='<', argrepr='<', offset=86, starts_line=None, is_jump_target=False), + Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=92, argval=92, argrepr='', offset=88, starts_line=None, is_jump_target=False), + Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=104, argval=104, argrepr='', offset=90, starts_line=17, is_jump_target=False), + Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=92, starts_line=11, is_jump_target=True), + Instruction(opname='POP_JUMP_IF_TRUE', opcode=115, arg=56, argval=56, argrepr='', offset=94, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=96, starts_line=19, is_jump_target=True), + 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=98, starts_line=None, is_jump_target=False), + Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=100, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=102, starts_line=None, is_jump_target=False), + Instruction(opname='SETUP_FINALLY', opcode=122, arg=96, argval=202, argrepr='to 202', offset=104, starts_line=20, is_jump_target=True), + Instruction(opname='SETUP_FINALLY', opcode=122, arg=12, argval=120, argrepr='to 120', offset=106, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=108, starts_line=21, is_jump_target=False), + Instruction(opname='LOAD_CONST', opcode=100, arg=7, argval=0, argrepr='0', offset=110, starts_line=None, is_jump_target=False), + Instruction(opname='BINARY_TRUE_DIVIDE', opcode=27, arg=None, argval=None, argrepr='', offset=112, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=114, starts_line=None, is_jump_target=False), + Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=116, starts_line=None, is_jump_target=False), + Instruction(opname='JUMP_FORWARD', opcode=110, arg=24, argval=144, argrepr='to 144', offset=118, starts_line=None, is_jump_target=False), + Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=120, starts_line=22, is_jump_target=True), + Instruction(opname='LOAD_GLOBAL', opcode=116, arg=2, argval='ZeroDivisionError', argrepr='ZeroDivisionError', offset=122, starts_line=None, is_jump_target=False), + Instruction(opname='JUMP_IF_NOT_EXC_MATCH', opcode=121, arg=212, argval=212, argrepr='', offset=124, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=126, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=128, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=130, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=132, 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=134, starts_line=None, is_jump_target=False), + Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=136, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=138, starts_line=None, is_jump_target=False), + Instruction(opname='POP_EXCEPT', opcode=89, arg=None, argval=None, argrepr='', offset=140, starts_line=None, is_jump_target=False), + Instruction(opname='JUMP_FORWARD', opcode=110, arg=44, argval=188, argrepr='to 188', offset=142, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=144, starts_line=25, is_jump_target=True), + Instruction(opname='SETUP_WITH', opcode=143, arg=24, argval=172, argrepr='to 172', offset=146, starts_line=None, is_jump_target=False), + Instruction(opname='STORE_FAST', opcode=125, arg=1, argval='dodgy', argrepr='dodgy', offset=148, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=150, starts_line=26, is_jump_target=False), + Instruction(opname='LOAD_CONST', opcode=100, arg=9, argval='Never reach this', argrepr="'Never reach this'", offset=152, starts_line=None, is_jump_target=False), + Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=154, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=156, starts_line=None, is_jump_target=False), + Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=158, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=160, starts_line=None, is_jump_target=False), + Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=162, starts_line=None, is_jump_target=False), + Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=164, starts_line=None, is_jump_target=False), + Instruction(opname='CALL_FUNCTION', opcode=131, arg=3, argval=3, argrepr='', offset=166, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=168, starts_line=None, is_jump_target=False), + Instruction(opname='JUMP_FORWARD', opcode=110, arg=16, argval=188, argrepr='to 188', offset=170, starts_line=None, is_jump_target=False), + Instruction(opname='WITH_EXCEPT_START', opcode=49, arg=None, argval=None, argrepr='', offset=172, starts_line=None, is_jump_target=True), + Instruction(opname='POP_JUMP_IF_TRUE', opcode=115, arg=178, argval=178, argrepr='', offset=174, starts_line=None, is_jump_target=False), + Instruction(opname='RERAISE', opcode=119, arg=1, argval=1, argrepr='', offset=176, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=178, starts_line=None, is_jump_target=True), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=180, 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_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=184, starts_line=None, is_jump_target=True), - Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=186, starts_line=28, is_jump_target=False), - Instruction(opname='LOAD_CONST', opcode=100, arg=10, argval="OK, now we're done", argrepr='"OK, now we\'re done"', offset=188, starts_line=None, is_jump_target=False), - Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=190, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=192, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=194, starts_line=None, is_jump_target=False), - Instruction(opname='RETURN_VALUE', opcode=83, arg=None, argval=None, argrepr='', offset=196, starts_line=None, is_jump_target=False), - Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=198, starts_line=None, 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=200, starts_line=None, is_jump_target=False), - Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=202, starts_line=None, is_jump_target=False), - Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=204, starts_line=None, is_jump_target=False), - Instruction(opname='RERAISE', opcode=48, arg=None, argval=None, argrepr='', offset=206, starts_line=None, is_jump_target=False), + Instruction(opname='POP_EXCEPT', opcode=89, arg=None, argval=None, argrepr='', offset=184, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=186, starts_line=None, is_jump_target=False), + Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=188, starts_line=None, is_jump_target=True), + Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=190, starts_line=28, is_jump_target=False), + Instruction(opname='LOAD_CONST', opcode=100, arg=10, argval="OK, now we're done", argrepr='"OK, now we\'re done"', offset=192, starts_line=None, is_jump_target=False), + Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=194, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=196, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=198, starts_line=None, is_jump_target=False), + Instruction(opname='RETURN_VALUE', opcode=83, arg=None, argval=None, argrepr='', offset=200, starts_line=None, is_jump_target=False), + Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=202, starts_line=None, 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=204, starts_line=None, is_jump_target=False), + Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=206, starts_line=None, is_jump_target=False), + Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=208, starts_line=None, is_jump_target=False), + Instruction(opname='RERAISE', opcode=119, arg=0, argval=0, argrepr='', offset=210, starts_line=None, is_jump_target=False), + Instruction(opname='RERAISE', opcode=119, arg=0, argval=0, argrepr='', offset=212, starts_line=22, is_jump_target=True), ] # One last piece of inspect fodder to check the default line number handling @@ -1194,5 +1213,24 @@ class BytecodeTests(unittest.TestCase): b = dis.Bytecode.from_traceback(tb) self.assertEqual(b.dis(), dis_traceback) + +class TestBytecodeTestCase(BytecodeTestCase): + def test_assert_not_in_with_op_not_in_bytecode(self): + code = compile("a = 1", "", "exec") + self.assertInBytecode(code, "LOAD_CONST", 1) + self.assertNotInBytecode(code, "LOAD_NAME") + self.assertNotInBytecode(code, "LOAD_NAME", "a") + + def test_assert_not_in_with_arg_not_in_bytecode(self): + code = compile("a = 1", "", "exec") + self.assertInBytecode(code, "LOAD_CONST") + self.assertInBytecode(code, "LOAD_CONST", 1) + self.assertNotInBytecode(code, "LOAD_CONST", 2) + + def test_assert_not_in_with_arg_in_bytecode(self): + code = compile("a = 1", "", "exec") + with self.assertRaises(AssertionError): + self.assertNotInBytecode(code, "LOAD_CONST", 1) + if __name__ == "__main__": unittest.main() diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py index bff20f9cac9..6a5013f5b8a 100644 --- a/Lib/test/test_doctest.py +++ b/Lib/test/test_doctest.py @@ -3039,10 +3039,11 @@ Invalid file name: ... '-m', 'doctest', 'nosuchfile') >>> rc, out (1, b'') + >>> # The exact error message changes depending on the platform. >>> print(normalize(err)) # doctest: +ELLIPSIS Traceback (most recent call last): ... - FileNotFoundError: [Errno ...] No such file or directory: 'nosuchfile' + FileNotFoundError: [Errno ...] ...nosuchfile... Invalid doctest option: diff --git a/Lib/test/test_eintr.py b/Lib/test/test_eintr.py index a5f8f6465e8..528147802ba 100644 --- a/Lib/test/test_eintr.py +++ b/Lib/test/test_eintr.py @@ -1,9 +1,6 @@ import os import signal -import subprocess -import sys import unittest - from test import support from test.support import script_helper @@ -15,22 +12,8 @@ class EINTRTests(unittest.TestCase): 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") - # use -u to try to get the full output if the test hangs or crash - args = ["-u", tester, "-v"] - if support.verbose: - print() - print("--- run eintr_tester.py ---", flush=True) - # In verbose mode, the child process inherit stdout and stdout, - # to see output in realtime and reduce the risk of losing output. - args = [sys.executable, "-E", "-X", "faulthandler", *args] - proc = subprocess.run(args) - print(f"--- eintr_tester.py completed: " - f"exit code {proc.returncode} ---", flush=True) - if proc.returncode: - self.fail("eintr_tester.py failed") - else: - script_helper.assert_python_ok("-u", tester, "-v") + script = support.findfile("_test_eintr.py") + script_helper.run_test_script(script) if __name__ == "__main__": diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 3431040f98a..19b4fa5464c 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -429,7 +429,7 @@ class TestEnum(unittest.TestCase): def test_reserved__sunder_(self): with self.assertRaisesRegex( ValueError, - '_sunder_ names, such as "_bad_", are reserved', + "_sunder_ names, such as '_bad_', are reserved", ): class Bad(Enum): _bad_ = 1 @@ -585,12 +585,15 @@ class TestEnum(unittest.TestCase): class Test1Enum(MyMethodEnum, int, MyStrEnum): One = 1 Two = 2 + self.assertTrue(Test1Enum._member_type_ is int) self.assertEqual(str(Test1Enum.One), 'MyStr') + self.assertEqual(format(Test1Enum.One, ''), 'MyStr') # class Test2Enum(MyStrEnum, MyMethodEnum): One = 1 Two = 2 self.assertEqual(str(Test2Enum.One), 'MyStr') + self.assertEqual(format(Test1Enum.One, ''), 'MyStr') def test_inherited_data_type(self): class HexInt(int): @@ -1146,6 +1149,7 @@ class TestEnum(unittest.TestCase): class auto_enum(type(Enum)): def __new__(metacls, cls, bases, classdict): temp = type(classdict)() + temp._cls_name = cls names = set(classdict._member_names) i = 0 for k in classdict._member_names: @@ -2021,6 +2025,32 @@ class TestEnum(unittest.TestCase): REVERT_ALL = "REVERT_ALL" RETRY = "RETRY" + def test_multiple_mixin_inherited(self): + class MyInt(int): + def __new__(cls, value): + return super().__new__(cls, value) + + class HexMixin: + def __repr__(self): + return hex(self) + + class MyIntEnum(HexMixin, MyInt, enum.Enum): + pass + + class Foo(MyIntEnum): + TEST = 1 + self.assertTrue(isinstance(Foo.TEST, MyInt)) + self.assertEqual(repr(Foo.TEST), "0x1") + + class Fee(MyIntEnum): + TEST = 1 + def __new__(cls, value): + value += 1 + member = int.__new__(cls, value) + member._value_ = value + return member + self.assertEqual(Fee.TEST, 2) + def test_empty_globals(self): # bpo-35717: sys._getframe(2).f_globals['__name__'] fails with KeyError # when using compile and exec because f_globals is empty @@ -2088,6 +2118,111 @@ class TestEnum(unittest.TestCase): class ThirdFailedStrEnum(StrEnum): one = '1' two = b'2', 'ascii', 9 + + def test_init_subclass_calling(self): + class MyEnum(Enum): + def __init_subclass__(cls, **kwds): + super(MyEnum, cls).__init_subclass__(**kwds) + self.assertFalse(cls.__dict__.get('_test', False)) + cls._test1 = 'MyEnum' + # + class TheirEnum(MyEnum): + def __init_subclass__(cls, **kwds): + super().__init_subclass__(**kwds) + cls._test2 = 'TheirEnum' + class WhoseEnum(TheirEnum): + def __init_subclass__(cls, **kwds): + pass + class NoEnum(WhoseEnum): + ONE = 1 + self.assertEqual(TheirEnum.__dict__['_test1'], 'MyEnum') + self.assertEqual(WhoseEnum.__dict__['_test1'], 'MyEnum') + self.assertEqual(WhoseEnum.__dict__['_test2'], 'TheirEnum') + self.assertFalse(NoEnum.__dict__.get('_test1', False)) + self.assertFalse(NoEnum.__dict__.get('_test2', False)) + # + class OurEnum(MyEnum): + def __init_subclass__(cls, **kwds): + cls._test2 = 'OurEnum' + class WhereEnum(OurEnum): + def __init_subclass__(cls, **kwds): + pass + class NeverEnum(WhereEnum): + ONE = 'one' + self.assertEqual(OurEnum.__dict__['_test1'], 'MyEnum') + self.assertFalse(WhereEnum.__dict__.get('_test1', False)) + self.assertEqual(WhereEnum.__dict__['_test2'], 'OurEnum') + self.assertFalse(NeverEnum.__dict__.get('_test1', False)) + self.assertFalse(NeverEnum.__dict__.get('_test2', False)) + + def test_init_subclass_parameter(self): + class multiEnum(Enum): + def __init_subclass__(cls, multi): + for member in cls: + member._as_parameter_ = multi * member.value + class E(multiEnum, multi=3): + A = 1 + B = 2 + self.assertEqual(E.A._as_parameter_, 3) + self.assertEqual(E.B._as_parameter_, 6) + + @unittest.skipUnless( + sys.version_info[:2] == (3, 9), + 'private variables are now normal attributes', + ) + def test_warning_for_private_variables(self): + with self.assertWarns(DeprecationWarning): + class Private(Enum): + __corporal = 'Radar' + self.assertEqual(Private._Private__corporal.value, 'Radar') + try: + with self.assertWarns(DeprecationWarning): + class Private(Enum): + __major_ = 'Hoolihan' + except ValueError: + pass + + def test_private_variable_is_normal_attribute(self): + class Private(Enum): + __corporal = 'Radar' + __major_ = 'Hoolihan' + self.assertEqual(Private._Private__corporal, 'Radar') + self.assertEqual(Private._Private__major_, 'Hoolihan') + + def test_strenum_auto(self): + class Strings(StrEnum): + ONE = auto() + TWO = auto() + self.assertEqual([Strings.ONE, Strings.TWO], ['one', 'two']) + + + def test_dynamic_members_with_static_methods(self): + # + foo_defines = {'FOO_CAT': 'aloof', 'BAR_DOG': 'friendly', 'FOO_HORSE': 'big'} + class Foo(Enum): + vars().update({ + k: v + for k, v in foo_defines.items() + if k.startswith('FOO_') + }) + def upper(self): + return self.value.upper() + self.assertEqual(list(Foo), [Foo.FOO_CAT, Foo.FOO_HORSE]) + self.assertEqual(Foo.FOO_CAT.value, 'aloof') + self.assertEqual(Foo.FOO_HORSE.upper(), 'BIG') + # + with self.assertRaisesRegex(TypeError, "'FOO_CAT' already defined as: 'aloof'"): + class FooBar(Enum): + vars().update({ + k: v + for k, v in foo_defines.items() + if k.startswith('FOO_') + }, + **{'FOO_CAT': 'small'}, + ) + def upper(self): + return self.value.upper() + class TestOrder(unittest.TestCase): @@ -2225,6 +2360,11 @@ class TestFlag(unittest.TestCase): self.assertEqual(repr(~(Open.RO | Open.CE)), '') self.assertEqual(repr(~(Open.WO | Open.CE)), '') + def test_format(self): + Perm = self.Perm + self.assertEqual(format(Perm.R, ''), 'Perm.R') + self.assertEqual(format(Perm.R | Perm.X, ''), 'Perm.R|X') + def test_or(self): Perm = self.Perm for i in Perm: @@ -2539,6 +2679,42 @@ class TestFlag(unittest.TestCase): 'at least one thread failed while creating composite members') self.assertEqual(256, len(seen), 'too many composite members created') + def test_init_subclass(self): + class MyEnum(Flag): + def __init_subclass__(cls, **kwds): + super().__init_subclass__(**kwds) + self.assertFalse(cls.__dict__.get('_test', False)) + cls._test1 = 'MyEnum' + # + class TheirEnum(MyEnum): + def __init_subclass__(cls, **kwds): + super(TheirEnum, cls).__init_subclass__(**kwds) + cls._test2 = 'TheirEnum' + class WhoseEnum(TheirEnum): + def __init_subclass__(cls, **kwds): + pass + class NoEnum(WhoseEnum): + ONE = 1 + self.assertEqual(TheirEnum.__dict__['_test1'], 'MyEnum') + self.assertEqual(WhoseEnum.__dict__['_test1'], 'MyEnum') + self.assertEqual(WhoseEnum.__dict__['_test2'], 'TheirEnum') + self.assertFalse(NoEnum.__dict__.get('_test1', False)) + self.assertFalse(NoEnum.__dict__.get('_test2', False)) + # + class OurEnum(MyEnum): + def __init_subclass__(cls, **kwds): + cls._test2 = 'OurEnum' + class WhereEnum(OurEnum): + def __init_subclass__(cls, **kwds): + pass + class NeverEnum(WhereEnum): + ONE = 1 + self.assertEqual(OurEnum.__dict__['_test1'], 'MyEnum') + self.assertFalse(WhereEnum.__dict__.get('_test1', False)) + self.assertEqual(WhereEnum.__dict__['_test2'], 'OurEnum') + self.assertFalse(NeverEnum.__dict__.get('_test1', False)) + self.assertFalse(NeverEnum.__dict__.get('_test2', False)) + class TestIntFlag(unittest.TestCase): """Tests of the IntFlags.""" @@ -2564,6 +2740,7 @@ class TestIntFlag(unittest.TestCase): def test_type(self): Perm = self.Perm + self.assertTrue(Perm._member_type_ is int) Open = self.Open for f in Perm: self.assertTrue(isinstance(f, Perm)) @@ -2643,6 +2820,11 @@ class TestIntFlag(unittest.TestCase): self.assertEqual(repr(~(Open.WO | Open.CE)), '') self.assertEqual(repr(Open(~4)), '') + def test_format(self): + Perm = self.Perm + self.assertEqual(format(Perm.R, ''), '4') + self.assertEqual(format(Perm.R | Perm.X, ''), '5') + def test_or(self): Perm = self.Perm for i in Perm: diff --git a/Lib/test/test_enumerate.py b/Lib/test/test_enumerate.py index 5785cb46492..906bfc21a26 100644 --- a/Lib/test/test_enumerate.py +++ b/Lib/test/test_enumerate.py @@ -2,6 +2,7 @@ import unittest import operator import sys import pickle +import gc from test import support @@ -134,6 +135,18 @@ class EnumerateTestCase(unittest.TestCase, PickleTest): self.assertEqual(len(set(map(id, list(enumerate(self.seq))))), len(self.seq)) self.assertEqual(len(set(map(id, enumerate(self.seq)))), min(1,len(self.seq))) + @support.cpython_only + def test_enumerate_result_gc(self): + # bpo-42536: enumerate's tuple-reuse speed trick breaks the GC's + # assumptions about what can be untracked. Make sure we re-track result + # tuples whenever we reuse them. + it = self.enum([[]]) + gc.collect() + # That GC collection probably untracked the recycled internal result + # tuple, which is initialized to (None, None). Make sure it's re-tracked + # when it's mutated and returned from __next__: + self.assertTrue(gc.is_tracked(next(it))) + class MyEnum(enumerate): pass diff --git a/Lib/test/test_epoll.py b/Lib/test/test_epoll.py index 10f148fe5cd..b623852f9eb 100644 --- a/Lib/test/test_epoll.py +++ b/Lib/test/test_epoll.py @@ -160,44 +160,42 @@ class TestEPoll(unittest.TestCase): self.fail("epoll on closed fd didn't raise EBADF") def test_control_and_wait(self): + # create the epoll object client, server = self._connected_pair() - ep = select.epoll(16) ep.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT | select.EPOLLET) ep.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT | select.EPOLLET) + # EPOLLOUT now = time.monotonic() events = ep.poll(1, 4) then = time.monotonic() self.assertFalse(then - now > 0.1, then - now) - events.sort() expected = [(client.fileno(), select.EPOLLOUT), (server.fileno(), select.EPOLLOUT)] - expected.sort() + self.assertEqual(sorted(events), sorted(expected)) - self.assertEqual(events, expected) - - events = ep.poll(timeout=2.1, maxevents=4) + # no event + events = ep.poll(timeout=0.1, maxevents=4) self.assertFalse(events) - client.send(b"Hello!") - server.send(b"world!!!") + # send: EPOLLIN and EPOLLOUT + client.sendall(b"Hello!") + server.sendall(b"world!!!") now = time.monotonic() - events = ep.poll(1, 4) + events = ep.poll(1.0, 4) then = time.monotonic() self.assertFalse(then - now > 0.01) - events.sort() expected = [(client.fileno(), select.EPOLLIN | select.EPOLLOUT), (server.fileno(), select.EPOLLIN | select.EPOLLOUT)] - expected.sort() - - self.assertEqual(events, expected) + self.assertEqual(sorted(events), sorted(expected)) + # unregister, modify ep.unregister(client.fileno()) ep.modify(server.fileno(), select.EPOLLOUT) now = time.monotonic() diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 4dbf5fe5d5b..864422390ad 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -252,7 +252,7 @@ class ExceptionTests(unittest.TestCase): check('from __future__ import doesnt_exist', 1, 1) check('from __future__ import braces', 1, 1) check('x=1\nfrom __future__ import division', 2, 1) - check('foo(1=2)', 1, 5) + check('foo(1=2)', 1, 6) check('def f():\n x, y: int', 2, 3) check('[*x for x in xs]', 1, 2) check('foo(x for x in range(10), 100)', 1, 5) @@ -1046,7 +1046,7 @@ class ExceptionTests(unittest.TestCase): # tstate->recursion_depth is equal to (recursion_limit - 1) # and is equal to recursion_limit when _gen_throw() calls # PyErr_NormalizeException(). - recurse(setrecursionlimit(depth + 2) - depth - 1) + recurse(setrecursionlimit(depth + 2) - depth) finally: sys.setrecursionlimit(recursionlimit) print('Done.') @@ -1076,6 +1076,54 @@ class ExceptionTests(unittest.TestCase): b'while normalizing an exception', err) self.assertIn(b'Done.', out) + + def test_recursion_in_except_handler(self): + + def set_relative_recursion_limit(n): + depth = 1 + while True: + try: + sys.setrecursionlimit(depth) + except RecursionError: + depth += 1 + else: + break + sys.setrecursionlimit(depth+n) + + def recurse_in_except(): + try: + 1/0 + except: + recurse_in_except() + + def recurse_after_except(): + try: + 1/0 + except: + pass + recurse_after_except() + + def recurse_in_body_and_except(): + try: + recurse_in_body_and_except() + except: + recurse_in_body_and_except() + + recursionlimit = sys.getrecursionlimit() + try: + set_relative_recursion_limit(10) + for func in (recurse_in_except, recurse_after_except, recurse_in_body_and_except): + with self.subTest(func=func): + try: + func() + except RecursionError: + pass + else: + self.fail("Should have raised a RecursionError") + finally: + sys.setrecursionlimit(recursionlimit) + + @cpython_only def test_recursion_normalizing_with_no_memory(self): # Issue #30697. Test that in the abort that occurs when there is no @@ -1112,7 +1160,7 @@ class ExceptionTests(unittest.TestCase): except MemoryError as e: tb = e.__traceback__ else: - self.fail("Should have raises a MemoryError") + self.fail("Should have raised a MemoryError") return traceback.format_tb(tb) tb1 = raiseMemError() @@ -1440,5 +1488,88 @@ class ImportErrorTests(unittest.TestCase): self.assertEqual(exc.path, orig.path) +class PEP626Tests(unittest.TestCase): + + def lineno_after_raise(self, f, line): + try: + f() + except Exception as ex: + t = ex.__traceback__ + while t.tb_next: + t = t.tb_next + frame = t.tb_frame + self.assertEqual(frame.f_lineno-frame.f_code.co_firstlineno, line) + + def test_lineno_after_raise_simple(self): + def simple(): + 1/0 + pass + self.lineno_after_raise(simple, 1) + + def test_lineno_after_raise_in_except(self): + def in_except(): + try: + 1/0 + except: + 1/0 + pass + self.lineno_after_raise(in_except, 4) + + def test_lineno_after_other_except(self): + def other_except(): + try: + 1/0 + except TypeError as ex: + pass + self.lineno_after_raise(other_except, 3) + + def test_lineno_in_named_except(self): + def in_named_except(): + try: + 1/0 + except Exception as ex: + 1/0 + pass + self.lineno_after_raise(in_named_except, 4) + + def test_lineno_in_try(self): + def in_try(): + try: + 1/0 + finally: + pass + self.lineno_after_raise(in_try, 4) + + def test_lineno_in_finally_normal(self): + def in_finally_normal(): + try: + pass + finally: + 1/0 + pass + self.lineno_after_raise(in_finally_normal, 4) + + def test_lineno_in_finally_except(self): + def in_finally_except(): + try: + 1/0 + finally: + 1/0 + pass + self.lineno_after_raise(in_finally_except, 4) + + def test_lineno_after_with(self): + class Noop: + def __enter__(self): + return self + def __exit__(self, *args): + pass + def after_with(): + with Noop(): + 1/0 + pass + self.lineno_after_raise(after_with, 2) + + if __name__ == '__main__': unittest.main() diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 9653e46ecc5..6679bd3d889 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -275,9 +275,9 @@ class FormatTest(unittest.TestCase): test_exc_common('% %s', 1, ValueError, "unsupported format character '%' (0x25) at index 2") test_exc_common('%d', '1', TypeError, - "%d format: a number is required, not str") + "%d format: a real number is required, not str") test_exc_common('%d', b'1', TypeError, - "%d format: a number is required, not bytes") + "%d format: a real number is required, not bytes") test_exc_common('%x', '1', TypeError, "%x format: an integer is required, not str") test_exc_common('%x', 3.14, TypeError, diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index bee9f9112bf..caeeb2712a1 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -27,8 +27,7 @@ import functools py_functools = import_helper.import_fresh_module('functools', blocked=['_functools']) -c_functools = import_helper.import_fresh_module('functools', - fresh=['_functools']) +c_functools = import_helper.import_fresh_module('functools') decimal = import_helper.import_fresh_module('decimal', fresh=['_decimal']) diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py index 44cb9a0f07b..22c75bae987 100644 --- a/Lib/test/test_gdb.py +++ b/Lib/test/test_gdb.py @@ -51,11 +51,6 @@ if gdb_major_version < 7: "embedding. Saw %s.%s:\n%s" % (gdb_major_version, gdb_minor_version, gdb_version)) -if (gdb_major_version, gdb_minor_version) >= (9, 2): - # gdb 9.2 on Fedora Rawhide is not reliable, see: - # * https://bugs.python.org/issue41473 - # * https://bugzilla.redhat.com/show_bug.cgi?id=1866884 - raise unittest.SkipTest("https://bugzilla.redhat.com/show_bug.cgi?id=1866884") if not sysconfig.is_python_build(): raise unittest.SkipTest("test_gdb only works on source builds at the moment.") diff --git a/Lib/test/test_genericalias.py b/Lib/test/test_genericalias.py index 912fb33af1a..fd024dcec82 100644 --- a/Lib/test/test_genericalias.py +++ b/Lib/test/test_genericalias.py @@ -62,7 +62,6 @@ class BaseTest(unittest.TestCase): Iterable, Iterator, Reversible, Container, Collection, - Callable, Mailbox, _PartialFile, ContextVar, Token, Field, @@ -302,6 +301,95 @@ class BaseTest(unittest.TestCase): alias = t[int] self.assertEqual(ref(alias)(), alias) + def test_no_kwargs(self): + # bpo-42576 + with self.assertRaises(TypeError): + GenericAlias(bad=float) + + def test_subclassing_types_genericalias(self): + class SubClass(GenericAlias): ... + alias = SubClass(list, int) + class Bad(GenericAlias): + def __new__(cls, *args, **kwargs): + super().__new__(cls, *args, **kwargs) + + self.assertEqual(alias, list[int]) + with self.assertRaises(TypeError): + Bad(list, int, bad=int) + + def test_abc_callable(self): + # A separate test is needed for Callable since it uses a subclass of + # GenericAlias. + alias = Callable[[int, str], float] + with self.subTest("Testing subscription"): + self.assertIs(alias.__origin__, Callable) + self.assertEqual(alias.__args__, (int, str, float)) + self.assertEqual(alias.__parameters__, ()) + + with self.subTest("Testing instance checks"): + self.assertIsInstance(alias, GenericAlias) + + with self.subTest("Testing weakref"): + self.assertEqual(ref(alias)(), alias) + + with self.subTest("Testing pickling"): + s = pickle.dumps(alias) + loaded = pickle.loads(s) + self.assertEqual(alias.__origin__, loaded.__origin__) + self.assertEqual(alias.__args__, loaded.__args__) + self.assertEqual(alias.__parameters__, loaded.__parameters__) + + with self.subTest("Testing TypeVar substitution"): + C1 = Callable[[int, T], T] + C2 = Callable[[K, T], V] + C3 = Callable[..., T] + self.assertEqual(C1[str], Callable[[int, str], str]) + self.assertEqual(C2[int, float, str], Callable[[int, float], str]) + self.assertEqual(C3[int], Callable[..., int]) + + # multi chaining + C4 = C2[int, V, str] + self.assertEqual(repr(C4).split(".")[-1], "Callable[[int, ~V], str]") + self.assertEqual(repr(C4[dict]).split(".")[-1], "Callable[[int, dict], str]") + self.assertEqual(C4[dict], Callable[[int, dict], str]) + + with self.subTest("Testing type erasure"): + class C1(Callable): + def __call__(self): + return None + a = C1[[int], T] + self.assertIs(a().__class__, C1) + self.assertEqual(a().__orig_class__, C1[[int], T]) + + # bpo-42195 + with self.subTest("Testing collections.abc.Callable's consistency " + "with typing.Callable"): + c1 = typing.Callable[[int, str], dict] + c2 = Callable[[int, str], dict] + self.assertEqual(c1.__args__, c2.__args__) + self.assertEqual(hash(c1.__args__), hash(c2.__args__)) + + with self.subTest("Testing ParamSpec uses"): + P = typing.ParamSpec('P') + C1 = Callable[P, T] + # substitution + self.assertEqual(C1[int, str], Callable[[int], str]) + self.assertEqual(C1[[int, str], str], Callable[[int, str], str]) + self.assertEqual(repr(C1).split(".")[-1], "Callable[~P, ~T]") + self.assertEqual(repr(C1[int, str]).split(".")[-1], "Callable[[int], str]") + + C2 = Callable[P, int] + # special case in PEP 612 where + # X[int, str, float] == X[[int, str, float]] + self.assertEqual(C2[int, str, float], C2[[int, str, float]]) + self.assertEqual(repr(C2).split(".")[-1], "Callable[~P, int]") + self.assertEqual(repr(C2[int, str]).split(".")[-1], "Callable[[int, str], int]") + + with self.subTest("Testing Concatenate uses"): + P = typing.ParamSpec('P') + C1 = Callable[typing.Concatenate[int, P], int] + self.assertEqual(repr(C1), "collections.abc.Callable" + "[typing.Concatenate[int, ~P], int]") if __name__ == "__main__": unittest.main() diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index 2859abb21fc..c3d7c8feb1e 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -3,7 +3,7 @@ Written by Cody A.W. Somerville , Josip Dzolonga, and Michael Otteneder for the 2007/08 GHOP contest. """ - +from collections import OrderedDict from http.server import BaseHTTPRequestHandler, HTTPServer, \ SimpleHTTPRequestHandler, CGIHTTPRequestHandler from http import server, HTTPStatus @@ -19,7 +19,7 @@ import shutil import email.message import email.utils import html -import http.client +import http, http.client import urllib.parse import tempfile import time @@ -588,6 +588,15 @@ print() print(os.environ["%s"]) """ +cgi_file6 = """\ +#!%s +import os + +print("Content-type: text/plain") +print() +print(repr(os.environ)) +""" + @unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0, "This test can't be run reliably as root (issue #13308).") @@ -666,6 +675,11 @@ class CGIHTTPServerTestCase(BaseTestCase): file5.write(cgi_file1 % self.pythonexe) os.chmod(self.file5_path, 0o777) + self.file6_path = os.path.join(self.cgi_dir, 'file6.py') + with open(self.file6_path, 'w', encoding='utf-8') as file6: + file6.write(cgi_file6 % self.pythonexe) + os.chmod(self.file6_path, 0o777) + os.chdir(self.parent_dir) def tearDown(self): @@ -685,6 +699,8 @@ class CGIHTTPServerTestCase(BaseTestCase): os.remove(self.file4_path) if self.file5_path: os.remove(self.file5_path) + if self.file6_path: + os.remove(self.file6_path) os.rmdir(self.cgi_child_dir) os.rmdir(self.cgi_dir) os.rmdir(self.cgi_dir_in_sub_dir) @@ -818,6 +834,23 @@ class CGIHTTPServerTestCase(BaseTestCase): finally: CGIHTTPRequestHandler.cgi_directories.remove('/sub/dir/cgi-bin') + def test_accept(self): + browser_accept = \ + 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' + tests = ( + ((('Accept', browser_accept),), browser_accept), + ((), ''), + # Hack case to get two values for the one header + ((('Accept', 'text/html'), ('ACCEPT', 'text/plain')), + 'text/html,text/plain'), + ) + for headers, expected in tests: + headers = OrderedDict(headers) + with self.subTest(headers): + res = self.request('/cgi-bin/file6.py', 'GET', headers=headers) + self.assertEqual(http.HTTPStatus.OK, res.status) + expected = f"'HTTP_ACCEPT': {expected!r}" + self.assertIn(expected.encode('ascii'), res.read()) class SocketlessRequestHandler(SimpleHTTPRequestHandler): diff --git a/Lib/test/test_idle.py b/Lib/test/test_idle.py index b205d356498..8756b766334 100644 --- a/Lib/test/test_idle.py +++ b/Lib/test/test_idle.py @@ -20,5 +20,5 @@ from idlelib.idle_test import load_tests if __name__ == '__main__': tk.NoDefaultRoot() unittest.main(exit=False) - tk._support_default_root = 1 + tk._support_default_root = True tk._default_root = None diff --git a/Lib/test/test_importlib/builtin/test_loader.py b/Lib/test/test_importlib/builtin/test_loader.py index b1349ec5da4..f6b6d97cd5b 100644 --- a/Lib/test/test_importlib/builtin/test_loader.py +++ b/Lib/test/test_importlib/builtin/test_loader.py @@ -6,6 +6,7 @@ machinery = util.import_importlib('importlib.machinery') import sys import types import unittest +import warnings @unittest.skipIf(util.BUILTINS.good_name is None, 'no reasonable builtin module') class LoaderTests(abc.LoaderTests): @@ -24,7 +25,9 @@ class LoaderTests(abc.LoaderTests): self.assertIn(module.__name__, sys.modules) def load_module(self, name): - return self.machinery.BuiltinImporter.load_module(name) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + return self.machinery.BuiltinImporter.load_module(name) def test_module(self): # Common case. diff --git a/Lib/test/test_importlib/extension/test_loader.py b/Lib/test/test_importlib/extension/test_loader.py index abd612fcd9b..22cf2dac5f8 100644 --- a/Lib/test/test_importlib/extension/test_loader.py +++ b/Lib/test/test_importlib/extension/test_loader.py @@ -1,3 +1,4 @@ +from warnings import catch_warnings from .. import abc from .. import util @@ -7,6 +8,7 @@ import os.path import sys import types import unittest +import warnings import importlib.util import importlib from test.support.script_helper import assert_python_failure @@ -20,14 +22,18 @@ class LoaderTests(abc.LoaderTests): util.EXTENSIONS.file_path) def load_module(self, fullname): - return self.loader.load_module(fullname) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + return self.loader.load_module(fullname) def test_load_module_API(self): # Test the default argument for load_module(). - self.loader.load_module() - self.loader.load_module(None) - with self.assertRaises(ImportError): - self.load_module('XXX') + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + self.loader.load_module() + self.loader.load_module(None) + with self.assertRaises(ImportError): + self.load_module('XXX') def test_equality(self): other = self.machinery.ExtensionFileLoader(util.EXTENSIONS.name, @@ -94,6 +100,21 @@ class MultiPhaseExtensionModuleTests(abc.LoaderTests): self.loader = self.machinery.ExtensionFileLoader( self.name, self.spec.origin) + def load_module(self): + '''Load the module from the test extension''' + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + 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 + # No extension module as __init__ available for testing. test_package = None @@ -157,19 +178,6 @@ class MultiPhaseExtensionModuleTests(abc.LoaderTests): 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) diff --git a/Lib/test/test_importlib/fixtures.py b/Lib/test/test_importlib/fixtures.py index 8fa92909d58..429313e9efb 100644 --- a/Lib/test/test_importlib/fixtures.py +++ b/Lib/test/test_importlib/fixtures.py @@ -7,6 +7,7 @@ import textwrap import contextlib from test.support.os_helper import FS_NONASCII +from typing import Dict, Union @contextlib.contextmanager @@ -71,8 +72,13 @@ class OnSysPath(Fixtures): self.fixtures.enter_context(self.add_sys_path(self.site_dir)) +# Except for python/mypy#731, prefer to define +# FilesDef = Dict[str, Union['FilesDef', str]] +FilesDef = Dict[str, Union[Dict[str, Union[Dict[str, str], str]], str]] + + class DistInfoPkg(OnSysPath, SiteDir): - files = { + files: FilesDef = { "distinfo_pkg-1.0.0.dist-info": { "METADATA": """ Name: distinfo-pkg @@ -86,19 +92,55 @@ class DistInfoPkg(OnSysPath, SiteDir): [entries] main = mod:main ns:sub = mod:main - """ - }, + """, + }, "mod.py": """ def main(): print("hello world") """, - } + } def setUp(self): super(DistInfoPkg, self).setUp() build_files(DistInfoPkg.files, self.site_dir) +class DistInfoPkgWithDot(OnSysPath, SiteDir): + files: FilesDef = { + "pkg_dot-1.0.0.dist-info": { + "METADATA": """ + Name: pkg.dot + Version: 1.0.0 + """, + }, + } + + def setUp(self): + super(DistInfoPkgWithDot, self).setUp() + build_files(DistInfoPkgWithDot.files, self.site_dir) + + +class DistInfoPkgWithDotLegacy(OnSysPath, SiteDir): + files: FilesDef = { + "pkg.dot-1.0.0.dist-info": { + "METADATA": """ + Name: pkg.dot + Version: 1.0.0 + """, + }, + "pkg.lot.egg-info": { + "METADATA": """ + Name: pkg.lot + Version: 1.0.0 + """, + }, + } + + def setUp(self): + super(DistInfoPkgWithDotLegacy, self).setUp() + build_files(DistInfoPkgWithDotLegacy.files, self.site_dir) + + class DistInfoPkgOffPath(SiteDir): def setUp(self): super(DistInfoPkgOffPath, self).setUp() @@ -106,7 +148,7 @@ class DistInfoPkgOffPath(SiteDir): class EggInfoPkg(OnSysPath, SiteDir): - files = { + files: FilesDef = { "egginfo_pkg.egg-info": { "PKG-INFO": """ Name: egginfo-pkg @@ -129,13 +171,13 @@ class EggInfoPkg(OnSysPath, SiteDir): [test] pytest """, - "top_level.txt": "mod\n" - }, + "top_level.txt": "mod\n", + }, "mod.py": """ def main(): print("hello world") """, - } + } def setUp(self): super(EggInfoPkg, self).setUp() @@ -143,7 +185,7 @@ class EggInfoPkg(OnSysPath, SiteDir): class EggInfoFile(OnSysPath, SiteDir): - files = { + files: FilesDef = { "egginfo_file.egg-info": """ Metadata-Version: 1.0 Name: egginfo_file @@ -156,7 +198,7 @@ class EggInfoFile(OnSysPath, SiteDir): Description: UNKNOWN Platform: UNKNOWN """, - } + } def setUp(self): super(EggInfoFile, self).setUp() @@ -164,12 +206,12 @@ class EggInfoFile(OnSysPath, SiteDir): class LocalPackage: - files = { + files: FilesDef = { "setup.py": """ import setuptools setuptools.setup(name="local-pkg", version="2.0.1") """, - } + } def setUp(self): self.fixtures = contextlib.ExitStack() @@ -214,8 +256,7 @@ def build_files(file_defs, prefix=pathlib.Path()): class FileBuilder: def unicode_filename(self): - return FS_NONASCII or \ - self.skip("File system does not support non-ascii.") + return FS_NONASCII or self.skip("File system does not support non-ascii.") def DALS(str): diff --git a/Lib/test/test_importlib/frozen/test_loader.py b/Lib/test/test_importlib/frozen/test_loader.py index 29ecff17740..8eaffa798a5 100644 --- a/Lib/test/test_importlib/frozen/test_loader.py +++ b/Lib/test/test_importlib/frozen/test_loader.py @@ -161,19 +161,23 @@ class LoaderTests(abc.LoaderTests): "") def test_module_repr_indirect(self): - with util.uncache('__hello__'), captured_stdout(): - module = self.machinery.FrozenImporter.load_module('__hello__') - self.assertEqual(repr(module), - "") + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + with util.uncache('__hello__'), captured_stdout(): + module = self.machinery.FrozenImporter.load_module('__hello__') + self.assertEqual(repr(module), + "") # No way to trigger an error in a frozen module. test_state_after_failure = None def test_unloadable(self): - assert self.machinery.FrozenImporter.find_module('_not_real') is None - with self.assertRaises(ImportError) as cm: - self.machinery.FrozenImporter.load_module('_not_real') - self.assertEqual(cm.exception.name, '_not_real') + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + assert self.machinery.FrozenImporter.find_module('_not_real') is None + with self.assertRaises(ImportError) as cm: + self.machinery.FrozenImporter.load_module('_not_real') + self.assertEqual(cm.exception.name, '_not_real') (Frozen_LoaderTests, diff --git a/Lib/test/test_importlib/import_/test___loader__.py b/Lib/test/test_importlib/import_/test___loader__.py index 4b18093cf90..ecd83c6567e 100644 --- a/Lib/test/test_importlib/import_/test___loader__.py +++ b/Lib/test/test_importlib/import_/test___loader__.py @@ -2,6 +2,7 @@ from importlib import machinery import sys import types import unittest +import warnings from .. import util @@ -45,25 +46,29 @@ class LoaderMock: class LoaderAttributeTests: def test___loader___missing(self): - module = types.ModuleType('blah') - try: - del module.__loader__ - except AttributeError: - pass - loader = LoaderMock() - loader.module = module - with util.uncache('blah'), util.import_state(meta_path=[loader]): - module = self.__import__('blah') - self.assertEqual(loader, module.__loader__) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + module = types.ModuleType('blah') + try: + del module.__loader__ + except AttributeError: + pass + loader = LoaderMock() + loader.module = module + with util.uncache('blah'), util.import_state(meta_path=[loader]): + module = self.__import__('blah') + self.assertEqual(loader, module.__loader__) def test___loader___is_None(self): - module = types.ModuleType('blah') - module.__loader__ = None - loader = LoaderMock() - loader.module = module - with util.uncache('blah'), util.import_state(meta_path=[loader]): - returned_module = self.__import__('blah') - self.assertEqual(loader, module.__loader__) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + module = types.ModuleType('blah') + module.__loader__ = None + loader = LoaderMock() + loader.module = module + with util.uncache('blah'), util.import_state(meta_path=[loader]): + returned_module = self.__import__('blah') + self.assertEqual(loader, module.__loader__) (Frozen_Tests, diff --git a/Lib/test/test_importlib/import_/test___package__.py b/Lib/test/test_importlib/import_/test___package__.py index 761b256b387..4a2b34e5f67 100644 --- a/Lib/test/test_importlib/import_/test___package__.py +++ b/Lib/test/test_importlib/import_/test___package__.py @@ -98,6 +98,16 @@ class FakeSpec: class Using__package__PEP302(Using__package__): mock_modules = util.mock_modules + def test_using___package__(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_using___package__() + + def test_spec_fallback(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_spec_fallback() + (Frozen_UsingPackagePEP302, Source_UsingPackagePEP302 @@ -155,6 +165,21 @@ class Setting__package__: class Setting__package__PEP302(Setting__package__, unittest.TestCase): mock_modules = util.mock_modules + def test_top_level(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_top_level() + + def test_package(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_package() + + def test_submodule(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_submodule() + class Setting__package__PEP451(Setting__package__, unittest.TestCase): mock_modules = util.mock_spec diff --git a/Lib/test/test_importlib/import_/test_api.py b/Lib/test/test_importlib/import_/test_api.py index 0cd9de4daff..35c26977ea3 100644 --- a/Lib/test/test_importlib/import_/test_api.py +++ b/Lib/test/test_importlib/import_/test_api.py @@ -4,6 +4,7 @@ from importlib import machinery import sys import types import unittest +import warnings PKG_NAME = 'fine' SUBMOD_NAME = 'fine.bogus' @@ -100,6 +101,36 @@ class APITest: class OldAPITests(APITest): bad_finder_loader = BadLoaderFinder + def test_raises_ModuleNotFoundError(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_raises_ModuleNotFoundError() + + def test_name_requires_rparition(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_name_requires_rparition() + + def test_negative_level(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_negative_level() + + def test_nonexistent_fromlist_entry(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_nonexistent_fromlist_entry() + + def test_fromlist_load_error_propagates(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_fromlist_load_error_propagates + + def test_blocked_fromlist(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_blocked_fromlist() + (Frozen_OldAPITests, Source_OldAPITests diff --git a/Lib/test/test_importlib/import_/test_caching.py b/Lib/test/test_importlib/import_/test_caching.py index 8079add5b21..0f987b22100 100644 --- a/Lib/test/test_importlib/import_/test_caching.py +++ b/Lib/test/test_importlib/import_/test_caching.py @@ -3,6 +3,7 @@ from .. import util import sys from types import MethodType import unittest +import warnings class UseCache: @@ -63,30 +64,36 @@ class ImportlibUseCache(UseCache, unittest.TestCase): # to when to use the module in sys.modules and when not to. def test_using_cache_after_loader(self): # [from cache on return] - with self.create_mock('module') as mock: - with util.import_state(meta_path=[mock]): - module = self.__import__('module') - self.assertEqual(id(module), id(sys.modules['module'])) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + with self.create_mock('module') as mock: + with util.import_state(meta_path=[mock]): + module = self.__import__('module') + self.assertEqual(id(module), id(sys.modules['module'])) # See test_using_cache_after_loader() for reasoning. def test_using_cache_for_assigning_to_attribute(self): # [from cache to attribute] - with self.create_mock('pkg.__init__', 'pkg.module') as importer: - with util.import_state(meta_path=[importer]): - module = self.__import__('pkg.module') - self.assertTrue(hasattr(module, 'module')) - self.assertEqual(id(module.module), - id(sys.modules['pkg.module'])) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + with self.create_mock('pkg.__init__', 'pkg.module') as importer: + with util.import_state(meta_path=[importer]): + module = self.__import__('pkg.module') + self.assertTrue(hasattr(module, 'module')) + self.assertEqual(id(module.module), + id(sys.modules['pkg.module'])) # See test_using_cache_after_loader() for reasoning. def test_using_cache_for_fromlist(self): # [from cache for fromlist] - with self.create_mock('pkg.__init__', 'pkg.module') as importer: - with util.import_state(meta_path=[importer]): - module = self.__import__('pkg', fromlist=['module']) - self.assertTrue(hasattr(module, 'module')) - self.assertEqual(id(module.module), - id(sys.modules['pkg.module'])) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + with self.create_mock('pkg.__init__', 'pkg.module') as importer: + with util.import_state(meta_path=[importer]): + module = self.__import__('pkg', fromlist=['module']) + self.assertTrue(hasattr(module, 'module')) + self.assertEqual(id(module.module), + id(sys.modules['pkg.module'])) if __name__ == '__main__': diff --git a/Lib/test/test_importlib/import_/test_fromlist.py b/Lib/test/test_importlib/import_/test_fromlist.py index 018c1721761..deb21710a61 100644 --- a/Lib/test/test_importlib/import_/test_fromlist.py +++ b/Lib/test/test_importlib/import_/test_fromlist.py @@ -24,7 +24,7 @@ class ReturnValue: def test_return_from_from_import(self): # [from return] - with util.mock_modules('pkg.__init__', 'pkg.module')as importer: + with util.mock_spec('pkg.__init__', 'pkg.module')as importer: with util.import_state(meta_path=[importer]): module = self.__import__('pkg.module', fromlist=['attr']) self.assertEqual(module.__name__, 'pkg.module') @@ -52,14 +52,14 @@ class HandlingFromlist: def test_object(self): # [object case] - with util.mock_modules('module') as importer: + with util.mock_spec('module') as importer: with util.import_state(meta_path=[importer]): module = self.__import__('module', fromlist=['attr']) self.assertEqual(module.__name__, 'module') def test_nonexistent_object(self): # [bad object] - with util.mock_modules('module') as importer: + with util.mock_spec('module') as importer: with util.import_state(meta_path=[importer]): module = self.__import__('module', fromlist=['non_existent']) self.assertEqual(module.__name__, 'module') @@ -67,7 +67,7 @@ class HandlingFromlist: def test_module_from_package(self): # [module] - with util.mock_modules('pkg.__init__', 'pkg.module') as importer: + with util.mock_spec('pkg.__init__', 'pkg.module') as importer: with util.import_state(meta_path=[importer]): module = self.__import__('pkg', fromlist=['module']) self.assertEqual(module.__name__, 'pkg') @@ -75,7 +75,7 @@ class HandlingFromlist: self.assertEqual(module.module.__name__, 'pkg.module') def test_nonexistent_from_package(self): - with util.mock_modules('pkg.__init__') as importer: + with util.mock_spec('pkg.__init__') as importer: with util.import_state(meta_path=[importer]): module = self.__import__('pkg', fromlist=['non_existent']) self.assertEqual(module.__name__, 'pkg') @@ -87,7 +87,7 @@ class HandlingFromlist: # ModuleNotFoundError propagate. def module_code(): import i_do_not_exist - with util.mock_modules('pkg.__init__', 'pkg.mod', + with util.mock_spec('pkg.__init__', 'pkg.mod', module_code={'pkg.mod': module_code}) as importer: with util.import_state(meta_path=[importer]): with self.assertRaises(ModuleNotFoundError) as exc: @@ -95,14 +95,14 @@ class HandlingFromlist: self.assertEqual('i_do_not_exist', exc.exception.name) def test_empty_string(self): - with util.mock_modules('pkg.__init__', 'pkg.mod') as importer: + with util.mock_spec('pkg.__init__', 'pkg.mod') as importer: with util.import_state(meta_path=[importer]): module = self.__import__('pkg.mod', fromlist=['']) self.assertEqual(module.__name__, 'pkg.mod') def basic_star_test(self, fromlist=['*']): # [using *] - with util.mock_modules('pkg.__init__', 'pkg.module') as mock: + with util.mock_spec('pkg.__init__', 'pkg.module') as mock: with util.import_state(meta_path=[mock]): mock['pkg'].__all__ = ['module'] module = self.__import__('pkg', fromlist=fromlist) @@ -119,7 +119,7 @@ class HandlingFromlist: def test_star_with_others(self): # [using * with others] - context = util.mock_modules('pkg.__init__', 'pkg.module1', 'pkg.module2') + context = util.mock_spec('pkg.__init__', 'pkg.module1', 'pkg.module2') with context as mock: with util.import_state(meta_path=[mock]): mock['pkg'].__all__ = ['module1'] @@ -131,7 +131,7 @@ class HandlingFromlist: self.assertEqual(module.module2.__name__, 'pkg.module2') def test_nonexistent_in_all(self): - with util.mock_modules('pkg.__init__') as importer: + with util.mock_spec('pkg.__init__') as importer: with util.import_state(meta_path=[importer]): importer['pkg'].__all__ = ['non_existent'] module = self.__import__('pkg', fromlist=['*']) @@ -139,7 +139,7 @@ class HandlingFromlist: self.assertFalse(hasattr(module, 'non_existent')) def test_star_in_all(self): - with util.mock_modules('pkg.__init__') as importer: + with util.mock_spec('pkg.__init__') as importer: with util.import_state(meta_path=[importer]): importer['pkg'].__all__ = ['*'] module = self.__import__('pkg', fromlist=['*']) @@ -147,7 +147,7 @@ class HandlingFromlist: self.assertFalse(hasattr(module, '*')) def test_invalid_type(self): - with util.mock_modules('pkg.__init__') as importer: + with util.mock_spec('pkg.__init__') as importer: with util.import_state(meta_path=[importer]), \ warnings.catch_warnings(): warnings.simplefilter('error', BytesWarning) @@ -157,7 +157,7 @@ class HandlingFromlist: self.__import__('pkg', fromlist=iter([b'attr'])) def test_invalid_type_in_all(self): - with util.mock_modules('pkg.__init__') as importer: + with util.mock_spec('pkg.__init__') as importer: with util.import_state(meta_path=[importer]), \ warnings.catch_warnings(): warnings.simplefilter('error', BytesWarning) diff --git a/Lib/test/test_importlib/import_/test_meta_path.py b/Lib/test/test_importlib/import_/test_meta_path.py index 5a41e8968a2..5730119fe99 100644 --- a/Lib/test/test_importlib/import_/test_meta_path.py +++ b/Lib/test/test_importlib/import_/test_meta_path.py @@ -100,8 +100,20 @@ class CallSignature: self.assertEqual(args[0], mod_name) self.assertIs(args[1], path) +class CallSignoreSuppressImportWarning(CallSignature): -class CallSignaturePEP302(CallSignature): + def test_no_path(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_no_path() + + def test_with_path(self): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + super().test_no_path() + + +class CallSignaturePEP302(CallSignoreSuppressImportWarning): mock_modules = util.mock_modules finder_name = 'find_module' diff --git a/Lib/test/test_importlib/test_abc.py b/Lib/test/test_importlib/test_abc.py index 605738fae2e..d8b9fc89f29 100644 --- a/Lib/test/test_importlib/test_abc.py +++ b/Lib/test/test_importlib/test_abc.py @@ -458,32 +458,36 @@ class LoaderLoadModuleTests: return SpecLoader() def test_fresh(self): - loader = self.loader() - name = 'blah' - with test_util.uncache(name): - loader.load_module(name) - module = loader.found - self.assertIs(sys.modules[name], module) - self.assertEqual(loader, module.__loader__) - self.assertEqual(loader, module.__spec__.loader) - self.assertEqual(name, module.__name__) - self.assertEqual(name, module.__spec__.name) - self.assertIsNotNone(module.__path__) - self.assertIsNotNone(module.__path__, - module.__spec__.submodule_search_locations) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + loader = self.loader() + name = 'blah' + with test_util.uncache(name): + loader.load_module(name) + module = loader.found + self.assertIs(sys.modules[name], module) + self.assertEqual(loader, module.__loader__) + self.assertEqual(loader, module.__spec__.loader) + self.assertEqual(name, module.__name__) + self.assertEqual(name, module.__spec__.name) + self.assertIsNotNone(module.__path__) + self.assertIsNotNone(module.__path__, + module.__spec__.submodule_search_locations) def test_reload(self): - name = 'blah' - loader = self.loader() - module = types.ModuleType(name) - module.__spec__ = self.util.spec_from_loader(name, loader) - module.__loader__ = loader - with test_util.uncache(name): - sys.modules[name] = module - loader.load_module(name) - found = loader.found - self.assertIs(found, sys.modules[name]) - self.assertIs(module, sys.modules[name]) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + name = 'blah' + loader = self.loader() + module = types.ModuleType(name) + module.__spec__ = self.util.spec_from_loader(name, loader) + module.__loader__ = loader + with test_util.uncache(name): + sys.modules[name] = module + loader.load_module(name) + found = loader.found + self.assertIs(found, sys.modules[name]) + self.assertIs(module, sys.modules[name]) (Frozen_LoaderLoadModuleTests, @@ -837,25 +841,29 @@ 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 test_util.uncache(self.name): - with warnings.catch_warnings(): - warnings.simplefilter('ignore', DeprecationWarning) - module = self.loader.load_module(self.name) - self.verify_module(module) - self.assertEqual(module.__path__, [os.path.dirname(self.path)]) - self.assertIn(self.name, sys.modules) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + with test_util.uncache(self.name): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', DeprecationWarning) + module = self.loader.load_module(self.name) + self.verify_module(module) + self.assertEqual(module.__path__, [os.path.dirname(self.path)]) + self.assertIn(self.name, sys.modules) def test_package_settings(self): # __package__ needs to be set, while __path__ is set on if the module # is a package. # Testing the values for a package are covered by test_load_module. - self.setUp(is_package=False) - with test_util.uncache(self.name): - with warnings.catch_warnings(): - warnings.simplefilter('ignore', DeprecationWarning) - module = self.loader.load_module(self.name) - self.verify_module(module) - self.assertFalse(hasattr(module, '__path__')) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + self.setUp(is_package=False) + with test_util.uncache(self.name): + with warnings.catch_warnings(): + warnings.simplefilter('ignore', DeprecationWarning) + module = self.loader.load_module(self.name) + self.verify_module(module) + self.assertFalse(hasattr(module, '__path__')) def test_get_source_encoding(self): # Source is considered encoded in UTF-8 by default unless otherwise diff --git a/Lib/test/test_importlib/test_api.py b/Lib/test/test_importlib/test_api.py index fd60634e093..3f06a10ba9c 100644 --- a/Lib/test/test_importlib/test_api.py +++ b/Lib/test/test_importlib/test_api.py @@ -20,7 +20,7 @@ class ImportModuleTests: def test_module_import(self): # Test importing a top-level module. - with test_util.mock_modules('top_level') as mock: + with test_util.mock_spec('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') @@ -30,7 +30,7 @@ class ImportModuleTests: pkg_name = 'pkg' pkg_long_name = '{0}.__init__'.format(pkg_name) name = '{0}.mod'.format(pkg_name) - with test_util.mock_modules(pkg_long_name, name) as mock: + with test_util.mock_spec(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) @@ -42,7 +42,7 @@ class ImportModuleTests: module_name = 'mod' absolute_name = '{0}.{1}'.format(pkg_name, module_name) relative_name = '.{0}'.format(module_name) - with test_util.mock_modules(pkg_long_name, absolute_name) as mock: + with test_util.mock_spec(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) @@ -50,7 +50,7 @@ class ImportModuleTests: def test_deep_relative_package_import(self): modules = ['a.__init__', 'a.b.__init__', 'a.c'] - with test_util.mock_modules(*modules) as mock: + with test_util.mock_spec(*modules) as mock: with test_util.import_state(meta_path=[mock]): self.init.import_module('a') self.init.import_module('a.b') @@ -63,7 +63,7 @@ class ImportModuleTests: pkg_name = 'pkg' pkg_long_name = '{0}.__init__'.format(pkg_name) name = '{0}.mod'.format(pkg_name) - with test_util.mock_modules(pkg_long_name, name) as mock: + with test_util.mock_spec(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) @@ -88,7 +88,7 @@ class ImportModuleTests: b_load_count += 1 code = {'a': load_a, 'a.b': load_b} modules = ['a.__init__', 'a.b'] - with test_util.mock_modules(*modules, module_code=code) as mock: + with test_util.mock_spec(*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) @@ -212,8 +212,8 @@ class ReloadTests: module = type(sys)('top_level') module.spam = 3 sys.modules['top_level'] = module - mock = test_util.mock_modules('top_level', - module_code={'top_level': code}) + mock = test_util.mock_spec('top_level', + module_code={'top_level': code}) with mock: with test_util.import_state(meta_path=[mock]): module = self.init.import_module('top_level') diff --git a/Lib/test/test_importlib/test_main.py b/Lib/test/test_importlib/test_main.py index a26bab63615..c937361e8fd 100644 --- a/Lib/test/test_importlib/test_main.py +++ b/Lib/test/test_importlib/test_main.py @@ -1,5 +1,3 @@ -# coding: utf-8 - import re import json import pickle @@ -14,10 +12,14 @@ except ImportError: from . import fixtures from importlib.metadata import ( - Distribution, EntryPoint, - PackageNotFoundError, distributions, - entry_points, metadata, version, - ) + Distribution, + EntryPoint, + PackageNotFoundError, + distributions, + entry_points, + metadata, + version, +) class BasicTests(fixtures.DistInfoPkg, unittest.TestCase): @@ -70,12 +72,11 @@ class ImportTests(fixtures.DistInfoPkg, unittest.TestCase): name='ep', value='importlib.metadata', group='grp', - ) + ) assert ep.load() is importlib.metadata -class NameNormalizationTests( - fixtures.OnSysPath, fixtures.SiteDir, unittest.TestCase): +class NameNormalizationTests(fixtures.OnSysPath, fixtures.SiteDir, unittest.TestCase): @staticmethod def pkg_with_dashes(site_dir): """ @@ -144,11 +145,15 @@ class NonASCIITests(fixtures.OnSysPath, fixtures.SiteDir, unittest.TestCase): metadata_dir.mkdir() metadata = metadata_dir / 'METADATA' with metadata.open('w', encoding='utf-8') as fp: - fp.write(textwrap.dedent(""" + fp.write( + textwrap.dedent( + """ Name: portend pôrˈtend - """).lstrip()) + """ + ).lstrip() + ) return 'portend' def test_metadata_loads(self): @@ -162,24 +167,12 @@ class NonASCIITests(fixtures.OnSysPath, fixtures.SiteDir, unittest.TestCase): assert meta.get_payload() == 'pôrˈtend\n' -class DiscoveryTests(fixtures.EggInfoPkg, - fixtures.DistInfoPkg, - unittest.TestCase): - +class DiscoveryTests(fixtures.EggInfoPkg, fixtures.DistInfoPkg, unittest.TestCase): def test_package_discovery(self): dists = list(distributions()) - assert all( - isinstance(dist, Distribution) - for dist in dists - ) - assert any( - dist.metadata['Name'] == 'egginfo-pkg' - for dist in dists - ) - assert any( - dist.metadata['Name'] == 'distinfo-pkg' - for dist in dists - ) + assert all(isinstance(dist, Distribution) for dist in dists) + assert any(dist.metadata['Name'] == 'egginfo-pkg' for dist in dists) + assert any(dist.metadata['Name'] == 'distinfo-pkg' for dist in dists) def test_invalid_usage(self): with self.assertRaises(ValueError): @@ -265,10 +258,21 @@ class TestEntryPoints(unittest.TestCase): def test_attr(self): assert self.ep.attr is None + def test_sortable(self): + """ + EntryPoint objects are sortable, but result is undefined. + """ + sorted( + [ + EntryPoint('b', 'val', 'group'), + EntryPoint('a', 'val', 'group'), + ] + ) + class FileSystem( - fixtures.OnSysPath, fixtures.SiteDir, fixtures.FileBuilder, - unittest.TestCase): + fixtures.OnSysPath, fixtures.SiteDir, fixtures.FileBuilder, unittest.TestCase +): def test_unicode_dir_on_sys_path(self): """ Ensure a Unicode subdirectory of a directory on sys.path @@ -277,5 +281,5 @@ class FileSystem( fixtures.build_files( {self.unicode_filename(): {}}, prefix=self.site_dir, - ) + ) list(distributions()) diff --git a/Lib/test/test_importlib/test_metadata_api.py b/Lib/test/test_importlib/test_metadata_api.py index 1d7b29ae05f..df00ae9375b 100644 --- a/Lib/test/test_importlib/test_metadata_api.py +++ b/Lib/test/test_importlib/test_metadata_api.py @@ -2,20 +2,26 @@ import re import textwrap import unittest -from collections.abc import Iterator - from . import fixtures from importlib.metadata import ( - Distribution, PackageNotFoundError, distribution, - entry_points, files, metadata, requires, version, - ) + Distribution, + PackageNotFoundError, + distribution, + entry_points, + files, + metadata, + requires, + version, +) class APITests( - fixtures.EggInfoPkg, - fixtures.DistInfoPkg, - fixtures.EggInfoFile, - unittest.TestCase): + fixtures.EggInfoPkg, + fixtures.DistInfoPkg, + fixtures.DistInfoPkgWithDot, + fixtures.EggInfoFile, + unittest.TestCase, +): version_pattern = r'\d+\.\d+(\.\d)?' @@ -33,16 +39,28 @@ class APITests( with self.assertRaises(PackageNotFoundError): distribution('does-not-exist') + def test_name_normalization(self): + names = 'pkg.dot', 'pkg_dot', 'pkg-dot', 'pkg..dot', 'Pkg.Dot' + for name in names: + with self.subTest(name): + assert distribution(name).metadata['Name'] == 'pkg.dot' + + def test_prefix_not_matched(self): + prefixes = 'p', 'pkg', 'pkg.' + for prefix in prefixes: + with self.subTest(prefix): + with self.assertRaises(PackageNotFoundError): + distribution(prefix) + def test_for_top_level(self): self.assertEqual( - distribution('egginfo-pkg').read_text('top_level.txt').strip(), - 'mod') + distribution('egginfo-pkg').read_text('top_level.txt').strip(), 'mod' + ) def test_read_text(self): top_level = [ - path for path in files('egginfo-pkg') - if path.name == 'top_level.txt' - ][0] + path for path in files('egginfo-pkg') if path.name == 'top_level.txt' + ][0] self.assertEqual(top_level.read_text(), 'mod\n') def test_entry_points(self): @@ -51,6 +69,13 @@ class APITests( self.assertEqual(ep.value, 'mod:main') self.assertEqual(ep.extras, []) + def test_entry_points_distribution(self): + entries = dict(entry_points()['entries']) + for entry in ("main", "ns:sub"): + ep = entries[entry] + self.assertIn(ep.dist.name, ('distinfo-pkg', 'egginfo-pkg')) + self.assertEqual(ep.dist.version, "1.0.0") + def test_metadata_for_this_package(self): md = metadata('egginfo-pkg') assert md['author'] == 'Steven Ma' @@ -75,13 +100,8 @@ class APITests( def test_file_hash_repr(self): assertRegex = self.assertRegex - util = [ - p for p in files('distinfo-pkg') - if p.name == 'mod.py' - ][0] - assertRegex( - repr(util.hash), - '') + util = [p for p in files('distinfo-pkg') if p.name == 'mod.py'][0] + assertRegex(repr(util.hash), '') def test_files_dist_info(self): self._test_files(files('distinfo-pkg')) @@ -99,10 +119,7 @@ class APITests( def test_requires_egg_info(self): deps = requires('egginfo-pkg') assert len(deps) == 2 - assert any( - dep == 'wheel >= 1.0; python_version >= "2.7"' - for dep in deps - ) + assert any(dep == 'wheel >= 1.0; python_version >= "2.7"' for dep in deps) def test_requires_dist_info(self): deps = requires('distinfo-pkg') @@ -112,7 +129,8 @@ class APITests( assert "pytest; extra == 'test'" in deps def test_more_complex_deps_requires_text(self): - requires = textwrap.dedent(""" + requires = textwrap.dedent( + """ dep1 dep2 @@ -124,7 +142,8 @@ class APITests( [extra2:python_version < "3"] dep5 - """) + """ + ) deps = sorted(Distribution._deps_from_requires_text(requires)) expected = [ 'dep1', @@ -132,7 +151,7 @@ class APITests( 'dep3; python_version < "3"', 'dep4; extra == "extra1"', 'dep5; (python_version < "3") and extra == "extra2"', - ] + ] # It's important that the environment marker expression be # wrapped in parentheses to avoid the following 'and' binding more # tightly than some other part of the environment expression. @@ -140,17 +159,27 @@ class APITests( assert deps == expected +class LegacyDots(fixtures.DistInfoPkgWithDotLegacy, unittest.TestCase): + def test_name_normalization(self): + names = 'pkg.dot', 'pkg_dot', 'pkg-dot', 'pkg..dot', 'Pkg.Dot' + for name in names: + with self.subTest(name): + assert distribution(name).metadata['Name'] == 'pkg.dot' + + def test_name_normalization_versionless_egg_info(self): + names = 'pkg.lot', 'pkg_lot', 'pkg-lot', 'pkg..lot', 'Pkg.Lot' + for name in names: + with self.subTest(name): + assert distribution(name).metadata['Name'] == 'pkg.lot' + + class OffSysPathTests(fixtures.DistInfoPkgOffPath, unittest.TestCase): def test_find_distributions_specified_path(self): dists = Distribution.discover(path=[str(self.site_dir)]) - assert any( - dist.metadata['Name'] == 'distinfo-pkg' - for dist in dists - ) + assert any(dist.metadata['Name'] == 'distinfo-pkg' for dist in dists) def test_distribution_at_pathlib(self): - """Demonstrate how to load metadata direct from a directory. - """ + """Demonstrate how to load metadata direct from a directory.""" dist_info_path = self.site_dir / 'distinfo_pkg-1.0.0.dist-info' dist = Distribution.at(dist_info_path) assert dist.version == '1.0.0' diff --git a/Lib/test/test_importlib/test_spec.py b/Lib/test/test_importlib/test_spec.py index eed90f29f92..b57eb6c0ff3 100644 --- a/Lib/test/test_importlib/test_spec.py +++ b/Lib/test/test_importlib/test_spec.py @@ -303,32 +303,38 @@ class ModuleSpecMethodsTests: self.assertNotIn(self.spec.name, sys.modules) def test_load_legacy(self): - self.spec.loader = LegacyLoader() - with CleanImport(self.spec.name): - loaded = self.bootstrap._load(self.spec) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + self.spec.loader = LegacyLoader() + with CleanImport(self.spec.name): + loaded = self.bootstrap._load(self.spec) - self.assertEqual(loaded.ham, -1) + self.assertEqual(loaded.ham, -1) def test_load_legacy_attributes(self): - self.spec.loader = LegacyLoader() - with CleanImport(self.spec.name): - loaded = self.bootstrap._load(self.spec) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + self.spec.loader = LegacyLoader() + with CleanImport(self.spec.name): + loaded = self.bootstrap._load(self.spec) - self.assertIs(loaded.__loader__, self.spec.loader) - self.assertEqual(loaded.__package__, self.spec.parent) - self.assertIs(loaded.__spec__, self.spec) + self.assertIs(loaded.__loader__, self.spec.loader) + self.assertEqual(loaded.__package__, self.spec.parent) + self.assertIs(loaded.__spec__, self.spec) def test_load_legacy_attributes_immutable(self): module = object() - class ImmutableLoader(TestLoader): - def load_module(self, name): - sys.modules[name] = module - return module - self.spec.loader = ImmutableLoader() - with CleanImport(self.spec.name): - loaded = self.bootstrap._load(self.spec) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + class ImmutableLoader(TestLoader): + def load_module(self, name): + sys.modules[name] = module + return module + self.spec.loader = ImmutableLoader() + with CleanImport(self.spec.name): + loaded = self.bootstrap._load(self.spec) - self.assertIs(sys.modules[self.spec.name], module) + self.assertIs(sys.modules[self.spec.name], module) # reload() @@ -382,11 +388,13 @@ class ModuleSpecMethodsTests: self.assertFalse(hasattr(loaded, '__cached__')) def test_reload_legacy(self): - self.spec.loader = LegacyLoader() - with CleanImport(self.spec.name): - loaded = self.bootstrap._load(self.spec) - reloaded = self.bootstrap._exec(self.spec, loaded) - installed = sys.modules[self.spec.name] + with warnings.catch_warnings(): + warnings.simplefilter("ignore", ImportWarning) + self.spec.loader = LegacyLoader() + with CleanImport(self.spec.name): + loaded = self.bootstrap._load(self.spec) + reloaded = self.bootstrap._exec(self.spec, loaded) + installed = sys.modules[self.spec.name] self.assertEqual(loaded.ham, -1) self.assertIs(reloaded, loaded) diff --git a/Lib/test/test_importlib/test_zip.py b/Lib/test/test_importlib/test_zip.py index a5399c16682..74783fc98b9 100644 --- a/Lib/test/test_importlib/test_zip.py +++ b/Lib/test/test_importlib/test_zip.py @@ -3,8 +3,12 @@ import unittest from contextlib import ExitStack from importlib.metadata import ( - distribution, entry_points, files, PackageNotFoundError, - version, distributions, + PackageNotFoundError, + distribution, + distributions, + entry_points, + files, + version, ) from importlib import resources diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 71c4f27d27b..706fcbe3439 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -390,6 +390,7 @@ class TestRetrievingSourceCode(GetSourceBase): ('ParrotDroppings', mod.ParrotDroppings), ('StupidGit', mod.StupidGit), ('Tit', mod.MalodorousPervert), + ('WhichComments', mod.WhichComments), ]) tree = inspect.getclasstree([cls[1] for cls in classes]) self.assertEqual(tree, @@ -403,7 +404,8 @@ class TestRetrievingSourceCode(GetSourceBase): [(mod.FesteringGob, (mod.MalodorousPervert, mod.ParrotDroppings)) ] - ] + ], + (mod.WhichComments, (object,),) ] ]) tree = inspect.getclasstree([cls[1] for cls in classes], True) @@ -415,7 +417,8 @@ class TestRetrievingSourceCode(GetSourceBase): [(mod.FesteringGob, (mod.MalodorousPervert, mod.ParrotDroppings)) ] - ] + ], + (mod.WhichComments, (object,),) ] ]) @@ -646,6 +649,18 @@ class TestOneliners(GetSourceBase): # as argument to another function. self.assertSourceEqual(mod2.anonymous, 55, 55) +class TestBlockComments(GetSourceBase): + fodderModule = mod + + def test_toplevel_class(self): + self.assertSourceEqual(mod.WhichComments, 96, 114) + + def test_class_method(self): + self.assertSourceEqual(mod.WhichComments.f, 99, 104) + + def test_class_async_method(self): + self.assertSourceEqual(mod.WhichComments.asyncf, 109, 112) + class TestBuggyCases(GetSourceBase): fodderModule = mod2 @@ -697,6 +712,17 @@ class TestBuggyCases(GetSourceBase): self.assertRaises(IOError, inspect.findsource, co) self.assertRaises(IOError, inspect.getsource, co) + def test_findsource_with_out_of_bounds_lineno(self): + mod_len = len(inspect.getsource(mod)) + src = '\n' * 2* mod_len + "def f(): pass" + co = compile(src, mod.__file__, "exec") + g, l = {}, {} + eval(co, g, l) + func = l['f'] + self.assertEqual(func.__code__.co_firstlineno, 1+2*mod_len) + with self.assertRaisesRegex(IOError, "lineno is out of bounds"): + inspect.findsource(func) + def test_getsource_on_method(self): self.assertSourceEqual(mod2.ClassWithMethod.method, 118, 119) @@ -3224,6 +3250,26 @@ class TestSignatureObject(unittest.TestCase): p2 = inspect.signature(lambda y, x: None).parameters self.assertNotEqual(p1, p2) + def test_signature_annotations_with_local_namespaces(self): + class Foo: ... + def func(foo: Foo) -> int: pass + def func2(foo: Foo, bar: Bar) -> int: pass + + for signature_func in (inspect.signature, inspect.Signature.from_callable): + with self.subTest(signature_func = signature_func): + sig1 = signature_func(func) + self.assertEqual(sig1.return_annotation, 'int') + self.assertEqual(sig1.parameters['foo'].annotation, 'Foo') + + sig2 = signature_func(func, localns=locals()) + self.assertEqual(sig2.return_annotation, int) + self.assertEqual(sig2.parameters['foo'].annotation, Foo) + + sig3 = signature_func(func2, globalns={'Bar': int}, localns=locals()) + self.assertEqual(sig3.return_annotation, int) + self.assertEqual(sig3.parameters['foo'].annotation, Foo) + self.assertEqual(sig3.parameters['bar'].annotation, int) + class TestParameterObject(unittest.TestCase): def test_signature_parameter_kinds(self): @@ -4014,8 +4060,8 @@ def foo(): def test_main(): run_unittest( - TestDecorators, TestRetrievingSourceCode, TestOneliners, TestBuggyCases, - TestInterpreterStack, TestClassesAndFunctions, TestPredicates, + TestDecorators, TestRetrievingSourceCode, TestOneliners, TestBlockComments, + TestBuggyCases, TestInterpreterStack, TestClassesAndFunctions, TestPredicates, TestGetcallargsFunctions, TestGetcallargsMethods, TestGetcallargsUnboundMethods, TestGetattrStatic, TestGetGeneratorState, TestNoEOL, TestSignatureObject, TestSignatureBind, TestParameterObject, diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index eaa6197bec3..a99b5e2bb71 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -12,6 +12,8 @@ from functools import reduce import sys import struct import threading +import gc + maxsize = support.MAX_Py_ssize_t minsize = -maxsize-1 @@ -1024,6 +1026,25 @@ class TestBasicOps(unittest.TestCase): self.assertEqual(next(it), (1, 2)) self.assertRaises(RuntimeError, next, it) + def test_pairwise(self): + self.assertEqual(list(pairwise('')), []) + self.assertEqual(list(pairwise('a')), []) + self.assertEqual(list(pairwise('ab')), + [('a', 'b')]), + self.assertEqual(list(pairwise('abcde')), + [('a', 'b'), ('b', 'c'), ('c', 'd'), ('d', 'e')]) + self.assertEqual(list(pairwise(range(10_000))), + list(zip(range(10_000), range(1, 10_000)))) + + with self.assertRaises(TypeError): + pairwise() # too few arguments + with self.assertRaises(TypeError): + pairwise('abc', 10) # too many arguments + with self.assertRaises(TypeError): + pairwise(iterable='abc') # keyword arguments + with self.assertRaises(TypeError): + pairwise(None) # non-iterable argument + def test_product(self): for args, result in [ ([], [()]), # zero iterables @@ -1554,6 +1575,51 @@ class TestBasicOps(unittest.TestCase): self.assertRaises(StopIteration, next, f(lambda x:x, [])) self.assertRaises(StopIteration, next, f(lambda x:x, StopNow())) + @support.cpython_only + def test_combinations_result_gc(self): + # bpo-42536: combinations's tuple-reuse speed trick breaks the GC's + # assumptions about what can be untracked. Make sure we re-track result + # tuples whenever we reuse them. + it = combinations([None, []], 1) + next(it) + gc.collect() + # That GC collection probably untracked the recycled internal result + # tuple, which has the value (None,). Make sure it's re-tracked when + # it's mutated and returned from __next__: + self.assertTrue(gc.is_tracked(next(it))) + + @support.cpython_only + def test_combinations_with_replacement_result_gc(self): + # Ditto for combinations_with_replacement. + it = combinations_with_replacement([None, []], 1) + next(it) + gc.collect() + self.assertTrue(gc.is_tracked(next(it))) + + @support.cpython_only + def test_permutations_result_gc(self): + # Ditto for permutations. + it = permutations([None, []], 1) + next(it) + gc.collect() + self.assertTrue(gc.is_tracked(next(it))) + + @support.cpython_only + def test_product_result_gc(self): + # Ditto for product. + it = product([None, []]) + next(it) + gc.collect() + self.assertTrue(gc.is_tracked(next(it))) + + @support.cpython_only + def test_zip_longest_result_gc(self): + # Ditto for zip_longest. + it = zip_longest([[]]) + gc.collect() + self.assertTrue(gc.is_tracked(next(it))) + + class TestExamples(unittest.TestCase): def test_accumulate(self): @@ -1787,6 +1853,10 @@ class TestGC(unittest.TestCase): a = [] self.makecycle(islice([a]*2, None), a) + def test_pairwise(self): + a = [] + self.makecycle(pairwise([a]*5), a) + def test_permutations(self): a = [] self.makecycle(permutations([1,2,a,3], 3), a) @@ -1995,6 +2065,17 @@ class TestVariousIteratorArgs(unittest.TestCase): self.assertRaises(TypeError, islice, N(s), 10) self.assertRaises(ZeroDivisionError, list, islice(E(s), 10)) + def test_pairwise(self): + for s in ("123", "", range(1000), ('do', 1.2), range(2000,2200,5)): + for g in (G, I, Ig, S, L, R): + seq = list(g(s)) + expected = list(zip(seq, seq[1:])) + actual = list(pairwise(g(s))) + self.assertEqual(actual, expected) + self.assertRaises(TypeError, pairwise, X(s)) + self.assertRaises(TypeError, pairwise, N(s)) + self.assertRaises(ZeroDivisionError, list, pairwise(E(s))) + def test_starmap(self): for s in (range(10), range(0), range(100), (7,11), range(20,50,5)): for g in (G, I, Ig, S, L, R): @@ -2290,7 +2371,7 @@ Samuele ... "Count how many times the predicate is true" ... return sum(map(pred, iterable)) ->>> def padnone(iterable): +>>> def pad_none(iterable): ... "Returns the sequence elements and then returns None indefinitely" ... return chain(iterable, repeat(None)) @@ -2312,15 +2393,6 @@ Samuele ... else: ... return starmap(func, repeat(args, times)) ->>> def pairwise(iterable): -... "s -> (s0,s1), (s1,s2), (s2, s3), ..." -... a, b = tee(iterable) -... try: -... next(b) -... except StopIteration: -... pass -... return zip(a, b) - >>> def grouper(n, iterable, fillvalue=None): ... "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx" ... args = [iter(iterable)] * n @@ -2451,16 +2523,7 @@ True >>> take(5, map(int, repeatfunc(random.random))) [0, 0, 0, 0, 0] ->>> list(pairwise('abcd')) -[('a', 'b'), ('b', 'c'), ('c', 'd')] - ->>> list(pairwise([])) -[] - ->>> list(pairwise('a')) -[] - ->>> list(islice(padnone('abc'), 0, 6)) +>>> list(islice(pad_none('abc'), 0, 6)) ['a', 'b', 'c', None, None, None] >>> list(ncycles('abc', 3)) diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index e2196736dcd..859baa4738b 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -4219,6 +4219,15 @@ class ModuleLevelMiscTest(BaseTest): logging.disable(83) self.assertEqual(logging.root.manager.disable, 83) + self.assertRaises(ValueError, logging.disable, "doesnotexists") + + class _NotAnIntOrString: + pass + + self.assertRaises(TypeError, logging.disable, _NotAnIntOrString()) + + logging.disable("WARN") + # test the default value introduced in 3.7 # (Issue #28524) logging.disable() diff --git a/Lib/test/test_mailcap.py b/Lib/test/test_mailcap.py index 51a0c7da8bb..ef9cad498a7 100644 --- a/Lib/test/test_mailcap.py +++ b/Lib/test/test_mailcap.py @@ -4,6 +4,7 @@ import copy import test.support from test.support import os_helper import unittest +import sys # Location of mailcap file MAILCAPFILE = test.support.findfile("mailcap.txt") @@ -214,6 +215,7 @@ class FindmatchTest(unittest.TestCase): self._run_cases(cases) @unittest.skipUnless(os.name == "posix", "Requires 'test' command on system") + @unittest.skipIf(sys.platform == "vxworks", "'test' command is not supported on VxWorks") def test_test(self): # findmatch() will automatically check any "test" conditions and skip # the entry if the check fails. diff --git a/Lib/test/test_netrc.py b/Lib/test/test_netrc.py index 2bd46aa745f..90ef5cd363b 100644 --- a/Lib/test/test_netrc.py +++ b/Lib/test/test_netrc.py @@ -109,62 +109,56 @@ class NetrcTestCase(unittest.TestCase): def test_security(self): # This test is incomplete since we are normally not run as root and # therefore can't test the file ownership being wrong. - d = os_helper.TESTFN - os.mkdir(d) - self.addCleanup(os_helper.rmtree, d) - fn = os.path.join(d, '.netrc') - with open(fn, 'wt') as f: - f.write("""\ - machine foo.domain.com login bar password pass - default login foo password pass - """) - with os_helper.EnvironmentVarGuard() as environ: - environ.set('HOME', d) - os.chmod(fn, 0o600) - nrc = netrc.netrc() - self.assertEqual(nrc.hosts['foo.domain.com'], - ('bar', None, 'pass')) - os.chmod(fn, 0o622) - self.assertRaises(netrc.NetrcParseError, netrc.netrc) + with os_helper.temp_cwd(None) as d: + fn = os.path.join(d, '.netrc') + with open(fn, 'wt') as f: + f.write("""\ + machine foo.domain.com login bar password pass + default login foo password pass + """) + with os_helper.EnvironmentVarGuard() as environ: + environ.set('HOME', d) + os.chmod(fn, 0o600) + nrc = netrc.netrc() + self.assertEqual(nrc.hosts['foo.domain.com'], + ('bar', None, 'pass')) + os.chmod(fn, 0o622) + self.assertRaises(netrc.NetrcParseError, netrc.netrc) def test_file_not_found_in_home(self): - d = os_helper.TESTFN - os.mkdir(d) - self.addCleanup(os_helper.rmtree, d) - with os_helper.EnvironmentVarGuard() as environ: - environ.set('HOME', d) - self.assertRaises(FileNotFoundError, netrc.netrc) + with os_helper.temp_cwd(None) as d: + with os_helper.EnvironmentVarGuard() as environ: + environ.set('HOME', d) + self.assertRaises(FileNotFoundError, netrc.netrc) def test_file_not_found_explicit(self): self.assertRaises(FileNotFoundError, netrc.netrc, file='unlikely_netrc') def test_home_not_set(self): - fake_home = os_helper.TESTFN - os.mkdir(fake_home) - self.addCleanup(os_helper.rmtree, fake_home) - fake_netrc_path = os.path.join(fake_home, '.netrc') - with open(fake_netrc_path, 'w') as f: - f.write('machine foo.domain.com login bar password pass') - os.chmod(fake_netrc_path, 0o600) + with os_helper.temp_cwd(None) as fake_home: + fake_netrc_path = os.path.join(fake_home, '.netrc') + with open(fake_netrc_path, 'w') as f: + f.write('machine foo.domain.com login bar password pass') + os.chmod(fake_netrc_path, 0o600) - orig_expanduser = os.path.expanduser - called = [] + orig_expanduser = os.path.expanduser + called = [] - def fake_expanduser(s): - called.append(s) - with os_helper.EnvironmentVarGuard() as environ: - environ.set('HOME', fake_home) - environ.set('USERPROFILE', fake_home) - result = orig_expanduser(s) - return result + def fake_expanduser(s): + called.append(s) + with os_helper.EnvironmentVarGuard() as environ: + environ.set('HOME', fake_home) + environ.set('USERPROFILE', fake_home) + result = orig_expanduser(s) + return result - with support.swap_attr(os.path, 'expanduser', fake_expanduser): - nrc = netrc.netrc() - login, account, password = nrc.authenticators('foo.domain.com') - self.assertEqual(login, 'bar') + with support.swap_attr(os.path, 'expanduser', fake_expanduser): + nrc = netrc.netrc() + login, account, password = nrc.authenticators('foo.domain.com') + self.assertEqual(login, 'bar') - self.assertTrue(called) + self.assertTrue(called) if __name__ == "__main__": diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index b11c19c84d3..4dbf941036f 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -82,7 +82,7 @@ class NetworkedNNTPTestsMixin: desc = self.server.description(self.GROUP_NAME) _check_desc(desc) # Another sanity check - self.assertIn("Python", desc) + self.assertIn(self.DESC, desc) # With a pattern desc = self.server.description(self.GROUP_PAT) _check_desc(desc) @@ -309,6 +309,7 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase): NNTP_HOST = 'news.trigofacile.com' GROUP_NAME = 'fr.comp.lang.python' GROUP_PAT = 'fr.comp.lang.*' + DESC = 'Python' NNTP_CLASS = NNTP @@ -343,8 +344,11 @@ class NetworkedNNTP_SSLTests(NetworkedNNTPTests): # 400 connections per day are accepted from each IP address." NNTP_HOST = 'nntp.aioe.org' - GROUP_NAME = 'comp.lang.python' - GROUP_PAT = 'comp.lang.*' + # bpo-42794: aioe.test is one of the official groups on this server + # used for testing: https://news.aioe.org/manual/aioe-hierarchy/ + GROUP_NAME = 'aioe.test' + GROUP_PAT = 'aioe.*' + DESC = 'test' NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None) diff --git a/Lib/test/test_ordered_dict.py b/Lib/test/test_ordered_dict.py index 31759f20d28..eb404463e92 100644 --- a/Lib/test/test_ordered_dict.py +++ b/Lib/test/test_ordered_dict.py @@ -700,6 +700,17 @@ class OrderedDictTests: with self.assertRaises(ValueError): a |= "BAD" + @support.cpython_only + def test_ordered_dict_items_result_gc(self): + # bpo-42536: OrderedDict.items's tuple-reuse speed trick breaks the GC's + # assumptions about what can be untracked. Make sure we re-track result + # tuples whenever we reuse them. + it = iter(self.OrderedDict({None: []}).items()) + gc.collect() + # That GC collection probably untracked the recycled internal result + # tuple, which is initialized to (None, None). Make sure it's re-tracked + # when it's mutated and returned from __next__: + self.assertTrue(gc.is_tracked(next(it))) class PurePythonOrderedDictTests(OrderedDictTests, unittest.TestCase): diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index f127cb199bb..08d7ab8a30b 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -116,6 +116,10 @@ class MiscTests(unittest.TestCase): # than MAX_PATH if long paths support is disabled: # see RtlAreLongPathsEnabled(). min_len = 2000 # characters + # On VxWorks, PATH_MAX is defined as 1024 bytes. Creating a path + # longer than PATH_MAX will fail. + if sys.platform == 'vxworks': + min_len = 1000 dirlen = 200 # characters dirname = 'python_test_dir_' dirname = dirname + ('a' * (dirlen - len(dirname))) @@ -987,6 +991,7 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol): # Bug 1110478 @unittest.skipUnless(unix_shell and os.path.exists(unix_shell), 'requires a shell') + @unittest.skipUnless(hasattr(os, 'popen'), "needs os.popen()") def test_update2(self): os.environ.clear() os.environ.update(HELLO="World") @@ -996,6 +1001,7 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol): @unittest.skipUnless(unix_shell and os.path.exists(unix_shell), 'requires a shell') + @unittest.skipUnless(hasattr(os, 'popen'), "needs os.popen()") def test_os_popen_iter(self): with os.popen("%s -c 'echo \"line1\nline2\nline3\"'" % unix_shell) as popen: diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py index 5e5e065b988..9be72941d33 100644 --- a/Lib/test/test_pathlib.py +++ b/Lib/test/test_pathlib.py @@ -2219,6 +2219,8 @@ class _BasePathTest(object): self.assertIs((P / 'fileA\x00').is_fifo(), False) @unittest.skipUnless(hasattr(os, "mkfifo"), "os.mkfifo() required") + @unittest.skipIf(sys.platform == "vxworks", + "fifo requires special path on VxWorks") def test_is_fifo_true(self): P = self.cls(BASE, 'myfifo') try: @@ -2465,6 +2467,8 @@ class PosixPathTest(_BasePathTest, unittest.TestCase): @unittest.skipUnless(hasattr(pwd, 'getpwall'), 'pwd module does not expose getpwall()') + @unittest.skipIf(sys.platform == "vxworks", + "no home directory on VxWorks") def test_expanduser(self): P = self.cls import_helper.import_module('pwd') diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py index 92a82cc54f2..4034154e4dc 100644 --- a/Lib/test/test_peepholer.py +++ b/Lib/test/test_peepholer.py @@ -409,21 +409,6 @@ class TestTranforms(BytecodeTestCase): self.assertLessEqual(len(returns), 6) self.check_lnotab(f) - def test_elim_jump_after_return2(self): - # Eliminate dead code: jumps immediately after returns can't be reached - def f(cond1, cond2): - while 1: - if cond1: return 4 - self.assertNotInBytecode(f, 'JUMP_FORWARD') - # There should be one jump for the while loop. - jumps = [instr for instr in dis.get_instructions(f) - if 'JUMP' in instr.opname] - self.assertEqual(len(jumps), 1) - returns = [instr for instr in dis.get_instructions(f) - if instr.opname == 'RETURN_VALUE'] - self.assertLessEqual(len(returns), 2) - self.check_lnotab(f) - def test_make_function_doesnt_bail(self): def f(): def g()->1+1: diff --git a/Lib/test/test_peg_generator/test_grammar_validator.py b/Lib/test/test_peg_generator/test_grammar_validator.py new file mode 100644 index 00000000000..2e72ff8df28 --- /dev/null +++ b/Lib/test/test_peg_generator/test_grammar_validator.py @@ -0,0 +1,51 @@ +import unittest +from test import test_tools + +test_tools.skip_if_missing('peg_generator') +with test_tools.imports_under_tool('peg_generator'): + from pegen.grammar_parser import GeneratedParser as GrammarParser + from pegen.validator import SubRuleValidator, ValidationError + from pegen.testutil import parse_string + from pegen.grammar import Grammar + + +class TestPegen(unittest.TestCase): + def test_rule_with_no_collision(self) -> None: + grammar_source = """ + start: bad_rule + sum: + | NAME '-' NAME + | NAME '+' NAME + """ + grammar: Grammar = parse_string(grammar_source, GrammarParser) + validator = SubRuleValidator(grammar) + for rule_name, rule in grammar.rules.items(): + validator.validate_rule(rule_name, rule) + + def test_rule_with_simple_collision(self) -> None: + grammar_source = """ + start: bad_rule + sum: + | NAME '+' NAME + | NAME '+' NAME ';' + """ + grammar: Grammar = parse_string(grammar_source, GrammarParser) + validator = SubRuleValidator(grammar) + with self.assertRaises(ValidationError): + for rule_name, rule in grammar.rules.items(): + validator.validate_rule(rule_name, rule) + + def test_rule_with_collision_after_some_other_rules(self) -> None: + grammar_source = """ + start: bad_rule + sum: + | NAME '+' NAME + | NAME '*' NAME ';' + | NAME '-' NAME + | NAME '+' NAME ';' + """ + grammar: Grammar = parse_string(grammar_source, GrammarParser) + validator = SubRuleValidator(grammar) + with self.assertRaises(ValidationError): + for rule_name, rule in grammar.rules.items(): + validator.validate_rule(rule_name, rule) diff --git a/Lib/test/test_pipes.py b/Lib/test/test_pipes.py index 7d8cd54ba0e..6a13b36d1cb 100644 --- a/Lib/test/test_pipes.py +++ b/Lib/test/test_pipes.py @@ -3,13 +3,16 @@ import os import string import unittest import shutil -from test.support import run_unittest, reap_children +from test.support import run_unittest, reap_children, unix_shell from test.support.os_helper import TESTFN, unlink if os.name != 'posix': raise unittest.SkipTest('pipes module only works on posix') +if not (unix_shell and os.path.exists(unix_shell)): + raise unittest.SkipTest('pipes module requires a shell') + TESTFN2 = TESTFN + "2" # tr a-z A-Z is not portable, so make the ranges explicit diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 1590cd509b9..1a688775f46 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -1,4 +1,6 @@ import os +import copy +import pickle import platform import subprocess import sys @@ -8,12 +10,70 @@ from unittest import mock from test import support from test.support import os_helper +FEDORA_OS_RELEASE = """\ +NAME=Fedora +VERSION="32 (Thirty Two)" +ID=fedora +VERSION_ID=32 +VERSION_CODENAME="" +PLATFORM_ID="platform:f32" +PRETTY_NAME="Fedora 32 (Thirty Two)" +ANSI_COLOR="0;34" +LOGO=fedora-logo-icon +CPE_NAME="cpe:/o:fedoraproject:fedora:32" +HOME_URL="https://fedoraproject.org/" +DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f32/system-administrators-guide/" +SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" +BUG_REPORT_URL="https://bugzilla.redhat.com/" +REDHAT_BUGZILLA_PRODUCT="Fedora" +REDHAT_BUGZILLA_PRODUCT_VERSION=32 +REDHAT_SUPPORT_PRODUCT="Fedora" +REDHAT_SUPPORT_PRODUCT_VERSION=32 +PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" +""" + +UBUNTU_OS_RELEASE = """\ +NAME="Ubuntu" +VERSION="20.04.1 LTS (Focal Fossa)" +ID=ubuntu +ID_LIKE=debian +PRETTY_NAME="Ubuntu 20.04.1 LTS" +VERSION_ID="20.04" +HOME_URL="https://www.ubuntu.com/" +SUPPORT_URL="https://help.ubuntu.com/" +BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" +PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" +VERSION_CODENAME=focal +UBUNTU_CODENAME=focal +""" + +TEST_OS_RELEASE = r""" +# test data +ID_LIKE="egg spam viking" +EMPTY= +# comments and empty lines are ignored + +SINGLE_QUOTE='single' +EMPTY_SINGLE='' +DOUBLE_QUOTE="double" +EMPTY_DOUBLE="" +QUOTES="double\'s" +SPECIALS="\$\`\\\'\"" +# invalid lines +=invalid += +INVALID +IN-VALID=value +IN VALID=value +""" + class PlatformTest(unittest.TestCase): def clear_caches(self): platform._platform_cache.clear() platform._sys_version_cache.clear() platform._uname_cache = None + platform._os_release_cache = None def test_architecture(self): res = platform.architecture() @@ -176,6 +236,38 @@ class PlatformTest(unittest.TestCase): ) self.assertEqual(tuple(res), expected) + def test_uname_replace(self): + res = platform.uname() + new = res._replace( + system='system', node='node', release='release', + version='version', machine='machine') + self.assertEqual(new.system, 'system') + self.assertEqual(new.node, 'node') + self.assertEqual(new.release, 'release') + self.assertEqual(new.version, 'version') + self.assertEqual(new.machine, 'machine') + # processor cannot be replaced + self.assertEqual(new.processor, res.processor) + + def test_uname_copy(self): + uname = platform.uname() + self.assertEqual(copy.copy(uname), uname) + self.assertEqual(copy.deepcopy(uname), uname) + + def test_uname_pickle(self): + orig = platform.uname() + for proto in range(pickle.HIGHEST_PROTOCOL + 1): + with self.subTest(protocol=proto): + pickled = pickle.dumps(orig, proto) + restored = pickle.loads(pickled) + self.assertEqual(restored, orig) + + def test_uname_slices(self): + res = platform.uname() + expected = tuple(res) + self.assertEqual(res[:], expected) + self.assertEqual(res[:5], expected[:5]) + @unittest.skipIf(sys.platform in ['win32', 'OpenVMS'], "uname -p not used") def test_uname_processor(self): """ @@ -382,6 +474,54 @@ class PlatformTest(unittest.TestCase): self.assertEqual(platform.platform(terse=1), expected_terse) self.assertEqual(platform.platform(), expected) + def test_freedesktop_os_release(self): + self.addCleanup(self.clear_caches) + self.clear_caches() + + if any(os.path.isfile(fn) for fn in platform._os_release_candidates): + info = platform.freedesktop_os_release() + self.assertIn("NAME", info) + self.assertIn("ID", info) + + info["CPYTHON_TEST"] = "test" + self.assertNotIn( + "CPYTHON_TEST", + platform.freedesktop_os_release() + ) + else: + with self.assertRaises(OSError): + platform.freedesktop_os_release() + + def test_parse_os_release(self): + info = platform._parse_os_release(FEDORA_OS_RELEASE.splitlines()) + self.assertEqual(info["NAME"], "Fedora") + self.assertEqual(info["ID"], "fedora") + self.assertNotIn("ID_LIKE", info) + self.assertEqual(info["VERSION_CODENAME"], "") + + info = platform._parse_os_release(UBUNTU_OS_RELEASE.splitlines()) + self.assertEqual(info["NAME"], "Ubuntu") + self.assertEqual(info["ID"], "ubuntu") + self.assertEqual(info["ID_LIKE"], "debian") + self.assertEqual(info["VERSION_CODENAME"], "focal") + + info = platform._parse_os_release(TEST_OS_RELEASE.splitlines()) + expected = { + "ID": "linux", + "NAME": "Linux", + "PRETTY_NAME": "Linux", + "ID_LIKE": "egg spam viking", + "EMPTY": "", + "DOUBLE_QUOTE": "double", + "EMPTY_DOUBLE": "", + "SINGLE_QUOTE": "single", + "EMPTY_SINGLE": "", + "QUOTES": "double's", + "SPECIALS": "$`\\'\"", + } + self.assertEqual(info, expected) + self.assertEqual(len(info["SPECIALS"]), 5) + if __name__ == '__main__': unittest.main() diff --git a/Lib/test/test_popen.py b/Lib/test/test_popen.py index ab1bc776552..cac2f6177f3 100644 --- a/Lib/test/test_popen.py +++ b/Lib/test/test_popen.py @@ -7,6 +7,9 @@ import unittest from test import support import os, sys +if not hasattr(os, 'popen'): + raise unittest.SkipTest("need os.popen()") + # Test that command-lines get down as we expect. # To do this we execute: # python -c "import sys;print(sys.argv)" {rest_of_commandline} diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index a522717751a..588c86994b4 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -642,12 +642,17 @@ class PosixTester(unittest.TestCase): @unittest.skipUnless(hasattr(posix, 'mkfifo'), "don't have mkfifo()") def test_mkfifo(self): - os_helper.unlink(os_helper.TESTFN) + if sys.platform == "vxworks": + fifo_path = os.path.join("/fifos/", os_helper.TESTFN) + else: + fifo_path = os_helper.TESTFN + os_helper.unlink(fifo_path) + self.addCleanup(os_helper.unlink, fifo_path) try: - posix.mkfifo(os_helper.TESTFN, stat.S_IRUSR | stat.S_IWUSR) + posix.mkfifo(fifo_path, stat.S_IRUSR | stat.S_IWUSR) except PermissionError as e: self.skipTest('posix.mkfifo(): %s' % e) - self.assertTrue(stat.S_ISFIFO(posix.stat(os_helper.TESTFN).st_mode)) + self.assertTrue(stat.S_ISFIFO(posix.stat(fifo_path).st_mode)) @unittest.skipUnless(hasattr(posix, 'mknod') and hasattr(stat, 'S_IFIFO'), "don't have mknod()/S_IFIFO") @@ -719,11 +724,20 @@ class PosixTester(unittest.TestCase): chown_func(first_param, uid, -1) check_stat(uid, gid) - if uid == 0: + if sys.platform == "vxworks": + # On VxWorks, root user id is 1 and 0 means no login user: + # both are super users. + is_root = (uid in (0, 1)) + else: + is_root = (uid == 0) + if is_root: # Try an amusingly large uid/gid to make sure we handle # large unsigned values. (chown lets you use any # uid/gid you like, even if they aren't defined.) # + # On VxWorks uid_t is defined as unsigned short. A big + # value greater than 65535 will result in underflow error. + # # This problem keeps coming up: # http://bugs.python.org/issue1747858 # http://bugs.python.org/issue4591 @@ -733,7 +747,7 @@ class PosixTester(unittest.TestCase): # This part of the test only runs when run as root. # Only scary people run their tests as root. - big_value = 2**31 + big_value = (2**31 if sys.platform != "vxworks" else 2**15) chown_func(first_param, big_value, big_value) check_stat(big_value, big_value) chown_func(first_param, -1, -1) @@ -1040,6 +1054,7 @@ class PosixTester(unittest.TestCase): @unittest.skipUnless(hasattr(os, 'getegid'), "test needs os.getegid()") + @unittest.skipUnless(hasattr(os, 'popen'), "test needs os.popen()") def test_getgroups(self): with os.popen('id -G 2>/dev/null') as idg: groups = idg.read().strip() @@ -1056,7 +1071,7 @@ class PosixTester(unittest.TestCase): if sys.platform == 'darwin': import sysconfig dt = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.0' - if tuple(int(n) for n in dt.split('.')[0:2]) < (10, 6): + if tuple(int(n) for n in str(dt).split('.')[0:2]) < (10, 6): raise unittest.SkipTest("getgroups(2) is broken prior to 10.6") # 'id -G' and 'os.getgroups()' should return the same @@ -1089,7 +1104,8 @@ class PosixTester(unittest.TestCase): finally: posix.close(f) - @unittest.skipUnless(os.chown in os.supports_dir_fd, "test needs dir_fd support in os.chown()") + @unittest.skipUnless(hasattr(os, 'chown') and (os.chown in os.supports_dir_fd), + "test needs dir_fd support in os.chown()") def test_chown_dir_fd(self): os_helper.unlink(os_helper.TESTFN) os_helper.create_empty_file(os_helper.TESTFN) @@ -1184,7 +1200,9 @@ class PosixTester(unittest.TestCase): posix.close(f) os_helper.rmtree(os_helper.TESTFN + 'dir') - @unittest.skipUnless((os.mknod in os.supports_dir_fd) and hasattr(stat, 'S_IFIFO'), + @unittest.skipUnless(hasattr(os, 'mknod') + and (os.mknod in os.supports_dir_fd) + and hasattr(stat, 'S_IFIFO'), "test requires both stat.S_IFIFO and dir_fd support for os.mknod()") def test_mknod_dir_fd(self): # Test using mknodat() to create a FIFO (the only use specified @@ -1217,7 +1235,8 @@ class PosixTester(unittest.TestCase): posix.close(a) posix.close(b) - @unittest.skipUnless(os.readlink in os.supports_dir_fd, "test needs dir_fd support in os.readlink()") + @unittest.skipUnless(hasattr(os, 'readlink') and (os.readlink in os.supports_dir_fd), + "test needs dir_fd support in os.readlink()") def test_readlink_dir_fd(self): os.symlink(os_helper.TESTFN, os_helper.TESTFN + 'link') f = posix.open(posix.getcwd(), posix.O_RDONLY) @@ -1929,7 +1948,7 @@ class TestPosixSpawnP(unittest.TestCase, _PosixSpawnMixin): class TestPosixWeaklinking(unittest.TestCase): # These test cases verify that weak linking support on macOS works # as expected. These cases only test new behaviour introduced by weak linking, - # regular behaviour is tested by the normal test cases. + # regular behaviour is tested by the normal test cases. # # See the section on Weak Linking in Mac/README.txt for more information. def setUp(self): diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py index 42fd8ef8b17..e18d01f4635 100644 --- a/Lib/test/test_posixpath.py +++ b/Lib/test/test_posixpath.py @@ -1,5 +1,6 @@ import os import posixpath +import sys import unittest from posixpath import realpath, abspath, dirname, basename from test import test_genericpath @@ -262,6 +263,8 @@ class PosixPathTest(unittest.TestCase): self.assertEqual(posixpath.expanduser("~/"), "/") self.assertEqual(posixpath.expanduser("~/foo"), "/foo") + @unittest.skipIf(sys.platform == "vxworks", + "no home directory on VxWorks") def test_expanduser_pwd(self): pwd = import_helper.import_module('pwd') diff --git a/Lib/test/test_property.py b/Lib/test/test_property.py index 172737ade14..7f3813fc8cd 100644 --- a/Lib/test/test_property.py +++ b/Lib/test/test_property.py @@ -204,6 +204,16 @@ class PropertyTests(unittest.TestCase): return 'Second' self.assertEqual(A.__doc__, 'Second') + def test_property_set_name_incorrect_args(self): + p = property() + + for i in (0, 1, 3): + with self.assertRaisesRegex( + TypeError, + fr'^__set_name__\(\) takes 2 positional arguments but {i} were given$' + ): + p.__set_name__(*([0] * i)) + # Issue 5890: subclasses of property do not preserve method __doc__ strings class PropertySub(property): @@ -299,6 +309,46 @@ class PropertySubclassTests(unittest.TestCase): self.assertEqual(Foo.spam.__doc__, "a new docstring") +class _PropertyUnreachableAttribute: + msg_format = None + obj = None + cls = None + + def _format_exc_msg(self, msg): + return self.msg_format.format(msg) + + @classmethod + def setUpClass(cls): + cls.obj = cls.cls() + + def test_get_property(self): + with self.assertRaisesRegex(AttributeError, self._format_exc_msg("unreadable attribute")): + self.obj.foo + + def test_set_property(self): + with self.assertRaisesRegex(AttributeError, self._format_exc_msg("can't set attribute")): + self.obj.foo = None + + def test_del_property(self): + with self.assertRaisesRegex(AttributeError, self._format_exc_msg("can't delete attribute")): + del self.obj.foo + + +class PropertyUnreachableAttributeWithName(_PropertyUnreachableAttribute, unittest.TestCase): + msg_format = "^{} 'foo'$" + + class cls: + foo = property() + + +class PropertyUnreachableAttributeNoName(_PropertyUnreachableAttribute, unittest.TestCase): + msg_format = "^{}$" + + class cls: + pass + + cls.foo = property() + if __name__ == '__main__': unittest.main() diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py index 7de568806ed..190d8d787a2 100644 --- a/Lib/test/test_pty.py +++ b/Lib/test/test_pty.py @@ -17,7 +17,6 @@ import unittest import struct import tty import fcntl -import platform import warnings TEST_STRING_1 = b"I wish to buy a fish license.\n" @@ -74,7 +73,7 @@ def _readline(fd): return reader.readline() def expectedFailureIfStdinIsTTY(fun): - # avoid isatty() for now + # avoid isatty() try: tty.tcgetattr(pty.STDIN_FILENO) return unittest.expectedFailure(fun) @@ -82,12 +81,6 @@ def expectedFailureIfStdinIsTTY(fun): pass return fun -def expectedFailureOnBSD(fun): - PLATFORM = platform.system() - if PLATFORM.endswith("BSD") or PLATFORM == "Darwin": - return unittest.expectedFailure(fun) - return fun - def _get_term_winsz(fd): s = struct.pack("HHHH", 0, 0, 0, 0) return fcntl.ioctl(fd, _TIOCGWINSZ, s) @@ -151,11 +144,16 @@ class PtyTest(unittest.TestCase): new_stdin_winsz = None if self.stdin_rows != None and self.stdin_cols != None: try: + # Modify pty.STDIN_FILENO window size; we need to + # check if pty.openpty() is able to set pty slave + # window size accordingly. debug("Setting pty.STDIN_FILENO window size") - # Set number of columns and rows to be the - # floors of 1/5 of respective original values - target_stdin_winsz = struct.pack("HHHH", self.stdin_rows//5, - self.stdin_cols//5, 0, 0) + debug(f"original size: (rows={self.stdin_rows}, cols={self.stdin_cols})") + target_stdin_rows = self.stdin_rows + 1 + target_stdin_cols = self.stdin_cols + 1 + debug(f"target size: (rows={target_stdin_rows}, cols={target_stdin_cols})") + target_stdin_winsz = struct.pack("HHHH", target_stdin_rows, + target_stdin_cols, 0, 0) _set_term_winsz(pty.STDIN_FILENO, target_stdin_winsz) # Were we able to set the window size @@ -309,7 +307,6 @@ class PtyTest(unittest.TestCase): os.close(master_fd) - @expectedFailureOnBSD def test_master_read(self): debug("Calling pty.openpty()") master_fd, slave_fd = pty.openpty() @@ -319,10 +316,13 @@ class PtyTest(unittest.TestCase): os.close(slave_fd) debug("Reading from master_fd") - with self.assertRaises(OSError): - os.read(master_fd, 1) + try: + data = os.read(master_fd, 1) + except OSError: # Linux + data = b"" os.close(master_fd) + self.assertEqual(data, b"") class SmallPtyTests(unittest.TestCase): """These tests don't spawn children or hang.""" diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index 0c1fdeec991..436f3c98e63 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -11,7 +11,7 @@ from functools import partial from math import log, exp, pi, fsum, sin, factorial from test import support from fractions import Fraction -from collections import Counter +from collections import abc, Counter class TestBasicOps: # Superclass with tests common to all generators. @@ -163,6 +163,22 @@ class TestBasicOps: population = {10, 20, 30, 40, 50, 60, 70} self.gen.sample(population, k=5) + def test_sample_on_seqsets(self): + class SeqSet(abc.Sequence, abc.Set): + def __init__(self, items): + self._items = items + + def __len__(self): + return len(self._items) + + def __getitem__(self, index): + return self._items[index] + + population = SeqSet([2, 4, 1, 3]) + with warnings.catch_warnings(): + warnings.simplefilter("error", DeprecationWarning) + self.gen.sample(population, k=2) + def test_sample_with_counts(self): sample = self.gen.sample @@ -398,6 +414,15 @@ class TestBasicOps: r = _random.Random() self.assertRaises(TypeError, pickle.dumps, r, proto) + @test.support.cpython_only + def test_bug_42008(self): + # _random.Random should call seed with first element of arg tuple + import _random + r1 = _random.Random() + r1.seed(8675309) + r2 = _random.Random(8675309) + self.assertEqual(r1.random(), r2.random()) + def test_bug_1727780(self): # verify that version-2-pickles can be loaded # fine, whether they are created on 32-bit or 64-bit @@ -517,6 +542,26 @@ class SystemRandom_TestBasicOps(TestBasicOps, unittest.TestCase): raises(0, 42, 0) raises(0, 42, 3.14159) + def test_randrange_argument_handling(self): + randrange = self.gen.randrange + with self.assertWarns(DeprecationWarning): + randrange(10.0, 20, 2) + with self.assertWarns(DeprecationWarning): + randrange(10, 20.0, 2) + with self.assertWarns(DeprecationWarning): + randrange(10, 20, 1.0) + with self.assertWarns(DeprecationWarning): + randrange(10, 20, 2.0) + with self.assertWarns(DeprecationWarning): + with self.assertRaises(ValueError): + randrange(10.5) + with self.assertWarns(DeprecationWarning): + with self.assertRaises(ValueError): + randrange(10, 20.5) + with self.assertWarns(DeprecationWarning): + with self.assertRaises(ValueError): + randrange(10, 20, 1.5) + def test_randbelow_logic(self, _log=log, int=int): # check bitcount transition points: 2**i and 2**(i+1)-1 # show that: k = int(1.001 + _log(n, 2)) diff --git a/Lib/test/test_select.py b/Lib/test/test_select.py index 458998a62fd..f63564e6b0e 100644 --- a/Lib/test/test_select.py +++ b/Lib/test/test_select.py @@ -1,7 +1,9 @@ import errno import os import select +import subprocess import sys +import textwrap import unittest from test import support @@ -44,17 +46,27 @@ class SelectTestCase(unittest.TestCase): self.assertIsNot(r, x) self.assertIsNot(w, x) + @unittest.skipUnless(hasattr(os, 'popen'), "need os.popen()") def test_select(self): - cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done' - with os.popen(cmd) as p: - for tout in (0, 1, 2, 4, 8, 16) + (None,)*10: + code = textwrap.dedent(''' + import time + for i in range(10): + print("testing...", flush=True) + time.sleep(0.050) + ''') + cmd = [sys.executable, '-I', '-c', code] + with subprocess.Popen(cmd, stdout=subprocess.PIPE) as proc: + pipe = proc.stdout + for timeout in (0, 1, 2, 4, 8, 16) + (None,)*10: if support.verbose: - print('timeout =', tout) - rfd, wfd, xfd = select.select([p], [], [], tout) - if (rfd, wfd, xfd) == ([], [], []): + print(f'timeout = {timeout}') + rfd, wfd, xfd = select.select([pipe], [], [], timeout) + self.assertEqual(wfd, []) + self.assertEqual(xfd, []) + if not rfd: continue - if (rfd, wfd, xfd) == ([p], [], []): - line = p.readline() + if rfd == [pipe]: + line = pipe.readline() if support.verbose: print(repr(line)) if not line: @@ -62,7 +74,8 @@ class SelectTestCase(unittest.TestCase): print('EOF') break continue - self.fail('Unexpected return values from select():', rfd, wfd, xfd) + self.fail('Unexpected return values from select():', + rfd, wfd, xfd) # Issue 16230: Crash on select resized list def test_select_mutated(self): diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 890f2c7d406..df8dcdcce60 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -280,10 +280,7 @@ class TestRmTree(BaseTest, unittest.TestCase): filename = os.path.join(tmpdir, "tstfile") with self.assertRaises(NotADirectoryError) as cm: shutil.rmtree(filename) - # The reason for this rather odd construct is that Windows sprinkles - # a \*.* at the end of file names. But only sometimes on some buildbots - possible_args = [filename, os.path.join(filename, '*.*')] - self.assertIn(cm.exception.filename, possible_args) + self.assertEqual(cm.exception.filename, filename) self.assertTrue(os.path.exists(filename)) # test that ignore_errors option is honored shutil.rmtree(filename, ignore_errors=True) @@ -296,11 +293,11 @@ class TestRmTree(BaseTest, unittest.TestCase): self.assertIs(errors[0][0], os.scandir) self.assertEqual(errors[0][1], filename) self.assertIsInstance(errors[0][2][1], NotADirectoryError) - self.assertIn(errors[0][2][1].filename, possible_args) + self.assertEqual(errors[0][2][1].filename, filename) self.assertIs(errors[1][0], os.rmdir) self.assertEqual(errors[1][1], filename) self.assertIsInstance(errors[1][2][1], NotADirectoryError) - self.assertIn(errors[1][2][1].filename, possible_args) + self.assertEqual(errors[1][2][1].filename, filename) @unittest.skipIf(sys.platform[:6] == 'cygwin', @@ -683,6 +680,8 @@ class TestCopyTree(BaseTest, unittest.TestCase): # Issue #3002: copyfile and copytree block indefinitely on named pipes @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()') @os_helper.skip_unless_symlink + @unittest.skipIf(sys.platform == "vxworks", + "fifo requires special path on VxWorks") def test_copytree_named_pipe(self): os.mkdir(TESTFN) try: @@ -1206,6 +1205,8 @@ class TestCopy(BaseTest, unittest.TestCase): # Issue #3002: copyfile and copytree block indefinitely on named pipes @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()') + @unittest.skipIf(sys.platform == "vxworks", + "fifo requires special path on VxWorks") def test_copyfile_named_pipe(self): try: os.mkfifo(TESTFN) diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 5a8ff361f96..6a43fe70372 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -519,10 +519,14 @@ class WakeupSocketSignalTests(unittest.TestCase): else: write.setblocking(False) - # Start with large chunk size to reduce the - # number of send needed to fill the buffer. written = 0 - for chunk_size in (2 ** 16, 2 ** 8, 1): + if sys.platform == "vxworks": + CHUNK_SIZES = (1,) + else: + # Start with large chunk size to reduce the + # number of send needed to fill the buffer. + CHUNK_SIZES = (2 ** 16, 2 ** 8, 1) + for chunk_size in CHUNK_SIZES: chunk = b"x" * chunk_size try: while True: @@ -595,6 +599,7 @@ class WakeupSocketSignalTests(unittest.TestCase): @unittest.skipIf(sys.platform == "win32", "Not valid on Windows") +@unittest.skipUnless(hasattr(signal, 'siginterrupt'), "needs signal.siginterrupt()") class SiginterruptTest(unittest.TestCase): def readpipe_interrupted(self, interrupt): @@ -680,6 +685,8 @@ class SiginterruptTest(unittest.TestCase): @unittest.skipIf(sys.platform == "win32", "Not valid on Windows") +@unittest.skipUnless(hasattr(signal, 'getitimer') and hasattr(signal, 'setitimer'), + "needs signal.getitimer() and signal.setitimer()") class ItimerTest(unittest.TestCase): def setUp(self): self.hndl_called = False diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 2e70880f56d..6060288248e 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -36,6 +36,7 @@ if sys.flags.no_site: import site +HAS_USER_SITE = (site.USER_SITE is not None) OLD_SYS_PATH = None @@ -195,6 +196,7 @@ class HelperFunctionsTests(unittest.TestCase): def test__getuserbase(self): self.assertEqual(site._getuserbase(), sysconfig._getuserbase()) + @unittest.skipUnless(HAS_USER_SITE, 'need user site') def test_get_path(self): if sys.platform == 'darwin' and sys._framework: scheme = 'osx_framework_user' @@ -244,6 +246,7 @@ class HelperFunctionsTests(unittest.TestCase): self.assertEqual(rc, 1, "User base not set by PYTHONUSERBASE") + @unittest.skipUnless(HAS_USER_SITE, 'need user site') def test_getuserbase(self): site.USER_BASE = None user_base = site.getuserbase() @@ -261,6 +264,7 @@ class HelperFunctionsTests(unittest.TestCase): self.assertTrue(site.getuserbase().startswith('xoxo'), site.getuserbase()) + @unittest.skipUnless(HAS_USER_SITE, 'need user site') def test_getusersitepackages(self): site.USER_SITE = None site.USER_BASE = None @@ -295,6 +299,7 @@ class HelperFunctionsTests(unittest.TestCase): wanted = os.path.join('xoxo', 'lib', 'site-packages') self.assertEqual(dirs[1], wanted) + @unittest.skipUnless(HAS_USER_SITE, 'need user site') def test_no_home_directory(self): # bpo-10496: getuserbase() and getusersitepackages() must not fail if # the current user has no home directory (if expanduser() returns the diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 5f57ab2f89d..bc280306b15 100755 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1121,9 +1121,11 @@ class GeneralModuleTests(unittest.TestCase): s_good_values = [0, 1, 2, 0xffff] l_good_values = s_good_values + [0xffffffff] l_bad_values = [-1, -2, 1<<32, 1<<1000] - s_bad_values = l_bad_values + [_testcapi.INT_MIN - 1, - _testcapi.INT_MAX + 1] - s_deprecated_values = [1<<16, _testcapi.INT_MAX] + s_bad_values = ( + l_bad_values + + [_testcapi.INT_MIN-1, _testcapi.INT_MAX+1] + + [1 << 16, _testcapi.INT_MAX] + ) for k in s_good_values: socket.ntohs(k) socket.htons(k) @@ -1136,9 +1138,6 @@ class GeneralModuleTests(unittest.TestCase): for k in l_bad_values: self.assertRaises(OverflowError, socket.ntohl, k) self.assertRaises(OverflowError, socket.htonl, k) - for k in s_deprecated_values: - self.assertWarns(DeprecationWarning, socket.ntohs, k) - self.assertWarns(DeprecationWarning, socket.htons, k) def testGetServBy(self): eq = self.assertEqual @@ -1738,6 +1737,7 @@ class GeneralModuleTests(unittest.TestCase): @unittest.skipUnless(socket_helper.IPV6_ENABLED, 'IPv6 required for this test.') @unittest.skipIf(sys.platform == 'win32', 'does not work on Windows') @unittest.skipIf(AIX, 'Symbolic scope id does not work') + @unittest.skipUnless(hasattr(socket, 'if_nameindex'), "test needs socket.if_nameindex()") def test_getaddrinfo_ipv6_scopeid_symbolic(self): # Just pick up any network interface (Linux, Mac OS X) (ifindex, test_interface) = socket.if_nameindex()[0] @@ -1770,6 +1770,7 @@ class GeneralModuleTests(unittest.TestCase): @unittest.skipUnless(socket_helper.IPV6_ENABLED, 'IPv6 required for this test.') @unittest.skipIf(sys.platform == 'win32', 'does not work on Windows') @unittest.skipIf(AIX, 'Symbolic scope id does not work') + @unittest.skipUnless(hasattr(socket, 'if_nameindex'), "test needs socket.if_nameindex()") def test_getnameinfo_ipv6_scopeid_symbolic(self): # Just pick up any network interface. (ifindex, test_interface) = socket.if_nameindex()[0] diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 7cdd115a951..954e0331352 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -277,6 +277,13 @@ class SocketServerTest(unittest.TestCase): t.join() s.server_close() + def test_close_immediately(self): + class MyServer(socketserver.ThreadingMixIn, socketserver.TCPServer): + pass + + server = MyServer((HOST, 0), lambda: None) + server.server_close() + def test_tcpserver_bind_leak(self): # Issue #22435: the server socket wouldn't be closed if bind()/listen() # failed. @@ -491,6 +498,22 @@ class MiscTestCase(unittest.TestCase): self.assertEqual(server.shutdown_called, 1) server.server_close() + def test_threads_reaped(self): + """ + In #37193, users reported a memory leak + due to the saving of every request thread. Ensure that + not all threads are kept forever. + """ + class MyServer(socketserver.ThreadingMixIn, socketserver.TCPServer): + pass + + server = MyServer((HOST, 0), socketserver.StreamRequestHandler) + for n in range(10): + with socket.create_connection(server.server_address): + server.handle_request() + self.assertLess(len(server._threads), 10) + server.server_close() + if __name__ == "__main__": unittest.main() diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index e5cd962e847..67850c34e00 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -391,7 +391,7 @@ class BasicSocketTests(unittest.TestCase): 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') + @unittest.skipUnless(hasattr(os, 'fork'), 'need os.fork') def test_random_fork(self): status = ssl.RAND_status() if not status: diff --git a/Lib/test/test_stat.py b/Lib/test/test_stat.py index 83d09e17f93..2e1e2c349c8 100644 --- a/Lib/test/test_stat.py +++ b/Lib/test/test_stat.py @@ -2,6 +2,7 @@ import unittest import os import socket import sys +from test.support import os_helper from test.support import socket_helper from test.support.import_helper import import_fresh_module from test.support.os_helper import TESTFN @@ -173,11 +174,16 @@ class TestFilemode: @unittest.skipUnless(hasattr(os, 'mkfifo'), 'os.mkfifo not available') def test_fifo(self): + if sys.platform == "vxworks": + fifo_path = os.path.join("/fifos/", TESTFN) + else: + fifo_path = TESTFN + self.addCleanup(os_helper.unlink, fifo_path) try: - os.mkfifo(TESTFN, 0o700) + os.mkfifo(fifo_path, 0o700) except PermissionError as e: self.skipTest('os.mkfifo(): %s' % e) - st_mode, modestr = self.get_mode() + st_mode, modestr = self.get_mode(fifo_path) self.assertEqual(modestr, 'prwx------') self.assertS_IS("FIFO", st_mode) diff --git a/Lib/test/test_statistics.py b/Lib/test/test_statistics.py index 997110732a1..4b8686b6818 100644 --- a/Lib/test/test_statistics.py +++ b/Lib/test/test_statistics.py @@ -1599,6 +1599,27 @@ class TestHarmonicMean(NumericTestCase, AverageMixin, UnivariateTypeMixin): actual = self.func(data*2) self.assertApproxEqual(actual, expected) + def test_with_weights(self): + self.assertEqual(self.func([40, 60], [5, 30]), 56.0) # common case + self.assertEqual(self.func([40, 60], + weights=[5, 30]), 56.0) # keyword argument + self.assertEqual(self.func(iter([40, 60]), + iter([5, 30])), 56.0) # iterator inputs + self.assertEqual( + self.func([Fraction(10, 3), Fraction(23, 5), Fraction(7, 2)], [5, 2, 10]), + self.func([Fraction(10, 3)] * 5 + + [Fraction(23, 5)] * 2 + + [Fraction(7, 2)] * 10)) + self.assertEqual(self.func([10], [7]), 10) # n=1 fast path + with self.assertRaises(TypeError): + self.func([1, 2, 3], [1, (), 3]) # non-numeric weight + with self.assertRaises(statistics.StatisticsError): + self.func([1, 2, 3], [1, 2]) # wrong number of weights + with self.assertRaises(statistics.StatisticsError): + self.func([10], [0]) # no non-zero weights + with self.assertRaises(statistics.StatisticsError): + self.func([10, 20], [0, 0]) # no non-zero weights + class TestMedian(NumericTestCase, AverageMixin): # Common tests for median and all median.* functions. diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 2a4c47530e6..70b54f4155a 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -204,6 +204,28 @@ class ProcessTestCase(BaseTestCase): input=b'pear') self.assertIn(b'PEAR', output) + def test_check_output_input_none(self): + """input=None has a legacy meaning of input='' on check_output.""" + output = subprocess.check_output( + [sys.executable, "-c", + "import sys; print('XX' if sys.stdin.read() else '')"], + input=None) + self.assertNotIn(b'XX', output) + + def test_check_output_input_none_text(self): + output = subprocess.check_output( + [sys.executable, "-c", + "import sys; print('XX' if sys.stdin.read() else '')"], + input=None, text=True) + self.assertNotIn('XX', output) + + def test_check_output_input_none_universal_newlines(self): + output = subprocess.check_output( + [sys.executable, "-c", + "import sys; print('XX' if sys.stdin.read() else '')"], + input=None, universal_newlines=True) + self.assertNotIn('XX', output) + def test_check_output_stdout_arg(self): # check_output() refuses to accept 'stdout' argument with self.assertRaises(ValueError) as c: diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index 91ca1db43a7..d8255607dcf 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -802,6 +802,13 @@ class SyntaxTestCase(unittest.TestCase): else: self.fail("compile() did not raise SyntaxError") + def test_expression_with_assignment(self): + self._check_error( + "print(end1 + end2 = ' ')", + 'expression cannot contain assignment, perhaps you meant "=="?', + offset=19 + ) + def test_curly_brace_after_primary_raises_immediately(self): self._check_error("f{", "invalid syntax", mode="single") diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 173ef9ebb4c..3af5b117aff 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -221,7 +221,7 @@ class SysModuleTest(unittest.TestCase): def f(): f() try: - for depth in (10, 25, 50, 75, 100, 250, 1000): + for depth in (50, 75, 100, 250, 1000): try: sys.setrecursionlimit(depth) except RecursionError: @@ -231,17 +231,17 @@ class SysModuleTest(unittest.TestCase): # Issue #5392: test stack overflow after hitting recursion # limit twice - self.assertRaises(RecursionError, f) - self.assertRaises(RecursionError, f) + with self.assertRaises(RecursionError): + f() + with 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. + # current recursion depth is already higher than limit. from _testinternalcapi import get_recursion_depth @@ -262,42 +262,10 @@ class SysModuleTest(unittest.TestCase): 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) + set_recursion_limit_at_depth(limit, limit) finally: sys.setrecursionlimit(oldlimit) - # The error message is specific to CPython - @test.support.cpython_only - def test_recursionlimit_fatalerror(self): - # A fatal error occurs if a second recursion limit is hit when recovering - # from a first one. - code = textwrap.dedent(""" - import sys - - def f(): - try: - f() - except RecursionError: - f() - - sys.setrecursionlimit(%d) - f()""") - with test.support.SuppressCrashReport(): - for i in (50, 1000): - sub = subprocess.Popen([sys.executable, '-c', code % i], - stderr=subprocess.PIPE) - err = sub.communicate()[1] - self.assertTrue(sub.returncode, sub.returncode) - self.assertIn( - b"Fatal Python error: _Py_CheckRecursiveCall: " - b"Cannot recover from stack overflow", - err) - def test_getwindowsversion(self): # Raise SkipTest if sys doesn't have getwindowsversion attribute test.support.get_attribute(sys, "getwindowsversion") @@ -1361,7 +1329,7 @@ class SizeofTest(unittest.TestCase): def setx(self, value): self.__x = value def delx(self): del self.__x x = property(getx, setx, delx, "") - check(x, size('4Pi')) + check(x, size('5Pi')) # PyCapsule # XXX # rangeiterator diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py index ccdb5c2c51a..50b5672e35a 100644 --- a/Lib/test/test_sys_settrace.py +++ b/Lib/test/test_sys_settrace.py @@ -53,9 +53,8 @@ basic.events = [(0, 'call'), # following that clause? -# Some constructs like "while 0:", "if 0:" or "if 1:...else:..." are optimized -# away. No code # exists for them, so the line numbers skip directly from -# "del x" to "x = 1". +# Some constructs like "while 0:", "if 0:" or "if 1:...else:..." could be optimized +# away. Make sure that those lines aren't skipped. def arigo_example0(): x = 1 del x @@ -66,6 +65,7 @@ def arigo_example0(): arigo_example0.events = [(0, 'call'), (1, 'line'), (2, 'line'), + (3, 'line'), (5, 'line'), (5, 'return')] @@ -79,6 +79,7 @@ def arigo_example1(): arigo_example1.events = [(0, 'call'), (1, 'line'), (2, 'line'), + (3, 'line'), (5, 'line'), (5, 'return')] @@ -94,6 +95,7 @@ def arigo_example2(): arigo_example2.events = [(0, 'call'), (1, 'line'), (2, 'line'), + (3, 'line'), (4, 'line'), (7, 'line'), (7, 'return')] @@ -236,9 +238,13 @@ tightloop_example.events = [(0, 'call'), (1, 'line'), (2, 'line'), (3, 'line'), + (4, 'line'), (5, 'line'), + (4, 'line'), (5, 'line'), + (4, 'line'), (5, 'line'), + (4, 'line'), (5, 'line'), (5, 'exception'), (6, 'line'), @@ -629,6 +635,245 @@ class TraceTestCase(unittest.TestCase): (3, 'line'), (3, 'return')]) + def test_try_except_no_exception(self): + + def func(): + try: + 2 + except: + 4 + finally: + 6 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (6, 'line'), + (6, 'return')]) + + def test_nested_loops(self): + + def func(): + for i in range(2): + for j in range(2): + a = i + j + return a == 1 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (2, 'line'), + (3, 'line'), + (2, 'line'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (2, 'line'), + (3, 'line'), + (2, 'line'), + (1, 'line'), + (4, 'line'), + (4, 'return')]) + + def test_if_break(self): + + def func(): + seq = [1, 0] + while seq: + n = seq.pop() + if n: + break # line 5 + else: + n = 99 + return n # line 8 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (4, 'line'), + (2, 'line'), + (3, 'line'), + (4, 'line'), + (5, 'line'), + (8, 'line'), + (8, 'return')]) + + def test_break_through_finally(self): + + def func(): + a, c, d, i = 1, 1, 1, 99 + try: + for i in range(3): + try: + a = 5 + if i > 0: + break # line 7 + a = 8 + finally: + c = 10 + except: + d = 12 # line 12 + assert a == 5 and c == 10 and d == 1 # line 13 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (4, 'line'), + (5, 'line'), + (6, 'line'), + (8, 'line'), + (10, 'line'), + (3, 'line'), + (4, 'line'), + (5, 'line'), + (6, 'line'), + (7, 'line'), + (10, 'line'), + (13, 'line'), + (13, 'return')]) + + def test_continue_through_finally(self): + + def func(): + a, b, c, d, i = 1, 1, 1, 1, 99 + try: + for i in range(2): + try: + a = 5 + if i > 0: + continue # line 7 + b = 8 + finally: + c = 10 + except: + d = 12 # line 12 + assert (a, b, c, d) == (5, 8, 10, 1) # line 13 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (4, 'line'), + (5, 'line'), + (6, 'line'), + (8, 'line'), + (10, 'line'), + (3, 'line'), + (4, 'line'), + (5, 'line'), + (6, 'line'), + (7, 'line'), + (10, 'line'), + (3, 'line'), + (13, 'line'), + (13, 'return')]) + + def test_return_through_finally(self): + + def func(): + try: + return 2 + finally: + 4 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (4, 'line'), + (4, 'return')]) + + def test_try_except_with_wrong_type(self): + + def func(): + try: + 2/0 + except IndexError: + 4 + finally: + return 6 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (2, 'exception'), + (3, 'line'), + (6, 'line'), + (6, 'return')]) + + def test_break_to_continue1(self): + + def func(): + TRUE = 1 + x = [1] + while x: + x.pop() + while TRUE: + break + continue + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (4, 'line'), + (5, 'line'), + (6, 'line'), + (7, 'line'), + (3, 'line'), + (3, 'return')]) + + def test_break_to_continue2(self): + + def func(): + TRUE = 1 + x = [1] + while x: + x.pop() + while TRUE: + break + else: + continue + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (4, 'line'), + (5, 'line'), + (6, 'line'), + (3, 'line'), + (3, 'return')]) + + def test_break_to_break(self): + + def func(): + TRUE = 1 + while TRUE: + while TRUE: + break + break + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (4, 'line'), + (5, 'line'), + (5, 'return')]) + class SkipLineEventsTraceTestCase(TraceTestCase): """Repeat the trace tests, but with per-line events skipped""" diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index d07d28df607..e279957e26c 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -18,6 +18,10 @@ from sysconfig import (get_paths, get_platform, get_config_vars, get_scheme_names, get_config_var, _main) import _osx_support + +HAS_USER_BASE = sysconfig._HAS_USER_BASE + + class TestSysConfig(unittest.TestCase): def setUp(self): @@ -230,9 +234,10 @@ class TestSysConfig(unittest.TestCase): self.assertTrue(os.path.isfile(config_h), config_h) def test_get_scheme_names(self): - wanted = ('nt', 'nt_user', 'osx_framework_user', - 'posix_home', 'posix_prefix', 'posix_user') - self.assertEqual(get_scheme_names(), wanted) + wanted = ['nt', 'posix_home', 'posix_prefix'] + if HAS_USER_BASE: + wanted.extend(['nt_user', 'osx_framework_user', 'posix_user']) + self.assertEqual(get_scheme_names(), tuple(sorted(wanted))) @skip_unless_symlink def test_symlink(self): # Issue 7880 @@ -244,7 +249,8 @@ class TestSysConfig(unittest.TestCase): # Issue #8759: make sure the posix scheme for the users # is similar to the global posix_prefix one base = get_config_var('base') - user = get_config_var('userbase') + if HAS_USER_BASE: + user = get_config_var('userbase') # the global scheme mirrors the distinction between prefix and # exec-prefix but not the user scheme, so we have to adapt the paths # before comparing (issue #9100) @@ -259,8 +265,9 @@ class TestSysConfig(unittest.TestCase): # before comparing global_path = global_path.replace(sys.base_prefix, sys.prefix) base = base.replace(sys.base_prefix, sys.prefix) - user_path = get_path(name, 'posix_user') - self.assertEqual(user_path, global_path.replace(base, user, 1)) + if HAS_USER_BASE: + user_path = get_path(name, 'posix_user') + self.assertEqual(user_path, global_path.replace(base, user, 1)) def test_main(self): # just making sure _main() runs and returns things in the stdout @@ -360,10 +367,12 @@ class TestSysConfig(unittest.TestCase): @unittest.skipIf(sysconfig.get_config_var('EXT_SUFFIX') is None, 'EXT_SUFFIX required for this test') - def test_SO_in_vars(self): + def test_EXT_SUFFIX_in_vars(self): + import _imp vars = sysconfig.get_config_vars() self.assertIsNotNone(vars['SO']) self.assertEqual(vars['SO'], vars['EXT_SUFFIX']) + self.assertEqual(vars['EXT_SUFFIX'], _imp.extension_suffixes()[0]) @unittest.skipUnless(sys.platform == 'linux' and hasattr(sys.implementation, '_multiarch'), diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index d104eb89104..ee7344c48ed 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -138,10 +138,14 @@ class TclTest(unittest.TestCase): def get_integers(self): 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)): - integers += (2**63, -2**63-1, 2**1000, -2**1000) + # bignum was added in Tcl 8.5, but its support is able only since 8.5.8. + # Actually it is determined at compile time, so using get_tk_patchlevel() + # is not reliable. + # TODO: expose full static version. + if tcl_version >= (8, 5): + v = get_tk_patchlevel() + if v >= (8, 6, 0, 'final') or (8, 5, 8) <= v < (8, 6): + integers += (2**63, -2**63-1, 2**1000, -2**1000) return integers def test_getint(self): @@ -445,7 +449,7 @@ class TclTest(unittest.TestCase): else: self.assertEqual(result, str(i)) self.assertIsInstance(result, str) - if tcl_version < (8, 5): # bignum was added in Tcl 8.5 + if get_tk_patchlevel() < (8, 5): # bignum was added in Tcl 8.5 self.assertRaises(TclError, tcl.call, 'expr', str(2**1000)) def test_passing_values(self): diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 864cea313ae..0a4372ec2df 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -487,7 +487,6 @@ class ThreadTests(BaseTestCase): if not pid: print("child process ok", file=sys.stderr, flush=True) # child process - sys.exit() else: wait_process(pid, exitcode=0) diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index 91688ff72bb..abb5762cd43 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -687,6 +687,31 @@ class BaseExceptionReportingTests: msg = self.get_report(e).splitlines() self.assertEqual(msg[-2], ' ^') + def test_syntax_error_no_lineno(self): + # See #34463. + + # Without filename + e = SyntaxError('bad syntax') + msg = self.get_report(e).splitlines() + self.assertEqual(msg, + ['SyntaxError: bad syntax']) + e.lineno = 100 + msg = self.get_report(e).splitlines() + self.assertEqual(msg, + [' File "", line 100', 'SyntaxError: bad syntax']) + + # With filename + e = SyntaxError('bad syntax') + e.filename = 'myfile.py' + + msg = self.get_report(e).splitlines() + self.assertEqual(msg, + ['SyntaxError: bad syntax (myfile.py)']) + e.lineno = 100 + msg = self.get_report(e).splitlines() + self.assertEqual(msg, + [' File "myfile.py", line 100', 'SyntaxError: bad syntax']) + def test_message_none(self): # A message that looks like "None" should not be treated specially err = self.get_report(Exception(None)) @@ -1123,7 +1148,19 @@ class TestTracebackException(unittest.TestCase): self.assertEqual(exc_info[0], exc.exc_type) self.assertEqual(str(exc_info[1]), str(exc)) - def test_comparison(self): + def test_no_refs_to_exception_and_traceback_objects(self): + try: + 1/0 + except Exception: + exc_info = sys.exc_info() + + refcnt1 = sys.getrefcount(exc_info[1]) + refcnt2 = sys.getrefcount(exc_info[2]) + exc = traceback.TracebackException(*exc_info) + self.assertEqual(sys.getrefcount(exc_info[1]), refcnt1) + self.assertEqual(sys.getrefcount(exc_info[2]), refcnt2) + + def test_comparison_basic(self): try: 1/0 except Exception: @@ -1135,6 +1172,53 @@ class TestTracebackException(unittest.TestCase): self.assertNotEqual(exc, object()) self.assertEqual(exc, ALWAYS_EQ) + def test_comparison_params_variations(self): + def raise_exc(): + try: + raise ValueError('bad value') + except: + raise + + def raise_with_locals(): + x, y = 1, 2 + raise_exc() + + try: + raise_with_locals() + except Exception: + exc_info = sys.exc_info() + + exc = traceback.TracebackException(*exc_info) + exc1 = traceback.TracebackException(*exc_info, limit=10) + exc2 = traceback.TracebackException(*exc_info, limit=2) + + self.assertEqual(exc, exc1) # limit=10 gets all frames + self.assertNotEqual(exc, exc2) # limit=2 truncates the output + + # locals change the output + exc3 = traceback.TracebackException(*exc_info, capture_locals=True) + self.assertNotEqual(exc, exc3) + + # there are no locals in the innermost frame + exc4 = traceback.TracebackException(*exc_info, limit=-1) + exc5 = traceback.TracebackException(*exc_info, limit=-1, capture_locals=True) + self.assertEqual(exc4, exc5) + + # there are locals in the next-to-innermost frame + exc6 = traceback.TracebackException(*exc_info, limit=-2) + exc7 = traceback.TracebackException(*exc_info, limit=-2, capture_locals=True) + self.assertNotEqual(exc6, exc7) + + def test_comparison_equivalent_exceptions_are_equal(self): + excs = [] + for _ in range(2): + try: + 1/0 + except: + excs.append(traceback.TracebackException(*sys.exc_info())) + self.assertEqual(excs[0], excs[1]) + self.assertEqual(list(excs[0].format()), list(excs[1].format())) + def test_unhashable(self): class UnhashableException(Exception): def __eq__(self, other): @@ -1176,7 +1260,7 @@ class TestTracebackException(unittest.TestCase): 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) + self.assertEqual(linecache.cache, {}) linecache.updatecache('/foo.py', globals()) self.assertEqual(exc.stack[0].line, "import sys") diff --git a/Lib/test/test_tracemalloc.py b/Lib/test/test_tracemalloc.py index a0037f81b88..556656747bb 100644 --- a/Lib/test/test_tracemalloc.py +++ b/Lib/test/test_tracemalloc.py @@ -85,6 +85,25 @@ def traceback_filename(filename): return traceback_lineno(filename, 0) +class TestTraceback(unittest.TestCase): + def test_repr(self): + def get_repr(*args) -> str: + return repr(tracemalloc.Traceback(*args)) + + self.assertEqual(get_repr(()), "") + self.assertEqual(get_repr((), 0), "") + + frames = (("f1", 1), ("f2", 2)) + exp_repr_frames = ( + "(," + " )" + ) + self.assertEqual(get_repr(frames), + f"") + self.assertEqual(get_repr(frames, 2), + f"") + + class TestTracemallocEnabled(unittest.TestCase): def setUp(self): if tracemalloc.is_tracing(): @@ -1065,6 +1084,7 @@ class TestCAPI(unittest.TestCase): def test_main(): support.run_unittest( + TestTraceback, TestTracemallocEnabled, TestSnapshot, TestFilters, diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py index 3058a02d6ee..83196ad3c17 100644 --- a/Lib/test/test_types.py +++ b/Lib/test/test_types.py @@ -717,14 +717,16 @@ class TypesTests(unittest.TestCase): a = list[int] b = list[str] c = dict[float, str] + class SubClass(types.GenericAlias): ... + d = SubClass(list, float) # equivalence with typing.Union - self.assertEqual(a | b | c, typing.Union[a, b, c]) + self.assertEqual(a | b | c | d, typing.Union[a, b, c, d]) # de-duplicate - self.assertEqual(a | c | b | b | a | c, a | b | c) + self.assertEqual(a | c | b | b | a | c | d | d, a | b | c | d) # order shouldn't matter - self.assertEqual(a | b, b | a) - self.assertEqual(repr(a | b | c), - "list[int] | list[str] | dict[float, str]") + self.assertEqual(a | b | d, b | a | d) + self.assertEqual(repr(a | b | c | d), + "list[int] | list[str] | dict[float, str] | list[float]") class BadType(type): def __eq__(self, other): diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 8ffc7f40ceb..3b8efe16c6e 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -25,6 +25,7 @@ from typing import IO, TextIO, BinaryIO from typing import Pattern, Match from typing import Annotated, ForwardRef from typing import TypeAlias +from typing import ParamSpec, Concatenate import abc import typing import weakref @@ -446,14 +447,6 @@ class CallableTests(BaseTestCase): type(c)() def test_callable_wrong_forms(self): - with self.assertRaises(TypeError): - Callable[[...], int] - with self.assertRaises(TypeError): - Callable[(), int] - with self.assertRaises(TypeError): - Callable[[()], int] - with self.assertRaises(TypeError): - Callable[[int, 1], 2] with self.assertRaises(TypeError): Callable[int] @@ -1138,10 +1131,6 @@ class ProtocolTests(BaseTestCase): PR[int] with self.assertRaises(TypeError): P[int, str] - with self.assertRaises(TypeError): - PR[int, 1] - with self.assertRaises(TypeError): - PR[int, ClassVar] class C(PR[int, T]): pass @@ -1163,8 +1152,6 @@ class ProtocolTests(BaseTestCase): self.assertIsSubclass(P, PR) with self.assertRaises(TypeError): PR[int] - with self.assertRaises(TypeError): - PR[int, 1] class P1(Protocol, Generic[T]): def bar(self, x: T) -> str: ... @@ -1183,8 +1170,6 @@ class ProtocolTests(BaseTestCase): return x self.assertIsInstance(Test(), PSub) - with self.assertRaises(TypeError): - PR[int, ClassVar] def test_init_called(self): T = TypeVar('T') @@ -1754,8 +1739,6 @@ class GenericTests(BaseTestCase): self.assertEqual(typing.Iterable[Tuple[T, T]][T], typing.Iterable[Tuple[T, T]]) with self.assertRaises(TypeError): Tuple[T, int][()] - with self.assertRaises(TypeError): - Tuple[T, U][T, ...] self.assertEqual(Union[T, int][int], int) self.assertEqual(Union[T, U][int, Union[int, str]], Union[int, str]) @@ -1767,10 +1750,6 @@ class GenericTests(BaseTestCase): self.assertEqual(Callable[[T], T][KT], Callable[[KT], KT]) self.assertEqual(Callable[..., List[T]][int], Callable[..., List[int]]) - with self.assertRaises(TypeError): - Callable[[T], U][..., int] - with self.assertRaises(TypeError): - Callable[[T], U][[], int] def test_extended_generic_rules_repr(self): T = TypeVar('T') @@ -1807,10 +1786,9 @@ class GenericTests(BaseTestCase): def test_extended_generic_rules_subclassing(self): class T1(Tuple[T, KT]): ... class T2(Tuple[T, ...]): ... - class C1(Callable[[T], T]): ... - class C2(Callable[..., int]): - def __call__(self): - return None + class C1(typing.Container[T]): + def __contains__(self, item): + return False self.assertEqual(T1.__parameters__, (T, KT)) self.assertEqual(T1[int, str].__args__, (int, str)) @@ -1824,10 +1802,9 @@ class GenericTests(BaseTestCase): ## T2[int, str] self.assertEqual(repr(C1[int]).split('.')[-1], 'C1[int]') - self.assertEqual(C2.__parameters__, ()) - self.assertIsInstance(C2(), collections.abc.Callable) - self.assertIsSubclass(C2, collections.abc.Callable) - self.assertIsSubclass(C1, collections.abc.Callable) + self.assertEqual(C1.__parameters__, (T,)) + self.assertIsInstance(C1(), collections.abc.Container) + self.assertIsSubclass(C1, collections.abc.Container) self.assertIsInstance(T1(), tuple) self.assertIsSubclass(T2, tuple) with self.assertRaises(TypeError): @@ -1861,10 +1838,6 @@ class GenericTests(BaseTestCase): class MyTup(Tuple[T, T]): ... self.assertIs(MyTup[int]().__class__, MyTup) self.assertEqual(MyTup[int]().__orig_class__, MyTup[int]) - class MyCall(Callable[..., T]): - def __call__(self): return None - self.assertIs(MyCall[T]().__class__, MyCall) - self.assertEqual(MyCall[T]().__orig_class__, MyCall[T]) class MyDict(typing.Dict[T, T]): ... self.assertIs(MyDict[int]().__class__, MyDict) self.assertEqual(MyDict[int]().__orig_class__, MyDict[int]) @@ -3048,6 +3021,7 @@ class GetUtilitiesTestCase(TestCase): self.assertIs(get_origin(Callable), collections.abc.Callable) self.assertIs(get_origin(list[int]), list) self.assertIs(get_origin(list), None) + self.assertIs(get_origin(list | str), types.Union) def test_get_args(self): T = TypeVar('T') @@ -3075,6 +3049,16 @@ class GetUtilitiesTestCase(TestCase): self.assertEqual(get_args(Callable), ()) self.assertEqual(get_args(list[int]), (int,)) self.assertEqual(get_args(list), ()) + self.assertEqual(get_args(collections.abc.Callable[[int], str]), ([int], str)) + self.assertEqual(get_args(collections.abc.Callable[..., str]), (..., str)) + self.assertEqual(get_args(collections.abc.Callable[[], str]), ([], str)) + self.assertEqual(get_args(collections.abc.Callable[[int], str]), + get_args(Callable[[int], str])) + P = ParamSpec('P') + self.assertEqual(get_args(Callable[P, int]), (P, int)) + self.assertEqual(get_args(Callable[Concatenate[int, P], int]), + (Concatenate[int, P], int)) + self.assertEqual(get_args(list | str), (list, str)) class CollectionsAbcTests(BaseTestCase): @@ -3895,10 +3879,14 @@ class TypedDictTests(BaseTestCase): self.assertEqual(D(), {}) self.assertEqual(D(x=1), {'x': 1}) self.assertEqual(D.__total__, False) + self.assertEqual(D.__required_keys__, frozenset()) + self.assertEqual(D.__optional_keys__, {'x'}) self.assertEqual(Options(), {}) self.assertEqual(Options(log_level=2), {'log_level': 2}) self.assertEqual(Options.__total__, False) + self.assertEqual(Options.__required_keys__, frozenset()) + self.assertEqual(Options.__optional_keys__, {'log_level', 'log_path'}) def test_optional_keys(self): class Point2Dor3D(Point2D, total=False): @@ -4253,6 +4241,111 @@ class TypeAliasTests(BaseTestCase): TypeAlias[int] +class ParamSpecTests(BaseTestCase): + + def test_basic_plain(self): + P = ParamSpec('P') + self.assertEqual(P, P) + self.assertIsInstance(P, ParamSpec) + + def test_valid_uses(self): + P = ParamSpec('P') + T = TypeVar('T') + C1 = Callable[P, int] + self.assertEqual(C1.__args__, (P, int)) + self.assertEqual(C1.__parameters__, (P,)) + C2 = Callable[P, T] + self.assertEqual(C2.__args__, (P, T)) + self.assertEqual(C2.__parameters__, (P, T)) + # Test collections.abc.Callable too. + C3 = collections.abc.Callable[P, int] + self.assertEqual(C3.__args__, (P, int)) + self.assertEqual(C3.__parameters__, (P,)) + C4 = collections.abc.Callable[P, T] + self.assertEqual(C4.__args__, (P, T)) + self.assertEqual(C4.__parameters__, (P, T)) + + # ParamSpec instances should also have args and kwargs attributes. + self.assertIn('args', dir(P)) + self.assertIn('kwargs', dir(P)) + P.args + P.kwargs + + def test_user_generics(self): + T = TypeVar("T") + P = ParamSpec("P") + P_2 = ParamSpec("P_2") + + class X(Generic[T, P]): + f: Callable[P, int] + x: T + G1 = X[int, P_2] + self.assertEqual(G1.__args__, (int, P_2)) + self.assertEqual(G1.__parameters__, (P_2,)) + + G2 = X[int, Concatenate[int, P_2]] + self.assertEqual(G2.__args__, (int, Concatenate[int, P_2])) + self.assertEqual(G2.__parameters__, (P_2,)) + + G3 = X[int, [int, bool]] + self.assertEqual(G3.__args__, (int, (int, bool))) + self.assertEqual(G3.__parameters__, ()) + + G4 = X[int, ...] + self.assertEqual(G4.__args__, (int, Ellipsis)) + self.assertEqual(G4.__parameters__, ()) + + class Z(Generic[P]): + f: Callable[P, int] + + G5 = Z[[int, str, bool]] + self.assertEqual(G5.__args__, ((int, str, bool),)) + self.assertEqual(G5.__parameters__, ()) + + G6 = Z[int, str, bool] + self.assertEqual(G6.__args__, ((int, str, bool),)) + self.assertEqual(G6.__parameters__, ()) + + # G5 and G6 should be equivalent according to the PEP + self.assertEqual(G5.__args__, G6.__args__) + self.assertEqual(G5.__origin__, G6.__origin__) + self.assertEqual(G5.__parameters__, G6.__parameters__) + self.assertEqual(G5, G6) + + def test_var_substitution(self): + T = TypeVar("T") + P = ParamSpec("P") + C1 = Callable[P, T] + self.assertEqual(C1[int, str], Callable[[int], str]) + self.assertEqual(C1[[int, str, dict], float], Callable[[int, str, dict], float]) + + +class ConcatenateTests(BaseTestCase): + def test_basics(self): + P = ParamSpec('P') + class MyClass: ... + c = Concatenate[MyClass, P] + self.assertNotEqual(c, Concatenate) + + def test_valid_uses(self): + P = ParamSpec('P') + T = TypeVar('T') + C1 = Callable[Concatenate[int, P], int] + self.assertEqual(C1.__args__, (Concatenate[int, P], int)) + self.assertEqual(C1.__parameters__, (P,)) + C2 = Callable[Concatenate[int, T, P], T] + self.assertEqual(C2.__args__, (Concatenate[int, T, P], T)) + self.assertEqual(C2.__parameters__, (T, P)) + + # Test collections.abc.Callable too. + C3 = collections.abc.Callable[Concatenate[int, P], int] + self.assertEqual(C3.__args__, (Concatenate[int, P], int)) + self.assertEqual(C3.__parameters__, (P,)) + C4 = collections.abc.Callable[Concatenate[int, T, P], T] + self.assertEqual(C4.__args__, (Concatenate[int, T, P], T)) + self.assertEqual(C4.__parameters__, (T, P)) + + class AllTests(BaseTestCase): """Tests for __all__.""" diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 12ad6ae79d5..9db23e6ce04 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1851,9 +1851,17 @@ class MiscTests(unittest.TestCase): ('ftp', 'joe', 'password', 'proxy.example.com')), # Test for no trailing '/' case ('http://joe:password@proxy.example.com', - ('http', 'joe', 'password', 'proxy.example.com')) + ('http', 'joe', 'password', 'proxy.example.com')), + # Testcases with '/' character in username, password + ('http://user/name:password@localhost:22', + ('http', 'user/name', 'password', 'localhost:22')), + ('http://username:pass/word@localhost:22', + ('http', 'username', 'pass/word', 'localhost:22')), + ('http://user/name:pass/word@localhost:22', + ('http', 'user/name', 'pass/word', 'localhost:22')), ] + for tc, expected in parse_proxy_test_cases: self.assertEqual(_parse_proxy(tc), expected) diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py old mode 100644 new mode 100755 index 718113d6e1b..d6a8333427a --- a/Lib/test/test_uuid.py +++ b/Lib/test/test_uuid.py @@ -639,7 +639,7 @@ class BaseTestUUID: equal(u, self.uuid.UUID(v)) equal(str(u), v) - @unittest.skipUnless(os.name == 'posix', 'requires Posix') + @unittest.skipUnless(hasattr(os, 'fork'), 'need os.fork') def testIssue8621(self): # On at least some versions of OSX self.uuid.uuid4 generates # the same sequence of UUIDs in the parent and any diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 5bb62cdb374..098ba17af59 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -446,7 +446,7 @@ class EnsurePipTest(BaseTest): # pip's cross-version compatibility may trigger deprecation # warnings in current versions of Python. Ensure related # environment settings don't cause venv to fail. - envvars["PYTHONWARNINGS"] = "e" + envvars["PYTHONWARNINGS"] = "ignore" # ensurepip is different enough from a normal pip invocation # that we want to ensure it ignores the normal pip environment # variable settings. We set PIP_NO_INSTALL here specifically @@ -485,7 +485,8 @@ class EnsurePipTest(BaseTest): # Ensure pip is available in the virtual environment envpy = os.path.join(os.path.realpath(self.env_dir), self.bindir, self.exe) # Ignore DeprecationWarning since pip code is not part of Python - out, err = check_output([envpy, '-W', 'ignore::DeprecationWarning', '-I', + out, err = check_output([envpy, '-W', 'ignore::DeprecationWarning', + '-W', 'ignore::ImportWarning', '-I', '-m', 'pip', '--version']) # We force everything to text, so unittest gives the detailed diff # if we get unexpected results @@ -501,8 +502,12 @@ class EnsurePipTest(BaseTest): # Check the private uninstall command provided for the Windows # installers works (at least in a virtual environment) with EnvironmentVarGuard() as envvars: + # It seems ensurepip._uninstall calls subprocesses which do not + # inherit the interpreter settings. + envvars["PYTHONWARNINGS"] = "ignore" out, err = check_output([envpy, - '-W', 'ignore::DeprecationWarning', '-I', + '-W', 'ignore::DeprecationWarning', + '-W', 'ignore::ImportWarning', '-I', '-m', 'ensurepip._uninstall']) # We force everything to text, so unittest gives the detailed diff # if we get unexpected results diff --git a/Lib/test/test_xxlimited.py b/Lib/test/test_xxlimited.py new file mode 100644 index 00000000000..e3f521d9b04 --- /dev/null +++ b/Lib/test/test_xxlimited.py @@ -0,0 +1,79 @@ +import unittest +from test.support import import_helper +import types + +xxlimited = import_helper.import_module('xxlimited') +xxlimited_35 = import_helper.import_module('xxlimited_35') + + +class CommonTests: + module: types.ModuleType + + def test_xxo_new(self): + xxo = self.module.Xxo() + + def test_xxo_attributes(self): + xxo = self.module.Xxo() + with self.assertRaises(AttributeError): + xxo.foo + with self.assertRaises(AttributeError): + del xxo.foo + + xxo.foo = 1234 + self.assertEqual(xxo.foo, 1234) + + del xxo.foo + with self.assertRaises(AttributeError): + xxo.foo + + def test_foo(self): + # the foo function adds 2 numbers + self.assertEqual(self.module.foo(1, 2), 3) + + def test_str(self): + self.assertTrue(issubclass(self.module.Str, str)) + self.assertIsNot(self.module.Str, str) + + custom_string = self.module.Str("abcd") + self.assertEqual(custom_string, "abcd") + self.assertEqual(custom_string.upper(), "ABCD") + + def test_new(self): + xxo = self.module.new() + self.assertEqual(xxo.demo("abc"), "abc") + + +class TestXXLimited(CommonTests, unittest.TestCase): + module = xxlimited + + def test_xxo_demo(self): + xxo = self.module.Xxo() + other = self.module.Xxo() + self.assertEqual(xxo.demo("abc"), "abc") + self.assertEqual(xxo.demo(xxo), xxo) + self.assertEqual(xxo.demo(other), other) + self.assertEqual(xxo.demo(0), None) + + def test_error(self): + with self.assertRaises(self.module.Error): + raise self.module.Error + + +class TestXXLimited35(CommonTests, unittest.TestCase): + module = xxlimited_35 + + def test_xxo_demo(self): + xxo = self.module.Xxo() + other = self.module.Xxo() + self.assertEqual(xxo.demo("abc"), "abc") + self.assertEqual(xxo.demo(0), None) + + def test_roj(self): + # the roj function always fails + with self.assertRaises(SystemError): + self.module.roj(0) + + def test_null(self): + null1 = self.module.Null() + null2 = self.module.Null() + self.assertNotEqual(null1, null2) diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index b3c24213f34..7c09e2f51b0 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -2965,6 +2965,12 @@ class TestPath(unittest.TestCase): e = root.joinpath("b").joinpath("d").joinpath("e.txt") assert e.read_text() == "content of e" + @pass_alpharep + def test_joinpath_multiple(self, alpharep): + root = zipfile.Path(alpharep) + e = root.joinpath("b", "d", "e.txt") + assert e.read_text() == "content of e" + @pass_alpharep def test_traverse_truediv(self, alpharep): root = zipfile.Path(alpharep) diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py index be0a198010c..d59ef1ed6ff 100644 --- a/Lib/test/test_zipimport.py +++ b/Lib/test/test_zipimport.py @@ -7,6 +7,7 @@ import struct import time import unittest import unittest.mock +import warnings from test import support from test.support import import_helper @@ -241,10 +242,10 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase): files = {TESTMOD + pyc_ext: (NOW, badmagic_pyc)} try: self.doTest(".py", files, TESTMOD) - except ImportError: - pass - else: - self.fail("expected ImportError; import from bad pyc") + self.fail("This should not be reached") + except zipimport.ZipImportError as exc: + self.assertIsInstance(exc.__cause__, ImportError) + self.assertIn("magic number", exc.__cause__.msg) def testBadMTime(self): badtime_pyc = bytearray(test_pyc) @@ -453,15 +454,17 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase): self.assertTrue(zi.is_package(TESTPACK)) # PEP 302 - find_mod = zi.find_module('spam') - self.assertIsNotNone(find_mod) - self.assertIsInstance(find_mod, zipimport.zipimporter) - self.assertFalse(find_mod.is_package('spam')) - load_mod = find_mod.load_module('spam') - self.assertEqual(find_mod.get_filename('spam'), load_mod.__file__) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + find_mod = zi.find_module('spam') + self.assertIsNotNone(find_mod) + self.assertIsInstance(find_mod, zipimport.zipimporter) + self.assertFalse(find_mod.is_package('spam')) + load_mod = find_mod.load_module('spam') + self.assertEqual(find_mod.get_filename('spam'), load_mod.__file__) - mod = zi.load_module(TESTPACK) - self.assertEqual(zi.get_filename(TESTPACK), mod.__file__) + mod = zi.load_module(TESTPACK) + self.assertEqual(zi.get_filename(TESTPACK), mod.__file__) # PEP 451 spec = zi.find_spec('spam') @@ -522,8 +525,10 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase): self.assertEqual(zi.prefix, packdir) self.assertTrue(zi.is_package(TESTPACK2)) # PEP 302 - mod = zi.load_module(TESTPACK2) - self.assertEqual(zi.get_filename(TESTPACK2), mod.__file__) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + mod = zi.load_module(TESTPACK2) + self.assertEqual(zi.get_filename(TESTPACK2), mod.__file__) # PEP 451 spec = zi.find_spec(TESTPACK2) mod = importlib.util.module_from_spec(spec) @@ -536,13 +541,15 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase): pkg_path = TEMP_ZIP + os.sep + packdir + TESTPACK2 zi2 = zipimport.zipimporter(pkg_path) # PEP 302 - find_mod_dotted = zi2.find_module(TESTMOD) - self.assertIsNotNone(find_mod_dotted) - self.assertIsInstance(find_mod_dotted, zipimport.zipimporter) - self.assertFalse(zi2.is_package(TESTMOD)) - load_mod = find_mod_dotted.load_module(TESTMOD) - self.assertEqual( - find_mod_dotted.get_filename(TESTMOD), load_mod.__file__) + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + find_mod_dotted = zi2.find_module(TESTMOD) + self.assertIsNotNone(find_mod_dotted) + self.assertIsInstance(find_mod_dotted, zipimport.zipimporter) + self.assertFalse(zi2.is_package(TESTMOD)) + load_mod = find_mod_dotted.load_module(TESTMOD) + self.assertEqual( + find_mod_dotted.get_filename(TESTMOD), load_mod.__file__) # PEP 451 spec = zi2.find_spec(TESTMOD) @@ -778,10 +785,12 @@ class BadFileZipImportTestCase(unittest.TestCase): z = zipimport.zipimporter(TESTMOD) try: + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + self.assertRaises(TypeError, z.load_module, None) self.assertRaises(TypeError, z.find_module, None) self.assertRaises(TypeError, z.find_spec, None) self.assertRaises(TypeError, z.exec_module, None) - self.assertRaises(TypeError, z.load_module, None) self.assertRaises(TypeError, z.is_package, None) self.assertRaises(TypeError, z.get_code, None) self.assertRaises(TypeError, z.get_data, None) @@ -791,7 +800,9 @@ class BadFileZipImportTestCase(unittest.TestCase): self.assertIsNone(z.find_module('abc')) self.assertIsNone(z.find_spec('abc')) - self.assertRaises(error, z.load_module, 'abc') + with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + self.assertRaises(error, z.load_module, 'abc') self.assertRaises(error, z.get_code, 'abc') self.assertRaises(OSError, z.get_data, 'abc') self.assertRaises(error, z.get_source, 'abc') diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 3bfeb7a0179..57ac3fb5cf6 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -270,7 +270,7 @@ class Event: ) -_support_default_root = 1 +_support_default_root = True _default_root = None @@ -280,13 +280,51 @@ def NoDefaultRoot(): Call this function to inhibit that the first instance of Tk is used for windows without an explicit parent window. """ - global _support_default_root - _support_default_root = 0 - global _default_root + global _support_default_root, _default_root + _support_default_root = False + # Delete, so any use of _default_root will immediately raise an exception. + # Rebind before deletion, so repeated calls will not fail. _default_root = None del _default_root +def _get_default_root(what=None): + if not _support_default_root: + raise RuntimeError("No master specified and tkinter is " + "configured to not support default root") + if _default_root is None: + if what: + raise RuntimeError(f"Too early to {what}: no default root window") + root = Tk() + assert _default_root is root + return _default_root + + +def _get_temp_root(): + global _support_default_root + if not _support_default_root: + raise RuntimeError("No master specified and tkinter is " + "configured to not support default root") + root = _default_root + if root is None: + assert _support_default_root + _support_default_root = False + root = Tk() + _support_default_root = True + assert _default_root is None + root.withdraw() + root._temporary = True + return root + + +def _destroy_temp_root(master): + if getattr(master, '_temporary', False): + try: + master.destroy() + except TclError: + pass + + def _tkerror(err): """Internal function.""" pass @@ -329,8 +367,8 @@ class Variable: if name is not None and not isinstance(name, str): raise TypeError("name must be a string") global _varnum - if not master: - master = _default_root + if master is None: + master = _get_default_root('create variable') self._root = master._root() self._tk = master.tk if name: @@ -478,15 +516,11 @@ class Variable: self._tk.call("trace", "vinfo", self._name))] def __eq__(self, other): - """Comparison for equality (==). - - Note: if the Variable's master matters to behavior - also compare self._master == other._master - """ if not isinstance(other, Variable): return NotImplemented - return self.__class__.__name__ == other.__class__.__name__ \ - and self._name == other._name + return (self._name == other._name + and self.__class__.__name__ == other.__class__.__name__ + and self._tk == other._tk) class StringVar(Variable): @@ -591,7 +625,7 @@ class BooleanVar(Variable): def mainloop(n=0): """Run the main loop of Tcl.""" - _default_root.tk.mainloop(n) + _get_default_root('run the main loop').tk.mainloop(n) getint = int @@ -600,9 +634,9 @@ getdouble = float def getboolean(s): - """Convert true and false to integer values 1 and 0.""" + """Convert Tcl object to True or False.""" try: - return _default_root.tk.getboolean(s) + return _get_default_root('use getboolean()').tk.getboolean(s) except TclError: raise ValueError("invalid literal for getboolean()") @@ -795,7 +829,7 @@ class Misc: function which shall be called. Additional parameters are given as parameters to the function call. Return identifier to cancel scheduling with after_cancel.""" - if not func: + if func is None: # I'd rather use time.sleep(ms*0.001) self.tk.call('after', ms) return None @@ -1529,7 +1563,7 @@ class Misc: def _root(self): """Internal function.""" w = self - while w.master: w = w.master + while w.master is not None: w = w.master return w _subst_format = ('%#', '%b', '%f', '%h', '%k', '%s', '%t', '%w', '%x', '%y', @@ -2248,7 +2282,7 @@ class Tk(Misc, Wm): is the name of the widget class.""" self.master = None self.children = {} - self._tkloaded = 0 + self._tkloaded = False # to avoid recursions in the getattr code in case of failure, we # ensure that self.tk is always _something_. self.tk = None @@ -2272,7 +2306,7 @@ class Tk(Misc, Wm): self._loadtk() def _loadtk(self): - self._tkloaded = 1 + self._tkloaded = True global _default_root # Version sanity checks tk_version = self.tk.getvar('tk_version') @@ -2293,7 +2327,7 @@ class Tk(Misc, Wm): self.tk.createcommand('exit', _exit) self._tclCommands.append('tkerror') self._tclCommands.append('exit') - if _support_default_root and not _default_root: + if _support_default_root and _default_root is None: _default_root = self self.protocol("WM_DELETE_WINDOW", self.destroy) @@ -2521,12 +2555,8 @@ class BaseWidget(Misc): def _setup(self, master, cnf): """Internal function. Sets up information about children.""" - if _support_default_root: - global _default_root - if not master: - if not _default_root: - _default_root = Tk() - master = _default_root + if master is None: + master = _get_default_root() self.master = master self.tk = master.tk name = None @@ -3940,7 +3970,7 @@ class _setit: def __call__(self, *args): self.__var.set(self.__value) - if self.__callback: + if self.__callback is not None: self.__callback(self.__value, *args) @@ -3989,10 +4019,8 @@ class Image: def __init__(self, imgtype, name=None, cnf={}, master=None, **kw): self.name = None - if not master: - master = _default_root - if not master: - raise RuntimeError('Too early to create image') + if master is None: + master = _get_default_root('create image') self.tk = getattr(master, 'tk', master) if not name: Image._last_id += 1 @@ -4146,11 +4174,13 @@ class BitmapImage(Image): def image_names(): - return _default_root.tk.splitlist(_default_root.tk.call('image', 'names')) + tk = _get_default_root('use image_names()').tk + return tk.splitlist(tk.call('image', 'names')) def image_types(): - return _default_root.tk.splitlist(_default_root.tk.call('image', 'types')) + tk = _get_default_root('use image_types()').tk + return tk.splitlist(tk.call('image', 'types')) class Spinbox(Widget, XView): diff --git a/Lib/tkinter/commondialog.py b/Lib/tkinter/commondialog.py index e56b5baf7d1..e595c99defb 100644 --- a/Lib/tkinter/commondialog.py +++ b/Lib/tkinter/commondialog.py @@ -10,7 +10,7 @@ __all__ = ["Dialog"] -from tkinter import Frame +from tkinter import Frame, _get_temp_root, _destroy_temp_root class Dialog: @@ -18,10 +18,10 @@ class Dialog: command = None def __init__(self, master=None, **options): + if master is None: + master = options.get('parent') self.master = master self.options = options - if not master and options.get('parent'): - self.master = options['parent'] def _fixoptions(self): pass # hook @@ -37,22 +37,17 @@ class Dialog: self._fixoptions() - # we need a dummy widget to properly process the options - # (at least as long as we use Tkinter 1.63) - w = Frame(self.master) - + master = self.master + if master is None: + master = _get_temp_root() try: - - s = w.tk.call(self.command, *w._options(self.options)) - - s = self._fixresult(w, s) - + self._test_callback(master) # The function below is replaced for some tests. + s = master.tk.call(self.command, *master._options(self.options)) + s = self._fixresult(master, s) finally: - - try: - # get rid of the widget - w.destroy() - except: - pass + _destroy_temp_root(master) return s + + def _test_callback(self, master): + pass diff --git a/Lib/tkinter/dnd.py b/Lib/tkinter/dnd.py index 3120ff342f8..acec61ba71f 100644 --- a/Lib/tkinter/dnd.py +++ b/Lib/tkinter/dnd.py @@ -108,7 +108,7 @@ __all__ = ["dnd_start", "DndHandler"] def dnd_start(source, event): h = DndHandler(source, event) - if h.root: + if h.root is not None: return h else: return None @@ -143,7 +143,7 @@ class DndHandler: def __del__(self): root = self.root self.root = None - if root: + if root is not None: try: del root.__dnd except AttributeError: @@ -154,25 +154,25 @@ class DndHandler: target_widget = self.initial_widget.winfo_containing(x, y) source = self.source new_target = None - while target_widget: + while target_widget is not None: try: attr = target_widget.dnd_accept except AttributeError: pass else: new_target = attr(source, event) - if new_target: + if new_target is not None: break target_widget = target_widget.master old_target = self.target if old_target is new_target: - if old_target: + if old_target is not None: old_target.dnd_motion(source, event) else: - if old_target: + if old_target is not None: self.target = None old_target.dnd_leave(source, event) - if new_target: + if new_target is not None: new_target.dnd_enter(source, event) self.target = new_target @@ -193,7 +193,7 @@ class DndHandler: self.initial_widget.unbind("") widget['cursor'] = self.save_cursor self.target = self.source = self.initial_widget = self.root = None - if target: + if target is not None: if commit: target.dnd_commit(source, event) else: @@ -215,9 +215,9 @@ class Icon: if canvas is self.canvas: self.canvas.coords(self.id, x, y) return - if self.canvas: + if self.canvas is not None: self.detach() - if not canvas: + if canvas is None: return label = tkinter.Label(canvas, text=self.name, borderwidth=2, relief="raised") @@ -229,7 +229,7 @@ class Icon: def detach(self): canvas = self.canvas - if not canvas: + if canvas is None: return id = self.id label = self.label diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py index a9f79d8e456..3e24e28ef58 100644 --- a/Lib/tkinter/font.py +++ b/Lib/tkinter/font.py @@ -17,10 +17,10 @@ BOLD = "bold" ITALIC = "italic" -def nametofont(name): +def nametofont(name, root=None): """Given the name of a tk named font, returns a Font representation. """ - return Font(name=name, exists=True) + return Font(name=name, exists=True, root=root) class Font: @@ -68,8 +68,8 @@ class Font: def __init__(self, root=None, font=None, name=None, exists=False, **options): - if not root: - root = tkinter._default_root + if root is None: + root = tkinter._get_default_root('use font') tk = getattr(root, 'tk', root) if font: # get actual settings corresponding to the given font @@ -107,7 +107,7 @@ class Font: def __eq__(self, other): if not isinstance(other, Font): return NotImplemented - return self.name == other.name + return self.name == other.name and self._tk == other._tk def __getitem__(self, key): return self.cget(key) @@ -183,8 +183,8 @@ class Font: def families(root=None, displayof=None): "Get font families (as a tuple)" - if not root: - root = tkinter._default_root + if root is None: + root = tkinter._get_default_root('use font.families()') args = () if displayof: args = ('-displayof', displayof) @@ -193,8 +193,8 @@ def families(root=None, displayof=None): def names(root=None): "Get names of defined fonts (as a tuple)" - if not root: - root = tkinter._default_root + if root is None: + root = tkinter._get_default_root('use font.names()') return root.tk.splitlist(root.tk.call("font", "names")) diff --git a/Lib/tkinter/simpledialog.py b/Lib/tkinter/simpledialog.py index 85244171117..a66fbd6cb98 100644 --- a/Lib/tkinter/simpledialog.py +++ b/Lib/tkinter/simpledialog.py @@ -24,10 +24,9 @@ askstring -- get a string from the user """ from tkinter import * +from tkinter import _get_temp_root, _destroy_temp_root from tkinter import messagebox -import tkinter # used at _QueryDialog for tkinter._default_root - class SimpleDialog: @@ -57,36 +56,8 @@ class SimpleDialog: b.config(relief=RIDGE, borderwidth=8) b.pack(side=LEFT, fill=BOTH, expand=1) self.root.protocol('WM_DELETE_WINDOW', self.wm_delete_window) - self._set_transient(master) - - def _set_transient(self, master, relx=0.5, rely=0.3): - widget = self.root - widget.withdraw() # Remain invisible while we figure out the geometry - widget.transient(master) - widget.update_idletasks() # Actualize geometry information - if master.winfo_ismapped(): - m_width = master.winfo_width() - m_height = master.winfo_height() - m_x = master.winfo_rootx() - m_y = master.winfo_rooty() - else: - m_width = master.winfo_screenwidth() - m_height = master.winfo_screenheight() - m_x = m_y = 0 - w_width = widget.winfo_reqwidth() - w_height = widget.winfo_reqheight() - x = m_x + (m_width - w_width) * relx - y = m_y + (m_height - w_height) * rely - if x+w_width > master.winfo_screenwidth(): - x = master.winfo_screenwidth() - w_width - elif x < 0: - x = 0 - if y+w_height > master.winfo_screenheight(): - y = master.winfo_screenheight() - w_height - elif y < 0: - y = 0 - widget.geometry("+%d+%d" % (x, y)) - widget.deiconify() # Become visible at the desired location + self.root.transient(master) + _place_window(self.root, master) def go(self): self.root.wait_visibility() @@ -128,13 +99,17 @@ class Dialog(Toplevel): title -- the dialog title ''' - Toplevel.__init__(self, parent) + master = parent + if master is None: + master = _get_temp_root() + + Toplevel.__init__(self, master) self.withdraw() # remain invisible for now - # If the master is not viewable, don't + # If the parent is not viewable, don't # make the child transient, or else it # would be opened withdrawn - if parent.winfo_viewable(): + if parent is not None and parent.winfo_viewable(): self.transient(parent) if title: @@ -150,16 +125,12 @@ class Dialog(Toplevel): self.buttonbox() - if not self.initial_focus: + if self.initial_focus is None: self.initial_focus = self self.protocol("WM_DELETE_WINDOW", self.cancel) - if self.parent is not None: - self.geometry("+%d+%d" % (parent.winfo_rootx()+50, - parent.winfo_rooty()+50)) - - self.deiconify() # become visible now + _place_window(self, parent) self.initial_focus.focus_set() @@ -172,6 +143,7 @@ class Dialog(Toplevel): '''Destroy the window''' self.initial_focus = None Toplevel.destroy(self) + _destroy_temp_root(self.master) # # construction hooks @@ -249,6 +221,37 @@ class Dialog(Toplevel): pass # override +# Place a toplevel window at the center of parent or screen +# It is a Python implementation of ::tk::PlaceWindow. +def _place_window(w, parent=None): + w.wm_withdraw() # Remain invisible while we figure out the geometry + w.update_idletasks() # Actualize geometry information + + minwidth = w.winfo_reqwidth() + minheight = w.winfo_reqheight() + maxwidth = w.winfo_vrootwidth() + maxheight = w.winfo_vrootheight() + if parent is not None and parent.winfo_ismapped(): + x = parent.winfo_rootx() + (parent.winfo_width() - minwidth) // 2 + y = parent.winfo_rooty() + (parent.winfo_height() - minheight) // 2 + vrootx = w.winfo_vrootx() + vrooty = w.winfo_vrooty() + x = min(x, vrootx + maxwidth - minwidth) + x = max(x, vrootx) + y = min(y, vrooty + maxheight - minheight) + y = max(y, vrooty) + if w._windowingsystem == 'aqua': + # Avoid the native menu bar which sits on top of everything. + y = max(y, 22) + else: + x = (w.winfo_screenwidth() - minwidth) // 2 + y = (w.winfo_screenheight() - minheight) // 2 + + w.wm_maxsize(maxwidth, maxheight) + w.wm_geometry('+%d+%d' % (x, y)) + w.wm_deiconify() # Become visible at the desired location + + # -------------------------------------------------------------------- # convenience dialogues @@ -259,9 +262,6 @@ class _QueryDialog(Dialog): minvalue = None, maxvalue = None, parent = None): - if not parent: - parent = tkinter._default_root - self.prompt = prompt self.minvalue = minvalue self.maxvalue = maxvalue diff --git a/Lib/tkinter/test/support.py b/Lib/tkinter/test/support.py index 467a0b66c26..dbc47a81e65 100644 --- a/Lib/tkinter/test/support.py +++ b/Lib/tkinter/test/support.py @@ -36,6 +36,33 @@ class AbstractTkTest: w.destroy() self.root.withdraw() + +class AbstractDefaultRootTest: + + def setUp(self): + self._old_support_default_root = tkinter._support_default_root + destroy_default_root() + tkinter._support_default_root = True + self.wantobjects = tkinter.wantobjects + + def tearDown(self): + destroy_default_root() + tkinter._default_root = None + tkinter._support_default_root = self._old_support_default_root + + def _test_widget(self, constructor): + # no master passing + x = constructor() + self.assertIsNotNone(tkinter._default_root) + self.assertIs(x.master, tkinter._default_root) + self.assertIs(x.tk, tkinter._default_root.tk) + x.destroy() + destroy_default_root() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, constructor) + self.assertFalse(hasattr(tkinter, '_default_root')) + + def destroy_default_root(): if getattr(tkinter, '_default_root', None): tkinter._default_root.update_idletasks() diff --git a/Lib/tkinter/test/test_tkinter/test_colorchooser.py b/Lib/tkinter/test/test_tkinter/test_colorchooser.py new file mode 100644 index 00000000000..600c8cde67e --- /dev/null +++ b/Lib/tkinter/test/test_tkinter/test_colorchooser.py @@ -0,0 +1,39 @@ +import unittest +import tkinter +from test.support import requires, run_unittest, swap_attr +from tkinter.test.support import AbstractDefaultRootTest +from tkinter.commondialog import Dialog +from tkinter.colorchooser import askcolor + +requires('gui') + + +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_askcolor(self): + def test_callback(dialog, master): + nonlocal ismapped + master.update() + ismapped = master.winfo_ismapped() + raise ZeroDivisionError + + with swap_attr(Dialog, '_test_callback', test_callback): + ismapped = None + self.assertRaises(ZeroDivisionError, askcolor) + #askcolor() + self.assertEqual(ismapped, False) + + root = tkinter.Tk() + ismapped = None + self.assertRaises(ZeroDivisionError, askcolor) + self.assertEqual(ismapped, True) + root.destroy() + + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, askcolor) + + +tests_gui = (DefaultRootTest,) + +if __name__ == "__main__": + run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_tkinter/test_font.py b/Lib/tkinter/test/test_tkinter/test_font.py index 6d1eea44b4d..91f99741171 100644 --- a/Lib/tkinter/test/test_tkinter/test_font.py +++ b/Lib/tkinter/test/test_tkinter/test_font.py @@ -2,7 +2,7 @@ import unittest import tkinter from tkinter import font from test.support import requires, run_unittest, gc_collect, ALWAYS_EQ -from tkinter.test.support import AbstractTkTest +from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest requires('gui') @@ -63,15 +63,22 @@ class FontTest(AbstractTkTest, unittest.TestCase): self.assertEqual(self.font.name, fontname) self.assertEqual(str(self.font), fontname) - def test_eq(self): + def test_equality(self): font1 = font.Font(root=self.root, name=fontname, exists=True) font2 = font.Font(root=self.root, name=fontname, exists=True) self.assertIsNot(font1, font2) self.assertEqual(font1, font2) self.assertNotEqual(font1, font1.copy()) + self.assertNotEqual(font1, 0) self.assertEqual(font1, ALWAYS_EQ) + root2 = tkinter.Tk() + self.addCleanup(root2.destroy) + font3 = font.Font(root=root2, name=fontname, exists=True) + self.assertEqual(str(font1), str(font3)) + self.assertNotEqual(font1, font3) + def test_measure(self): self.assertIsInstance(self.font.measure('abc'), int) @@ -101,13 +108,58 @@ class FontTest(AbstractTkTest, unittest.TestCase): self.assertTrue(name) self.assertIn(fontname, names) + def test_nametofont(self): + testfont = font.nametofont(fontname, root=self.root) + self.assertIsInstance(testfont, font.Font) + self.assertEqual(testfont.name, fontname) + def test_repr(self): self.assertEqual( repr(self.font), f'' ) -tests_gui = (FontTest, ) +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_families(self): + self.assertRaises(RuntimeError, font.families) + root = tkinter.Tk() + families = font.families() + self.assertIsInstance(families, tuple) + self.assertTrue(families) + for family in families: + self.assertIsInstance(family, str) + self.assertTrue(family) + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, font.families) + + def test_names(self): + self.assertRaises(RuntimeError, font.names) + root = tkinter.Tk() + names = font.names() + self.assertIsInstance(names, tuple) + self.assertTrue(names) + for name in names: + self.assertIsInstance(name, str) + self.assertTrue(name) + self.assertIn(fontname, names) + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, font.names) + + def test_nametofont(self): + self.assertRaises(RuntimeError, font.nametofont, fontname) + root = tkinter.Tk() + testfont = font.nametofont(fontname) + self.assertIsInstance(testfont, font.Font) + self.assertEqual(testfont.name, fontname) + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, font.nametofont, fontname) + + +tests_gui = (FontTest, DefaultRootTest) if __name__ == "__main__": run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_tkinter/test_images.py b/Lib/tkinter/test/test_tkinter/test_images.py index 6c6cb4e1485..2526e92200d 100644 --- a/Lib/tkinter/test/test_tkinter/test_images.py +++ b/Lib/tkinter/test/test_tkinter/test_images.py @@ -2,7 +2,7 @@ import unittest import tkinter from test import support from test.support import os_helper -from tkinter.test.support import AbstractTkTest, requires_tcl +from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest, requires_tcl support.requires('gui') @@ -20,6 +20,47 @@ class MiscTest(AbstractTkTest, unittest.TestCase): self.assertIsInstance(image_names, tuple) +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_image_types(self): + self.assertRaises(RuntimeError, tkinter.image_types) + root = tkinter.Tk() + image_types = tkinter.image_types() + self.assertIsInstance(image_types, tuple) + self.assertIn('photo', image_types) + self.assertIn('bitmap', image_types) + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, tkinter.image_types) + + def test_image_names(self): + self.assertRaises(RuntimeError, tkinter.image_names) + root = tkinter.Tk() + image_names = tkinter.image_names() + self.assertIsInstance(image_names, tuple) + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, tkinter.image_names) + + def test_image_create_bitmap(self): + self.assertRaises(RuntimeError, tkinter.BitmapImage) + root = tkinter.Tk() + image = tkinter.BitmapImage() + self.assertIn(image.name, tkinter.image_names()) + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, tkinter.BitmapImage) + + def test_image_create_photo(self): + self.assertRaises(RuntimeError, tkinter.PhotoImage) + root = tkinter.Tk() + image = tkinter.PhotoImage() + self.assertIn(image.name, tkinter.image_names()) + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, tkinter.PhotoImage) + + class BitmapImageTest(AbstractTkTest, unittest.TestCase): @classmethod @@ -331,7 +372,7 @@ class PhotoImageTest(AbstractTkTest, unittest.TestCase): self.assertEqual(image.transparency_get(4, 6), False) -tests_gui = (MiscTest, BitmapImageTest, PhotoImageTest,) +tests_gui = (MiscTest, DefaultRootTest, BitmapImageTest, PhotoImageTest,) if __name__ == "__main__": support.run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_tkinter/test_messagebox.py b/Lib/tkinter/test/test_tkinter/test_messagebox.py new file mode 100644 index 00000000000..0dec08e9041 --- /dev/null +++ b/Lib/tkinter/test/test_tkinter/test_messagebox.py @@ -0,0 +1,38 @@ +import unittest +import tkinter +from test.support import requires, run_unittest, swap_attr +from tkinter.test.support import AbstractDefaultRootTest +from tkinter.commondialog import Dialog +from tkinter.messagebox import showinfo + +requires('gui') + + +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_showinfo(self): + def test_callback(dialog, master): + nonlocal ismapped + master.update() + ismapped = master.winfo_ismapped() + raise ZeroDivisionError + + with swap_attr(Dialog, '_test_callback', test_callback): + ismapped = None + self.assertRaises(ZeroDivisionError, showinfo, "Spam", "Egg Information") + self.assertEqual(ismapped, False) + + root = tkinter.Tk() + ismapped = None + self.assertRaises(ZeroDivisionError, showinfo, "Spam", "Egg Information") + self.assertEqual(ismapped, True) + root.destroy() + + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, showinfo, "Spam", "Egg Information") + + +tests_gui = (DefaultRootTest,) + +if __name__ == "__main__": + run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py index b8eea2544f5..585d81ddf9f 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@ -1,7 +1,7 @@ import unittest import tkinter from test import support -from tkinter.test.support import AbstractTkTest +from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest support.requires('gui') @@ -241,7 +241,85 @@ class MiscTest(AbstractTkTest, unittest.TestCase): " num=3 delta=-1 focus=True" " x=10 y=20 width=300 height=200>") -tests_gui = (MiscTest, ) + def test_getboolean(self): + for v in 'true', 'yes', 'on', '1', 't', 'y', 1, True: + self.assertIs(self.root.getboolean(v), True) + for v in 'false', 'no', 'off', '0', 'f', 'n', 0, False: + self.assertIs(self.root.getboolean(v), False) + self.assertRaises(ValueError, self.root.getboolean, 'yea') + self.assertRaises(ValueError, self.root.getboolean, '') + self.assertRaises(TypeError, self.root.getboolean, None) + self.assertRaises(TypeError, self.root.getboolean, ()) + + def test_mainloop(self): + log = [] + def callback(): + log.append(1) + self.root.after(100, self.root.quit) + self.root.after(100, callback) + self.root.mainloop(1) + self.assertEqual(log, []) + self.root.mainloop(0) + self.assertEqual(log, [1]) + self.assertTrue(self.root.winfo_exists()) + + +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_default_root(self): + self.assertIs(tkinter._support_default_root, True) + self.assertIsNone(tkinter._default_root) + root = tkinter.Tk() + root2 = tkinter.Tk() + root3 = tkinter.Tk() + self.assertIs(tkinter._default_root, root) + root2.destroy() + self.assertIs(tkinter._default_root, root) + root.destroy() + self.assertIsNone(tkinter._default_root) + root3.destroy() + self.assertIsNone(tkinter._default_root) + + def test_no_default_root(self): + self.assertIs(tkinter._support_default_root, True) + self.assertIsNone(tkinter._default_root) + root = tkinter.Tk() + self.assertIs(tkinter._default_root, root) + tkinter.NoDefaultRoot() + self.assertIs(tkinter._support_default_root, False) + self.assertFalse(hasattr(tkinter, '_default_root')) + # repeated call is no-op + tkinter.NoDefaultRoot() + self.assertIs(tkinter._support_default_root, False) + self.assertFalse(hasattr(tkinter, '_default_root')) + root.destroy() + self.assertIs(tkinter._support_default_root, False) + self.assertFalse(hasattr(tkinter, '_default_root')) + root = tkinter.Tk() + self.assertIs(tkinter._support_default_root, False) + self.assertFalse(hasattr(tkinter, '_default_root')) + root.destroy() + + def test_getboolean(self): + self.assertRaises(RuntimeError, tkinter.getboolean, '1') + root = tkinter.Tk() + self.assertIs(tkinter.getboolean('1'), True) + self.assertRaises(ValueError, tkinter.getboolean, 'yea') + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, tkinter.getboolean, '1') + + def test_mainloop(self): + self.assertRaises(RuntimeError, tkinter.mainloop) + root = tkinter.Tk() + root.after_idle(root.quit) + tkinter.mainloop() + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, tkinter.mainloop) + + +tests_gui = (MiscTest, DefaultRootTest) if __name__ == "__main__": support.run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_tkinter/test_simpledialog.py b/Lib/tkinter/test/test_tkinter/test_simpledialog.py new file mode 100644 index 00000000000..b64b854c4db --- /dev/null +++ b/Lib/tkinter/test/test_tkinter/test_simpledialog.py @@ -0,0 +1,37 @@ +import unittest +import tkinter +from test.support import requires, run_unittest, swap_attr +from tkinter.test.support import AbstractDefaultRootTest +from tkinter.simpledialog import Dialog, askinteger + +requires('gui') + + +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_askinteger(self): + @staticmethod + def mock_wait_window(w): + nonlocal ismapped + ismapped = w.master.winfo_ismapped() + w.destroy() + + with swap_attr(Dialog, 'wait_window', mock_wait_window): + ismapped = None + askinteger("Go To Line", "Line number") + self.assertEqual(ismapped, False) + + root = tkinter.Tk() + ismapped = None + askinteger("Go To Line", "Line number") + self.assertEqual(ismapped, True) + root.destroy() + + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, askinteger, "Go To Line", "Line number") + + +tests_gui = (DefaultRootTest,) + +if __name__ == "__main__": + run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_tkinter/test_variables.py b/Lib/tkinter/test/test_tkinter/test_variables.py index 08b7dedcaf9..6aebe8d16d5 100644 --- a/Lib/tkinter/test/test_tkinter/test_variables.py +++ b/Lib/tkinter/test/test_tkinter/test_variables.py @@ -1,8 +1,10 @@ import unittest import gc +import tkinter from tkinter import (Variable, StringVar, IntVar, DoubleVar, BooleanVar, Tcl, TclError) from test.support import ALWAYS_EQ +from tkinter.test.support import AbstractDefaultRootTest class Var(Variable): @@ -56,22 +58,32 @@ class TestVariable(TestBase): del v2 self.assertFalse(self.info_exists("name")) - def test___eq__(self): + def test_equality(self): # values doesn't matter, only class and name are checked v1 = Variable(self.root, name="abc") v2 = Variable(self.root, name="abc") self.assertIsNot(v1, v2) self.assertEqual(v1, v2) - v3 = StringVar(self.root, name="abc") + v3 = Variable(self.root, name="cba") self.assertNotEqual(v1, v3) + v4 = StringVar(self.root, name="abc") + self.assertEqual(str(v1), str(v4)) + self.assertNotEqual(v1, v4) + V = type('Variable', (), {}) self.assertNotEqual(v1, V()) self.assertNotEqual(v1, object()) self.assertEqual(v1, ALWAYS_EQ) + root2 = tkinter.Tk() + self.addCleanup(root2.destroy) + v5 = Variable(root2, name="abc") + self.assertEqual(str(v1), str(v5)) + self.assertNotEqual(v1, v5) + def test_invalid_name(self): with self.assertRaises(TypeError): Variable(self.root, name=123) @@ -308,8 +320,21 @@ class TestBooleanVar(TestBase): v.get() +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_variable(self): + self.assertRaises(RuntimeError, Variable) + root = tkinter.Tk() + v = Variable() + v.set("value") + self.assertEqual(v.get(), "value") + root.destroy() + tkinter.NoDefaultRoot() + self.assertRaises(RuntimeError, Variable) + + tests_gui = (TestVariable, TestStringVar, TestIntVar, - TestDoubleVar, TestBooleanVar) + TestDoubleVar, TestBooleanVar, DefaultRootTest) if __name__ == "__main__": diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index b6f792d6c2c..39334de8cf4 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -2,11 +2,11 @@ import unittest import tkinter from tkinter import TclError import os -import sys from test.support import requires from tkinter.test.support import (tcl_version, requires_tcl, - get_tk_patchlevel, widget_eq) + get_tk_patchlevel, widget_eq, + AbstractDefaultRootTest) from tkinter.test.widget_tests import ( add_standard_options, noconv, pixels_round, AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests, @@ -22,7 +22,7 @@ def float_round(x): class AbstractToplevelTest(AbstractWidgetTest, PixelSizeTests): _conv_pad_pixels = noconv - def test_class(self): + def test_configure_class(self): widget = self.create() self.assertEqual(widget['class'], widget.__class__.__name__.title()) @@ -31,7 +31,7 @@ class AbstractToplevelTest(AbstractWidgetTest, PixelSizeTests): widget2 = self.create(class_='Foo') self.assertEqual(widget2['class'], 'Foo') - def test_colormap(self): + def test_configure_colormap(self): widget = self.create() self.assertEqual(widget['colormap'], '') self.checkInvalidParam(widget, 'colormap', 'new', @@ -39,7 +39,7 @@ class AbstractToplevelTest(AbstractWidgetTest, PixelSizeTests): widget2 = self.create(colormap='new') self.assertEqual(widget2['colormap'], 'new') - def test_container(self): + def test_configure_container(self): widget = self.create() self.assertEqual(widget['container'], 0 if self.wantobjects else '0') self.checkInvalidParam(widget, 'container', 1, @@ -47,7 +47,7 @@ class AbstractToplevelTest(AbstractWidgetTest, PixelSizeTests): widget2 = self.create(container=True) self.assertEqual(widget2['container'], 1 if self.wantobjects else '1') - def test_visual(self): + def test_configure_visual(self): widget = self.create() self.assertEqual(widget['visual'], '') self.checkInvalidParam(widget, 'visual', 'default', @@ -69,13 +69,13 @@ class ToplevelTest(AbstractToplevelTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Toplevel(self.root, **kwargs) - def test_menu(self): + def test_configure_menu(self): widget = self.create() menu = tkinter.Menu(self.root) self.checkParam(widget, 'menu', menu, eq=widget_eq) self.checkParam(widget, 'menu', '') - def test_screen(self): + def test_configure_screen(self): widget = self.create() self.assertEqual(widget['screen'], '') try: @@ -87,7 +87,7 @@ class ToplevelTest(AbstractToplevelTest, unittest.TestCase): widget2 = self.create(screen=display) self.assertEqual(widget2['screen'], display) - def test_use(self): + def test_configure_use(self): widget = self.create() self.assertEqual(widget['use'], '') parent = self.create(container=True) @@ -124,14 +124,14 @@ class LabelFrameTest(AbstractToplevelTest, unittest.TestCase): def create(self, **kwargs): return tkinter.LabelFrame(self.root, **kwargs) - def test_labelanchor(self): + def test_configure_labelanchor(self): widget = self.create() self.checkEnumParam(widget, 'labelanchor', 'e', 'en', 'es', 'n', 'ne', 'nw', 's', 'se', 'sw', 'w', 'wn', 'ws') self.checkInvalidParam(widget, 'labelanchor', 'center') - def test_labelwidget(self): + def test_configure_labelwidget(self): widget = self.create() label = tkinter.Label(self.root, text='Mupp', name='foo') self.checkParam(widget, 'labelwidget', label, expected='.foo') @@ -141,7 +141,7 @@ class LabelFrameTest(AbstractToplevelTest, unittest.TestCase): class AbstractLabelTest(AbstractWidgetTest, IntegerSizeTests): _conv_pixels = noconv - def test_highlightthickness(self): + def test_configure_highlightthickness(self): widget = self.create() self.checkPixelsParam(widget, 'highlightthickness', 0, 1.3, 2.6, 6, -2, '10p') @@ -179,7 +179,7 @@ class ButtonTest(AbstractLabelTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Button(self.root, **kwargs) - def test_default(self): + def test_configure_default(self): widget = self.create() self.checkEnumParam(widget, 'default', 'active', 'disabled', 'normal') @@ -204,11 +204,11 @@ class CheckbuttonTest(AbstractLabelTest, unittest.TestCase): return tkinter.Checkbutton(self.root, **kwargs) - def test_offvalue(self): + def test_configure_offvalue(self): widget = self.create() self.checkParams(widget, 'offvalue', 1, 2.3, '', 'any string') - def test_onvalue(self): + def test_configure_onvalue(self): widget = self.create() self.checkParams(widget, 'onvalue', 1, 2.3, '', 'any string') @@ -231,7 +231,7 @@ class RadiobuttonTest(AbstractLabelTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Radiobutton(self.root, **kwargs) - def test_value(self): + def test_configure_value(self): widget = self.create() self.checkParams(widget, 'value', 1, 2.3, '', 'any string') @@ -254,20 +254,19 @@ class MenubuttonTest(AbstractLabelTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Menubutton(self.root, **kwargs) - def test_direction(self): + def test_configure_direction(self): widget = self.create() self.checkEnumParam(widget, 'direction', 'above', 'below', 'flush', 'left', 'right') - def test_height(self): + def test_configure_height(self): widget = self.create() self.checkIntegerParam(widget, 'height', 100, -100, 0, conv=str) - test_highlightthickness = StandardOptionsTests.test_highlightthickness + test_configure_highlightthickness = \ + StandardOptionsTests.test_configure_highlightthickness - @unittest.skipIf(sys.platform == 'darwin', - 'crashes with Cocoa Tk (issue19733)') - def test_image(self): + def test_configure_image(self): widget = self.create() image = tkinter.PhotoImage(master=self.root, name='image1') self.checkParam(widget, 'image', image, conv=str) @@ -281,23 +280,23 @@ class MenubuttonTest(AbstractLabelTest, unittest.TestCase): if errmsg is not None: self.assertEqual(str(cm.exception), errmsg) - def test_menu(self): + def test_configure_menu(self): widget = self.create() menu = tkinter.Menu(widget, name='menu') self.checkParam(widget, 'menu', menu, eq=widget_eq) menu.destroy() - def test_padx(self): + def test_configure_padx(self): widget = self.create() self.checkPixelsParam(widget, 'padx', 3, 4.4, 5.6, '12m') self.checkParam(widget, 'padx', -2, expected=0) - def test_pady(self): + def test_configure_pady(self): widget = self.create() self.checkPixelsParam(widget, 'pady', 3, 4.4, 5.6, '12m') self.checkParam(widget, 'pady', -2, expected=0) - def test_width(self): + def test_configure_width(self): widget = self.create() self.checkIntegerParam(widget, 'width', 402, -402, 0, conv=str) @@ -330,18 +329,18 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Entry(self.root, **kwargs) - def test_disabledbackground(self): + def test_configure_disabledbackground(self): widget = self.create() self.checkColorParam(widget, 'disabledbackground') - def test_insertborderwidth(self): + def test_configure_insertborderwidth(self): widget = self.create(insertwidth=100) self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, 2.6, 6, -2, '10p') # insertborderwidth is bounded above by a half of insertwidth. self.checkParam(widget, 'insertborderwidth', 60, expected=100//2) - def test_insertwidth(self): + def test_configure_insertwidth(self): widget = self.create() self.checkPixelsParam(widget, 'insertwidth', 1.3, 3.6, '10p') self.checkParam(widget, 'insertwidth', 0.1, expected=2) @@ -351,32 +350,32 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase): else: self.checkParam(widget, 'insertwidth', 0.9, expected=1) - def test_invalidcommand(self): + def test_configure_invalidcommand(self): widget = self.create() self.checkCommandParam(widget, 'invalidcommand') self.checkCommandParam(widget, 'invcmd') - def test_readonlybackground(self): + def test_configure_readonlybackground(self): widget = self.create() self.checkColorParam(widget, 'readonlybackground') - def test_show(self): + def test_configure_show(self): widget = self.create() self.checkParam(widget, 'show', '*') self.checkParam(widget, 'show', '') self.checkParam(widget, 'show', ' ') - def test_state(self): + def test_configure_state(self): widget = self.create() self.checkEnumParam(widget, 'state', 'disabled', 'normal', 'readonly') - def test_validate(self): + def test_configure_validate(self): widget = self.create() self.checkEnumParam(widget, 'validate', 'all', 'key', 'focus', 'focusin', 'focusout', 'none') - def test_validatecommand(self): + def test_configure_validatecommand(self): widget = self.create() self.checkCommandParam(widget, 'validatecommand') self.checkCommandParam(widget, 'vcmd') @@ -429,25 +428,25 @@ class SpinboxTest(EntryTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Spinbox(self.root, **kwargs) - test_show = None + test_configure_show = None - def test_buttonbackground(self): + def test_configure_buttonbackground(self): widget = self.create() self.checkColorParam(widget, 'buttonbackground') - def test_buttoncursor(self): + def test_configure_buttoncursor(self): widget = self.create() self.checkCursorParam(widget, 'buttoncursor') - def test_buttondownrelief(self): + def test_configure_buttondownrelief(self): widget = self.create() self.checkReliefParam(widget, 'buttondownrelief') - def test_buttonuprelief(self): + def test_configure_buttonuprelief(self): widget = self.create() self.checkReliefParam(widget, 'buttonuprelief') - def test_format(self): + def test_configure_format(self): widget = self.create() self.checkParam(widget, 'format', '%2f') self.checkParam(widget, 'format', '%2.2f') @@ -462,25 +461,25 @@ class SpinboxTest(EntryTest, unittest.TestCase): self.checkParam(widget, 'format', '%09.200f') self.checkInvalidParam(widget, 'format', '%d') - def test_from(self): + def test_configure_from(self): widget = self.create() self.checkParam(widget, 'to', 100.0) self.checkFloatParam(widget, 'from', -10, 10.2, 11.7) self.checkInvalidParam(widget, 'from', 200, errmsg='-to value must be greater than -from value') - def test_increment(self): + def test_configure_increment(self): widget = self.create() self.checkFloatParam(widget, 'increment', -1, 1, 10.2, 12.8, 0) - def test_to(self): + def test_configure_to(self): widget = self.create() self.checkParam(widget, 'from', -100.0) self.checkFloatParam(widget, 'to', -10, 10.2, 11.7) self.checkInvalidParam(widget, 'to', -200, errmsg='-to value must be greater than -from value') - def test_values(self): + def test_configure_values(self): # XXX widget = self.create() self.assertEqual(widget['values'], '') @@ -491,7 +490,7 @@ class SpinboxTest(EntryTest, unittest.TestCase): expected='42 3.14 {} {any string}') self.checkParam(widget, 'values', '') - def test_wrap(self): + def test_configure_wrap(self): widget = self.create() self.checkBooleanParam(widget, 'wrap') @@ -557,17 +556,17 @@ class TextTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Text(self.root, **kwargs) - def test_autoseparators(self): + def test_configure_autoseparators(self): widget = self.create() self.checkBooleanParam(widget, 'autoseparators') @requires_tcl(8, 5) - def test_blockcursor(self): + def test_configure_blockcursor(self): widget = self.create() self.checkBooleanParam(widget, 'blockcursor') @requires_tcl(8, 5) - def test_endline(self): + def test_configure_endline(self): widget = self.create() text = '\n'.join('Line %d' for i in range(100)) widget.insert('end', text) @@ -580,50 +579,50 @@ class TextTest(AbstractWidgetTest, unittest.TestCase): self.checkInvalidParam(widget, 'endline', 10, errmsg='-startline must be less than or equal to -endline') - def test_height(self): + def test_configure_height(self): widget = self.create() self.checkPixelsParam(widget, 'height', 100, 101.2, 102.6, '3c') self.checkParam(widget, 'height', -100, expected=1) self.checkParam(widget, 'height', 0, expected=1) - def test_maxundo(self): + def test_configure_maxundo(self): widget = self.create() self.checkIntegerParam(widget, 'maxundo', 0, 5, -1) @requires_tcl(8, 5) - def test_inactiveselectbackground(self): + def test_configure_inactiveselectbackground(self): widget = self.create() self.checkColorParam(widget, 'inactiveselectbackground') @requires_tcl(8, 6) - def test_insertunfocussed(self): + def test_configure_insertunfocussed(self): widget = self.create() self.checkEnumParam(widget, 'insertunfocussed', 'hollow', 'none', 'solid') - def test_selectborderwidth(self): + def test_configure_selectborderwidth(self): widget = self.create() self.checkPixelsParam(widget, 'selectborderwidth', 1.3, 2.6, -2, '10p', conv=noconv, keep_orig=tcl_version >= (8, 5)) - def test_spacing1(self): + def test_configure_spacing1(self): widget = self.create() self.checkPixelsParam(widget, 'spacing1', 20, 21.4, 22.6, '0.5c') self.checkParam(widget, 'spacing1', -5, expected=0) - def test_spacing2(self): + def test_configure_spacing2(self): widget = self.create() self.checkPixelsParam(widget, 'spacing2', 5, 6.4, 7.6, '0.1c') self.checkParam(widget, 'spacing2', -1, expected=0) - def test_spacing3(self): + def test_configure_spacing3(self): widget = self.create() self.checkPixelsParam(widget, 'spacing3', 20, 21.4, 22.6, '0.5c') self.checkParam(widget, 'spacing3', -10, expected=0) @requires_tcl(8, 5) - def test_startline(self): + def test_configure_startline(self): widget = self.create() text = '\n'.join('Line %d' for i in range(100)) widget.insert('end', text) @@ -636,14 +635,14 @@ class TextTest(AbstractWidgetTest, unittest.TestCase): self.checkInvalidParam(widget, 'startline', 70, errmsg='-startline must be less than or equal to -endline') - def test_state(self): + def test_configure_state(self): widget = self.create() if tcl_version < (8, 5): self.checkParams(widget, 'state', 'disabled', 'normal') else: self.checkEnumParam(widget, 'state', 'disabled', 'normal') - def test_tabs(self): + def test_configure_tabs(self): widget = self.create() if get_tk_patchlevel() < (8, 5, 11): self.checkParam(widget, 'tabs', (10.2, 20.7, '1i', '2i'), @@ -659,21 +658,21 @@ class TextTest(AbstractWidgetTest, unittest.TestCase): keep_orig=tcl_version >= (8, 5)) @requires_tcl(8, 5) - def test_tabstyle(self): + def test_configure_tabstyle(self): widget = self.create() self.checkEnumParam(widget, 'tabstyle', 'tabular', 'wordprocessor') - def test_undo(self): + def test_configure_undo(self): widget = self.create() self.checkBooleanParam(widget, 'undo') - def test_width(self): + def test_configure_width(self): widget = self.create() self.checkIntegerParam(widget, 'width', 402) self.checkParam(widget, 'width', -402, expected=1) self.checkParam(widget, 'width', 0, expected=1) - def test_wrap(self): + def test_configure_wrap(self): widget = self.create() if tcl_version < (8, 5): self.checkParams(widget, 'wrap', 'char', 'none', 'word') @@ -711,16 +710,16 @@ class CanvasTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Canvas(self.root, **kwargs) - def test_closeenough(self): + def test_configure_closeenough(self): widget = self.create() self.checkFloatParam(widget, 'closeenough', 24, 2.4, 3.6, -3, conv=float) - def test_confine(self): + def test_configure_confine(self): widget = self.create() self.checkBooleanParam(widget, 'confine') - def test_offset(self): + def test_configure_offset(self): widget = self.create() self.assertEqual(widget['offset'], '0,0') self.checkParams(widget, 'offset', @@ -729,7 +728,7 @@ class CanvasTest(AbstractWidgetTest, unittest.TestCase): self.checkParam(widget, 'offset', '#5,6') self.checkInvalidParam(widget, 'offset', 'spam') - def test_scrollregion(self): + def test_configure_scrollregion(self): widget = self.create() self.checkParam(widget, 'scrollregion', '0 0 200 150') self.checkParam(widget, 'scrollregion', (0, 0, 200, 150), @@ -741,17 +740,17 @@ class CanvasTest(AbstractWidgetTest, unittest.TestCase): self.checkInvalidParam(widget, 'scrollregion', (0, 0, 200)) self.checkInvalidParam(widget, 'scrollregion', (0, 0, 200, 150, 0)) - def test_state(self): + def test_configure_state(self): widget = self.create() self.checkEnumParam(widget, 'state', 'disabled', 'normal', errmsg='bad state value "{}": must be normal or disabled') - def test_xscrollincrement(self): + def test_configure_xscrollincrement(self): widget = self.create() self.checkPixelsParam(widget, 'xscrollincrement', 40, 0, 41.2, 43.6, -40, '0.5i') - def test_yscrollincrement(self): + def test_configure_yscrollincrement(self): widget = self.create() self.checkPixelsParam(widget, 'yscrollincrement', 10, 0, 11.2, 13.6, -10, '0.1i') @@ -796,26 +795,26 @@ class ListboxTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Listbox(self.root, **kwargs) - def test_activestyle(self): + def test_configure_activestyle(self): widget = self.create() self.checkEnumParam(widget, 'activestyle', 'dotbox', 'none', 'underline') - test_justify = requires_tcl(8, 6, 5)(StandardOptionsTests.test_justify) + test_justify = requires_tcl(8, 6, 5)(StandardOptionsTests.test_configure_justify) - def test_listvariable(self): + def test_configure_listvariable(self): widget = self.create() var = tkinter.DoubleVar(self.root) self.checkVariableParam(widget, 'listvariable', var) - def test_selectmode(self): + def test_configure_selectmode(self): widget = self.create() self.checkParam(widget, 'selectmode', 'single') self.checkParam(widget, 'selectmode', 'browse') self.checkParam(widget, 'selectmode', 'multiple') self.checkParam(widget, 'selectmode', 'extended') - def test_state(self): + def test_configure_state(self): widget = self.create() self.checkEnumParam(widget, 'state', 'disabled', 'normal') @@ -930,53 +929,53 @@ class ScaleTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Scale(self.root, **kwargs) - def test_bigincrement(self): + def test_configure_bigincrement(self): widget = self.create() self.checkFloatParam(widget, 'bigincrement', 12.4, 23.6, -5) - def test_digits(self): + def test_configure_digits(self): widget = self.create() self.checkIntegerParam(widget, 'digits', 5, 0) - def test_from(self): + def test_configure_from(self): widget = self.create() conv = False if get_tk_patchlevel() >= (8, 6, 10) else float_round self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=conv) - def test_label(self): + def test_configure_label(self): widget = self.create() self.checkParam(widget, 'label', 'any string') self.checkParam(widget, 'label', '') - def test_length(self): + def test_configure_length(self): widget = self.create() self.checkPixelsParam(widget, 'length', 130, 131.2, 135.6, '5i') - def test_resolution(self): + def test_configure_resolution(self): widget = self.create() self.checkFloatParam(widget, 'resolution', 4.2, 0, 6.7, -2) - def test_showvalue(self): + def test_configure_showvalue(self): widget = self.create() self.checkBooleanParam(widget, 'showvalue') - def test_sliderlength(self): + def test_configure_sliderlength(self): widget = self.create() self.checkPixelsParam(widget, 'sliderlength', 10, 11.2, 15.6, -3, '3m') - def test_sliderrelief(self): + def test_configure_sliderrelief(self): widget = self.create() self.checkReliefParam(widget, 'sliderrelief') - def test_tickinterval(self): + def test_configure_tickinterval(self): widget = self.create() self.checkFloatParam(widget, 'tickinterval', 1, 4.3, 7.6, 0, conv=float_round) self.checkParam(widget, 'tickinterval', -2, expected=2, conv=float_round) - def test_to(self): + def test_configure_to(self): widget = self.create() self.checkFloatParam(widget, 'to', 300, 14.9, 15.1, -10, conv=float_round) @@ -1000,15 +999,15 @@ class ScrollbarTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Scrollbar(self.root, **kwargs) - def test_activerelief(self): + def test_configure_activerelief(self): widget = self.create() self.checkReliefParam(widget, 'activerelief') - def test_elementborderwidth(self): + def test_configure_elementborderwidth(self): widget = self.create() self.checkPixelsParam(widget, 'elementborderwidth', 4.3, 5.6, -2, '1m') - def test_orient(self): + def test_configure_orient(self): widget = self.create() self.checkEnumParam(widget, 'orient', 'vertical', 'horizontal', errmsg='bad orientation "{}": must be vertical or horizontal') @@ -1049,63 +1048,63 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return tkinter.PanedWindow(self.root, **kwargs) - def test_handlepad(self): + def test_configure_handlepad(self): widget = self.create() self.checkPixelsParam(widget, 'handlepad', 5, 6.4, 7.6, -3, '1m') - def test_handlesize(self): + def test_configure_handlesize(self): widget = self.create() self.checkPixelsParam(widget, 'handlesize', 8, 9.4, 10.6, -3, '2m', conv=noconv) - def test_height(self): + def test_configure_height(self): widget = self.create() self.checkPixelsParam(widget, 'height', 100, 101.2, 102.6, -100, 0, '1i', conv=noconv) - def test_opaqueresize(self): + def test_configure_opaqueresize(self): widget = self.create() self.checkBooleanParam(widget, 'opaqueresize') @requires_tcl(8, 6, 5) - def test_proxybackground(self): + def test_configure_proxybackground(self): widget = self.create() self.checkColorParam(widget, 'proxybackground') @requires_tcl(8, 6, 5) - def test_proxyborderwidth(self): + def test_configure_proxyborderwidth(self): widget = self.create() self.checkPixelsParam(widget, 'proxyborderwidth', 0, 1.3, 2.9, 6, -2, '10p', conv=noconv) @requires_tcl(8, 6, 5) - def test_proxyrelief(self): + def test_configure_proxyrelief(self): widget = self.create() self.checkReliefParam(widget, 'proxyrelief') - def test_sashcursor(self): + def test_configure_sashcursor(self): widget = self.create() self.checkCursorParam(widget, 'sashcursor') - def test_sashpad(self): + def test_configure_sashpad(self): widget = self.create() self.checkPixelsParam(widget, 'sashpad', 8, 1.3, 2.6, -2, '2m') - def test_sashrelief(self): + def test_configure_sashrelief(self): widget = self.create() self.checkReliefParam(widget, 'sashrelief') - def test_sashwidth(self): + def test_configure_sashwidth(self): widget = self.create() self.checkPixelsParam(widget, 'sashwidth', 10, 11.1, 15.6, -3, '1m', conv=noconv) - def test_showhandle(self): + def test_configure_showhandle(self): widget = self.create() self.checkBooleanParam(widget, 'showhandle') - def test_width(self): + def test_configure_width(self): widget = self.create() self.checkPixelsParam(widget, 'width', 402, 403.4, 404.6, -402, 0, '5i', conv=noconv) @@ -1224,23 +1223,23 @@ class MenuTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Menu(self.root, **kwargs) - def test_postcommand(self): + def test_configure_postcommand(self): widget = self.create() self.checkCommandParam(widget, 'postcommand') - def test_tearoff(self): + def test_configure_tearoff(self): widget = self.create() self.checkBooleanParam(widget, 'tearoff') - def test_tearoffcommand(self): + def test_configure_tearoffcommand(self): widget = self.create() self.checkCommandParam(widget, 'tearoffcommand') - def test_title(self): + def test_configure_title(self): widget = self.create() self.checkParam(widget, 'title', 'any string') - def test_type(self): + def test_configure_type(self): widget = self.create() self.checkEnumParam(widget, 'type', 'normal', 'tearoff', 'menubar') @@ -1293,17 +1292,26 @@ class MessageTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return tkinter.Message(self.root, **kwargs) - def test_aspect(self): + def test_configure_aspect(self): widget = self.create() self.checkIntegerParam(widget, 'aspect', 250, 0, -300) +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_frame(self): + self._test_widget(tkinter.Frame) + + def test_label(self): + self._test_widget(tkinter.Label) + + tests_gui = ( ButtonTest, CanvasTest, CheckbuttonTest, EntryTest, FrameTest, LabelFrameTest,LabelTest, ListboxTest, MenubuttonTest, MenuTest, MessageTest, OptionMenuTest, PanedWindowTest, RadiobuttonTest, ScaleTest, ScrollbarTest, - SpinboxTest, TextTest, ToplevelTest, + SpinboxTest, TextTest, ToplevelTest, DefaultRootTest, ) if __name__ == '__main__': diff --git a/Lib/tkinter/test/test_ttk/test_extensions.py b/Lib/tkinter/test/test_ttk/test_extensions.py index a45f882bb00..1a70e0befe6 100644 --- a/Lib/tkinter/test/test_ttk/test_extensions.py +++ b/Lib/tkinter/test/test_ttk/test_extensions.py @@ -2,8 +2,8 @@ import sys import unittest import tkinter from tkinter import ttk -from test.support import requires, run_unittest, swap_attr -from tkinter.test.support import AbstractTkTest, destroy_default_root +from test.support import requires, run_unittest +from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest requires('gui') @@ -46,20 +46,6 @@ class LabeledScaleTest(AbstractTkTest, unittest.TestCase): if hasattr(sys, 'last_type'): self.assertNotEqual(sys.last_type, tkinter.TclError) - - def test_initialization_no_master(self): - # no master passing - with swap_attr(tkinter, '_default_root', None), \ - swap_attr(tkinter, '_support_default_root', True): - try: - x = ttk.LabeledScale() - self.assertIsNotNone(tkinter._default_root) - self.assertEqual(x.master, tkinter._default_root) - self.assertEqual(x.tk, tkinter._default_root.tk) - x.destroy() - finally: - destroy_default_root() - def test_initialization(self): # master passing master = tkinter.Frame(self.root) @@ -114,7 +100,6 @@ class LabeledScaleTest(AbstractTkTest, unittest.TestCase): def test_horizontal_range(self): lscale = ttk.LabeledScale(self.root, from_=0, to=10) lscale.pack() - lscale.wait_visibility() lscale.update() linfo_1 = lscale.label.place_info() @@ -144,7 +129,6 @@ class LabeledScaleTest(AbstractTkTest, unittest.TestCase): def test_variable_change(self): x = ttk.LabeledScale(self.root) x.pack() - x.wait_visibility() x.update() curr_xcoord = x.scale.coords()[0] @@ -187,7 +171,6 @@ class LabeledScaleTest(AbstractTkTest, unittest.TestCase): def test_resize(self): x = ttk.LabeledScale(self.root) x.pack(expand=True, fill='both') - x.wait_visibility() x.update() width, height = x.master.winfo_width(), x.master.winfo_height() @@ -268,7 +251,6 @@ class OptionMenuTest(AbstractTkTest, unittest.TestCase): # check that variable is updated correctly optmenu.pack() - optmenu.wait_visibility() optmenu['menu'].invoke(0) self.assertEqual(optmenu._variable.get(), items[0]) @@ -299,9 +281,7 @@ class OptionMenuTest(AbstractTkTest, unittest.TestCase): textvar2 = tkinter.StringVar(self.root) optmenu2 = ttk.OptionMenu(self.root, textvar2, default, *items) optmenu.pack() - optmenu.wait_visibility() optmenu2.pack() - optmenu2.wait_visibility() optmenu['menu'].invoke(1) optmenu2['menu'].invoke(2) optmenu_stringvar_name = optmenu['menu'].entrycget(0, 'variable') @@ -317,7 +297,13 @@ class OptionMenuTest(AbstractTkTest, unittest.TestCase): optmenu2.destroy() -tests_gui = (LabeledScaleTest, OptionMenuTest) +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_labeledscale(self): + self._test_widget(ttk.LabeledScale) + + +tests_gui = (LabeledScaleTest, OptionMenuTest, DefaultRootTest) if __name__ == "__main__": run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_ttk/test_style.py b/Lib/tkinter/test/test_ttk/test_style.py index 54e91331176..38d70d7a890 100644 --- a/Lib/tkinter/test/test_ttk/test_style.py +++ b/Lib/tkinter/test/test_ttk/test_style.py @@ -1,4 +1,5 @@ import unittest +import sys import tkinter from tkinter import ttk from test import support @@ -136,6 +137,10 @@ class StyleTest(AbstractTkTest, unittest.TestCase): with self.subTest(theme=theme, name=name): if support.verbose >= 2: print('configure', theme, name, default) + if (theme in ('vista', 'xpnative') + and sys.getwindowsversion()[:2] == (6, 1)): + # Fails on the Windows 7 buildbot + continue newname = f'C.{name}' self.assertEqual(style.configure(newname), None) style.configure(newname, **default) @@ -158,6 +163,10 @@ class StyleTest(AbstractTkTest, unittest.TestCase): with self.subTest(theme=theme, name=name): if support.verbose >= 2: print('map', theme, name, default) + if (theme in ('vista', 'xpnative') + and sys.getwindowsversion()[:2] == (6, 1)): + # Fails on the Windows 7 buildbot + continue newname = f'C.{name}' self.assertEqual(style.map(newname), {}) style.map(newname, **default) diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py index e20ec390710..1fac83a004a 100644 --- a/Lib/tkinter/test/test_ttk/test_widgets.py +++ b/Lib/tkinter/test/test_ttk/test_widgets.py @@ -6,7 +6,7 @@ import sys from tkinter.test.test_ttk.test_functions import MockTclObj from tkinter.test.support import (AbstractTkTest, tcl_version, get_tk_patchlevel, - simulate_mouse_click) + simulate_mouse_click, AbstractDefaultRootTest) from tkinter.test.widget_tests import (add_standard_options, noconv, AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests, setUpModule) @@ -16,7 +16,7 @@ requires('gui') class StandardTtkOptionsTests(StandardOptionsTests): - def test_class(self): + def test_configure_class(self): widget = self.create() self.assertEqual(widget['class'], '') errmsg='attempt to change read-only option' @@ -26,7 +26,7 @@ class StandardTtkOptionsTests(StandardOptionsTests): widget2 = self.create(class_='Foo') self.assertEqual(widget2['class'], 'Foo') - def test_padding(self): + def test_configure_padding(self): widget = self.create() self.checkParam(widget, 'padding', 0, expected=('0',)) self.checkParam(widget, 'padding', 5, expected=('5',)) @@ -38,7 +38,7 @@ class StandardTtkOptionsTests(StandardOptionsTests): self.checkParam(widget, 'padding', ('5p', '6p', '7p', '8p')) self.checkParam(widget, 'padding', (), expected='') - def test_style(self): + def test_configure_style(self): widget = self.create() self.assertEqual(widget['style'], '') errmsg = 'Layout Foo not found' @@ -60,11 +60,10 @@ class WidgetTest(AbstractTkTest, unittest.TestCase): super().setUp() self.widget = ttk.Button(self.root, width=0, text="Text") self.widget.pack() - self.widget.wait_visibility() def test_identify(self): - self.widget.update_idletasks() + self.widget.update() self.assertEqual(self.widget.identify( int(self.widget.winfo_width() / 2), int(self.widget.winfo_height() / 2) @@ -140,14 +139,14 @@ class LabelFrameTest(AbstractToplevelTest, unittest.TestCase): def create(self, **kwargs): return ttk.LabelFrame(self.root, **kwargs) - def test_labelanchor(self): + def test_configure_labelanchor(self): widget = self.create() self.checkEnumParam(widget, 'labelanchor', 'e', 'en', 'es', 'n', 'ne', 'nw', 's', 'se', 'sw', 'w', 'wn', 'ws', errmsg='Bad label anchor specification {}') self.checkInvalidParam(widget, 'labelanchor', 'center') - def test_labelwidget(self): + def test_configure_labelwidget(self): widget = self.create() label = ttk.Label(self.root, text='Mupp', name='foo') self.checkParam(widget, 'labelwidget', label, expected='.foo') @@ -169,17 +168,17 @@ class AbstractLabelTest(AbstractWidgetTest): self.checkInvalidParam(widget, name, 'spam', errmsg='image "spam" doesn\'t exist') - def test_compound(self): + def test_configure_compound(self): widget = self.create() self.checkEnumParam(widget, 'compound', 'none', 'text', 'image', 'center', 'top', 'bottom', 'left', 'right') - def test_state(self): + def test_configure_state(self): widget = self.create() self.checkParams(widget, 'state', 'active', 'disabled', 'normal') - def test_width(self): + def test_configure_width(self): widget = self.create() self.checkParams(widget, 'width', 402, -402, 0) @@ -198,7 +197,7 @@ class LabelTest(AbstractLabelTest, unittest.TestCase): def create(self, **kwargs): return ttk.Label(self.root, **kwargs) - def test_font(self): + def test_configure_font(self): widget = self.create() self.checkParam(widget, 'font', '-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') @@ -216,7 +215,7 @@ class ButtonTest(AbstractLabelTest, unittest.TestCase): def create(self, **kwargs): return ttk.Button(self.root, **kwargs) - def test_default(self): + def test_configure_default(self): widget = self.create() self.checkEnumParam(widget, 'default', 'normal', 'active', 'disabled') @@ -241,11 +240,11 @@ class CheckbuttonTest(AbstractLabelTest, unittest.TestCase): def create(self, **kwargs): return ttk.Checkbutton(self.root, **kwargs) - def test_offvalue(self): + def test_configure_offvalue(self): widget = self.create() self.checkParams(widget, 'offvalue', 1, 2.3, '', 'any string') - def test_onvalue(self): + def test_configure_onvalue(self): widget = self.create() self.checkParams(widget, 'onvalue', 1, 2.3, '', 'any string') @@ -293,27 +292,27 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return ttk.Entry(self.root, **kwargs) - def test_invalidcommand(self): + def test_configure_invalidcommand(self): widget = self.create() self.checkCommandParam(widget, 'invalidcommand') - def test_show(self): + def test_configure_show(self): widget = self.create() self.checkParam(widget, 'show', '*') self.checkParam(widget, 'show', '') self.checkParam(widget, 'show', ' ') - def test_state(self): + def test_configure_state(self): widget = self.create() self.checkParams(widget, 'state', 'disabled', 'normal', 'readonly') - def test_validate(self): + def test_configure_validate(self): widget = self.create() self.checkEnumParam(widget, 'validate', 'all', 'key', 'focus', 'focusin', 'focusout', 'none') - def test_validatecommand(self): + def test_configure_validatecommand(self): widget = self.create() self.checkCommandParam(widget, 'validatecommand') @@ -326,8 +325,7 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase): def test_identify(self): self.entry.pack() - self.entry.wait_visibility() - self.entry.update_idletasks() + self.entry.update() # bpo-27313: macOS Cocoa widget differs from X, allow either if sys.platform == 'darwin': @@ -431,7 +429,7 @@ class ComboboxTest(EntryTest, unittest.TestCase): def create(self, **kwargs): return ttk.Combobox(self.root, **kwargs) - def test_height(self): + def test_configure_height(self): widget = self.create() self.checkParams(widget, 'height', 100, 101.2, 102.6, -100, 0, '1i') @@ -450,7 +448,7 @@ class ComboboxTest(EntryTest, unittest.TestCase): self.combo.bind('<>', lambda evt: success.append(True)) self.combo.pack() - self.combo.wait_visibility() + self.combo.update() height = self.combo.winfo_height() self._show_drop_down_listbox() @@ -461,12 +459,12 @@ class ComboboxTest(EntryTest, unittest.TestCase): self.assertTrue(success) - def test_postcommand(self): + def test_configure_postcommand(self): success = [] self.combo['postcommand'] = lambda: success.append(True) self.combo.pack() - self.combo.wait_visibility() + self.combo.update() self._show_drop_down_listbox() self.assertTrue(success) @@ -477,7 +475,7 @@ class ComboboxTest(EntryTest, unittest.TestCase): self.assertEqual(len(success), 1) - def test_values(self): + def test_configure_values(self): def check_get_current(getval, currval): self.assertEqual(self.combo.get(), getval) self.assertEqual(self.combo.current(), currval) @@ -553,7 +551,7 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return ttk.PanedWindow(self.root, **kwargs) - def test_orient(self): + def test_configure_orient(self): widget = self.create() self.assertEqual(str(widget['orient']), 'vertical') errmsg='attempt to change read-only option' @@ -666,7 +664,6 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase): self.assertRaises(tkinter.TclError, self.paned.sashpos, 1) self.paned.pack(expand=True, fill='both') - self.paned.wait_visibility() curr_pos = self.paned.sashpos(0) self.paned.sashpos(0, 1000) @@ -687,11 +684,11 @@ class RadiobuttonTest(AbstractLabelTest, unittest.TestCase): def create(self, **kwargs): return ttk.Radiobutton(self.root, **kwargs) - def test_value(self): + def test_configure_value(self): widget = self.create() self.checkParams(widget, 'value', 1, 2.3, '', 'any string') - def test_invoke(self): + def test_configure_invoke(self): success = [] def cb_test(): success.append(1) @@ -742,7 +739,7 @@ class MenubuttonTest(AbstractLabelTest, unittest.TestCase): self.checkEnumParam(widget, 'direction', 'above', 'below', 'left', 'right', 'flush') - def test_menu(self): + def test_configure_menu(self): widget = self.create() menu = tkinter.Menu(widget, name='menu') self.checkParam(widget, 'menu', menu, conv=str) @@ -767,19 +764,19 @@ class ScaleTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return ttk.Scale(self.root, **kwargs) - def test_from(self): + def test_configure_from(self): widget = self.create() self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=False) - def test_length(self): + def test_configure_length(self): widget = self.create() self.checkPixelsParam(widget, 'length', 130, 131.2, 135.6, '5i') - def test_to(self): + def test_configure_to(self): widget = self.create() self.checkFloatParam(widget, 'to', 300, 14.9, 15.1, -10, conv=False) - def test_value(self): + def test_configure_value(self): widget = self.create() self.checkFloatParam(widget, 'value', 300, 14.9, 15.1, -10, conv=False) @@ -869,23 +866,23 @@ class ProgressbarTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return ttk.Progressbar(self.root, **kwargs) - def test_length(self): + def test_configure_length(self): widget = self.create() self.checkPixelsParam(widget, 'length', 100.1, 56.7, '2i') - def test_maximum(self): + def test_configure_maximum(self): widget = self.create() self.checkFloatParam(widget, 'maximum', 150.2, 77.7, 0, -10, conv=False) - def test_mode(self): + def test_configure_mode(self): widget = self.create() self.checkEnumParam(widget, 'mode', 'determinate', 'indeterminate') - def test_phase(self): + def test_configure_phase(self): # XXX pass - def test_value(self): + def test_configure_value(self): widget = self.create() self.checkFloatParam(widget, 'value', 150.2, 77.7, 0, -10, conv=False) @@ -934,7 +931,7 @@ class NotebookTest(AbstractWidgetTest, unittest.TestCase): self.nb.add(self.child1, text='a') self.nb.pack() - self.nb.wait_visibility() + self.nb.update() if sys.platform == 'darwin': tb_idx = "@20,5" else: @@ -1042,7 +1039,7 @@ class NotebookTest(AbstractWidgetTest, unittest.TestCase): def test_select(self): self.nb.pack() - self.nb.wait_visibility() + self.nb.update() success = [] tab_changed = [] @@ -1074,7 +1071,7 @@ class NotebookTest(AbstractWidgetTest, unittest.TestCase): self.assertEqual(self.nb.tab(self.child1, 'text'), 'abc') - def test_tabs(self): + def test_configure_tabs(self): self.assertEqual(len(self.nb.tabs()), 2) self.nb.forget(self.child1) @@ -1085,7 +1082,7 @@ class NotebookTest(AbstractWidgetTest, unittest.TestCase): def test_traversal(self): self.nb.pack() - self.nb.wait_visibility() + self.nb.update() self.nb.select(0) @@ -1150,7 +1147,7 @@ class SpinboxTest(EntryTest, unittest.TestCase): self.spin.event_generate('', x=x, y=y) self.spin.update_idletasks() - def test_command(self): + def test_configure_command(self): success = [] self.spin['command'] = lambda: success.append(True) @@ -1170,7 +1167,7 @@ class SpinboxTest(EntryTest, unittest.TestCase): self.spin.update() self.assertEqual(len(success), 2) - def test_to(self): + def test_configure_to(self): self.spin['from'] = 0 self.spin['to'] = 5 self.spin.set(4) @@ -1182,7 +1179,7 @@ class SpinboxTest(EntryTest, unittest.TestCase): self._click_increment_arrow() # 5 self.assertEqual(self.spin.get(), '5') - def test_from(self): + def test_configure_from(self): self.spin['from'] = 1 self.spin['to'] = 10 self.spin.set(2) @@ -1192,7 +1189,7 @@ class SpinboxTest(EntryTest, unittest.TestCase): self._click_decrement_arrow() # 1 self.assertEqual(self.spin.get(), '1') - def test_increment(self): + def test_configure_increment(self): self.spin['from'] = 0 self.spin['to'] = 10 self.spin['increment'] = 4 @@ -1206,7 +1203,7 @@ class SpinboxTest(EntryTest, unittest.TestCase): self._click_decrement_arrow() # 3 self.assertEqual(self.spin.get(), '3') - def test_format(self): + def test_configure_format(self): self.spin.set(1) self.spin['format'] = '%10.3f' self.spin.update() @@ -1223,7 +1220,7 @@ class SpinboxTest(EntryTest, unittest.TestCase): self.assertTrue('.' not in value) self.assertEqual(len(value), 1) - def test_wrap(self): + def test_configure_wrap(self): self.spin['to'] = 10 self.spin['from'] = 1 self.spin.set(1) @@ -1242,7 +1239,7 @@ class SpinboxTest(EntryTest, unittest.TestCase): self._click_decrement_arrow() self.assertEqual(self.spin.get(), '1') - def test_values(self): + def test_configure_values(self): self.assertEqual(self.spin['values'], () if tcl_version < (8, 5) else '') self.checkParam(self.spin, 'values', 'mon tue wed thur', @@ -1302,14 +1299,14 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return ttk.Treeview(self.root, **kwargs) - def test_columns(self): + def test_configure_columns(self): widget = self.create() self.checkParam(widget, 'columns', 'a b c', expected=('a', 'b', 'c')) self.checkParam(widget, 'columns', ('a', 'b', 'c')) self.checkParam(widget, 'columns', '') - def test_displaycolumns(self): + def test_configure_displaycolumns(self): widget = self.create() widget['columns'] = ('a', 'b', 'c') self.checkParam(widget, 'displaycolumns', 'b a c', @@ -1325,17 +1322,17 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase): self.checkInvalidParam(widget, 'displaycolumns', (1, -2), errmsg='Column index -2 out of bounds') - def test_height(self): + def test_configure_height(self): widget = self.create() self.checkPixelsParam(widget, 'height', 100, -100, 0, '3c', conv=False) self.checkPixelsParam(widget, 'height', 101.2, 102.6, conv=noconv) - def test_selectmode(self): + def test_configure_selectmode(self): widget = self.create() self.checkEnumParam(widget, 'selectmode', 'none', 'browse', 'extended') - def test_show(self): + def test_configure_show(self): widget = self.create() self.checkParam(widget, 'show', 'tree headings', expected=('tree', 'headings')) @@ -1347,7 +1344,6 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase): def test_bbox(self): self.tv.pack() self.assertEqual(self.tv.bbox(''), '') - self.tv.wait_visibility() self.tv.update() item_id = self.tv.insert('', 'end') @@ -1544,7 +1540,6 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase): success = [] # no success for now self.tv.pack() - self.tv.wait_visibility() self.tv.heading('#0', command=lambda: success.append(True)) self.tv.column('#0', width=100) self.tv.update() @@ -1792,7 +1787,6 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase): lambda evt: events.append(2)) self.tv.pack() - self.tv.wait_visibility() self.tv.update() pos_y = set() @@ -1866,12 +1860,22 @@ class SizegripTest(AbstractWidgetTest, unittest.TestCase): def create(self, **kwargs): return ttk.Sizegrip(self.root, **kwargs) + +class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): + + def test_frame(self): + self._test_widget(ttk.Frame) + + def test_label(self): + self._test_widget(ttk.Label) + + tests_gui = ( ButtonTest, CheckbuttonTest, ComboboxTest, EntryTest, FrameTest, LabelFrameTest, LabelTest, MenubuttonTest, NotebookTest, PanedWindowTest, ProgressbarTest, RadiobuttonTest, ScaleTest, ScrollbarTest, SeparatorTest, - SizegripTest, SpinboxTest, TreeviewTest, WidgetTest, + SizegripTest, SpinboxTest, TreeviewTest, WidgetTest, DefaultRootTest, ) if __name__ == "__main__": diff --git a/Lib/tkinter/test/widget_tests.py b/Lib/tkinter/test/widget_tests.py index b42ff52178f..9702ff45300 100644 --- a/Lib/tkinter/test/widget_tests.py +++ b/Lib/tkinter/test/widget_tests.py @@ -1,7 +1,6 @@ # Common tests for test_tkinter/test_widgets.py and test_ttk/test_widgets.py import unittest -import sys import tkinter from tkinter.test.support import (AbstractTkTest, tcl_version, requires_tcl, get_tk_patchlevel, pixels_conv, tcl_obj_eq) @@ -243,31 +242,31 @@ class StandardOptionsTests: 'underline', 'wraplength', 'xscrollcommand', 'yscrollcommand', ) - def test_activebackground(self): + def test_configure_activebackground(self): widget = self.create() self.checkColorParam(widget, 'activebackground') - def test_activeborderwidth(self): + def test_configure_activeborderwidth(self): widget = self.create() self.checkPixelsParam(widget, 'activeborderwidth', 0, 1.3, 2.9, 6, -2, '10p') - def test_activeforeground(self): + def test_configure_activeforeground(self): widget = self.create() self.checkColorParam(widget, 'activeforeground') - def test_anchor(self): + def test_configure_anchor(self): widget = self.create() self.checkEnumParam(widget, 'anchor', 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw', 'center') - def test_background(self): + def test_configure_background(self): widget = self.create() self.checkColorParam(widget, 'background') if 'bg' in self.OPTIONS: self.checkColorParam(widget, 'bg') - def test_bitmap(self): + def test_configure_bitmap(self): widget = self.create() self.checkParam(widget, 'bitmap', 'questhead') self.checkParam(widget, 'bitmap', 'gray50') @@ -280,90 +279,88 @@ class StandardOptionsTests: self.checkInvalidParam(widget, 'bitmap', 'spam', errmsg='bitmap "spam" not defined') - def test_borderwidth(self): + def test_configure_borderwidth(self): widget = self.create() self.checkPixelsParam(widget, 'borderwidth', 0, 1.3, 2.6, 6, -2, '10p') if 'bd' in self.OPTIONS: self.checkPixelsParam(widget, 'bd', 0, 1.3, 2.6, 6, -2, '10p') - def test_compound(self): + def test_configure_compound(self): widget = self.create() self.checkEnumParam(widget, 'compound', 'bottom', 'center', 'left', 'none', 'right', 'top') - def test_cursor(self): + def test_configure_cursor(self): widget = self.create() self.checkCursorParam(widget, 'cursor') - def test_disabledforeground(self): + def test_configure_disabledforeground(self): widget = self.create() self.checkColorParam(widget, 'disabledforeground') - def test_exportselection(self): + def test_configure_exportselection(self): widget = self.create() self.checkBooleanParam(widget, 'exportselection') - def test_font(self): + def test_configure_font(self): widget = self.create() self.checkParam(widget, 'font', '-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*') self.checkInvalidParam(widget, 'font', '', errmsg='font "" doesn\'t exist') - def test_foreground(self): + def test_configure_foreground(self): widget = self.create() self.checkColorParam(widget, 'foreground') if 'fg' in self.OPTIONS: self.checkColorParam(widget, 'fg') - def test_highlightbackground(self): + def test_configure_highlightbackground(self): widget = self.create() self.checkColorParam(widget, 'highlightbackground') - def test_highlightcolor(self): + def test_configure_highlightcolor(self): widget = self.create() self.checkColorParam(widget, 'highlightcolor') - def test_highlightthickness(self): + def test_configure_highlightthickness(self): widget = self.create() self.checkPixelsParam(widget, 'highlightthickness', 0, 1.3, 2.6, 6, '10p') self.checkParam(widget, 'highlightthickness', -2, expected=0, conv=self._conv_pixels) - @unittest.skipIf(sys.platform == 'darwin', - 'crashes with Cocoa Tk (issue19733)') - def test_image(self): + def test_configure_image(self): widget = self.create() self.checkImageParam(widget, 'image') - def test_insertbackground(self): + def test_configure_insertbackground(self): widget = self.create() self.checkColorParam(widget, 'insertbackground') - def test_insertborderwidth(self): + def test_configure_insertborderwidth(self): widget = self.create() self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, 2.6, 6, -2, '10p') - def test_insertofftime(self): + def test_configure_insertofftime(self): widget = self.create() self.checkIntegerParam(widget, 'insertofftime', 100) - def test_insertontime(self): + def test_configure_insertontime(self): widget = self.create() self.checkIntegerParam(widget, 'insertontime', 100) - def test_insertwidth(self): + def test_configure_insertwidth(self): widget = self.create() self.checkPixelsParam(widget, 'insertwidth', 1.3, 2.6, -2, '10p') - def test_jump(self): + def test_configure_jump(self): widget = self.create() self.checkBooleanParam(widget, 'jump') - def test_justify(self): + def test_configure_justify(self): widget = self.create() self.checkEnumParam(widget, 'justify', 'left', 'right', 'center', errmsg='bad justification "{}": must be ' @@ -372,154 +369,155 @@ class StandardOptionsTests: errmsg='ambiguous justification "": must be ' 'left, right, or center') - def test_orient(self): + def test_configure_orient(self): widget = self.create() self.assertEqual(str(widget['orient']), self.default_orient) self.checkEnumParam(widget, 'orient', 'horizontal', 'vertical') - def test_padx(self): + def test_configure_padx(self): widget = self.create() self.checkPixelsParam(widget, 'padx', 3, 4.4, 5.6, -2, '12m', conv=self._conv_pad_pixels) - def test_pady(self): + def test_configure_pady(self): widget = self.create() self.checkPixelsParam(widget, 'pady', 3, 4.4, 5.6, -2, '12m', conv=self._conv_pad_pixels) - def test_relief(self): + def test_configure_relief(self): widget = self.create() self.checkReliefParam(widget, 'relief') - def test_repeatdelay(self): + def test_configure_repeatdelay(self): widget = self.create() self.checkIntegerParam(widget, 'repeatdelay', -500, 500) - def test_repeatinterval(self): + def test_configure_repeatinterval(self): widget = self.create() self.checkIntegerParam(widget, 'repeatinterval', -500, 500) - def test_selectbackground(self): + def test_configure_selectbackground(self): widget = self.create() self.checkColorParam(widget, 'selectbackground') - def test_selectborderwidth(self): + def test_configure_selectborderwidth(self): widget = self.create() self.checkPixelsParam(widget, 'selectborderwidth', 1.3, 2.6, -2, '10p') - def test_selectforeground(self): + def test_configure_selectforeground(self): widget = self.create() self.checkColorParam(widget, 'selectforeground') - def test_setgrid(self): + def test_configure_setgrid(self): widget = self.create() self.checkBooleanParam(widget, 'setgrid') - def test_state(self): + def test_configure_state(self): widget = self.create() self.checkEnumParam(widget, 'state', 'active', 'disabled', 'normal') - def test_takefocus(self): + def test_configure_takefocus(self): widget = self.create() self.checkParams(widget, 'takefocus', '0', '1', '') - def test_text(self): + def test_configure_text(self): widget = self.create() self.checkParams(widget, 'text', '', 'any string') - def test_textvariable(self): + def test_configure_textvariable(self): widget = self.create() var = tkinter.StringVar(self.root) self.checkVariableParam(widget, 'textvariable', var) - def test_troughcolor(self): + def test_configure_troughcolor(self): widget = self.create() self.checkColorParam(widget, 'troughcolor') - def test_underline(self): + def test_configure_underline(self): widget = self.create() self.checkIntegerParam(widget, 'underline', 0, 1, 10) - def test_wraplength(self): + def test_configure_wraplength(self): widget = self.create() self.checkPixelsParam(widget, 'wraplength', 100) - def test_xscrollcommand(self): + def test_configure_xscrollcommand(self): widget = self.create() self.checkCommandParam(widget, 'xscrollcommand') - def test_yscrollcommand(self): + def test_configure_yscrollcommand(self): widget = self.create() self.checkCommandParam(widget, 'yscrollcommand') # non-standard but common options - def test_command(self): + def test_configure_command(self): widget = self.create() self.checkCommandParam(widget, 'command') - def test_indicatoron(self): + def test_configure_indicatoron(self): widget = self.create() self.checkBooleanParam(widget, 'indicatoron') - def test_offrelief(self): + def test_configure_offrelief(self): widget = self.create() self.checkReliefParam(widget, 'offrelief') - def test_overrelief(self): + def test_configure_overrelief(self): widget = self.create() self.checkReliefParam(widget, 'overrelief') - def test_selectcolor(self): + def test_configure_selectcolor(self): widget = self.create() self.checkColorParam(widget, 'selectcolor') - def test_selectimage(self): + def test_configure_selectimage(self): widget = self.create() self.checkImageParam(widget, 'selectimage') @requires_tcl(8, 5) - def test_tristateimage(self): + def test_configure_tristateimage(self): widget = self.create() self.checkImageParam(widget, 'tristateimage') @requires_tcl(8, 5) - def test_tristatevalue(self): + def test_configure_tristatevalue(self): widget = self.create() self.checkParam(widget, 'tristatevalue', 'unknowable') - def test_variable(self): + def test_configure_variable(self): widget = self.create() var = tkinter.DoubleVar(self.root) self.checkVariableParam(widget, 'variable', var) class IntegerSizeTests: - def test_height(self): + def test_configure_height(self): widget = self.create() self.checkIntegerParam(widget, 'height', 100, -100, 0) - def test_width(self): + def test_configure_width(self): widget = self.create() self.checkIntegerParam(widget, 'width', 402, -402, 0) class PixelSizeTests: - def test_height(self): + def test_configure_height(self): widget = self.create() self.checkPixelsParam(widget, 'height', 100, 101.2, 102.6, -100, 0, '3c') - def test_width(self): + def test_configure_width(self): widget = self.create() self.checkPixelsParam(widget, 'width', 402, 403.4, 404.6, -402, 0, '5i') def add_standard_options(*source_classes): - # This decorator adds test_xxx methods from source classes for every xxx - # option in the OPTIONS class attribute if they are not defined explicitly. + # This decorator adds test_configure_xxx methods from source classes for + # every xxx option in the OPTIONS class attribute if they are not defined + # explicitly. def decorator(cls): for option in cls.OPTIONS: - methodname = 'test_' + option + methodname = 'test_configure_' + option if not hasattr(cls, methodname): for source_class in source_classes: if hasattr(source_class, methodname): diff --git a/Lib/tkinter/tix.py b/Lib/tkinter/tix.py index ac545502e45..7d240754036 100644 --- a/Lib/tkinter/tix.py +++ b/Lib/tkinter/tix.py @@ -386,10 +386,8 @@ class TixWidget(tkinter.Widget): self.tk.call(name, 'configure', '-' + option, value) # These are missing from Tkinter def image_create(self, imgtype, cnf={}, master=None, **kw): - if not master: - master = tkinter._default_root - if not master: - raise RuntimeError('Too early to create image') + if master is None: + master = self if kw and cnf: cnf = _cnfmerge((cnf, kw)) elif kw: cnf = kw options = () @@ -469,16 +467,13 @@ class DisplayStyle: (multiple) Display Items""" def __init__(self, itemtype, cnf={}, *, master=None, **kw): - if not master: + if master is None: if 'refwindow' in kw: master = kw['refwindow'] elif 'refwindow' in cnf: master = cnf['refwindow'] else: - master = tkinter._default_root - if not master: - raise RuntimeError("Too early to create display style: " - "no root window") + master = tkinter._get_default_root('create display style') self.tk = master.tk self.stylename = self.tk.call('tixDisplayStyle', itemtype, *self._options(cnf,kw) ) @@ -867,7 +862,7 @@ class HList(TixWidget, XView, YView): return self.tk.call(self._w, 'add', entry, *self._options(cnf, kw)) def add_child(self, parent=None, cnf={}, **kw): - if not parent: + if parent is None: parent = '' return self.tk.call( self._w, 'addchild', parent, *self._options(cnf, kw)) diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py index 968fd54dce1..b854235a626 100644 --- a/Lib/tkinter/ttk.py +++ b/Lib/tkinter/ttk.py @@ -349,12 +349,7 @@ def setup_master(master=None): If it is not allowed to use the default root and master is None, RuntimeError is raised.""" if master is None: - if tkinter._support_default_root: - master = tkinter._default_root or tkinter.Tk() - else: - raise RuntimeError( - "No master specified and tkinter is " - "configured to not support default root") + master = tkinter._get_default_root() return master @@ -574,7 +569,7 @@ class Widget(tkinter.Widget): matches statespec. statespec is expected to be a sequence.""" ret = self.tk.getboolean( self.tk.call(self._w, "instate", ' '.join(statespec))) - if ret and callback: + if ret and callback is not None: return callback(*args, **kw) return ret @@ -1538,7 +1533,10 @@ class LabeledScale(Frame): scale_side = 'bottom' if self._label_top else 'top' label_side = 'top' if scale_side == 'bottom' else 'bottom' self.scale.pack(side=scale_side, fill='x') - tmp = Label(self).pack(side=label_side) # place holder + # Dummy required to make frame correct height + dummy = Label(self) + dummy.pack(side=label_side) + dummy.lower() self.label.place(anchor='n' if label_side == 'top' else 's') # update the label as scale or variable changes diff --git a/Lib/traceback.py b/Lib/traceback.py index d2d93c8a32a..4e008bc0e08 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -510,7 +510,6 @@ class TracebackException: _seen=_seen) else: context = None - self.exc_traceback = exc_traceback self.__cause__ = cause self.__context__ = context self.__suppress_context__ = \ @@ -526,7 +525,8 @@ class TracebackException: if exc_type and issubclass(exc_type, SyntaxError): # Handle SyntaxError's specially self.filename = exc_value.filename - self.lineno = str(exc_value.lineno) + lno = exc_value.lineno + self.lineno = str(lno) if lno is not None else None self.text = exc_value.text self.offset = exc_value.offset self.msg = exc_value.msg @@ -585,9 +585,12 @@ class TracebackException: def _format_syntax_error(self, stype): """Format SyntaxError exceptions (internal helper).""" # Show exactly where the problem was found. - filename = self.filename or "" - lineno = str(self.lineno) or '?' - yield ' File "{}", line {}\n'.format(filename, lineno) + filename_suffix = '' + if self.lineno is not None: + yield ' File "{}", line {}\n'.format( + self.filename or "", self.lineno) + elif self.filename is not None: + filename_suffix = ' ({})'.format(self.filename) text = self.text if text is not None: @@ -605,7 +608,7 @@ class TracebackException: caretspace = ((c if c.isspace() else ' ') for c in ltext[:caret]) yield ' {}^\n'.format(''.join(caretspace)) msg = self.msg or "" - yield "{}: {}\n".format(stype, msg) + yield "{}: {}{}\n".format(stype, msg, filename_suffix) def format(self, *, chain=True): """Format the exception. @@ -627,7 +630,7 @@ class TracebackException: not self.__suppress_context__): yield from self.__context__.format(chain=chain) yield _context_message - if self.exc_traceback is not None: + if self.stack: yield 'Traceback (most recent call last):\n' - yield from self.stack.format() + yield from self.stack.format() yield from self.format_exception_only() diff --git a/Lib/tracemalloc.py b/Lib/tracemalloc.py index 69b4170ec82..cec99c59700 100644 --- a/Lib/tracemalloc.py +++ b/Lib/tracemalloc.py @@ -226,7 +226,7 @@ class Traceback(Sequence): return str(self[0]) def __repr__(self): - s = " elen else 'few'} parameters for {cls};" f" actual {alen}, expected {elen}") +def _prepare_paramspec_params(cls, params): + """Prepares the parameters for a Generic containing ParamSpec + variables (internal helper). + """ + # Special case where Z[[int, str, bool]] == Z[int, str, bool] in PEP 612. + if len(cls.__parameters__) == 1 and len(params) > 1: + return (params,) + else: + _params = [] + # Convert lists to tuples to help other libraries cache the results. + for p, tvar in zip(params, cls.__parameters__): + if isinstance(tvar, ParamSpec) and isinstance(p, list): + p = tuple(p) + _params.append(p) + return tuple(_params) def _deduplicate(params): # Weed out strict duplicates, preserving the first of each occurrence. @@ -516,6 +542,29 @@ def TypeAlias(self, parameters): raise TypeError(f"{self} is not subscriptable") +@_SpecialForm +def Concatenate(self, parameters): + """Used in conjunction with ParamSpec and Callable to represent a higher + order function which adds, removes or transforms parameters of a Callable. + + For example:: + + Callable[Concatenate[int, P], int] + + See PEP 612 for detailed information. + """ + if parameters == (): + raise TypeError("Cannot take a Concatenate of no types.") + if not isinstance(parameters, tuple): + parameters = (parameters,) + if not isinstance(parameters[-1], ParamSpec): + raise TypeError("The last parameter to Concatenate should be a " + "ParamSpec variable.") + msg = "Concatenate[arg, ...]: each arg must be a type." + parameters = tuple(_type_check(p, msg) for p in parameters) + return _ConcatenateGenericAlias(self, parameters) + + class ForwardRef(_Final, _root=True): """Internal wrapper to hold a forward reference.""" @@ -578,8 +627,41 @@ class ForwardRef(_Final, _root=True): def __repr__(self): return f'ForwardRef({self.__forward_arg__!r})' +class _TypeVarLike: + """Mixin for TypeVar-like types (TypeVar and ParamSpec).""" + def __init__(self, bound, covariant, contravariant): + """Used to setup TypeVars and ParamSpec's bound, covariant and + contravariant attributes. + """ + if covariant and contravariant: + raise ValueError("Bivariant types are not supported.") + self.__covariant__ = bool(covariant) + self.__contravariant__ = bool(contravariant) + if bound: + self.__bound__ = _type_check(bound, "Bound must be a type.") + else: + self.__bound__ = None -class TypeVar(_Final, _Immutable, _root=True): + def __or__(self, right): + return Union[self, right] + + def __ror__(self, right): + return Union[self, right] + + def __repr__(self): + if self.__covariant__: + prefix = '+' + elif self.__contravariant__: + prefix = '-' + else: + prefix = '~' + return prefix + self.__name__ + + def __reduce__(self): + return self.__name__ + + +class TypeVar( _Final, _Immutable, _TypeVarLike, _root=True): """Type variable. Usage:: @@ -629,20 +711,13 @@ class TypeVar(_Final, _Immutable, _root=True): def __init__(self, name, *constraints, bound=None, covariant=False, contravariant=False): self.__name__ = name - if covariant and contravariant: - raise ValueError("Bivariant types are not supported.") - self.__covariant__ = bool(covariant) - self.__contravariant__ = bool(contravariant) + super().__init__(bound, covariant, 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 try: def_mod = sys._getframe(1).f_globals.get('__name__', '__main__') # for pickling except (AttributeError, ValueError): @@ -650,23 +725,68 @@ class TypeVar(_Final, _Immutable, _root=True): if def_mod != 'typing': self.__module__ = def_mod - def __or__(self, right): - return Union[self, right] - def __ror__(self, right): - return Union[self, right] +class ParamSpec(_Final, _Immutable, _TypeVarLike, _root=True): + """Parameter specification variable. - def __repr__(self): - if self.__covariant__: - prefix = '+' - elif self.__contravariant__: - prefix = '-' - else: - prefix = '~' - return prefix + self.__name__ + Usage:: - def __reduce__(self): - return self.__name__ + P = ParamSpec('P') + + Parameter specification variables exist primarily for the benefit of static + type checkers. They are used to forward the parameter types of one + Callable to another Callable, a pattern commonly found in higher order + functions and decorators. They are only valid when used in Concatenate, or + as the first argument to Callable, or as parameters for user-defined Generics. + See class Generic for more information on generic types. An example for + annotating a decorator:: + + T = TypeVar('T') + P = ParamSpec('P') + + def add_logging(f: Callable[P, T]) -> Callable[P, T]: + '''A type-safe decorator to add logging to a function.''' + def inner(*args: P.args, **kwargs: P.kwargs) -> T: + logging.info(f'{f.__name__} was called') + return f(*args, **kwargs) + return inner + + @add_logging + def add_two(x: float, y: float) -> float: + '''Add two numbers together.''' + return x + y + + Parameter specification variables defined with covariant=True or + contravariant=True can be used to declare covariant or contravariant + generic types. These keyword arguments are valid, but their actual semantics + are yet to be decided. See PEP 612 for details. + + Parameter specification variables can be introspected. e.g.: + + P.__name__ == 'T' + P.__bound__ == None + P.__covariant__ == False + P.__contravariant__ == False + + Note that only parameter specification variables defined in global scope can + be pickled. + """ + + __slots__ = ('__name__', '__bound__', '__covariant__', '__contravariant__', + '__dict__') + + args = object() + kwargs = object() + + def __init__(self, name, bound=None, covariant=False, contravariant=False): + self.__name__ = name + super().__init__(bound, covariant, contravariant) + try: + def_mod = sys._getframe(1).f_globals.get('__name__', '__main__') + except (AttributeError, ValueError): + def_mod = None + if def_mod != 'typing': + self.__module__ = def_mod def _is_dunder(attr): @@ -776,21 +896,26 @@ class _GenericAlias(_BaseGenericAlias, _root=True): raise TypeError(f"Cannot subscript already-subscripted {self}") if not isinstance(params, tuple): params = (params,) - msg = "Parameters to generic types must be types." - params = tuple(_type_check(p, msg) for p in params) + params = tuple(_type_convert(p) for p in params) + if any(isinstance(t, ParamSpec) for t in self.__parameters__): + params = _prepare_paramspec_params(self, params) _check_generic(self, params, len(self.__parameters__)) subst = dict(zip(self.__parameters__, params)) new_args = [] for arg in self.__args__: - if isinstance(arg, TypeVar): + if isinstance(arg, _TypeVarLike): arg = subst[arg] elif isinstance(arg, (_GenericAlias, GenericAlias)): subparams = arg.__parameters__ if subparams: subargs = tuple(subst[x] for x in subparams) arg = arg[subargs] - new_args.append(arg) + # Required to flatten out the args for CallableGenericAlias + if self.__origin__ == collections.abc.Callable and isinstance(arg, tuple): + new_args.extend(arg) + else: + new_args.append(arg) return self.copy_with(tuple(new_args)) def copy_with(self, params): @@ -877,15 +1002,18 @@ class _SpecialGenericAlias(_BaseGenericAlias, _root=True): class _CallableGenericAlias(_GenericAlias, _root=True): def __repr__(self): assert self._name == 'Callable' - if len(self.__args__) == 2 and self.__args__[0] is Ellipsis: + args = self.__args__ + if len(args) == 2 and (args[0] is Ellipsis + or isinstance(args[0], (ParamSpec, _ConcatenateGenericAlias))): return super().__repr__() return (f'typing.Callable' - f'[[{", ".join([_type_repr(a) for a in self.__args__[:-1]])}], ' - f'{_type_repr(self.__args__[-1])}]') + f'[[{", ".join([_type_repr(a) for a in args[:-1]])}], ' + f'{_type_repr(args[-1])}]') def __reduce__(self): args = self.__args__ - if not (len(args) == 2 and args[0] is ...): + if not (len(args) == 2 and (args[0] is Ellipsis + or isinstance(args[0], (ParamSpec, _ConcatenateGenericAlias)))): args = list(args[:-1]), args[-1] return operator.getitem, (Callable, args) @@ -900,13 +1028,13 @@ class _CallableType(_SpecialGenericAlias, _root=True): raise TypeError("Callable must be used as " "Callable[[arg, ...], result].") args, result = params - if args is Ellipsis: - params = (Ellipsis, result) - else: - if not isinstance(args, list): - raise TypeError(f"Callable[args, result]: args must be a list." - f" Got {args}") + # This relaxes what args can be on purpose to allow things like + # PEP 612 ParamSpec. Responsibility for whether a user is using + # Callable[...] properly is deferred to static type checkers. + if isinstance(args, list): params = (tuple(args), result) + else: + params = (args, result) return self.__getitem_inner__(params) @_tp_cache @@ -916,8 +1044,9 @@ class _CallableType(_SpecialGenericAlias, _root=True): result = _type_check(result, msg) if args is Ellipsis: return self.copy_with((_TypingEllipsis, result)) - msg = "Callable[[arg, ...], result]: each arg must be a type." - args = tuple(_type_check(arg, msg) for arg in args) + if not isinstance(args, tuple): + args = (args,) + args = tuple(_type_convert(arg) for arg in args) params = args + (result,) return self.copy_with(params) @@ -984,6 +1113,10 @@ class _LiteralGenericAlias(_GenericAlias, _root=True): return hash(frozenset(_value_and_type_iter(self.__args__))) +class _ConcatenateGenericAlias(_GenericAlias, _root=True): + pass + + class Generic: """Abstract base class for generic types. @@ -1014,18 +1147,20 @@ class Generic: if not params and cls is not Tuple: raise TypeError( f"Parameter list to {cls.__qualname__}[...] cannot be empty") - msg = "Parameters to generic types must be types." - params = tuple(_type_check(p, msg) for p in params) + params = tuple(_type_convert(p) for p in params) if cls in (Generic, Protocol): # Generic and Protocol can only be subscripted with unique type variables. - if not all(isinstance(p, TypeVar) for p in params): + if not all(isinstance(p, _TypeVarLike) for p in params): raise TypeError( - f"Parameters to {cls.__name__}[...] must all be type variables") + f"Parameters to {cls.__name__}[...] must all be type variables " + f"or parameter specification variables.") if len(set(params)) != len(params): raise TypeError( f"Parameters to {cls.__name__}[...] must all be unique") else: # Subscripting a regular Generic subclass. + if any(isinstance(t, ParamSpec) for t in cls.__parameters__): + params = _prepare_paramspec_params(cls, params) _check_generic(cls, params, len(cls.__parameters__)) return _GenericAlias(cls, params) @@ -1114,7 +1249,7 @@ def _no_init(self, *args, **kwargs): raise TypeError('Protocols cannot be instantiated') -def _allow_reckless_class_cheks(): +def _allow_reckless_class_checks(): """Allow instance and class checks for special stdlib modules. The abc and functools modules indiscriminately call isinstance() and @@ -1203,12 +1338,12 @@ class Protocol(Generic, metaclass=_ProtocolMeta): # First, perform various sanity checks. if not getattr(cls, '_is_runtime_protocol', False): - if _allow_reckless_class_cheks(): + if _allow_reckless_class_checks(): return NotImplemented raise TypeError("Instance and class checks can only be used with" " @runtime_checkable protocols") if not _is_callable_members_only(cls): - if _allow_reckless_class_cheks(): + if _allow_reckless_class_checks(): return NotImplemented raise TypeError("Protocols with non-method members" " don't support issubclass()") @@ -1533,6 +1668,8 @@ def get_origin(tp): return tp.__origin__ if tp is Generic: return Generic + if isinstance(tp, types.Union): + return types.Union return None @@ -1549,12 +1686,14 @@ def get_args(tp): """ if isinstance(tp, _AnnotatedAlias): return (tp.__origin__,) + tp.__metadata__ - if isinstance(tp, _GenericAlias): + if isinstance(tp, (_GenericAlias, GenericAlias)): res = tp.__args__ - if tp.__origin__ is collections.abc.Callable and res[0] is not Ellipsis: + if (tp.__origin__ is collections.abc.Callable + and not (res[0] is Ellipsis + or isinstance(res[0], (ParamSpec, _ConcatenateGenericAlias)))): res = (list(res[:-1]), res[-1]) return res - if isinstance(tp, GenericAlias): + if isinstance(tp, types.Union): return tp.__args__ return () @@ -2043,14 +2182,14 @@ def TypedDict(typename, fields=None, /, *, total=True, **kwargs): raise TypeError("TypedDict takes either a dict or keyword arguments," " but not both") - ns = {'__annotations__': dict(fields), '__total__': total} + ns = {'__annotations__': dict(fields)} try: # Setting correct module is necessary to make typed dict classes pickleable. ns['__module__'] = sys._getframe(1).f_globals.get('__name__', '__main__') except (AttributeError, ValueError): pass - return _TypedDictMeta(typename, (), ns) + return _TypedDictMeta(typename, (), ns, total=total) _TypedDict = type.__new__(_TypedDictMeta, 'TypedDict', (), {}) TypedDict.__mro_entries__ = lambda bases: (_TypedDict,) diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index f5f502f2572..720f682efbb 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -406,7 +406,7 @@ class NonCallableMock(Base): # Check if spec is an async object or function bound_args = _MOCK_SIG.bind_partial(cls, *args, **kw).arguments spec_arg = bound_args.get('spec_set', bound_args.get('spec')) - if spec_arg and _is_async_obj(spec_arg): + if spec_arg is not None and _is_async_obj(spec_arg): bases = (AsyncMockMixin, cls) new = type(cls.__name__, bases, {'__doc__': cls.__doc__}) instance = _safe_super(NonCallableMock, cls).__new__(new) @@ -632,8 +632,9 @@ class NonCallableMock(Base): raise AttributeError(name) if not self._mock_unsafe: if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')): - raise AttributeError("Attributes cannot start with 'assert' " - "or its misspellings") + raise AttributeError( + f"{name!r} is not a valid assertion. Use a spec " + f"for the mock if {name!r} is meant to be an attribute.") result = self._mock_children.get(name) if result is _deleted: @@ -1241,6 +1242,17 @@ def _importer(target): return thing +# _check_spec_arg_typos takes kwargs from commands like patch and checks that +# they don't contain common misspellings of arguments related to autospeccing. +def _check_spec_arg_typos(kwargs_to_check): + typos = ("autospect", "auto_spec", "set_spec") + for typo in typos: + if typo in kwargs_to_check: + raise RuntimeError( + f"{typo!r} might be a typo; use unsafe=True if this is intended" + ) + + class _patch(object): attribute_name = None @@ -1248,7 +1260,7 @@ class _patch(object): def __init__( self, getter, attribute, new, spec, create, - spec_set, autospec, new_callable, kwargs + spec_set, autospec, new_callable, kwargs, *, unsafe=False ): if new_callable is not None: if new is not DEFAULT: @@ -1259,6 +1271,8 @@ class _patch(object): raise ValueError( "Cannot use 'autospec' and 'new_callable' together" ) + if not unsafe: + _check_spec_arg_typos(kwargs) self.getter = getter self.attribute = attribute @@ -1568,7 +1582,7 @@ def _get_target(target): def _patch_object( target, attribute, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, - new_callable=None, **kwargs + new_callable=None, *, unsafe=False, **kwargs ): """ patch the named member (`attribute`) on an object (`target`) with a mock @@ -1590,7 +1604,7 @@ def _patch_object( getter = lambda: target return _patch( getter, attribute, new, spec, create, - spec_set, autospec, new_callable, kwargs + spec_set, autospec, new_callable, kwargs, unsafe=unsafe ) @@ -1645,7 +1659,7 @@ def _patch_multiple(target, spec=None, create=False, spec_set=None, def patch( target, new=DEFAULT, spec=None, create=False, - spec_set=None, autospec=None, new_callable=None, **kwargs + spec_set=None, autospec=None, new_callable=None, *, unsafe=False, **kwargs ): """ `patch` acts as a function decorator, class decorator or a context @@ -1707,6 +1721,10 @@ def patch( use "as" then the patched object will be bound to the name after the "as"; very useful if `patch` is creating a mock object for you. + Patch will raise a `RuntimeError` if passed some common misspellings of + the arguments autospec and spec_set. Pass the argument `unsafe` with the + value True to disable that check. + `patch` takes arbitrary keyword arguments. These will be passed to `AsyncMock` if the patched object is asynchronous, to `MagicMock` otherwise or to `new_callable` if specified. @@ -1717,7 +1735,7 @@ def patch( getter, attribute = _get_target(target) return _patch( getter, attribute, new, spec, create, - spec_set, autospec, new_callable, kwargs + spec_set, autospec, new_callable, kwargs, unsafe=unsafe ) @@ -2567,7 +2585,7 @@ call = _Call(from_kall=False) def create_autospec(spec, spec_set=False, instance=False, _parent=None, - _name=None, **kwargs): + _name=None, *, unsafe=False, **kwargs): """Create a mock object using another object as a spec. Attributes on the mock will use the corresponding attribute on the `spec` object as their spec. @@ -2583,6 +2601,10 @@ def create_autospec(spec, spec_set=False, instance=False, _parent=None, spec for an instance object by passing `instance=True`. The returned mock will only be callable if instances of the mock are callable. + `create_autospec` will raise a `RuntimeError` if passed some common + misspellings of the arguments autospec and spec_set. Pass the argument + `unsafe` with the value True to disable that check. + `create_autospec` also takes arbitrary keyword arguments that are passed to the constructor of the created mock.""" if _is_list(spec): @@ -2600,6 +2622,8 @@ def create_autospec(spec, spec_set=False, instance=False, _parent=None, _kwargs = {} if _kwargs and instance: _kwargs['_spec_as_instance'] = True + if not unsafe: + _check_spec_arg_typos(kwargs) _kwargs.update(kwargs) diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py index 194ce3f61bb..e38f41e1d21 100644 --- a/Lib/unittest/test/testmock/testmock.py +++ b/Lib/unittest/test/testmock/testmock.py @@ -38,6 +38,12 @@ class Something(object): def smeth(a, b, c, d=None): pass +class Typos(): + autospect = None + auto_spec = None + set_spec = None + + def something(a): pass @@ -1598,7 +1604,7 @@ class MockTest(unittest.TestCase): #Issue21238 def test_mock_unsafe(self): m = Mock() - msg = "Attributes cannot start with 'assert' or its misspellings" + msg = "is not a valid assertion. Use a spec for the mock" with self.assertRaisesRegex(AttributeError, msg): m.assert_foo_call() with self.assertRaisesRegex(AttributeError, msg): @@ -2165,6 +2171,62 @@ class MockTest(unittest.TestCase): obj = mock(spec=Something) self.assertIsInstance(obj, Something) + def test_bool_not_called_when_passing_spec_arg(self): + class Something: + def __init__(self): + self.obj_with_bool_func = unittest.mock.MagicMock() + + obj = Something() + with unittest.mock.patch.object(obj, 'obj_with_bool_func', autospec=True): pass + + self.assertEqual(obj.obj_with_bool_func.__bool__.call_count, 0) + + def test_misspelled_arguments(self): + class Foo(): + one = 'one' + # patch, patch.object and create_autospec need to check for misspelled + # arguments explicitly and throw a RuntimError if found. + with self.assertRaises(RuntimeError): + with patch(f'{__name__}.Something.meth', autospect=True): pass + with self.assertRaises(RuntimeError): + with patch.object(Foo, 'one', autospect=True): pass + with self.assertRaises(RuntimeError): + with patch(f'{__name__}.Something.meth', auto_spec=True): pass + with self.assertRaises(RuntimeError): + with patch.object(Foo, 'one', auto_spec=True): pass + with self.assertRaises(RuntimeError): + with patch(f'{__name__}.Something.meth', set_spec=True): pass + with self.assertRaises(RuntimeError): + with patch.object(Foo, 'one', set_spec=True): pass + with self.assertRaises(RuntimeError): + m = create_autospec(Foo, set_spec=True) + # patch.multiple, on the other hand, should flag misspelled arguments + # through an AttributeError, when trying to find the keys from kwargs + # as attributes on the target. + with self.assertRaises(AttributeError): + with patch.multiple( + f'{__name__}.Something', meth=DEFAULT, autospect=True): pass + with self.assertRaises(AttributeError): + with patch.multiple( + f'{__name__}.Something', meth=DEFAULT, auto_spec=True): pass + with self.assertRaises(AttributeError): + with patch.multiple( + f'{__name__}.Something', meth=DEFAULT, set_spec=True): pass + + with patch(f'{__name__}.Something.meth', unsafe=True, autospect=True): + pass + with patch.object(Foo, 'one', unsafe=True, autospect=True): pass + with patch(f'{__name__}.Something.meth', unsafe=True, auto_spec=True): + pass + with patch.object(Foo, 'one', unsafe=True, auto_spec=True): pass + with patch(f'{__name__}.Something.meth', unsafe=True, set_spec=True): + pass + with patch.object(Foo, 'one', unsafe=True, set_spec=True): pass + m = create_autospec(Foo, set_spec=True, unsafe=True) + with patch.multiple( + f'{__name__}.Typos', autospect=True, set_spec=True, auto_spec=True): + pass + if __name__ == '__main__': unittest.main() diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 39974d975ee..e5febe61f55 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -773,7 +773,11 @@ def _parse_proxy(proxy): raise ValueError("proxy URL with no authority: %r" % proxy) # We have an authority, so for RFC 3986-compliant URLs (by ss 3. # and 3.3.), path is empty or starts with '/' - end = r_scheme.find("/", 2) + if '@' in r_scheme: + host_separator = r_scheme.find('@') + end = r_scheme.find("/", host_separator) + else: + end = r_scheme.find("/", 2) if end == -1: end = None authority = r_scheme[2:end] diff --git a/Lib/zipfile.py b/Lib/zipfile.py index e1a50a3eb51..0eed4ce9a63 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -2379,8 +2379,8 @@ class Path: def __repr__(self): return self.__repr.format(self=self) - def joinpath(self, add): - next = posixpath.join(self.at, add) + def joinpath(self, *other): + next = posixpath.join(self.at, *other) return self._next(self.root.resolve_dir(next)) __truediv__ = joinpath diff --git a/Lib/zipimport.py b/Lib/zipimport.py index 2e5188a4a0a..ce3e00e24fa 100644 --- a/Lib/zipimport.py +++ b/Lib/zipimport.py @@ -22,6 +22,7 @@ import _io # for open import marshal # for loads import sys # for modules import time # for mktime +import _warnings # For warn() __all__ = ['ZipImportError', 'zipimporter'] @@ -184,7 +185,7 @@ class zipimporter(_bootstrap_external._LoaderBasics): """get_code(fullname) -> code object. Return the code object for the specified module. Raise ZipImportError - if the module couldn't be found. + if the module couldn't be imported. """ code, ispackage, modpath = _get_module_code(self, fullname) return code @@ -214,7 +215,8 @@ class zipimporter(_bootstrap_external._LoaderBasics): def get_filename(self, fullname): """get_filename(fullname) -> filename string. - Return the filename for the specified module. + Return the filename for the specified module or raise ZipImportError + if it couldn't be imported. """ # Deciding the filename requires working out where the code # would come from if the module was actually loaded @@ -266,10 +268,13 @@ class zipimporter(_bootstrap_external._LoaderBasics): Load the module specified by 'fullname'. 'fullname' must be the fully qualified (dotted) module name. It returns the imported - module, or raises ZipImportError if it wasn't found. + module, or raises ZipImportError if it could not be imported. - Deprecated since Python 3.10. use exec_module() instead. + Deprecated since Python 3.10. Use exec_module() instead. """ + msg = ("zipimport.zipimporter.load_module() is deprecated and slated for " + "removal in Python 3.12; use exec_module() instead") + _warnings.warn(msg, DeprecationWarning) code, ispackage, modpath = _get_module_code(self, fullname) mod = sys.modules.get(fullname) if mod is None or not isinstance(mod, _module_type): @@ -609,20 +614,15 @@ def _eq_mtime(t1, t2): # Given the contents of a .py[co] file, unmarshal the data -# and return the code object. Return None if it the magic word doesn't -# match, or if the recorded .py[co] metadata does not match the source, -# (we do this instead of raising an exception as we fall back -# to .py if available and we don't want to mask other errors). +# and return the code object. Raises ImportError it the magic word doesn't +# match, or if the recorded .py[co] metadata does not match the source. def _unmarshal_code(self, pathname, fullpath, fullname, data): exc_details = { 'name': fullname, 'path': fullpath, } - try: - flags = _bootstrap_external._classify_pyc(data, fullname, exc_details) - except ImportError: - return None + flags = _bootstrap_external._classify_pyc(data, fullname, exc_details) hash_based = flags & 0b1 != 0 if hash_based: @@ -636,11 +636,8 @@ def _unmarshal_code(self, pathname, fullpath, fullname, data): source_bytes, ) - try: - _bootstrap_external._validate_hash_pyc( - data, source_hash, fullname, exc_details) - except ImportError: - return None + _bootstrap_external._validate_hash_pyc( + data, source_hash, fullname, exc_details) else: source_mtime, source_size = \ _get_mtime_and_size_of_source(self, fullpath) @@ -726,6 +723,7 @@ def _get_pyc_source(self, path): # 'fullname'. def _get_module_code(self, fullname): path = _get_module_path(self, fullname) + import_error = None for suffix, isbytecode, ispackage in _zip_searchorder: fullpath = path + suffix _bootstrap._verbose_message('trying {}{}{}', self.archive, path_sep, fullpath, verbosity=2) @@ -736,8 +734,12 @@ def _get_module_code(self, fullname): else: modpath = toc_entry[0] data = _get_data(self.archive, toc_entry) + code = None if isbytecode: - code = _unmarshal_code(self, modpath, fullpath, fullname, data) + try: + code = _unmarshal_code(self, modpath, fullpath, fullname, data) + except ImportError as exc: + import_error = exc else: code = _compile_source(modpath, data) if code is None: @@ -747,4 +749,8 @@ def _get_module_code(self, fullname): modpath = toc_entry[0] return code, ispackage, modpath else: - raise ZipImportError(f"can't find module {fullname!r}", name=fullname) + if import_error: + msg = f"module load failed: {import_error}" + raise ZipImportError(msg, name=fullname) from import_error + else: + raise ZipImportError(f"can't find module {fullname!r}", name=fullname) diff --git a/Mac/BuildScript/resources/ReadMe.rtf b/Mac/BuildScript/resources/ReadMe.rtf index a4dd8b5ee41..c82e4b6303a 100644 --- a/Mac/BuildScript/resources/ReadMe.rtf +++ b/Mac/BuildScript/resources/ReadMe.rtf @@ -3,7 +3,7 @@ \f3\fmodern\fcharset0 CourierNewPSMT;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} -\margl1440\margr1440\vieww13380\viewh14600\viewkind0 +\margl1440\margr1440\vieww13380\viewh14580\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \f0\fs24 \cf0 This package will install Python $FULL_VERSION for macOS $MACOSX_DEPLOYMENT_TARGET for the following architecture(s): $ARCHITECTURES.\ @@ -56,7 +56,15 @@ Due to new security checks on macOS 10.15 Catalina, when launching IDLE macOS ma \f0\b0 button to proceed.\ \ -\f1\b \ul Other changes\ +\f1\b \ul macOS 11.0 (Big Sur) and Apple Silicon Mac support [new in 3.10.0a3]\ + +\f0\b0 \ulnone \ +As of 2020-11, macOS 11.0 (Big Sur) is the latest release of macOS and one of its major features is the support of new Apple Silicon Macs that are based on the ARM64 CPU architecture specification rather than the Intel 64 (x86_64) architecture used previously. There are other changes in Big Sur that affect Python operation regardless of CPU architecture.\ +\ +Beginning with 3.10.0a3, we provide a new "universal2" installer variant that provides universal binaries for both ARM64 and Intel 64 architectures and is also supported on all Macs that support macOS 10.9 or later. Some of the advantages of the new installer variant: native ARM64 code on Apple Silicon Macs should run significantly faster than Rosetta2-emulated code; some operating system functions and options introduced in macOS releases since 10.9 are now exposed when available (primarily in the os module); the new installer variant includes Tcl/Tk 8.6.10 rather than 8.6.8.\ + +\f1\b \ul \ +Other changes\ \f0\b0 \ulnone \ For other changes in this release, see the diff --git a/Mac/BuildScript/scripts/postflight.patch-profile b/Mac/BuildScript/scripts/postflight.patch-profile index 0a62e327f51..68b8e4bb044 100755 --- a/Mac/BuildScript/scripts/postflight.patch-profile +++ b/Mac/BuildScript/scripts/postflight.patch-profile @@ -20,7 +20,7 @@ fi # Make sure the directory ${PYTHON_ROOT}/bin is on the users PATH. BSH="`basename "${theShell}"`" case "${BSH}" in -bash|ksh|sh|*csh|zsh) +bash|ksh|sh|*csh|zsh|fish) if [ `id -ur` = 0 ]; then P=`su - ${USER} -c 'echo A-X-4-X@@$PATH@@X-4-X-A' | grep 'A-X-4-X@@.*@@X-4-X-A' | sed -e 's/^A-X-4-X@@//g' -e 's/@@X-4-X-A$//g'` else @@ -76,6 +76,22 @@ bash) PR="${HOME}/.bash_profile" fi ;; +fish) + CONFIG_DIR="${HOME}/.config/fish" + RC="${CONFIG_DIR}/config.fish" + mkdir -p "$CONFIG_DIR" + if [ -f "${RC}" ]; then + cp -fp "${RC}" "${RC}.pysave" + fi + echo "" >> "${RC}" + echo "# Setting PATH for Python ${PYVER}" >> "${RC}" + echo "# The original version is saved in ${RC}.pysave" >> "${RC}" + echo "set -x PATH \"${PYTHON_ROOT}/bin\" \"\$PATH\"" >> "${RC}" + if [ `id -ur` = 0 ]; then + chown "${USER}" "${RC}" + fi + exit 0 + ;; zsh) PR="${HOME}/.zprofile" ;; diff --git a/Makefile.pre.in b/Makefile.pre.in index ee801ec46df..d8b9e8498d5 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -744,6 +744,13 @@ regen-importlib: Programs/_freeze_importlib $(UPDATE_FILE) $(srcdir)/Python/importlib_zipimport.h $(srcdir)/Python/importlib_zipimport.h.new +regen-limited-abi: all + @$(MKDIR_P) $(srcdir)/Doc/data/ + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py generate $(srcdir)/Doc/data/stable_abi.dat.new + $(UPDATE_FILE) $(srcdir)/Doc/data/stable_abi.dat \ + $(srcdir)/Doc/data/stable_abi.dat.new + + ############################################################################ # Regenerate all generated files @@ -1095,6 +1102,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/cpython/pylifecycle.h \ $(srcdir)/Include/cpython/pymem.h \ $(srcdir)/Include/cpython/pystate.h \ + $(srcdir)/Include/cpython/pythonrun.h \ $(srcdir)/Include/cpython/sysmodule.h \ $(srcdir)/Include/cpython/traceback.h \ $(srcdir)/Include/cpython/tupleobject.h \ @@ -1103,6 +1111,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/internal/pycore_abstract.h \ $(srcdir)/Include/internal/pycore_accu.h \ $(srcdir)/Include/internal/pycore_atomic.h \ + $(srcdir)/Include/internal/pycore_atomic_funcs.h \ $(srcdir)/Include/internal/pycore_bitutils.h \ $(srcdir)/Include/internal/pycore_bytes_methods.h \ $(srcdir)/Include/internal/pycore_call.h \ @@ -1112,6 +1121,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/internal/pycore_context.h \ $(srcdir)/Include/internal/pycore_dtoa.h \ $(srcdir)/Include/internal/pycore_fileutils.h \ + $(srcdir)/Include/internal/pycore_format.h \ $(srcdir)/Include/internal/pycore_getopt.h \ $(srcdir)/Include/internal/pycore_gil.h \ $(srcdir)/Include/internal/pycore_hamt.h \ @@ -1356,18 +1366,54 @@ maninstall: altmaninstall # Install the library XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax -LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ - tkinter/test/test_ttk site-packages test \ - test/audiodata \ - test/capath test/data \ - test/cjkencodings test/decimaltestdata \ - test/xmltestdata test/xmltestdata/c14n-20 \ - test/dtracedata \ - test/eintrdata \ - test/imghdrdata \ - test/libregrtest \ - test/subprocessdata test/sndhdrdata test/support \ - test/tracedmodules test/encoded_modules \ +LIBSUBDIRS= asyncio \ + collections \ + concurrent concurrent/futures \ + csv \ + ctypes ctypes/macholib \ + curses \ + dbm \ + distutils distutils/command \ + email email/mime \ + encodings \ + ensurepip ensurepip/_bundled \ + html \ + http \ + idlelib idlelib/Icons \ + importlib importlib/metadata \ + json \ + lib2to3 lib2to3/fixes lib2to3/pgen2 \ + logging \ + multiprocessing multiprocessing/dummy \ + pydoc_data \ + site-packages \ + sqlite3 \ + tkinter \ + turtledemo \ + unittest \ + urllib \ + venv venv/scripts venv/scripts/common venv/scripts/posix \ + wsgiref \ + $(XMLLIBSUBDIRS) \ + xmlrpc \ + zoneinfo +TESTSUBDIRS= ctypes/test \ + distutils/tests \ + idlelib/idle_test \ + lib2to3/tests \ + lib2to3/tests/data \ + lib2to3/tests/data/fixers \ + lib2to3/tests/data/fixers/myfixes \ + sqlite3/test \ + test test/audiodata \ + test/capath test/cjkencodings \ + test/data test/decimaltestdata \ + test/dtracedata test/eintrdata \ + test/encoded_modules test/imghdrdata \ + test/libregrtest test/sndhdrdata \ + test/subprocessdata test/support \ + test/test_asyncio \ + test/test_email test/test_email/data \ test/test_import \ test/test_import/data \ test/test_import/data/circular_imports \ @@ -1375,8 +1421,6 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ test/test_import/data/package \ test/test_import/data/package2 \ test/test_import/data/unwritable \ - importlib \ - importlib/metadata \ test/test_importlib \ test/test_importlib/builtin \ test/test_importlib/data \ @@ -1415,30 +1459,19 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ test/test_importlib/source \ test/test_importlib/zipdata01 \ test/test_importlib/zipdata02 \ - test/test_zoneinfo test/test_zoneinfo/data \ - test/ziptestdata \ - asyncio \ - test/test_asyncio \ - collections concurrent concurrent/futures encodings \ - email email/mime test/test_email test/test_email/data \ - ensurepip ensurepip/_bundled \ - html json test/test_json http dbm xmlrpc \ - sqlite3 sqlite3/test \ - logging csv wsgiref urllib \ - lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \ - lib2to3/tests/data lib2to3/tests/data/fixers \ - lib2to3/tests/data/fixers/myfixes \ - ctypes ctypes/test ctypes/macholib \ - idlelib idlelib/Icons idlelib/idle_test \ - distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ + test/test_json \ test/test_peg_generator \ - test/test_tools test/test_warnings test/test_warnings/data \ - turtledemo \ - multiprocessing multiprocessing/dummy \ - unittest unittest/test unittest/test/testmock \ - venv venv/scripts venv/scripts/common venv/scripts/posix \ - curses pydoc_data \ - zoneinfo + test/test_tools \ + test/test_warnings test/test_warnings/data \ + test/test_zoneinfo test/test_zoneinfo/data \ + test/tracedmodules \ + test/xmltestdata test/xmltestdata/c14n-20 \ + test/ziptestdata \ + tkinter/test tkinter/test/test_tkinter \ + tkinter/test/test_ttk \ + unittest/test unittest/test/testmock + +TEST_MODULES=@TEST_MODULES@ libinstall: build_all $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ @@ -1448,7 +1481,12 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c else true; \ fi; \ done - @for d in $(LIBSUBDIRS); \ + @if test "$(TEST_MODULES)" = yes; then \ + subdirs="$(LIBSUBDIRS) $(TESTSUBDIRS)"; \ + else \ + subdirs="$(LIBSUBDIRS)"; \ + fi; \ + for d in $$subdirs; \ do \ a=$(srcdir)/Lib/$$d; \ if test ! -d $$a; then continue; else true; fi; \ @@ -1469,7 +1507,12 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c echo $(INSTALL_DATA) $$i $(LIBDEST); \ fi; \ done - @for d in $(LIBSUBDIRS); \ + @if test "$(TEST_MODULES)" = yes; then \ + subdirs="$(LIBSUBDIRS) $(TESTSUBDIRS)"; \ + else \ + subdirs="$(LIBSUBDIRS)"; \ + fi; \ + for d in $$subdirs; \ do \ a=$(srcdir)/Lib/$$d; \ if test ! -d $$a; then continue; else true; fi; \ @@ -1899,6 +1942,9 @@ funny: patchcheck: @DEF_MAKE_RULE@ $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py +check-limited-abi: all + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py check $(srcdir)/Doc/data/stable_abi.dat + # Dependencies Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h diff --git a/Misc/ACKS b/Misc/ACKS index 253349017c5..211455b4dfc 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -643,6 +643,7 @@ Grzegorz Grzywacz Thomas Guettler Yuyang Guo Anuj Gupta +Om Gupta Michael Guravage Lars Gustäbel Thomas Güttler @@ -1623,6 +1624,7 @@ Ville Skyttä Michael Sloan Nick Sloan Václav Šmilauer +Casper W. Smet Allen W. Smith Christopher Smith Eric V. Smith @@ -1657,6 +1659,7 @@ Quentin Stafford-Fraser Frank Stajano Joel Stanley Kyle Stanley +Brandon Stansbury Anthony Starks David Steele Oliver Steele @@ -1847,6 +1850,7 @@ Zachary Ware Barry Warsaw Steve Waterbury Bob Watson +Colin Watson David Watson Aaron Watters Henrik Weber diff --git a/Misc/NEWS.d/3.10.0a2.rst b/Misc/NEWS.d/3.10.0a2.rst index a3c909df866..3cfef171603 100644 --- a/Misc/NEWS.d/3.10.0a2.rst +++ b/Misc/NEWS.d/3.10.0a2.rst @@ -116,15 +116,6 @@ failure, run the parser a second time with those enabled. .. -.. bpo: 41910 -.. date: 2020-10-21-14-40-54 -.. nonce: CzBMit -.. section: Core and Builtins - -Document the default implementation of `object.__eq__`. - -.. - .. bpo: 42093 .. date: 2020-10-20-04-24-07 .. nonce: ooZZNh @@ -569,7 +560,7 @@ by Joongi Kim and John Belmonte. .. -.. bpo: 16936 +.. bpo: 16396 .. date: 2020-07-08-09-45-00 .. nonce: z8o8Pn .. section: Library @@ -653,6 +644,15 @@ Document __format__ functionality for IP addresses. .. +.. bpo: 41910 +.. date: 2020-10-21-14-40-54 +.. nonce: CzBMit +.. section: Documentation + +Document the default implementation of `object.__eq__`. + +.. + .. bpo: 42010 .. date: 2020-10-21-02-21-14 .. nonce: 76vJ0u diff --git a/Misc/NEWS.d/3.10.0a3.rst b/Misc/NEWS.d/3.10.0a3.rst new file mode 100644 index 00000000000..0b76367f944 --- /dev/null +++ b/Misc/NEWS.d/3.10.0a3.rst @@ -0,0 +1,1504 @@ +.. bpo: 40791 +.. date: 2020-05-28-06-06-47 +.. nonce: QGZClX +.. release date: 2020-12-07 +.. section: Security + +Add ``volatile`` to the accumulator variable in ``hmac.compare_digest``, +making constant-time-defeating optimizations less likely. + +.. + +.. bpo: 42576 +.. date: 2020-12-05-22-34-47 +.. nonce: lEeEl7 +.. section: Core and Builtins + +``types.GenericAlias`` will now raise a ``TypeError`` when attempting to +initialize with a keyword argument. Previously, this would cause the +interpreter to crash if the interpreter was compiled with debug symbols. +This does not affect interpreters compiled for release. Patch by Ken Jin. + +.. + +.. bpo: 42536 +.. date: 2020-12-02-20-23-31 +.. nonce: Kx3ZOu +.. section: Core and Builtins + +Several built-in and standard library types now ensure that their internal +result tuples are always tracked by the :term:`garbage collector `: + +- :meth:`collections.OrderedDict.items() ` + +- :meth:`dict.items` + +- :func:`enumerate` + +- :func:`functools.reduce` + +- :func:`itertools.combinations` + +- :func:`itertools.combinations_with_replacement` + +- :func:`itertools.permutations` + +- :func:`itertools.product` + +- :func:`itertools.zip_longest` + +- :func:`zip` + +Previously, they could have become untracked by a prior garbage collection. +Patch by Brandt Bucher. + +.. + +.. bpo: 42500 +.. date: 2020-11-30-14-27-29 +.. nonce: excVKU +.. section: Core and Builtins + +Improve handling of exceptions near recursion limit. Converts a number of +Fatal Errors in RecursionErrors. + +.. + +.. bpo: 42246 +.. date: 2020-11-24-14-01-43 +.. nonce: c9k9hj +.. section: Core and Builtins + +PEP 626: After a return, the f_lineno attribute of a frame is always the +last line executed. + +.. + +.. bpo: 42435 +.. date: 2020-11-22-14-34-55 +.. nonce: uwlB2W +.. section: Core and Builtins + +Speed up comparison of bytes objects with non-bytes objects when option +:option:`-b` is specified. Speed up comparison of bytarray objects with +non-buffer object. + +.. + +.. bpo: 1635741 +.. date: 2020-11-18-23-46-31 +.. nonce: GVOQ-m +.. section: Core and Builtins + +Port the ``_warnings`` extension module to the multi-phase initialization +API (:pep:`489`). Patch by Victor Stinner. + +.. + +.. bpo: 41686 +.. date: 2020-11-17-16-25-50 +.. nonce: hX77kL +.. section: Core and Builtins + +On Windows, the ``SIGINT`` event, ``_PyOS_SigintEvent()``, is now created +even if Python is configured to not install signal handlers (if +:c:member:`PyConfig.install_signal_handlers` equals to 0, or +``Py_InitializeEx(0)``). + +.. + +.. bpo: 42381 +.. date: 2020-11-16-23-45-56 +.. nonce: G4AWxL +.. section: Core and Builtins + +Allow assignment expressions in set literals and set comprehensions as per +PEP 572. Patch by Pablo Galindo. + +.. + +.. bpo: 42202 +.. date: 2020-11-16-18-13-07 +.. nonce: ZxenYD +.. section: Core and Builtins + +Change function parameters annotations internal representation to tuple of +strings. Patch provided by Yurii Karabas. + +.. + +.. bpo: 42374 +.. date: 2020-11-16-17-57-09 +.. nonce: t7np1E +.. section: Core and Builtins + +Fix a regression introduced by the new parser, where an unparenthesized +walrus operator was not allowed within generator expressions. + +.. + +.. bpo: 42316 +.. date: 2020-11-16-17-30-03 +.. nonce: _DdmpQ +.. section: Core and Builtins + +Allow an unparenthesized walrus in subscript indexes. + +.. + +.. bpo: 42349 +.. date: 2020-11-13-17-25-44 +.. nonce: JdWxez +.. section: Core and Builtins + +Make sure that the compiler front-end produces a well-formed control flow +graph. Be be more aggressive in the compiler back-end, as it is now safe to +do so. + +.. + +.. bpo: 42296 +.. date: 2020-11-13-13-53-11 +.. nonce: DuGrLJ +.. section: Core and Builtins + +On Windows, fix a regression in signal handling which prevented to interrupt +a program using CTRL+C. The signal handler can be run in a thread different +than the Python thread, in which case the test deciding if the thread can +handle signals is wrong. + +.. + +.. bpo: 42332 +.. date: 2020-11-12-23-16-14 +.. nonce: fEQIdk +.. section: Core and Builtins + +:class:`types.GenericAlias` objects can now be the targets of weakrefs. + +.. + +.. bpo: 42282 +.. date: 2020-11-07-21-02-05 +.. nonce: M1W4Wj +.. section: Core and Builtins + +Optimise constant subexpressions that appear as part of named expressions +(previously the AST optimiser did not descend into named expressions). Patch +by Nick Coghlan. + +.. + +.. bpo: 42266 +.. date: 2020-11-04-23-03-25 +.. nonce: G4hGDe +.. section: Core and Builtins + +Fixed a bug with the LOAD_ATTR opcode cache that was not respecting +monkey-patching a class-level attribute to make it a descriptor. Patch by +Pablo Galindo. + +.. + +.. bpo: 40077 +.. date: 2020-11-03-21-58-27 +.. nonce: a9qM1j +.. section: Core and Builtins + +Convert :mod:`queue` to use heap types. + +.. + +.. bpo: 42246 +.. date: 2020-11-02-15-48-17 +.. nonce: 3CNQEX +.. section: Core and Builtins + +Improved accuracy of line tracing events and f_lineno attribute of Frame +objects. See PEP 626 for details. + +.. + +.. bpo: 40077 +.. date: 2020-11-02-14-39-48 +.. nonce: grY9TG +.. section: Core and Builtins + +Convert :mod:`mmap` to use heap types. + +.. + +.. bpo: 42233 +.. date: 2020-11-01-23-34-56 +.. nonce: zOSzja +.. section: Core and Builtins + +Allow ``GenericAlias`` objects to use :ref:`union type expressions +`. This allows expressions like ``list[int] | dict[float, +str]`` where previously a ``TypeError`` would have been thrown. This also +fixes union type expressions not de-duplicating ``GenericAlias`` objects. +(Contributed by Ken Jin in :issue:`42233`.) + +.. + +.. bpo: 26131 +.. date: 2020-10-22-17-27-08 +.. nonce: B-Veg7 +.. section: Core and Builtins + +The import system triggers a `ImportWarning` when it falls back to using +`load_module()`. + +.. + +.. bpo: 5054 +.. date: 2020-12-04-03-51-12 +.. nonce: 53StYZ +.. section: Library + +CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed. Replace the +special purpose getallmatchingheaders with generic get_all method and add +relevant tests. + +Original Patch by Martin Panter. Modified by Senthil Kumaran. + +.. + +.. bpo: 42562 +.. date: 2020-12-03-22-42-03 +.. nonce: 2hPmhi +.. section: Library + +Fix issue when dis failed to parse function that has no line numbers. Patch +provided by Yurii Karabas. + +.. + +.. bpo: 17735 +.. date: 2020-12-03-22-22-24 +.. nonce: Qsaaue +.. section: Library + +:func:`inspect.findsource` now raises :exc:`OSError` instead of +:exc:`IndexError` when :attr:`co_lineno` of a code object is greater than +the file length. This can happen, for example, when a file is edited after +it was imported. PR by Irit Katriel. + +.. + +.. bpo: 42116 +.. date: 2020-12-03-15-42-32 +.. nonce: yIwroP +.. section: Library + +Fix handling of trailing comments by :func:`inspect.getsource`. + +.. + +.. bpo: 42532 +.. date: 2020-12-02-07-37-59 +.. nonce: ObNep_ +.. section: Library + +Remove unexpected call of ``__bool__`` when passing a ``spec_arg`` argument +to a Mock. + +.. + +.. bpo: 38200 +.. date: 2020-11-28-22-52-57 +.. nonce: DuWGlW +.. section: Library + +Added itertools.pairwise() + +.. + +.. bpo: 41818 +.. date: 2020-11-28-06-34-53 +.. nonce: mFSMc2 +.. section: Library + +Fix test_master_read() so that it succeeds on all platforms that either +raise OSError or return b"" upon reading from master. + +.. + +.. bpo: 42487 +.. date: 2020-11-28-04-31-20 +.. nonce: iqtC4L +.. section: Library + +ChainMap.__iter__ no longer calls __getitem__ on underlying maps + +.. + +.. bpo: 42482 +.. date: 2020-11-27-16-46-58 +.. nonce: EJC3sd +.. section: Library + +:class:`~traceback.TracebackException` no longer holds a reference to the +exception's traceback object. Consequently, instances of TracebackException +for equivalent but non-equal exceptions now compare as equal. + +.. + +.. bpo: 41818 +.. date: 2020-11-27-09-19-43 +.. nonce: KWYUbL +.. section: Library + +Make test_openpty() avoid unexpected success due to number of rows and/or +number of columns being == 0. + +.. + +.. bpo: 42392 +.. date: 2020-11-26-12-40-16 +.. nonce: GbmdHE +.. section: Library + +Remove loop parameter from ``asyncio.subprocess`` and ``asyncio.tasks`` +functions. Patch provided by Yurii Karabas. + +.. + +.. bpo: 42392 +.. date: 2020-11-25-22-44-59 +.. nonce: T_DAEl +.. section: Library + +Remove loop parameter from ``asyncio.open_connection`` and +``asyncio.start_server`` functions. Patch provided by Yurii Karabas. + +.. + +.. bpo: 28468 +.. date: 2020-11-24-13-18-05 +.. nonce: 8Gh2d4 +.. section: Library + +Add :func:`platform.freedesktop_os_release` function to parse +freedesktop.org ``os-release`` files. + +.. + +.. bpo: 42299 +.. date: 2020-11-23-23-42-08 +.. nonce: Fdn4Wf +.. section: Library + +Removed the ``formatter`` module, which was deprecated in Python 3.4. It is +somewhat obsolete, little used, and not tested. It was originally scheduled +to be removed in Python 3.6, but such removals were delayed until after +Python 2.7 EOL. Existing users should copy whatever classes they use into +their code. Patch by Dong-hee Na and and Terry J. Reedy. + +.. + +.. bpo: 26131 +.. date: 2020-11-22-12-30-26 +.. nonce: -HsFPG +.. section: Library + +Deprecate zipimport.zipimporter.load_module() in favour of exec_module(). + +.. + +.. bpo: 41818 +.. date: 2020-11-20-14-44-07 +.. nonce: 33soAw +.. section: Library + +Updated tests for the pty library. test_basic() has been changed to +test_openpty(); this additionally checks if slave termios and slave winsize +are being set properly by pty.openpty(). In order to add support for +FreeBSD, NetBSD, OpenBSD, and Darwin, this also adds test_master_read(), +which demonstrates that pty.spawn() should not depend on an OSError to exit +from its copy loop. + +.. + +.. bpo: 42392 +.. date: 2020-11-20-14-01-29 +.. nonce: -OUzvl +.. section: Library + +Remove loop parameter from ``__init__`` in all ``asyncio.locks`` and +``asyncio.Queue`` classes. Patch provided by Yurii Karabas. + +.. + +.. bpo: 15450 +.. date: 2020-11-20-10-38-34 +.. nonce: E-y9PA +.. section: Library + +Make :class:`filecmp.dircmp` respect subclassing. Now the +:attr:`filecmp.dircmp.subdirs` behaves as expected when subclassing dircmp. + +.. + +.. bpo: 42413 +.. date: 2020-11-19-20-27-51 +.. nonce: fjHrHx +.. section: Library + +The exception :exc:`socket.timeout` is now an alias of :exc:`TimeoutError`. + +.. + +.. bpo: 31904 +.. date: 2020-11-19-16-14-36 +.. nonce: 83kf9d +.. section: Library + +Support signal module on VxWorks. + +.. + +.. bpo: 42406 +.. date: 2020-11-19-10-44-41 +.. nonce: r9rNCj +.. section: Library + +We fixed an issue in `pickle.whichmodule` in which importing +`multiprocessing` could change the how pickle identifies which module an +object belongs to, potentially breaking the unpickling of those objects. + +.. + +.. bpo: 42403 +.. date: 2020-11-19-10-12-39 +.. nonce: t7q5AX +.. section: Library + +Simplify the :mod:`importlib` external bootstrap code: +``importlib._bootstrap_external`` now uses regular imports to import builtin +modules. When it is imported, the builtin :func:`__import__()` function is +already fully working and so can be used to import builtin modules like +:mod:`sys`. Patch by Victor Stinner. + +.. + +.. bpo: 1635741 +.. date: 2020-11-19-09-59-07 +.. nonce: 7cMypH +.. section: Library + +Convert _sre module types to heap types (PEP 384). Patch by Erlend E. +Aasland. + +.. + +.. bpo: 42375 +.. date: 2020-11-19-04-13-53 +.. nonce: U8bp4s +.. section: Library + +subprocess module update for DragonFlyBSD support. + +.. + +.. bpo: 41713 +.. date: 2020-11-17-23-00-27 +.. nonce: -Us0tf +.. section: Library + +Port the ``_signal`` extension module to the multi-phase initialization API +(:pep:`489`). Patch by Victor Stinner and Mohamed Koubaa. + +.. + +.. bpo: 37205 +.. date: 2020-11-16-15-08-12 +.. nonce: Wh5svI +.. section: Library + +:func:`time.time()`, :func:`time.perf_counter()` and +:func:`time.monotonic()` functions can no longer fail with a Python fatal +error, instead raise a regular Python exception on failure. + +.. + +.. bpo: 42328 +.. date: 2020-11-15-17-02-00 +.. nonce: bqpPlR +.. section: Library + +Fixed :meth:`tkinter.ttk.Style.map`. The function accepts now the +representation of the default state as empty sequence (as returned by +``Style.map()``). The structure of the result is now the same on all +platform and does not depend on the value of ``wantobjects``. + +.. + +.. bpo: 42345 +.. date: 2020-11-15-15-23-34 +.. nonce: hiIR7x +.. section: Library + +Fix various issues with ``typing.Literal`` parameter handling (flatten, +deduplicate, use type to cache key). Patch provided by Yurii Karabas. + +.. + +.. bpo: 37205 +.. date: 2020-11-14-14-34-32 +.. nonce: iDbHrw +.. section: Library + +:func:`time.perf_counter()` on Windows and :func:`time.monotonic()` on macOS +are now system-wide. Previously, they used an offset computed at startup to +reduce the precision loss caused by the float type. Use +:func:`time.perf_counter_ns()` and :func:`time.monotonic_ns()` added in +Python 3.7 to avoid this precision loss. + +.. + +.. bpo: 42318 +.. date: 2020-11-14-13-46-27 +.. nonce: wYAcBD +.. section: Library + +Fixed support of non-BMP characters in :mod:`tkinter` on macOS. + +.. + +.. bpo: 42350 +.. date: 2020-11-13-18-53-50 +.. nonce: rsql7V +.. section: Library + +Fix the :class:`threading.Thread` class at fork: do nothing if the thread is +already stopped (ex: fork called at Python exit). Previously, an error was +logged in the child process. + +.. + +.. bpo: 42333 +.. date: 2020-11-12-18-21-15 +.. nonce: J9vFmV +.. section: Library + +Port _ssl extension module to heap types. + +.. + +.. bpo: 42014 +.. date: 2020-11-10-15-40-56 +.. nonce: ShM37l +.. section: Library + +The ``onerror`` callback from ``shutil.rmtree`` now receives correct +function when ``os.open`` fails. + +.. + +.. bpo: 42237 +.. date: 2020-11-10-14-27-49 +.. nonce: F363jO +.. section: Library + +Fix `os.sendfile()` on illumos. + +.. + +.. bpo: 42308 +.. date: 2020-11-10-12-09-13 +.. nonce: yaJHH9 +.. section: Library + +Add :data:`threading.__excepthook__` to allow retrieving the original value +of :func:`threading.excepthook` in case it is set to a broken or a different +value. Patch by Mario Corchero. + +.. + +.. bpo: 42131 +.. date: 2020-11-06-18-20-47 +.. nonce: l2rjjG +.. section: Library + +Implement PEP 451/spec methods on zipimport.zipimporter: find_spec(), +create_module(), and exec_module(). + +This also allows for the documented deprecation of find_loader(), +find_module(), and load_module(). + +.. + +.. bpo: 41877 +.. date: 2020-11-05-16-00-03 +.. nonce: FHbngM +.. section: Library + +Mock objects which are not unsafe will now raise an AttributeError if an +attribute with the prefix asert, aseert, or assrt is accessed, in addition +to this already happening for the prefixes assert or assret. + +.. + +.. bpo: 42264 +.. date: 2020-11-05-13-32-41 +.. nonce: r4KYUU +.. section: Library + +``sqlite3.OptimizedUnicode`` has been undocumented and obsolete since Python +3.3, when it was made an alias to :class:`str`. It is now deprecated, +scheduled for removal in Python 3.12. + +.. + +.. bpo: 42251 +.. date: 2020-11-03-14-15-35 +.. nonce: 6TC32V +.. section: Library + +Added :func:`threading.gettrace` and :func:`threading.getprofile` to +retrieve the functions set by :func:`threading.settrace` and +:func:`threading.setprofile` respectively. Patch by Mario Corchero. + +.. + +.. bpo: 42249 +.. date: 2020-11-03-09-22-56 +.. nonce: vfNO2u +.. section: Library + +Fixed writing binary Plist files larger than 4 GiB. + +.. + +.. bpo: 42236 +.. date: 2020-11-02-23-05-17 +.. nonce: aJ6ZBR +.. section: Library + +On Unix, the :func:`os.device_encoding` function now returns ``'UTF-8'`` +rather than the device encoding if the :ref:`Python UTF-8 Mode ` +is enabled. + +.. + +.. bpo: 41754 +.. date: 2020-11-01-15-07-20 +.. nonce: DraSZh +.. section: Library + +webbrowser: Ignore *NotADirectoryError* when calling ``xdg-settings``. + +.. + +.. bpo: 42183 +.. date: 2020-10-29-11-17-35 +.. nonce: 50ZcIi +.. section: Library + +Fix a stack overflow error for asyncio Task or Future repr(). + +The overflow occurs under some circumstances when a Task or Future +recursively returns itself. + +.. + +.. bpo: 42140 +.. date: 2020-10-24-04-02-36 +.. nonce: miLqvb +.. section: Library + +Improve asyncio.wait function to create the futures set just one time. + +.. + +.. bpo: 42133 +.. date: 2020-10-23-15-47-47 +.. nonce: BzizYV +.. section: Library + +Update various modules in the stdlib to fall back on `__spec__.loader` when +`__loader__` isn't defined on a module. + +.. + +.. bpo: 26131 +.. date: 2020-10-22-17-26-35 +.. nonce: CAsI3O +.. section: Library + +The `load_module()` methods found in importlib now trigger a +DeprecationWarning. + +.. + +.. bpo: 39825 +.. date: 2020-10-20-08-28-26 +.. nonce: n6KnG0 +.. section: Library + +Windows: Change ``sysconfig.get_config_var('EXT_SUFFIX')`` to the expected +full ``platform_tag.extension`` format. Previously it was hard-coded to +``.pyd``, now it is compatible with ``distutils.sysconfig`` and will result +in something like ``.cp38-win_amd64.pyd``. This brings windows into +conformance with the other platforms. + +.. + +.. bpo: 26389 +.. date: 2020-10-08-23-51-55 +.. nonce: uga44e +.. section: Library + +The :func:`traceback.format_exception`, +:func:`traceback.format_exception_only`, and +:func:`traceback.print_exception` functions can now take an exception object +as a positional-only argument. + +.. + +.. bpo: 41889 +.. date: 2020-10-01-16-17-11 +.. nonce: qLkNh8 +.. section: Library + +Enum: fix regression involving inheriting a multiply-inherited enum + +.. + +.. bpo: 41861 +.. date: 2020-10-01-15-44-52 +.. nonce: YTqJ7z +.. section: Library + +Convert :mod:`sqlite3` to use heap types (PEP 384). Patch by Erlend E. +Aasland. + +.. + +.. bpo: 40624 +.. date: 2020-09-08-03-19-04 +.. nonce: 0-gYfx +.. section: Library + +Added support for the XPath ``!=`` operator in xml.etree + +.. + +.. bpo: 28850 +.. date: 2020-09-06-21-55-44 +.. nonce: HJNggD +.. section: Library + +Fix :meth:`pprint.PrettyPrinter.format` overrides being ignored for contents +of small containers. The :func:`pprint._safe_repr` function was removed. + +.. + +.. bpo: 41625 +.. date: 2020-08-24-16-59-04 +.. nonce: Cc967V +.. section: Library + +Expose the :c:func:`splice` as :func:`os.splice` in the :mod:`os` module. +Patch by Pablo Galindo + +.. + +.. bpo: 34215 +.. date: 2020-08-19-20-17-51 +.. nonce: _Cv8c- +.. section: Library + +Clarify the error message for :exc:`asyncio.IncompleteReadError` when +``expected`` is ``None``. + +.. + +.. bpo: 41543 +.. date: 2020-08-14-00-39-04 +.. nonce: RpcRjb +.. section: Library + +Add async context manager support for contextlib.nullcontext. + +.. + +.. bpo: 21041 +.. date: 2020-08-10-15-06-55 +.. nonce: cYz1eL +.. section: Library + +:attr:`pathlib.PurePath.parents` now supports negative indexing. Patch +contributed by Yaroslav Pankovych. + +.. + +.. bpo: 41332 +.. date: 2020-07-18-17-39-28 +.. nonce: QRGmA5 +.. section: Library + +Added missing connect_accepted_socket() method to +``asyncio.AbstractEventLoop``. + +.. + +.. bpo: 12800 +.. date: 2020-07-09-11-32-28 +.. nonce: fNgWwx +.. section: Library + +Extracting a symlink from a tarball should succeed and overwrite the symlink +if it already exists. The fix is to remove the existing file or symlink +before extraction. Based on patch by Chris AtLee, Jeffrey Kintscher, and +Senthil Kumaran. + +.. + +.. bpo: 40968 +.. date: 2020-06-18-11-35-16 +.. nonce: R8Edbv +.. section: Library + +:mod:`urllib.request` and :mod:`http.client` now send ``http/1.1`` ALPN +extension during TLS handshake when no custom context is supplied. + +.. + +.. bpo: 41001 +.. date: 2020-06-17-12-24-26 +.. nonce: 5mi7b0 +.. section: Library + +Add func:`os.eventfd` to provide a low level interface for Linux's event +notification file descriptor. + +.. + +.. bpo: 40816 +.. date: 2020-05-29-15-25-41 +.. nonce: w61Pob +.. section: Library + +Add AsyncContextDecorator to contextlib to support async context manager as +a decorator. + +.. + +.. bpo: 40550 +.. date: 2020-05-08-21-30-54 +.. nonce: i7GWkb +.. section: Library + +Fix time-of-check/time-of-action issue in subprocess.Popen.send_signal. + +.. + +.. bpo: 39411 +.. date: 2020-01-21-16-38-25 +.. nonce: 9uHFqT +.. section: Library + +Add an ``is_async`` identifier to :mod:`pyclbr`'s ``Function`` objects. +Patch by Batuhan Taskaya + +.. + +.. bpo: 35498 +.. date: 2018-12-14-13-29-17 +.. nonce: LEJHl7 +.. section: Library + +Add slice support to :attr:`pathlib.PurePath.parents`. + +.. + +.. bpo: 42238 +.. date: 2020-11-24-22-54-49 +.. nonce: 62EOTu +.. section: Documentation + +Tentative to deprecate ``make suspicious`` by first removing it from the CI +and documentation builds, but keeping it around for manual uses. + +.. + +.. bpo: 42153 +.. date: 2020-11-15-13-46-31 +.. nonce: KjBhx3 +.. section: Documentation + +Fix the URL for the IMAP protocol documents. + +.. + +.. bpo: 41028 +.. date: 2020-06-18-23-37-03 +.. nonce: vM8bC8 +.. section: Documentation + +Language and version switchers, previously maintained in every cpython +branches, are now handled by docsbuild-script. + +.. + +.. bpo: 41473 +.. date: 2020-12-04-11-47-09 +.. nonce: W_updK +.. section: Tests + +Reenable test_gdb on gdb 9.2 and newer: +https://bugzilla.redhat.com/show_bug.cgi?id=1866884 bug is fixed in gdb +10.1. + +.. + +.. bpo: 42553 +.. date: 2020-12-03-13-32-44 +.. nonce: 2TRE2N +.. section: Tests + +Fix ``test_asyncio.test_call_later()`` race condition: don't measure asyncio +performance in the ``call_later()`` unit test. The test failed randomly on +the CI. + +.. + +.. bpo: 31904 +.. date: 2020-12-01-15-51-19 +.. nonce: iwetj4 +.. section: Tests + +Fix test_netrc on VxWorks: create temporary directories using temp_cwd(). + +.. + +.. bpo: 31904 +.. date: 2020-11-26-11-13-13 +.. nonce: ay4g89 +.. section: Tests + +skip test_getaddrinfo_ipv6_scopeid_symbolic and +test_getnameinfo_ipv6_scopeid_symbolic on VxWorks + +.. + +.. bpo: 31904 +.. date: 2020-11-25-17-00-53 +.. nonce: ue4hd9 +.. section: Tests + +skip test_test of test_mailcap on VxWorks + +.. + +.. bpo: 31904 +.. date: 2020-11-24-17-26-41 +.. nonce: eug834 +.. section: Tests + +add shell requirement for test_pipes + +.. + +.. bpo: 31904 +.. date: 2020-11-23-11-11-29 +.. nonce: V3sUZk +.. section: Tests + +skip some tests related to fifo on VxWorks + +.. + +.. bpo: 31904 +.. date: 2020-11-20-15-07-18 +.. nonce: EBJXjJ +.. section: Tests + +Fix test_doctest.py failures for VxWorks. + +.. + +.. bpo: 40754 +.. date: 2020-11-13-21-51-34 +.. nonce: Ekoxkg +.. section: Tests + +Include ``_testinternalcapi`` module in Windows installer for test suite + +.. + +.. bpo: 41561 +.. date: 2020-09-18-16-14-03 +.. nonce: uPnwrW +.. section: Tests + +test_ssl: skip test_min_max_version_mismatch when TLS 1.0 is not available + +.. + +.. bpo: 31904 +.. date: 2020-05-20-17-28-46 +.. nonce: yt83Ge +.. section: Tests + +Fix os module failures for VxWorks RTOS. + +.. + +.. bpo: 31904 +.. date: 2020-05-20-14-28-48 +.. nonce: yJik6k +.. section: Tests + +Fix fifo test cases for VxWorks RTOS. + +.. + +.. bpo: 31904 +.. date: 2020-11-19-17-01-50 +.. nonce: 894dk2 +.. section: Build + +remove libnet dependency from detect_socket() for VxWorks + +.. + +.. bpo: 42398 +.. date: 2020-11-18-11-58-44 +.. nonce: Yt5wO8 +.. section: Build + +Fix a race condition in "make regen-all" when make -jN option is used to run +jobs in parallel. The clinic.py script now only use atomic write to write +files. Moveover, generated files are now left unchanged if the content does +not change, to not change the file modification time. + +.. + +.. bpo: 41617 +.. date: 2020-11-13-15-04-53 +.. nonce: 98_oaE +.. section: Build + +Fix building ``pycore_bitutils.h`` internal header on old clang version +without ``__builtin_bswap16()`` (ex: Xcode 4.6.3 on Mac OS X 10.7). Patch by +Joshua Root and Victor Stinner. + +.. + +.. bpo: 38823 +.. date: 2020-11-12-13-45-15 +.. nonce: C0z_Fe +.. section: Build + +It is no longer possible to build the ``_ctypes`` extension module without +:c:type:`wchar_t` type: remove ``CTYPES_UNICODE`` macro. Anyway, the +:c:type:`wchar_t` type is required to build Python. Patch by Victor Stinner. + +.. + +.. bpo: 42087 +.. date: 2020-10-19-15-41-05 +.. nonce: 2AhRFP +.. section: Build + +Support was removed for AIX 5.3 and below. See :issue:`40680`. + +.. + +.. bpo: 40998 +.. date: 2020-06-17-09-05-02 +.. nonce: sgqmg9 +.. section: Build + +Addressed three compiler warnings found by undefined behavior sanitizer +(ubsan). + +.. + +.. bpo: 42120 +.. date: 2020-11-16-22-41-02 +.. nonce: 9scgko +.. section: Windows + +Remove macro definition of ``copysign`` (to ``_copysign``) in headers. + +.. + +.. bpo: 38506 +.. date: 2020-11-15-23-01-14 +.. nonce: hhdnuP +.. section: Windows + +The Windows launcher now properly handles Python 3.10 when listing installed +Python versions. + +.. + +.. bpo: 42504 +.. date: 2020-12-02-15-48-40 +.. nonce: RQmMOR +.. section: macOS + +Fix build on macOS Big Sur when MACOSX_DEPLOYMENT_TARGET=11 + +.. + +.. bpo: 41116 +.. date: 2020-11-15-16-43-45 +.. nonce: oCkbrF +.. section: macOS + +Ensure distutils.unixxcompiler.find_library_file can find system provided +libraries on macOS 11. + +.. + +.. bpo: 41100 +.. date: 2020-11-01-16-40-23 +.. nonce: BApztP +.. section: macOS + +Add support for macOS 11 and Apple Silicon systems. + +It is now possible to build "Universal 2" binaries using +"--enable-universalsdk --with-universal-archs=universal2". + +Binaries build on later macOS versions can be deployed back to older +versions (tested up to macOS 10.9), when using the correct deployment +target. This is tested using Xcode 11 and later. + +.. + +.. bpo: 42232 +.. date: 2020-11-01-15-10-28 +.. nonce: 2zI1GN +.. section: macOS + +Added Darwin specific madvise options to mmap module. + +.. + +.. bpo: 38443 +.. date: 2020-10-23-10-26-53 +.. nonce: vu64tl +.. section: macOS + +The ``--enable-universalsdk`` and ``--with-universal-archs`` options for the +configure script now check that the specified architectures can be used. + +.. + +.. bpo: 42508 +.. date: 2020-11-30-19-46-05 +.. nonce: fE7w4M +.. section: IDLE + +Keep IDLE running on macOS. Remove obsolete workaround that prevented +running files with shortcuts when using new universal2 installers built on +macOS 11. + +.. + +.. bpo: 42426 +.. date: 2020-11-21-17-21-21 +.. nonce: kNnPoC +.. section: IDLE + +Fix reporting offset of the RE error in searchengine. + +.. + +.. bpo: 42415 +.. date: 2020-11-20-01-30-27 +.. nonce: CyD-va +.. section: IDLE + +Get docstrings for IDLE calltips more often by using inspect.getdoc. + +.. + +.. bpo: 42212 +.. date: 2020-11-20-15-11-05 +.. nonce: sjzgOf +.. section: Tools/Demos + +The smelly.py script now also checks the Python dynamic library and +extension modules, not only the Python static library. Make also the script +more verbose: explain what it does. + +.. + +.. bpo: 36310 +.. date: 2020-05-03-01-30-46 +.. nonce: xDxxwY +.. section: Tools/Demos + +Allow :file:`Tools/i18n/pygettext.py` to detect calls to ``gettext`` in +f-strings. + +.. + +.. bpo: 42423 +.. date: 2020-11-21-12-27-19 +.. nonce: ByJHhY +.. section: C API + +The :c:func:`PyType_FromSpecWithBases` and +:c:func:`PyType_FromModuleAndSpec` functions now accept a single class as +the *bases* argument. + +.. + +.. bpo: 1635741 +.. date: 2020-11-19-17-44-36 +.. nonce: qBZc3o +.. section: C API + +Port :mod:`select` extension module to multiphase initialization +(:pep:`489`). + +.. + +.. bpo: 1635741 +.. date: 2020-11-19-16-54-16 +.. nonce: 9tVsZt +.. section: C API + +Port _posixsubprocess extension module to multiphase initialization +(:pep:`489`). + +.. + +.. bpo: 1635741 +.. date: 2020-11-19-15-33-42 +.. nonce: 9tVsZt +.. section: C API + +Port _posixshmem extension module to multiphase initialization (:pep:`489`) + +.. + +.. bpo: 1635741 +.. date: 2020-11-19-12-06-43 +.. nonce: KEfZpn +.. section: C API + +Port _struct extension module to multiphase initialization (:pep:`489`) + +.. + +.. bpo: 1635741 +.. date: 2020-11-19-09-17-01 +.. nonce: 6F9o6L +.. section: C API + +Port :mod:`spwd` extension module to multiphase initialization (:pep:`489`) + +.. + +.. bpo: 1635741 +.. date: 2020-11-18-20-33-35 +.. nonce: B4ztSk +.. section: C API + +Port :mod:`gc` extension module to multiphase initialization (:pep:`489`) + +.. + +.. bpo: 1635741 +.. date: 2020-11-18-20-11-13 +.. nonce: fe3iRb +.. section: C API + +Port _queue extension module to multiphase initialization (:pep:`489`) + +.. + +.. bpo: 39573 +.. date: 2020-11-18-15-21-59 +.. nonce: VB3G2y +.. section: C API + +Convert :c:func:`Py_TYPE` and :c:func:`Py_SIZE` back to macros to allow +using them as an l-value. Many third party C extension modules rely on the +ability of using Py_TYPE() and Py_SIZE() to set an object type and size: +``Py_TYPE(obj) = type;`` and ``Py_SIZE(obj) = size;``. + +.. + +.. bpo: 1635741 +.. date: 2020-11-18-10-52-38 +.. nonce: FrWAwJ +.. section: C API + +Port :mod:`symtable` extension module to multiphase initialization +(:pep:`489`) + +.. + +.. bpo: 1635741 +.. date: 2020-11-18-09-46-35 +.. nonce: SH8OIT +.. section: C API + +Port :mod:`grp` and :mod:`pwd` extension modules to multiphase +initialization (:pep:`489`) + +.. + +.. bpo: 1635741 +.. date: 2020-11-18-09-16-23 +.. nonce: gkoI7Y +.. section: C API + +Port _random extension module to multiphase initialization (:pep:`489`) + +.. + +.. bpo: 1635741 +.. date: 2020-11-18-08-45-36 +.. nonce: VLZfiY +.. section: C API + +Port _hashlib extension module to multiphase initialization (:pep:`489`) + +.. + +.. bpo: 41713 +.. date: 2020-11-17-15-39-10 +.. nonce: Rq99Vc +.. section: C API + +Removed the undocumented ``PyOS_InitInterrupts()`` function. Initializing +Python already implicitly installs signal handlers: see +:c:member:`PyConfig.install_signal_handlers`. Patch by Victor Stinner. + +.. + +.. bpo: 40170 +.. date: 2020-11-13-01-40-28 +.. nonce: uh8lEf +.. section: C API + +The ``Py_TRASHCAN_BEGIN`` macro no longer accesses PyTypeObject attributes, +but now can get the condition by calling the new private +:c:func:`_PyTrash_cond()` function which hides implementation details. + +.. + +.. bpo: 42260 +.. date: 2020-11-10-14-27-39 +.. nonce: -Br3Co +.. section: C API + +:c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, +:c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` and +:c:func:`Py_GetProgramName` functions now return ``NULL`` if called before +:c:func:`Py_Initialize` (before Python is initialized). Use the new +:ref:`Python Initialization Configuration API ` to get the +:ref:`Python Path Configuration. `. Patch by Victor +Stinner. + +.. + +.. bpo: 42260 +.. date: 2020-11-05-18-02-07 +.. nonce: pAeaNR +.. section: C API + +The :c:func:`PyConfig_Read` function now only parses +:c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv` is +set to ``2`` after arguments are parsed. Since Python arguments are +strippped from :c:member:`PyConfig.argv`, parsing arguments twice would +parse the application options as Python options. + +.. + +.. bpo: 42262 +.. date: 2020-11-04-17-22-36 +.. nonce: fCWzBb +.. section: C API + +Added :c:func:`Py_NewRef` and :c:func:`Py_XNewRef` functions to increment +the reference count of an object and return the object. Patch by Victor +Stinner. + +.. + +.. bpo: 42260 +.. date: 2020-11-04-16-31-55 +.. nonce: CmgHtF +.. section: C API + +When :c:func:`Py_Initialize` is called twice, the second call now updates +more :mod:`sys` attributes for the configuration, rather than only +:data:`sys.argv`. Patch by Victor Stinner. + +.. + +.. bpo: 41832 +.. date: 2020-11-03-19-47-06 +.. nonce: dL1VJJ +.. section: C API + +The :c:func:`PyType_FromModuleAndSpec` function now accepts NULL ``tp_doc`` +slot. + +.. + +.. bpo: 1635741 +.. date: 2020-11-03-11-52-27 +.. nonce: aDYJKB +.. section: C API + +Added :c:func:`PyModule_AddObjectRef` function: similar to +:c:func:`PyModule_AddObject` but don't steal a reference to the value on +success. Patch by Victor Stinner. + +.. + +.. bpo: 42171 +.. date: 2020-10-27-21-10-14 +.. nonce: S3FWTP +.. section: C API + +The :c:data:`METH_FASTCALL` calling convention is added to the limited API. +The functions :c:func:`PyModule_AddType`, +:c:func:`PyType_FromModuleAndSpec`, :c:func:`PyType_GetModule` and +:c:func:`PyType_GetModuleState` are added to the limited API on Windows. + +.. + +.. bpo: 42085 +.. date: 2020-10-19-15-58-16 +.. nonce: NhEf3W +.. section: C API + +Add dedicated entry to PyAsyncMethods for sending values + +.. + +.. bpo: 41073 +.. date: 2020-07-08-21-01-49 +.. nonce: VqQZON +.. section: C API + +:c:func:`PyType_GetSlot()` can now accept static types. + +.. + +.. bpo: 30459 +.. date: 2020-05-06-23-54-57 +.. nonce: N9_Jai +.. section: C API + +:c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and +:c:func:`PyCell_SET` macros can no longer be used as l-value or r-value. For +example, ``x = PyList_SET_ITEM(a, b, c)`` and ``PyList_SET_ITEM(a, b, c) = +x`` now fail with a compiler error. It prevents bugs like ``if +(PyList_SET_ITEM (a, b, c) < 0) ...`` test. Patch by Zackery Spytz and +Victor Stinner. diff --git a/Misc/NEWS.d/3.8.0a1.rst b/Misc/NEWS.d/3.8.0a1.rst index b7164a5b4e0..89811c12a79 100644 --- a/Misc/NEWS.d/3.8.0a1.rst +++ b/Misc/NEWS.d/3.8.0a1.rst @@ -1784,7 +1784,7 @@ instead of an OrderedDict. .. nonce: Q0ktFC .. section: Library -An ExitStack is now used internally within subprocess.POpen to clean up pipe +An ExitStack is now used internally within subprocess.Popen to clean up pipe file handles. No behavior change in normal operation. But if closing one handle were ever to cause an exception, the others will now be closed instead of leaked. (patch by Giampaolo Rodola) diff --git a/Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst b/Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst new file mode 100644 index 00000000000..b38beb05869 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst @@ -0,0 +1 @@ +Add fish shell support to macOS installer. diff --git a/Misc/NEWS.d/next/Build/2020-06-17-09-05-02.bpo-40998.sgqmg9.rst b/Misc/NEWS.d/next/Build/2020-06-17-09-05-02.bpo-40998.sgqmg9.rst deleted file mode 100644 index c268e4fd0d9..00000000000 --- a/Misc/NEWS.d/next/Build/2020-06-17-09-05-02.bpo-40998.sgqmg9.rst +++ /dev/null @@ -1,2 +0,0 @@ -Addressed three compiler warnings found by undefined behavior sanitizer -(ubsan). diff --git a/Misc/NEWS.d/next/Build/2020-10-19-15-41-05.bpo-42087.2AhRFP.rst b/Misc/NEWS.d/next/Build/2020-10-19-15-41-05.bpo-42087.2AhRFP.rst deleted file mode 100644 index 1a830bfe9f5..00000000000 --- a/Misc/NEWS.d/next/Build/2020-10-19-15-41-05.bpo-42087.2AhRFP.rst +++ /dev/null @@ -1 +0,0 @@ -Support was removed for AIX 5.3 and below. See :issue:`40680`. diff --git a/Misc/NEWS.d/next/Build/2020-11-12-13-45-15.bpo-38823.C0z_Fe.rst b/Misc/NEWS.d/next/Build/2020-11-12-13-45-15.bpo-38823.C0z_Fe.rst deleted file mode 100644 index 4a0f11de5e4..00000000000 --- a/Misc/NEWS.d/next/Build/2020-11-12-13-45-15.bpo-38823.C0z_Fe.rst +++ /dev/null @@ -1,3 +0,0 @@ -It is no longer possible to build the ``_ctypes`` extension module without -:c:type:`wchar_t` type: remove ``CTYPES_UNICODE`` macro. Anyway, the -:c:type:`wchar_t` type is required to build Python. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Build/2020-11-13-15-04-53.bpo-41617.98_oaE.rst b/Misc/NEWS.d/next/Build/2020-11-13-15-04-53.bpo-41617.98_oaE.rst deleted file mode 100644 index a5f35b25e8b..00000000000 --- a/Misc/NEWS.d/next/Build/2020-11-13-15-04-53.bpo-41617.98_oaE.rst +++ /dev/null @@ -1,3 +0,0 @@ -Fix building ``pycore_bitutils.h`` internal header on old clang version -without ``__builtin_bswap16()`` (ex: Xcode 4.6.3 on Mac OS X 10.7). Patch by -Joshua Root and Victor Stinner. diff --git a/Misc/NEWS.d/next/Build/2020-11-18-11-58-44.bpo-42398.Yt5wO8.rst b/Misc/NEWS.d/next/Build/2020-11-18-11-58-44.bpo-42398.Yt5wO8.rst deleted file mode 100644 index 9ab99d0e69d..00000000000 --- a/Misc/NEWS.d/next/Build/2020-11-18-11-58-44.bpo-42398.Yt5wO8.rst +++ /dev/null @@ -1,4 +0,0 @@ -Fix a race condition in "make regen-all" when make -jN option is used to run -jobs in parallel. The clinic.py script now only use atomic write to write -files. Moveover, generated files are now left unchanged if the content does not -change, to not change the file modification time. diff --git a/Misc/NEWS.d/next/Build/2020-12-11-18-04-38.bpo-31904.j3j6d8.rst b/Misc/NEWS.d/next/Build/2020-12-11-18-04-38.bpo-31904.j3j6d8.rst new file mode 100644 index 00000000000..d2da711448a --- /dev/null +++ b/Misc/NEWS.d/next/Build/2020-12-11-18-04-38.bpo-31904.j3j6d8.rst @@ -0,0 +1 @@ +Enable libpython3.so for VxWorks. diff --git a/Misc/NEWS.d/next/Build/2020-12-13-14-43-10.bpo-42598.7ipr5H.rst b/Misc/NEWS.d/next/Build/2020-12-13-14-43-10.bpo-42598.7ipr5H.rst new file mode 100644 index 00000000000..7dafc105c45 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2020-12-13-14-43-10.bpo-42598.7ipr5H.rst @@ -0,0 +1,2 @@ +Fix implicit function declarations in configure which could have resulted in +incorrect configuration checks. Patch contributed by Joshua Root. diff --git a/Misc/NEWS.d/next/Build/2020-12-20-02-35-28.bpo-42604.gRd89w.rst b/Misc/NEWS.d/next/Build/2020-12-20-02-35-28.bpo-42604.gRd89w.rst new file mode 100644 index 00000000000..caaada41cf9 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2020-12-20-02-35-28.bpo-42604.gRd89w.rst @@ -0,0 +1,4 @@ +Now all platforms use a value for the "EXT_SUFFIX" build variable derived +from SOABI (for instance in freeBSD, "EXT_SUFFIX" is now ".cpython-310d.so" +instead of ".so"). Previosuly only Linux, Mac and VxWorks were using a value +for "EXT_SUFFIX" that included "SOABI". diff --git a/Misc/NEWS.d/next/Build/2020-12-22-17-57-04.bpo-27640.j3a8r0.rst b/Misc/NEWS.d/next/Build/2020-12-22-17-57-04.bpo-27640.j3a8r0.rst new file mode 100644 index 00000000000..142590d05ef --- /dev/null +++ b/Misc/NEWS.d/next/Build/2020-12-22-17-57-04.bpo-27640.j3a8r0.rst @@ -0,0 +1,3 @@ +Added ``--disable-test-modules`` option to the ``configure`` script: +don't build nor install test modules. +Patch by Xavier de Gaye, Thomas Petazzoni and Peixing Xin. diff --git a/Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst b/Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst new file mode 100644 index 00000000000..538488e2fba --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst @@ -0,0 +1,2 @@ +Fix an alignment build warning/error in function ``PyVectorcall_Function()``. +Patch by Andreas Schneider, Antoine Pitrou and Petr Viktorin. diff --git a/Misc/NEWS.d/next/C API/2020-07-08-21-01-49.bpo-41073.VqQZON.rst b/Misc/NEWS.d/next/C API/2020-07-08-21-01-49.bpo-41073.VqQZON.rst deleted file mode 100644 index 1bec2f1a197..00000000000 --- a/Misc/NEWS.d/next/C API/2020-07-08-21-01-49.bpo-41073.VqQZON.rst +++ /dev/null @@ -1 +0,0 @@ -:c:func:`PyType_GetSlot()` can now accept static types. diff --git a/Misc/NEWS.d/next/C API/2020-10-19-15-58-16.bpo-42085.NhEf3W.rst b/Misc/NEWS.d/next/C API/2020-10-19-15-58-16.bpo-42085.NhEf3W.rst deleted file mode 100644 index 53338fb4f44..00000000000 --- a/Misc/NEWS.d/next/C API/2020-10-19-15-58-16.bpo-42085.NhEf3W.rst +++ /dev/null @@ -1 +0,0 @@ -Add dedicated entry to PyAsyncMethods for sending values diff --git a/Misc/NEWS.d/next/C API/2020-10-21-18-43-06.bpo-42111.9pvtrc.rst b/Misc/NEWS.d/next/C API/2020-10-21-18-43-06.bpo-42111.9pvtrc.rst new file mode 100644 index 00000000000..3fb718cc45d --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-10-21-18-43-06.bpo-42111.9pvtrc.rst @@ -0,0 +1,2 @@ +Update the ``xxlimited`` module to be a better example of how to use the +limited C API. diff --git a/Misc/NEWS.d/next/C API/2020-10-27-21-10-14.bpo-42171.S3FWTP.rst b/Misc/NEWS.d/next/C API/2020-10-27-21-10-14.bpo-42171.S3FWTP.rst deleted file mode 100644 index 5dfbb23a6a3..00000000000 --- a/Misc/NEWS.d/next/C API/2020-10-27-21-10-14.bpo-42171.S3FWTP.rst +++ /dev/null @@ -1,4 +0,0 @@ -The :c:data:`METH_FASTCALL` calling convention is added to the limited API. -The functions :c:func:`PyModule_AddType`, :c:func:`PyType_FromModuleAndSpec`, -:c:func:`PyType_GetModule` and :c:func:`PyType_GetModuleState` are added to -the limited API on Windows. diff --git a/Misc/NEWS.d/next/C API/2020-11-03-11-52-27.bpo-1635741.aDYJKB.rst b/Misc/NEWS.d/next/C API/2020-11-03-11-52-27.bpo-1635741.aDYJKB.rst deleted file mode 100644 index 2c118129dbf..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-03-11-52-27.bpo-1635741.aDYJKB.rst +++ /dev/null @@ -1,3 +0,0 @@ -Added :c:func:`PyModule_AddObjectRef` function: similar to -:c:func:`PyModule_AddObject` but don't steal a reference to the value on -success. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/C API/2020-11-03-19-47-06.bpo-41832.dL1VJJ.rst b/Misc/NEWS.d/next/C API/2020-11-03-19-47-06.bpo-41832.dL1VJJ.rst deleted file mode 100644 index e0bce54eb93..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-03-19-47-06.bpo-41832.dL1VJJ.rst +++ /dev/null @@ -1,2 +0,0 @@ -The :c:func:`PyType_FromModuleAndSpec` function now accepts NULL ``tp_doc`` -slot. diff --git a/Misc/NEWS.d/next/C API/2020-11-04-16-31-55.bpo-42260.CmgHtF.rst b/Misc/NEWS.d/next/C API/2020-11-04-16-31-55.bpo-42260.CmgHtF.rst deleted file mode 100644 index 694dd550a8e..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-04-16-31-55.bpo-42260.CmgHtF.rst +++ /dev/null @@ -1,3 +0,0 @@ -When :c:func:`Py_Initialize` is called twice, the second call now updates -more :mod:`sys` attributes for the configuration, rather than only -:data:`sys.argv`. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/C API/2020-11-04-17-22-36.bpo-42262.fCWzBb.rst b/Misc/NEWS.d/next/C API/2020-11-04-17-22-36.bpo-42262.fCWzBb.rst deleted file mode 100644 index 8c1e4f41844..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-04-17-22-36.bpo-42262.fCWzBb.rst +++ /dev/null @@ -1,2 +0,0 @@ -Added :c:func:`Py_NewRef` and :c:func:`Py_XNewRef` functions to increment the -reference count of an object and return the object. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/C API/2020-11-05-18-02-07.bpo-42260.pAeaNR.rst b/Misc/NEWS.d/next/C API/2020-11-05-18-02-07.bpo-42260.pAeaNR.rst deleted file mode 100644 index 0d6a277db88..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-05-18-02-07.bpo-42260.pAeaNR.rst +++ /dev/null @@ -1,5 +0,0 @@ -The :c:func:`PyConfig_Read` function now only parses :c:member:`PyConfig.argv` -arguments once: :c:member:`PyConfig.parse_argv` is set to ``2`` after arguments -are parsed. Since Python arguments are strippped from -:c:member:`PyConfig.argv`, parsing arguments twice would parse the application -options as Python options. diff --git a/Misc/NEWS.d/next/C API/2020-11-10-14-27-39.bpo-42260.-Br3Co.rst b/Misc/NEWS.d/next/C API/2020-11-10-14-27-39.bpo-42260.-Br3Co.rst deleted file mode 100644 index e7b5a558fd4..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-10-14-27-39.bpo-42260.-Br3Co.rst +++ /dev/null @@ -1,7 +0,0 @@ -:c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, -:c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` and -:c:func:`Py_GetProgramName` functions now return ``NULL`` if called before -:c:func:`Py_Initialize` (before Python is initialized). Use the new -:ref:`Python Initialization Configuration API ` to get the -:ref:`Python Path Configuration. `. Patch by Victor -Stinner. diff --git a/Misc/NEWS.d/next/C API/2020-11-13-01-40-28.bpo-40170.uh8lEf.rst b/Misc/NEWS.d/next/C API/2020-11-13-01-40-28.bpo-40170.uh8lEf.rst deleted file mode 100644 index 741f9520686..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-13-01-40-28.bpo-40170.uh8lEf.rst +++ /dev/null @@ -1,3 +0,0 @@ -The ``Py_TRASHCAN_BEGIN`` macro no longer accesses PyTypeObject attributes, -but now can get the condition by calling the new private -:c:func:`_PyTrash_cond()` function which hides implementation details. diff --git a/Misc/NEWS.d/next/C API/2020-11-17-15-39-10.bpo-41713.Rq99Vc.rst b/Misc/NEWS.d/next/C API/2020-11-17-15-39-10.bpo-41713.Rq99Vc.rst deleted file mode 100644 index 5373595aa08..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-17-15-39-10.bpo-41713.Rq99Vc.rst +++ /dev/null @@ -1,3 +0,0 @@ -Removed the undocumented ``PyOS_InitInterrupts()`` function. Initializing -Python already implicitly installs signal handlers: see -:c:member:`PyConfig.install_signal_handlers`. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/C API/2020-11-18-08-45-36.bpo-1635741.VLZfiY.rst b/Misc/NEWS.d/next/C API/2020-11-18-08-45-36.bpo-1635741.VLZfiY.rst deleted file mode 100644 index 2300170587d..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-18-08-45-36.bpo-1635741.VLZfiY.rst +++ /dev/null @@ -1 +0,0 @@ -Port _hashlib extension module to multiphase initialization (:pep:`489`) diff --git a/Misc/NEWS.d/next/C API/2020-11-18-09-16-23.bpo-1635741.gkoI7Y.rst b/Misc/NEWS.d/next/C API/2020-11-18-09-16-23.bpo-1635741.gkoI7Y.rst deleted file mode 100644 index 1f300dca554..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-18-09-16-23.bpo-1635741.gkoI7Y.rst +++ /dev/null @@ -1 +0,0 @@ -Port _random extension module to multiphase initialization (:pep:`489`) diff --git a/Misc/NEWS.d/next/C API/2020-11-18-09-46-35.bpo-1635741.SH8OIT.rst b/Misc/NEWS.d/next/C API/2020-11-18-09-46-35.bpo-1635741.SH8OIT.rst deleted file mode 100644 index 34802cd9d3a..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-18-09-46-35.bpo-1635741.SH8OIT.rst +++ /dev/null @@ -1,2 +0,0 @@ -Port :mod:`grp` and :mod:`pwd` extension modules to multiphase -initialization (:pep:`489`) diff --git a/Misc/NEWS.d/next/C API/2020-11-18-10-52-38.bpo-1635741.FrWAwJ.rst b/Misc/NEWS.d/next/C API/2020-11-18-10-52-38.bpo-1635741.FrWAwJ.rst deleted file mode 100644 index 9eda94140dd..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-18-10-52-38.bpo-1635741.FrWAwJ.rst +++ /dev/null @@ -1,2 +0,0 @@ -Port :mod:`symtable` extension module to multiphase initialization -(:pep:`489`) diff --git a/Misc/NEWS.d/next/C API/2020-11-18-15-21-59.bpo-39573.VB3G2y.rst b/Misc/NEWS.d/next/C API/2020-11-18-15-21-59.bpo-39573.VB3G2y.rst deleted file mode 100644 index b4fade6e202..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-18-15-21-59.bpo-39573.VB3G2y.rst +++ /dev/null @@ -1,4 +0,0 @@ -Convert :c:func:`Py_TYPE` and :c:func:`Py_SIZE` back to macros to allow -using them as an l-value. Many third party C extension modules rely on the -ability of using Py_TYPE() and Py_SIZE() to set an object type and size: -``Py_TYPE(obj) = type;`` and ``Py_SIZE(obj) = size;``. diff --git a/Misc/NEWS.d/next/C API/2020-11-18-20-11-13.bpo-1635741.fe3iRb.rst b/Misc/NEWS.d/next/C API/2020-11-18-20-11-13.bpo-1635741.fe3iRb.rst deleted file mode 100644 index 78df4fe0432..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-18-20-11-13.bpo-1635741.fe3iRb.rst +++ /dev/null @@ -1 +0,0 @@ -Port _queue extension module to multiphase initialization (:pep:`489`) diff --git a/Misc/NEWS.d/next/C API/2020-11-18-20-33-35.bpo-1635741.B4ztSk.rst b/Misc/NEWS.d/next/C API/2020-11-18-20-33-35.bpo-1635741.B4ztSk.rst deleted file mode 100644 index bce80c86de5..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-18-20-33-35.bpo-1635741.B4ztSk.rst +++ /dev/null @@ -1 +0,0 @@ -Port :mod:`gc` extension module to multiphase initialization (:pep:`489`) diff --git a/Misc/NEWS.d/next/C API/2020-11-19-09-17-01.bpo-1635741.6F9o6L.rst b/Misc/NEWS.d/next/C API/2020-11-19-09-17-01.bpo-1635741.6F9o6L.rst deleted file mode 100644 index d925a24da1e..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-19-09-17-01.bpo-1635741.6F9o6L.rst +++ /dev/null @@ -1 +0,0 @@ -Port :mod:`spwd` extension module to multiphase initialization (:pep:`489`) diff --git a/Misc/NEWS.d/next/C API/2020-11-19-12-06-43.bpo-1635741.KEfZpn.rst b/Misc/NEWS.d/next/C API/2020-11-19-12-06-43.bpo-1635741.KEfZpn.rst deleted file mode 100644 index fc64757e00b..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-19-12-06-43.bpo-1635741.KEfZpn.rst +++ /dev/null @@ -1 +0,0 @@ -Port _struct extension module to multiphase initialization (:pep:`489`) diff --git a/Misc/NEWS.d/next/C API/2020-11-19-15-33-42.bpo-1635741.9tVsZt.rst b/Misc/NEWS.d/next/C API/2020-11-19-15-33-42.bpo-1635741.9tVsZt.rst deleted file mode 100644 index 201b7aed56c..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-19-15-33-42.bpo-1635741.9tVsZt.rst +++ /dev/null @@ -1 +0,0 @@ -Port _posixshmem extension module to multiphase initialization (:pep:`489`) diff --git a/Misc/NEWS.d/next/C API/2020-11-19-16-54-16.bpo-1635741.9tVsZt.rst b/Misc/NEWS.d/next/C API/2020-11-19-16-54-16.bpo-1635741.9tVsZt.rst deleted file mode 100644 index cdaabfcc091..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-19-16-54-16.bpo-1635741.9tVsZt.rst +++ /dev/null @@ -1 +0,0 @@ -Port _posixshmem extension module to multiphase initialization (:pep:`489`). diff --git a/Misc/NEWS.d/next/C API/2020-11-19-17-44-36.bpo-1635741.qBZc3o.rst b/Misc/NEWS.d/next/C API/2020-11-19-17-44-36.bpo-1635741.qBZc3o.rst deleted file mode 100644 index e66e8d7e406..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-19-17-44-36.bpo-1635741.qBZc3o.rst +++ /dev/null @@ -1,2 +0,0 @@ -Port :mod:`select` extension module to multiphase initialization -(:pep:`489`). diff --git a/Misc/NEWS.d/next/C API/2020-11-21-12-27-19.bpo-42423.ByJHhY.rst b/Misc/NEWS.d/next/C API/2020-11-21-12-27-19.bpo-42423.ByJHhY.rst deleted file mode 100644 index 046a89d7eb8..00000000000 --- a/Misc/NEWS.d/next/C API/2020-11-21-12-27-19.bpo-42423.ByJHhY.rst +++ /dev/null @@ -1,3 +0,0 @@ -The :c:func:`PyType_FromSpecWithBases` and -:c:func:`PyType_FromModuleAndSpec` functions now accept a single class as -the *bases* argument. diff --git a/Misc/NEWS.d/next/C API/2020-11-22-13-46-06.bpo-1635741.-fJLzA.rst b/Misc/NEWS.d/next/C API/2020-11-22-13-46-06.bpo-1635741.-fJLzA.rst new file mode 100644 index 00000000000..da1e4cb9ef1 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-11-22-13-46-06.bpo-1635741.-fJLzA.rst @@ -0,0 +1 @@ +Port :mod:`resource` extension module to module state diff --git a/Misc/NEWS.d/next/C API/2020-12-09-00-35-25.bpo-32381.Je08Ny.rst b/Misc/NEWS.d/next/C API/2020-12-09-00-35-25.bpo-32381.Je08Ny.rst new file mode 100644 index 00000000000..ded75fa54a4 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-12-09-00-35-25.bpo-32381.Je08Ny.rst @@ -0,0 +1,3 @@ +Remove the private :c:func:`_Py_fopen` function which is no longer needed. +Use :c:func:`_Py_wfopen` or :c:func:`_Py_fopen_obj` instead. Patch by Victor +Stinner. diff --git a/Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst b/Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst new file mode 100644 index 00000000000..3519859f7be --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst @@ -0,0 +1,3 @@ +Export the :c:func:`Py_FrozenMain` function: fix a Python 3.9.0 regression. +Python 3.9 uses ``-fvisibility=hidden`` and the function was not exported +explicitly and so not exported. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-05-13-18-50-27.bpo-39465.j7nl6A.rst b/Misc/NEWS.d/next/Core and Builtins/2020-05-13-18-50-27.bpo-39465.j7nl6A.rst new file mode 100644 index 00000000000..c29b5e1757f --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-05-13-18-50-27.bpo-39465.j7nl6A.rst @@ -0,0 +1,3 @@ +Make :c:func:`_PyUnicode_FromId` function compatible with subinterpreters. +Each interpreter now has an array of identifier objects (interned strings +decoded from UTF-8). Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-05-14-02-55-39.bpo-40521.dIlXsZ.rst b/Misc/NEWS.d/next/Core and Builtins/2020-05-14-02-55-39.bpo-40521.dIlXsZ.rst new file mode 100644 index 00000000000..654757a5f90 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-05-14-02-55-39.bpo-40521.dIlXsZ.rst @@ -0,0 +1,2 @@ +Make the Unicode dictionary of interned strings compatible with +subinterpreters. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-10-12-14-51-59.bpo-42008.ijWw2I.rst b/Misc/NEWS.d/next/Core and Builtins/2020-10-12-14-51-59.bpo-42008.ijWw2I.rst new file mode 100644 index 00000000000..1b50a0ef3b0 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-10-12-14-51-59.bpo-42008.ijWw2I.rst @@ -0,0 +1 @@ +Fix _random.Random() seeding. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-01-23-34-56.bpo-42233.zOSzja.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-01-23-34-56.bpo-42233.zOSzja.rst deleted file mode 100644 index 499bb324fb9..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-01-23-34-56.bpo-42233.zOSzja.rst +++ /dev/null @@ -1,5 +0,0 @@ -Allow ``GenericAlias`` objects to use :ref:`union type expressions `. -This allows expressions like ``list[int] | dict[float, str]`` where previously a -``TypeError`` would have been thrown. This also fixes union type expressions -not de-duplicating ``GenericAlias`` objects. (Contributed by Ken Jin in -:issue:`42233`.) diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-02-14-39-48.bpo-40077.grY9TG.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-02-14-39-48.bpo-40077.grY9TG.rst deleted file mode 100644 index 48565a5a0da..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-02-14-39-48.bpo-40077.grY9TG.rst +++ /dev/null @@ -1 +0,0 @@ -Convert :mod:`mmap` to use heap types. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-02-15-48-17.bpo-42246.3CNQEX.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-02-15-48-17.bpo-42246.3CNQEX.rst deleted file mode 100644 index 358454ce40a..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-02-15-48-17.bpo-42246.3CNQEX.rst +++ /dev/null @@ -1,2 +0,0 @@ -Improved accuracy of line tracing events and f_lineno attribute of Frame -objects. See PEP 626 for details. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-03-21-58-27.bpo-40077.a9qM1j.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-03-21-58-27.bpo-40077.a9qM1j.rst deleted file mode 100644 index 369ba6b63ce..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-03-21-58-27.bpo-40077.a9qM1j.rst +++ /dev/null @@ -1 +0,0 @@ -Convert :mod:`queue` to use heap types. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-04-23-03-25.bpo-42266.G4hGDe.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-04-23-03-25.bpo-42266.G4hGDe.rst deleted file mode 100644 index a8598cfde04..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-04-23-03-25.bpo-42266.G4hGDe.rst +++ /dev/null @@ -1,3 +0,0 @@ -Fixed a bug with the LOAD_ATTR opcode cache that was not respecting -monkey-patching a class-level attribute to make it a descriptor. Patch by -Pablo Galindo. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-07-21-02-05.bpo-42282.M1W4Wj.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-07-21-02-05.bpo-42282.M1W4Wj.rst deleted file mode 100644 index 74f5c336238..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-07-21-02-05.bpo-42282.M1W4Wj.rst +++ /dev/null @@ -1,3 +0,0 @@ -Optimise constant subexpressions that appear as part of named expressions -(previously the AST optimiser did not descend into named expressions). -Patch by Nick Coghlan. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-12-23-16-14.bpo-42332.fEQIdk.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-12-23-16-14.bpo-42332.fEQIdk.rst deleted file mode 100644 index 8a2cb87cc0b..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-12-23-16-14.bpo-42332.fEQIdk.rst +++ /dev/null @@ -1 +0,0 @@ -:class:`types.GenericAlias` objects can now be the targets of weakrefs. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-13-13-53-11.bpo-42296.DuGrLJ.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-13-13-53-11.bpo-42296.DuGrLJ.rst deleted file mode 100644 index 841a26e791e..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-13-13-53-11.bpo-42296.DuGrLJ.rst +++ /dev/null @@ -1,4 +0,0 @@ -On Windows, fix a regression in signal handling which prevented to interrupt -a program using CTRL+C. The signal handler can be run in a thread different -than the Python thread, in which case the test deciding if the thread can -handle signals is wrong. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-13-17-25-44.bpo-42349.JdWxez.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-13-17-25-44.bpo-42349.JdWxez.rst deleted file mode 100644 index 3db695673a0..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-13-17-25-44.bpo-42349.JdWxez.rst +++ /dev/null @@ -1 +0,0 @@ -Make sure that the compiler front-end produces a well-formed control flow graph. Be be more aggressive in the compiler back-end, as it is now safe to do so. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-16-17-30-03.bpo-42316._DdmpQ.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-16-17-30-03.bpo-42316._DdmpQ.rst deleted file mode 100644 index 77eb6662ba8..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-16-17-30-03.bpo-42316._DdmpQ.rst +++ /dev/null @@ -1 +0,0 @@ -Allow an unparenthesized walrus in subscript indexes. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-16-17-57-09.bpo-42374.t7np1E.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-16-17-57-09.bpo-42374.t7np1E.rst deleted file mode 100644 index d86d038c842..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-16-17-57-09.bpo-42374.t7np1E.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix a regression introduced by the new parser, where an unparenthesized walrus operator -was not allowed within generator expressions. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-16-18-13-07.bpo-42202.ZxenYD.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-16-18-13-07.bpo-42202.ZxenYD.rst deleted file mode 100644 index aba8ce6686f..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-16-18-13-07.bpo-42202.ZxenYD.rst +++ /dev/null @@ -1,2 +0,0 @@ -Change function parameters annotations internal representation to tuple -of strings. Patch provided by Yurii Karabas. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-16-23-45-56.bpo-42381.G4AWxL.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-16-23-45-56.bpo-42381.G4AWxL.rst deleted file mode 100644 index 5bee5141f6c..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-16-23-45-56.bpo-42381.G4AWxL.rst +++ /dev/null @@ -1,2 +0,0 @@ -Allow assignment expressions in set literals and set comprehensions as per -PEP 572. Patch by Pablo Galindo. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-17-16-25-50.bpo-41686.hX77kL.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-17-16-25-50.bpo-41686.hX77kL.rst deleted file mode 100644 index 0265d48660a..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-17-16-25-50.bpo-41686.hX77kL.rst +++ /dev/null @@ -1,4 +0,0 @@ -On Windows, the ``SIGINT`` event, ``_PyOS_SigintEvent()``, is now created -even if Python is configured to not install signal handlers (if -:c:member:`PyConfig.install_signal_handlers` equals to 0, or -``Py_InitializeEx(0)``). diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-18-23-46-31.bpo-1635741.GVOQ-m.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-18-23-46-31.bpo-1635741.GVOQ-m.rst deleted file mode 100644 index ae9cc0bc5dd..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-18-23-46-31.bpo-1635741.GVOQ-m.rst +++ /dev/null @@ -1,2 +0,0 @@ -Port the ``_warnings`` extension module to the multi-phase initialization -API (:pep:`489`). Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-19-23-12-57.bpo-40137.bihl9O.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-19-23-12-57.bpo-40137.bihl9O.rst new file mode 100644 index 00000000000..607fa0ecccf --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-11-19-23-12-57.bpo-40137.bihl9O.rst @@ -0,0 +1 @@ +Convert functools module to use :c:func:`PyType_FromModuleAndSpec`. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-20-00-57-47.bpo-42195.HeqcpS.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-20-00-57-47.bpo-42195.HeqcpS.rst new file mode 100644 index 00000000000..87e8c0e89b3 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-11-20-00-57-47.bpo-42195.HeqcpS.rst @@ -0,0 +1,10 @@ +The ``__args__`` of the parameterized generics for :data:`typing.Callable` +and :class:`collections.abc.Callable` are now consistent. The ``__args__`` +for :class:`collections.abc.Callable` are now flattened while +:data:`typing.Callable`'s have not changed. To allow this change, +:class:`types.GenericAlias` can now be subclassed and +``collections.abc.Callable``'s ``__class_getitem__`` will now return a subclass +of ``types.GenericAlias``. Tests for typing were also updated to not subclass +things like ``Callable[..., T]`` as that is not a valid base class. Finally, +both ``Callable``\ s no longer validate their ``argtypes``, in +``Callable[[argtypes], resulttype]`` to prepare for :pep:`612`. Patch by Ken Jin. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-22-14-34-55.bpo-42435.uwlB2W.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-22-14-34-55.bpo-42435.uwlB2W.rst deleted file mode 100644 index 46a8486b78a..00000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-22-14-34-55.bpo-42435.uwlB2W.rst +++ /dev/null @@ -1,2 +0,0 @@ -Speed up comparison of bytes objects with non-bytes objects when option :option:`-b` -is specified. Speed up comparison of bytarray objects with non-buffer object. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-04-17-17-44.bpo-32381.NY5t2S.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-04-17-17-44.bpo-32381.NY5t2S.rst new file mode 100644 index 00000000000..f4d84f9d848 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-04-17-17-44.bpo-32381.NY5t2S.rst @@ -0,0 +1,3 @@ +Fix encoding name when running a ``.pyc`` file on Windows: +:c:func:`PyRun_SimpleFileExFlags()` now uses the correct encoding to decode +the filename. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-09-01-55-10.bpo-42639.5pI5HG.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-09-01-55-10.bpo-42639.5pI5HG.rst new file mode 100644 index 00000000000..7999ee976f3 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-09-01-55-10.bpo-42639.5pI5HG.rst @@ -0,0 +1,3 @@ +Make the :mod:`atexit` module state per-interpreter. It is now safe have more +than one :mod:`atexit` module instance. +Patch by Dong-hee Na and Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-10-17-06-52.bpo-42615.Je6Q-r.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-10-17-06-52.bpo-42615.Je6Q-r.rst new file mode 100644 index 00000000000..2d919a8192d --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-10-17-06-52.bpo-42615.Je6Q-r.rst @@ -0,0 +1,2 @@ +Remove jump commands made redundant by the deletion of unreachable bytecode +blocks diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-13-15-23-09.bpo-30858.-f9G4z.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-13-15-23-09.bpo-30858.-f9G4z.rst new file mode 100644 index 00000000000..f2d06c3009c --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-13-15-23-09.bpo-30858.-f9G4z.rst @@ -0,0 +1,2 @@ +Improve error location in expressions that contain assignments. Patch by +Pablo Galindo and Lysandros Nikolaou. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-15-18-43-43.bpo-32381.3tIofL.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-15-18-43-43.bpo-32381.3tIofL.rst new file mode 100644 index 00000000000..fc8ea82fb08 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-15-18-43-43.bpo-32381.3tIofL.rst @@ -0,0 +1,2 @@ +The coding cookie (ex: ``# coding: latin1``) is now ignored in the command +passed to the :option:`-c` command line option. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-16-14-44-21.bpo-42246.RtIEY7.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-16-14-44-21.bpo-42246.RtIEY7.rst new file mode 100644 index 00000000000..a3814b6419e --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-16-14-44-21.bpo-42246.RtIEY7.rst @@ -0,0 +1,3 @@ +Make sure that the ``f_lasti`` and ``f_lineno`` attributes of a frame are +set correctly when an exception is raised or re-raised. Required for PEP +626. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-22-20-30-11.bpo-42246.7BrPLg.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-22-20-30-11.bpo-42246.7BrPLg.rst new file mode 100644 index 00000000000..33564f6b56b --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-22-20-30-11.bpo-42246.7BrPLg.rst @@ -0,0 +1 @@ +Jumps to jumps are not eliminated when it would break PEP 626. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-25-23-30-58.bpo-42745.XsFoHS.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-25-23-30-58.bpo-42745.XsFoHS.rst new file mode 100644 index 00000000000..fb7de9c2150 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-25-23-30-58.bpo-42745.XsFoHS.rst @@ -0,0 +1 @@ +Make the type attribute lookup cache per-interpreter. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-27-18-07-43.bpo-27794.sxgfGi.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-27-18-07-43.bpo-27794.sxgfGi.rst new file mode 100644 index 00000000000..0f66b4effc5 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-27-18-07-43.bpo-27794.sxgfGi.rst @@ -0,0 +1,3 @@ +Improve the error message for failed writes/deletes to property objects. +When possible, the attribute name is now shown. Patch provided by +Yurii Karabas. diff --git a/Misc/NEWS.d/next/Documentation/2019-03-04-18-51-21.bpo-34398.YedUqW.rst b/Misc/NEWS.d/next/Documentation/2019-03-04-18-51-21.bpo-34398.YedUqW.rst new file mode 100644 index 00000000000..4693cecdb7b --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2019-03-04-18-51-21.bpo-34398.YedUqW.rst @@ -0,0 +1,2 @@ +Prominently feature listings from the glossary in documentation search +results. Patch by Ammar Askar. diff --git a/Misc/NEWS.d/next/Documentation/2020-06-18-23-37-03.bpo-41028.vM8bC8.rst b/Misc/NEWS.d/next/Documentation/2020-06-18-23-37-03.bpo-41028.vM8bC8.rst deleted file mode 100644 index 5fc4155b553..00000000000 --- a/Misc/NEWS.d/next/Documentation/2020-06-18-23-37-03.bpo-41028.vM8bC8.rst +++ /dev/null @@ -1,2 +0,0 @@ -Language and version switchers, previously maintained in every cpython -branches, are now handled by docsbuild-script. diff --git a/Misc/NEWS.d/next/Documentation/2020-11-15-13-46-31.bpo-42153.KjBhx3.rst b/Misc/NEWS.d/next/Documentation/2020-11-15-13-46-31.bpo-42153.KjBhx3.rst deleted file mode 100644 index 0a9451a63fb..00000000000 --- a/Misc/NEWS.d/next/Documentation/2020-11-15-13-46-31.bpo-42153.KjBhx3.rst +++ /dev/null @@ -1 +0,0 @@ -Fix the URL for the IMAP protocol documents. diff --git a/Misc/NEWS.d/next/Documentation/2020-11-24-22-54-49.bpo-42238.62EOTu.rst b/Misc/NEWS.d/next/Documentation/2020-11-24-22-54-49.bpo-42238.62EOTu.rst deleted file mode 100644 index d9edf9cdf79..00000000000 --- a/Misc/NEWS.d/next/Documentation/2020-11-24-22-54-49.bpo-42238.62EOTu.rst +++ /dev/null @@ -1,2 +0,0 @@ -Tentative to deprecate ``make suspicious`` by first removing it from the CI -and documentation builds, but keeping it around for manual uses. diff --git a/Misc/NEWS.d/next/Documentation/2020-12-16-21-06-16.bpo-17140.1leSEg.rst b/Misc/NEWS.d/next/Documentation/2020-12-16-21-06-16.bpo-17140.1leSEg.rst new file mode 100644 index 00000000000..cb1fd23a56e --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2020-12-16-21-06-16.bpo-17140.1leSEg.rst @@ -0,0 +1 @@ +Add documentation for the :class:`multiprocessing.pool.ThreadPool` class. diff --git a/Misc/NEWS.d/next/IDLE/2020-11-20-01-30-27.bpo-42415.CyD-va.rst b/Misc/NEWS.d/next/IDLE/2020-11-20-01-30-27.bpo-42415.CyD-va.rst deleted file mode 100644 index b61032c1e48..00000000000 --- a/Misc/NEWS.d/next/IDLE/2020-11-20-01-30-27.bpo-42415.CyD-va.rst +++ /dev/null @@ -1 +0,0 @@ -Get docstrings for IDLE calltips more often by using inspect.getdoc. diff --git a/Misc/NEWS.d/next/IDLE/2020-11-21-17-21-21.bpo-42426.kNnPoC.rst b/Misc/NEWS.d/next/IDLE/2020-11-21-17-21-21.bpo-42426.kNnPoC.rst deleted file mode 100644 index 0ab7972aad9..00000000000 --- a/Misc/NEWS.d/next/IDLE/2020-11-21-17-21-21.bpo-42426.kNnPoC.rst +++ /dev/null @@ -1 +0,0 @@ -Fix reporting offset of the RE error in searchengine. diff --git a/Misc/NEWS.d/next/Library/2018-12-14-13-29-17.bpo-35498.LEJHl7.rst b/Misc/NEWS.d/next/Library/2018-12-14-13-29-17.bpo-35498.LEJHl7.rst deleted file mode 100644 index 1ab0093fcde..00000000000 --- a/Misc/NEWS.d/next/Library/2018-12-14-13-29-17.bpo-35498.LEJHl7.rst +++ /dev/null @@ -1 +0,0 @@ -Add slice support to :attr:`pathlib.PurePath.parents`. diff --git a/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst b/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst new file mode 100644 index 00000000000..fe6503fdce6 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst @@ -0,0 +1,2 @@ +Fix initialization race condition in :func:`a85encode` and :func:`b85encode` +in :mod:`base64`. Patch by Brandon Stansbury. diff --git a/Misc/NEWS.d/next/Library/2020-01-21-16-38-25.bpo-39411.9uHFqT.rst b/Misc/NEWS.d/next/Library/2020-01-21-16-38-25.bpo-39411.9uHFqT.rst deleted file mode 100644 index 2377eef4b9f..00000000000 --- a/Misc/NEWS.d/next/Library/2020-01-21-16-38-25.bpo-39411.9uHFqT.rst +++ /dev/null @@ -1,2 +0,0 @@ -Add an ``is_async`` identifier to :mod:`pyclbr`'s ``Function`` objects. -Patch by Batuhan Taskaya diff --git a/Misc/NEWS.d/next/Library/2020-05-08-21-30-54.bpo-40550.i7GWkb.rst b/Misc/NEWS.d/next/Library/2020-05-08-21-30-54.bpo-40550.i7GWkb.rst deleted file mode 100644 index b0f3f03c34b..00000000000 --- a/Misc/NEWS.d/next/Library/2020-05-08-21-30-54.bpo-40550.i7GWkb.rst +++ /dev/null @@ -1 +0,0 @@ -Fix time-of-check/time-of-action issue in subprocess.Popen.send_signal. diff --git a/Misc/NEWS.d/next/Library/2020-05-29-15-25-41.bpo-40816.w61Pob.rst b/Misc/NEWS.d/next/Library/2020-05-29-15-25-41.bpo-40816.w61Pob.rst deleted file mode 100644 index 66b75779784..00000000000 --- a/Misc/NEWS.d/next/Library/2020-05-29-15-25-41.bpo-40816.w61Pob.rst +++ /dev/null @@ -1 +0,0 @@ -Add AsyncContextDecorator to contextlib to support async context manager as a decorator. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-06-12-21-23-20.bpo-37193.wJximU.rst b/Misc/NEWS.d/next/Library/2020-06-12-21-23-20.bpo-37193.wJximU.rst new file mode 100644 index 00000000000..fbf56d3194c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-06-12-21-23-20.bpo-37193.wJximU.rst @@ -0,0 +1,2 @@ +Fixed memory leak in ``socketserver.ThreadingMixIn`` introduced in Python +3.7. diff --git a/Misc/NEWS.d/next/Library/2020-06-17-12-24-26.bpo-41001.5mi7b0.rst b/Misc/NEWS.d/next/Library/2020-06-17-12-24-26.bpo-41001.5mi7b0.rst deleted file mode 100644 index 34ecfbf5e66..00000000000 --- a/Misc/NEWS.d/next/Library/2020-06-17-12-24-26.bpo-41001.5mi7b0.rst +++ /dev/null @@ -1,2 +0,0 @@ -Add func:`os.eventfd` to provide a low level interface for Linux's event -notification file descriptor. diff --git a/Misc/NEWS.d/next/Library/2020-06-18-11-35-16.bpo-40968.R8Edbv.rst b/Misc/NEWS.d/next/Library/2020-06-18-11-35-16.bpo-40968.R8Edbv.rst deleted file mode 100644 index 6bcbaaa9ab9..00000000000 --- a/Misc/NEWS.d/next/Library/2020-06-18-11-35-16.bpo-40968.R8Edbv.rst +++ /dev/null @@ -1,2 +0,0 @@ -:mod:`urllib.request` and :mod:`http.client` now send ``http/1.1`` ALPN -extension during TLS handshake when no custom context is supplied. diff --git a/Misc/NEWS.d/next/Library/2020-07-09-11-32-28.bpo-12800.fNgWwx.rst b/Misc/NEWS.d/next/Library/2020-07-09-11-32-28.bpo-12800.fNgWwx.rst deleted file mode 100644 index fdd7c5e74f3..00000000000 --- a/Misc/NEWS.d/next/Library/2020-07-09-11-32-28.bpo-12800.fNgWwx.rst +++ /dev/null @@ -1,4 +0,0 @@ -Extracting a symlink from a tarball should succeed and overwrite the symlink -if it already exists. The fix is to remove the existing file or symlink -before extraction. Based on patch by Chris AtLee, Jeffrey Kintscher, and -Senthil Kumaran. diff --git a/Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst b/Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst new file mode 100644 index 00000000000..aedc5c49b40 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst @@ -0,0 +1 @@ +Lowered :class:`tkinter.ttk.LabeledScale` dummy widget to prevent hiding part of the content label. diff --git a/Misc/NEWS.d/next/Library/2020-08-03-17-54-32.bpo-41462.ek38d_.rst b/Misc/NEWS.d/next/Library/2020-08-03-17-54-32.bpo-41462.ek38d_.rst new file mode 100644 index 00000000000..ca5da1b17b4 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-03-17-54-32.bpo-41462.ek38d_.rst @@ -0,0 +1 @@ +Add :func:`os.set_blocking()` support for VxWorks RTOS. diff --git a/Misc/NEWS.d/next/Library/2020-08-10-15-06-55.bpo-21041.cYz1eL.rst b/Misc/NEWS.d/next/Library/2020-08-10-15-06-55.bpo-21041.cYz1eL.rst deleted file mode 100644 index 4f14fd39d88..00000000000 --- a/Misc/NEWS.d/next/Library/2020-08-10-15-06-55.bpo-21041.cYz1eL.rst +++ /dev/null @@ -1 +0,0 @@ -:attr:`pathlib.PurePath.parents` now supports negative indexing. Patch contributed by Yaroslav Pankovych. diff --git a/Misc/NEWS.d/next/Library/2020-08-11-17-44-07.bpo-31904.cb13ea.rst b/Misc/NEWS.d/next/Library/2020-08-11-17-44-07.bpo-31904.cb13ea.rst new file mode 100644 index 00000000000..a7164b7a5a2 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-11-17-44-07.bpo-31904.cb13ea.rst @@ -0,0 +1 @@ +Fix site and sysconfig modules for VxWorks RTOS which has no home directories. diff --git a/Misc/NEWS.d/next/Library/2020-08-14-00-39-04.bpo-41543.RpcRjb.rst b/Misc/NEWS.d/next/Library/2020-08-14-00-39-04.bpo-41543.RpcRjb.rst deleted file mode 100644 index 753dc763f21..00000000000 --- a/Misc/NEWS.d/next/Library/2020-08-14-00-39-04.bpo-41543.RpcRjb.rst +++ /dev/null @@ -1 +0,0 @@ -Add async context manager support for contextlib.nullcontext. diff --git a/Misc/NEWS.d/next/Library/2020-08-24-16-59-04.bpo-41625.Cc967V.rst b/Misc/NEWS.d/next/Library/2020-08-24-16-59-04.bpo-41625.Cc967V.rst deleted file mode 100644 index 086788a7b01..00000000000 --- a/Misc/NEWS.d/next/Library/2020-08-24-16-59-04.bpo-41625.Cc967V.rst +++ /dev/null @@ -1,2 +0,0 @@ -Expose the :c:func:`splice` as :func:`os.splice` in the :mod:`os` module. -Patch by Pablo Galindo diff --git a/Misc/NEWS.d/next/Library/2020-09-06-21-55-44.bpo-28850.HJNggD.rst b/Misc/NEWS.d/next/Library/2020-09-06-21-55-44.bpo-28850.HJNggD.rst deleted file mode 100644 index fc6bd1d57e2..00000000000 --- a/Misc/NEWS.d/next/Library/2020-09-06-21-55-44.bpo-28850.HJNggD.rst +++ /dev/null @@ -1 +0,0 @@ -Fix :meth:`pprint.PrettyPrinter.format` overrides being ignored for contents of small containers. The :func:`pprint._safe_repr` function was removed. diff --git a/Misc/NEWS.d/next/Library/2020-09-08-03-19-04.bpo-40624.0-gYfx.rst b/Misc/NEWS.d/next/Library/2020-09-08-03-19-04.bpo-40624.0-gYfx.rst deleted file mode 100644 index 78bad6e4686..00000000000 --- a/Misc/NEWS.d/next/Library/2020-09-08-03-19-04.bpo-40624.0-gYfx.rst +++ /dev/null @@ -1 +0,0 @@ -Added support for the XPath ``!=`` operator in xml.etree diff --git a/Misc/NEWS.d/next/Library/2020-09-11-16-07-00.bpo-24792.Z-ARra.rst b/Misc/NEWS.d/next/Library/2020-09-11-16-07-00.bpo-24792.Z-ARra.rst new file mode 100644 index 00000000000..4f1f18a5584 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-09-11-16-07-00.bpo-24792.Z-ARra.rst @@ -0,0 +1 @@ +Fixed bug where :mod:`zipimporter` sometimes reports an incorrect cause of import errors. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-09-30-13-35-29.bpo-41891.pNAeYI.rst b/Misc/NEWS.d/next/Library/2020-09-30-13-35-29.bpo-41891.pNAeYI.rst new file mode 100644 index 00000000000..75c25127803 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-09-30-13-35-29.bpo-41891.pNAeYI.rst @@ -0,0 +1 @@ +Ensure asyncio.wait_for waits for task completion diff --git a/Misc/NEWS.d/next/Library/2020-10-01-15-44-52.bpo-41861.YTqJ7z.rst b/Misc/NEWS.d/next/Library/2020-10-01-15-44-52.bpo-41861.YTqJ7z.rst deleted file mode 100644 index d34658a254e..00000000000 --- a/Misc/NEWS.d/next/Library/2020-10-01-15-44-52.bpo-41861.YTqJ7z.rst +++ /dev/null @@ -1,2 +0,0 @@ -Convert :mod:`sqlite3` to use heap types (PEP 384). -Patch by Erlend E. Aasland. diff --git a/Misc/NEWS.d/next/Library/2020-10-02-10-19-49.bpo-41907.wiIEsz.rst b/Misc/NEWS.d/next/Library/2020-10-02-10-19-49.bpo-41907.wiIEsz.rst new file mode 100644 index 00000000000..2c7b70d589d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-02-10-19-49.bpo-41907.wiIEsz.rst @@ -0,0 +1 @@ +fix ``format()`` behavior for ``IntFlag`` diff --git a/Misc/NEWS.d/next/Library/2020-10-06-23-59-20.bpo-41960.icQ7Xd.rst b/Misc/NEWS.d/next/Library/2020-10-06-23-59-20.bpo-41960.icQ7Xd.rst new file mode 100644 index 00000000000..f7e71998dab --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-06-23-59-20.bpo-41960.icQ7Xd.rst @@ -0,0 +1,2 @@ +Add ``globalns`` and ``localns`` parameters to the :func:`inspect.signature` +and :meth:`inspect.Signature.from_callable`. diff --git a/Misc/NEWS.d/next/Library/2020-10-08-23-51-55.bpo-26389.uga44e.rst b/Misc/NEWS.d/next/Library/2020-10-08-23-51-55.bpo-26389.uga44e.rst deleted file mode 100644 index a721a0d7cd0..00000000000 --- a/Misc/NEWS.d/next/Library/2020-10-08-23-51-55.bpo-26389.uga44e.rst +++ /dev/null @@ -1,4 +0,0 @@ -The :func:`traceback.format_exception`, -:func:`traceback.format_exception_only`, and -:func:`traceback.print_exception` functions can now take an exception object -as a positional-only argument. diff --git a/Misc/NEWS.d/next/Library/2020-10-17-12-42-08.bpo-42059.ZGMZ3D.rst b/Misc/NEWS.d/next/Library/2020-10-17-12-42-08.bpo-42059.ZGMZ3D.rst new file mode 100644 index 00000000000..3f18824fe65 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-17-12-42-08.bpo-42059.ZGMZ3D.rst @@ -0,0 +1 @@ +:class:`typing.TypedDict` types created using the alternative call-style syntax now correctly respect the ``total`` keyword argument when setting their ``__required_keys__`` and ``__optional_keys__`` class attributes. diff --git a/Misc/NEWS.d/next/Library/2020-10-20-23-28-55.bpo-1635741.Iyka3r.rst b/Misc/NEWS.d/next/Library/2020-10-20-23-28-55.bpo-1635741.Iyka3r.rst new file mode 100644 index 00000000000..e14e9a12c27 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-20-23-28-55.bpo-1635741.Iyka3r.rst @@ -0,0 +1 @@ +Port the _csv module to the multi-phase initialization API (:pep:`489`). diff --git a/Misc/NEWS.d/next/Library/2020-10-23-15-47-47.bpo-42133.BzizYV.rst b/Misc/NEWS.d/next/Library/2020-10-23-15-47-47.bpo-42133.BzizYV.rst deleted file mode 100644 index f3cfa1a8dce..00000000000 --- a/Misc/NEWS.d/next/Library/2020-10-23-15-47-47.bpo-42133.BzizYV.rst +++ /dev/null @@ -1,2 +0,0 @@ -Update various modules in the stdlib to fall back on `__spec__.loader` when -`__loader__` isn't defined on a module. diff --git a/Misc/NEWS.d/next/Library/2020-10-24-04-02-36.bpo-42140.miLqvb.rst b/Misc/NEWS.d/next/Library/2020-10-24-04-02-36.bpo-42140.miLqvb.rst deleted file mode 100644 index 4160234b5ec..00000000000 --- a/Misc/NEWS.d/next/Library/2020-10-24-04-02-36.bpo-42140.miLqvb.rst +++ /dev/null @@ -1 +0,0 @@ -Improve asyncio.wait function to create the futures set just one time. diff --git a/Misc/NEWS.d/next/Library/2020-10-25-14-48-57.bpo-42090.Ubuc0j.rst b/Misc/NEWS.d/next/Library/2020-10-25-14-48-57.bpo-42090.Ubuc0j.rst new file mode 100644 index 00000000000..72f6853b505 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-25-14-48-57.bpo-42090.Ubuc0j.rst @@ -0,0 +1,2 @@ +``zipfile.Path.joinpath`` now accepts arbitrary arguments, same as +``pathlib.Path.joinpath``. diff --git a/Misc/NEWS.d/next/Library/2020-10-29-09-22-56.bpo-42163.O4VcCY.rst b/Misc/NEWS.d/next/Library/2020-10-29-09-22-56.bpo-42163.O4VcCY.rst new file mode 100644 index 00000000000..0c357eb4ac1 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-29-09-22-56.bpo-42163.O4VcCY.rst @@ -0,0 +1 @@ +Restore compatibility for ``uname_result`` around deepcopy and _replace. diff --git a/Misc/NEWS.d/next/Library/2020-10-29-11-17-35.bpo-42183.50ZcIi.rst b/Misc/NEWS.d/next/Library/2020-10-29-11-17-35.bpo-42183.50ZcIi.rst deleted file mode 100644 index f6d7653f2cf..00000000000 --- a/Misc/NEWS.d/next/Library/2020-10-29-11-17-35.bpo-42183.50ZcIi.rst +++ /dev/null @@ -1,4 +0,0 @@ -Fix a stack overflow error for asyncio Task or Future repr(). - -The overflow occurs under some circumstances when a Task or Future -recursively returns itself. diff --git a/Misc/NEWS.d/next/Library/2020-10-31-10-28-32.bpo-42222.Cfl1eR.rst b/Misc/NEWS.d/next/Library/2020-10-31-10-28-32.bpo-42222.Cfl1eR.rst new file mode 100644 index 00000000000..2f570bb9824 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-31-10-28-32.bpo-42222.Cfl1eR.rst @@ -0,0 +1,9 @@ +Harmonized random.randrange() argument handling to match range(). + +* The integer test and conversion in randrange() now uses + operator.index(). +* Non-integer arguments to randrange() are deprecated. +* The *ValueError* is deprecated in favor of a *TypeError*. +* It now runs a little faster than before. + +(Contributed by Raymond Hettinger and Serhiy Storchaka.) diff --git a/Misc/NEWS.d/next/Library/2020-11-01-15-07-20.bpo-41754.DraSZh.rst b/Misc/NEWS.d/next/Library/2020-11-01-15-07-20.bpo-41754.DraSZh.rst deleted file mode 100644 index 181c2d9650a..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-01-15-07-20.bpo-41754.DraSZh.rst +++ /dev/null @@ -1 +0,0 @@ -webbrowser: Ignore *NotADirectoryError* when calling ``xdg-settings``. diff --git a/Misc/NEWS.d/next/Library/2020-11-02-23-05-17.bpo-42236.aJ6ZBR.rst b/Misc/NEWS.d/next/Library/2020-11-02-23-05-17.bpo-42236.aJ6ZBR.rst deleted file mode 100644 index 15e26203665..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-02-23-05-17.bpo-42236.aJ6ZBR.rst +++ /dev/null @@ -1,3 +0,0 @@ -On Unix, the :func:`os.device_encoding` function now returns ``'UTF-8'`` rather -than the device encoding if the :ref:`Python UTF-8 Mode ` is -enabled. diff --git a/Misc/NEWS.d/next/Library/2020-11-03-09-22-56.bpo-42249.vfNO2u.rst b/Misc/NEWS.d/next/Library/2020-11-03-09-22-56.bpo-42249.vfNO2u.rst deleted file mode 100644 index 071a0fdda1f..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-03-09-22-56.bpo-42249.vfNO2u.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed writing binary Plist files larger than 4 GiB. diff --git a/Misc/NEWS.d/next/Library/2020-11-03-14-15-35.bpo-42251.6TC32V.rst b/Misc/NEWS.d/next/Library/2020-11-03-14-15-35.bpo-42251.6TC32V.rst deleted file mode 100644 index 7435c837a2c..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-03-14-15-35.bpo-42251.6TC32V.rst +++ /dev/null @@ -1,3 +0,0 @@ -Added :func:`threading.gettrace` and :func:`threading.getprofile` to -retrieve the functions set by :func:`threading.settrace` and -:func:`threading.setprofile` respectively. Patch by Mario Corchero. diff --git a/Misc/NEWS.d/next/Library/2020-11-05-13-32-41.bpo-42264.r4KYUU.rst b/Misc/NEWS.d/next/Library/2020-11-05-13-32-41.bpo-42264.r4KYUU.rst deleted file mode 100644 index dd8e6871eb8..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-05-13-32-41.bpo-42264.r4KYUU.rst +++ /dev/null @@ -1,3 +0,0 @@ -``sqlite3.OptimizedUnicode`` has been undocumented and obsolete since Python -3.3, when it was made an alias to :class:`str`. It is now deprecated, -scheduled for removal in Python 3.12. diff --git a/Misc/NEWS.d/next/Library/2020-11-05-16-00-03.bpo-41877.FHbngM.rst b/Misc/NEWS.d/next/Library/2020-11-05-16-00-03.bpo-41877.FHbngM.rst deleted file mode 100644 index 6f6fccb1d4c..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-05-16-00-03.bpo-41877.FHbngM.rst +++ /dev/null @@ -1,2 +0,0 @@ -Mock objects which are not unsafe will now raise an AttributeError if an attribute with the prefix asert, aseert, -or assrt is accessed, in addition to this already happening for the prefixes assert or assret. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-11-06-18-20-47.bpo-42131.l2rjjG.rst b/Misc/NEWS.d/next/Library/2020-11-06-18-20-47.bpo-42131.l2rjjG.rst deleted file mode 100644 index 4381f5e9754..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-06-18-20-47.bpo-42131.l2rjjG.rst +++ /dev/null @@ -1,5 +0,0 @@ -Implement PEP 451/spec methods on zipimport.zipimporter: find_spec(), -create_module(), and exec_module(). - -This also allows for the documented deprecation of find_loader(), -find_module(), and load_module(). diff --git a/Misc/NEWS.d/next/Library/2020-11-10-12-09-13.bpo-42308.yaJHH9.rst b/Misc/NEWS.d/next/Library/2020-11-10-12-09-13.bpo-42308.yaJHH9.rst deleted file mode 100644 index 3460b0c92b1..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-10-12-09-13.bpo-42308.yaJHH9.rst +++ /dev/null @@ -1,3 +0,0 @@ -Add :data:`threading.__excepthook__` to allow retrieving the original value -of :func:`threading.excepthook` in case it is set to a broken or a different -value. Patch by Mario Corchero. diff --git a/Misc/NEWS.d/next/Library/2020-11-10-14-27-49.bpo-42237.F363jO.rst b/Misc/NEWS.d/next/Library/2020-11-10-14-27-49.bpo-42237.F363jO.rst deleted file mode 100644 index 50cab6e1f11..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-10-14-27-49.bpo-42237.F363jO.rst +++ /dev/null @@ -1 +0,0 @@ -Fix `os.sendfile()` on illumos. diff --git a/Misc/NEWS.d/next/Library/2020-11-10-15-40-56.bpo-42014.ShM37l.rst b/Misc/NEWS.d/next/Library/2020-11-10-15-40-56.bpo-42014.ShM37l.rst deleted file mode 100644 index d3e1abcd84c..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-10-15-40-56.bpo-42014.ShM37l.rst +++ /dev/null @@ -1 +0,0 @@ -The ``onerror`` callback from ``shutil.rmtree`` now receives correct function when ``os.open`` fails. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-11-12-18-21-15.bpo-42333.J9vFmV.rst b/Misc/NEWS.d/next/Library/2020-11-12-18-21-15.bpo-42333.J9vFmV.rst deleted file mode 100644 index f8755c76856..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-12-18-21-15.bpo-42333.J9vFmV.rst +++ /dev/null @@ -1 +0,0 @@ -Port _ssl extension module to heap types. diff --git a/Misc/NEWS.d/next/Library/2020-11-13-18-53-50.bpo-42350.rsql7V.rst b/Misc/NEWS.d/next/Library/2020-11-13-18-53-50.bpo-42350.rsql7V.rst deleted file mode 100644 index 090ea226663..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-13-18-53-50.bpo-42350.rsql7V.rst +++ /dev/null @@ -1,3 +0,0 @@ -Fix the :class:`threading.Thread` class at fork: do nothing if the thread is -already stopped (ex: fork called at Python exit). Previously, an error was -logged in the child process. diff --git a/Misc/NEWS.d/next/Library/2020-11-14-13-46-27.bpo-42318.wYAcBD.rst b/Misc/NEWS.d/next/Library/2020-11-14-13-46-27.bpo-42318.wYAcBD.rst deleted file mode 100644 index e72daebb2f1..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-14-13-46-27.bpo-42318.wYAcBD.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed support of non-BMP characters in :mod:`tkinter` on macOS. diff --git a/Misc/NEWS.d/next/Library/2020-11-14-14-34-32.bpo-37205.iDbHrw.rst b/Misc/NEWS.d/next/Library/2020-11-14-14-34-32.bpo-37205.iDbHrw.rst deleted file mode 100644 index 5cf325ec0c1..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-14-14-34-32.bpo-37205.iDbHrw.rst +++ /dev/null @@ -1,5 +0,0 @@ -:func:`time.perf_counter()` on Windows and :func:`time.monotonic()` on macOS -are now system-wide. Previously, they used an offset computed at startup to -reduce the precision loss caused by the float type. Use -:func:`time.perf_counter_ns()` and :func:`time.monotonic_ns()` added in Python -3.7 to avoid this precision loss. diff --git a/Misc/NEWS.d/next/Library/2020-11-15-15-23-34.bpo-42345.hiIR7x.rst b/Misc/NEWS.d/next/Library/2020-11-15-15-23-34.bpo-42345.hiIR7x.rst deleted file mode 100644 index 6339182c3ae..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-15-15-23-34.bpo-42345.hiIR7x.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix various issues with ``typing.Literal`` parameter handling (flatten, -deduplicate, use type to cache key). Patch provided by Yurii Karabas. diff --git a/Misc/NEWS.d/next/Library/2020-11-15-17-02-00.bpo-42328.bqpPlR.rst b/Misc/NEWS.d/next/Library/2020-11-15-17-02-00.bpo-42328.bqpPlR.rst deleted file mode 100644 index 7e6a176c889..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-15-17-02-00.bpo-42328.bqpPlR.rst +++ /dev/null @@ -1,4 +0,0 @@ -Fixed :meth:`tkinter.ttk.Style.map`. The function accepts now the -representation of the default state as empty sequence (as returned by -``Style.map()``). The structure of the result is now the same on all platform -and does not depend on the value of ``wantobjects``. diff --git a/Misc/NEWS.d/next/Library/2020-11-16-15-08-12.bpo-37205.Wh5svI.rst b/Misc/NEWS.d/next/Library/2020-11-16-15-08-12.bpo-37205.Wh5svI.rst deleted file mode 100644 index 9268f2d77f7..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-16-15-08-12.bpo-37205.Wh5svI.rst +++ /dev/null @@ -1,3 +0,0 @@ -:func:`time.time()`, :func:`time.perf_counter()` and -:func:`time.monotonic()` functions can no longer fail with a Python fatal -error, instead raise a regular Python exception on failure. diff --git a/Misc/NEWS.d/next/Library/2020-11-17-22-06-15.bpo-42393.BB0oXc.rst b/Misc/NEWS.d/next/Library/2020-11-17-22-06-15.bpo-42393.BB0oXc.rst new file mode 100644 index 00000000000..f291123d6de --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-17-22-06-15.bpo-42393.BB0oXc.rst @@ -0,0 +1,3 @@ +Raise :exc:`OverflowError` instead of silent truncation in :meth:`socket.ntohs` +and :meth:`socket.htons`. Silent truncation was deprecated in Python 3.7. +Patch by Erlend E. Aasland diff --git a/Misc/NEWS.d/next/Library/2020-11-17-23-00-27.bpo-41713.-Us0tf.rst b/Misc/NEWS.d/next/Library/2020-11-17-23-00-27.bpo-41713.-Us0tf.rst deleted file mode 100644 index 4b297d9d743..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-17-23-00-27.bpo-41713.-Us0tf.rst +++ /dev/null @@ -1,2 +0,0 @@ -Port the ``_signal`` extension module to the multi-phase initialization API -(:pep:`489`). Patch by Victor Stinner and Mohamed Koubaa. diff --git a/Misc/NEWS.d/next/Library/2020-11-19-04-13-53.bpo-42375.U8bp4s.rst b/Misc/NEWS.d/next/Library/2020-11-19-04-13-53.bpo-42375.U8bp4s.rst deleted file mode 100644 index 6d8c80c2f2c..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-19-04-13-53.bpo-42375.U8bp4s.rst +++ /dev/null @@ -1 +0,0 @@ -subprocess module update for DragonFlyBSD support. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-11-19-09-59-07.bpo-1635741.7cMypH.rst b/Misc/NEWS.d/next/Library/2020-11-19-09-59-07.bpo-1635741.7cMypH.rst deleted file mode 100644 index 1e7d412680a..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-19-09-59-07.bpo-1635741.7cMypH.rst +++ /dev/null @@ -1,2 +0,0 @@ -Convert _sre module types to heap types (PEP 384). Patch by Erlend E. -Aasland. diff --git a/Misc/NEWS.d/next/Library/2020-11-19-10-12-39.bpo-42403.t7q5AX.rst b/Misc/NEWS.d/next/Library/2020-11-19-10-12-39.bpo-42403.t7q5AX.rst deleted file mode 100644 index a90459a23eb..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-19-10-12-39.bpo-42403.t7q5AX.rst +++ /dev/null @@ -1,5 +0,0 @@ -Simplify the :mod:`importlib` external bootstrap code: -``importlib._bootstrap_external`` now uses regular imports to import builtin -modules. When it is imported, the builtin :func:`__import__()` function is -already fully working and so can be used to import builtin modules like -:mod:`sys`. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Library/2020-11-19-20-27-51.bpo-42413.fjHrHx.rst b/Misc/NEWS.d/next/Library/2020-11-19-20-27-51.bpo-42413.fjHrHx.rst deleted file mode 100644 index ef1bf0fe9d3..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-19-20-27-51.bpo-42413.fjHrHx.rst +++ /dev/null @@ -1 +0,0 @@ -The exception :exc:`socket.timeout` is now an alias of :exc:`TimeoutError`. diff --git a/Misc/NEWS.d/next/Library/2020-11-20-10-38-34.bpo-15450.E-y9PA.rst b/Misc/NEWS.d/next/Library/2020-11-20-10-38-34.bpo-15450.E-y9PA.rst deleted file mode 100644 index dc374066928..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-20-10-38-34.bpo-15450.E-y9PA.rst +++ /dev/null @@ -1,2 +0,0 @@ -Make :class:`filecmp.dircmp` respect subclassing. Now the -:attr:`filecmp.dircmp.subdirs` behaves as expected when subclassing dircmp. diff --git a/Misc/NEWS.d/next/Library/2020-11-20-14-01-29.bpo-42392.-OUzvl.rst b/Misc/NEWS.d/next/Library/2020-11-20-14-01-29.bpo-42392.-OUzvl.rst deleted file mode 100644 index 964bef1893e..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-20-14-01-29.bpo-42392.-OUzvl.rst +++ /dev/null @@ -1,2 +0,0 @@ -Remove loop parameter from ``__init__`` in all ``asyncio.locks`` and -``asyncio.Queue`` classes. Patch provided by Yurii Karabas. diff --git a/Misc/NEWS.d/next/Library/2020-11-20-14-44-07.bpo-41818.33soAw.rst b/Misc/NEWS.d/next/Library/2020-11-20-14-44-07.bpo-41818.33soAw.rst deleted file mode 100644 index 005bf7e2af9..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-20-14-44-07.bpo-41818.33soAw.rst +++ /dev/null @@ -1 +0,0 @@ -Updated tests for the pty library. test_basic() has been changed to test_openpty(); this additionally checks if slave termios and slave winsize are being set properly by pty.openpty(). In order to add support for FreeBSD, NetBSD, OpenBSD, and Darwin, this also adds test_master_read(), which demonstrates that pty.spawn() should not depend on an OSError to exit from its copy loop. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-11-20-19-00-27.bpo-34463.aJcm56.rst b/Misc/NEWS.d/next/Library/2020-11-20-19-00-27.bpo-34463.aJcm56.rst new file mode 100644 index 00000000000..df183548236 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-20-19-00-27.bpo-34463.aJcm56.rst @@ -0,0 +1 @@ +Fixed discrepancy between :mod:`traceback` and the interpreter in formatting of SyntaxError with lineno not set (:mod:`traceback` was changed to match interpreter). diff --git a/Misc/NEWS.d/next/Library/2020-11-22-11-22-28.bpo-42388.LMgM6B.rst b/Misc/NEWS.d/next/Library/2020-11-22-11-22-28.bpo-42388.LMgM6B.rst new file mode 100644 index 00000000000..1b19247e841 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-22-11-22-28.bpo-42388.LMgM6B.rst @@ -0,0 +1,2 @@ +Fix subprocess.check_output(..., input=None) behavior when text=True to be +consistent with that of the documentation and universal_newlines=True. diff --git a/Misc/NEWS.d/next/Library/2020-11-23-23-42-08.bpo-42299.Fdn4Wf.rst b/Misc/NEWS.d/next/Library/2020-11-23-23-42-08.bpo-42299.Fdn4Wf.rst deleted file mode 100644 index a8e156c1003..00000000000 --- a/Misc/NEWS.d/next/Library/2020-11-23-23-42-08.bpo-42299.Fdn4Wf.rst +++ /dev/null @@ -1,5 +0,0 @@ -Removed the ``formatter`` module, which was deprecated in Python 3.4. -It is somewhat obsolete, little used, and not tested. It was originally -scheduled to be removed in Python 3.6, but such removals were delayed until -after Python 2.7 EOL. Existing users should copy whatever classes they use -into their code. Patch by Dong-hee Na and and Terry J. Reedy. diff --git a/Misc/NEWS.d/next/Library/2020-11-27-18-09-59.bpo-31904.g8k43d.rst b/Misc/NEWS.d/next/Library/2020-11-27-18-09-59.bpo-31904.g8k43d.rst new file mode 100644 index 00000000000..5a687d1eb32 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-27-18-09-59.bpo-31904.g8k43d.rst @@ -0,0 +1,2 @@ +:func:`posixpath.expanduser` returns the input *path* unchanged if +user home directory is None on VxWorks. diff --git a/Misc/NEWS.d/next/Library/2020-12-06-12-00-00.bpo-42470.iqtC4L.rst b/Misc/NEWS.d/next/Library/2020-12-06-12-00-00.bpo-42470.iqtC4L.rst new file mode 100644 index 00000000000..cd2edb65d7a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-06-12-00-00.bpo-42470.iqtC4L.rst @@ -0,0 +1 @@ +:func:`random.sample` no longer warns on a sequence which is also a set. diff --git a/Misc/NEWS.d/next/Library/2020-12-07-13-21-00.bpo-28964.UTQikc.rst b/Misc/NEWS.d/next/Library/2020-12-07-13-21-00.bpo-28964.UTQikc.rst new file mode 100644 index 00000000000..b1be0de3b22 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-07-13-21-00.bpo-28964.UTQikc.rst @@ -0,0 +1 @@ +:func:`ast.literal_eval` adds line number information (if available) in error message for malformed nodes. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-12-08-22-43-35.bpo-42678.ba9ktU.rst b/Misc/NEWS.d/next/Library/2020-12-08-22-43-35.bpo-42678.ba9ktU.rst new file mode 100644 index 00000000000..4b2ced5c148 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-08-22-43-35.bpo-42678.ba9ktU.rst @@ -0,0 +1 @@ +``Enum``: call ``__init_subclass__`` after members have been added diff --git a/Misc/NEWS.d/next/Library/2020-12-09-10-59-16.bpo-42517.FKEVcZ.rst b/Misc/NEWS.d/next/Library/2020-12-09-10-59-16.bpo-42517.FKEVcZ.rst new file mode 100644 index 00000000000..813139dfe5d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-09-10-59-16.bpo-42517.FKEVcZ.rst @@ -0,0 +1,2 @@ +Enum: private names do not become members / do not generate errors -- they +remain normal attributes diff --git a/Misc/NEWS.d/next/Library/2020-12-09-14-15-48.bpo-34750.x8TASR.rst b/Misc/NEWS.d/next/Library/2020-12-09-14-15-48.bpo-34750.x8TASR.rst new file mode 100644 index 00000000000..c98ba14797a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-09-14-15-48.bpo-34750.x8TASR.rst @@ -0,0 +1 @@ +[Enum] `_EnumDict.update()` is now supported diff --git a/Misc/NEWS.d/next/Library/2020-12-09-15-23-28.bpo-31904.g3k5k3.rst b/Misc/NEWS.d/next/Library/2020-12-09-15-23-28.bpo-31904.g3k5k3.rst new file mode 100644 index 00000000000..7bca3ed845b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-09-15-23-28.bpo-31904.g3k5k3.rst @@ -0,0 +1 @@ +Define THREAD_STACK_SIZE for VxWorks. diff --git a/Misc/NEWS.d/next/Library/2020-12-09-19-45-32.bpo-42385.boGbjo.rst b/Misc/NEWS.d/next/Library/2020-12-09-19-45-32.bpo-42385.boGbjo.rst new file mode 100644 index 00000000000..f95da859b03 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-09-19-45-32.bpo-42385.boGbjo.rst @@ -0,0 +1 @@ +StrEnum: fix _generate_next_value_ to return a str diff --git a/Misc/NEWS.d/next/Library/2020-12-10-00-09-40.bpo-41559.1l4yjP.rst b/Misc/NEWS.d/next/Library/2020-12-10-00-09-40.bpo-41559.1l4yjP.rst new file mode 100644 index 00000000000..539fdeccd14 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-10-00-09-40.bpo-41559.1l4yjP.rst @@ -0,0 +1,2 @@ +Implemented :pep:`612`: added ``ParamSpec`` and ``Concatenate`` to +:mod:`typing`. Patch by Ken Jin. diff --git a/Misc/NEWS.d/next/Library/2020-12-10-09-24-44.bpo-41877.iJSCvM.rst b/Misc/NEWS.d/next/Library/2020-12-10-09-24-44.bpo-41877.iJSCvM.rst new file mode 100644 index 00000000000..df43cc5d0c9 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-10-09-24-44.bpo-41877.iJSCvM.rst @@ -0,0 +1 @@ +AttributeError for suspected misspellings of assertions on mocks are now pointing out that the cause are misspelled assertions and also what to do if the misspelling is actually an intended attribute name. The unittest.mock document is also updated to reflect the current set of recognised misspellings. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-12-10-18-36-52.bpo-39717.sK2u0w.rst b/Misc/NEWS.d/next/Library/2020-12-10-18-36-52.bpo-39717.sK2u0w.rst new file mode 100644 index 00000000000..6f3691f591f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-10-18-36-52.bpo-39717.sK2u0w.rst @@ -0,0 +1 @@ +[tarfile] update nested exception raising to use ``from None`` or ``from e`` diff --git a/Misc/NEWS.d/next/Library/2020-12-10-19-49-52.bpo-41877.wiVlPc.rst b/Misc/NEWS.d/next/Library/2020-12-10-19-49-52.bpo-41877.wiVlPc.rst new file mode 100644 index 00000000000..d42200ecd03 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-10-19-49-52.bpo-41877.wiVlPc.rst @@ -0,0 +1 @@ +A check is added against misspellings of autospect, auto_spec and set_spec being passed as arguments to patch, patch.object and create_autospec. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-12-13-22-05-35.bpo-42382.2YtKo5.rst b/Misc/NEWS.d/next/Library/2020-12-13-22-05-35.bpo-42382.2YtKo5.rst new file mode 100644 index 00000000000..5ccd5bbf5e9 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-13-22-05-35.bpo-42382.2YtKo5.rst @@ -0,0 +1,6 @@ +In ``importlib.metadata``: - ``EntryPoint`` objects now expose a ``.dist`` +object referencing the ``Distribution`` when constructed from a +``Distribution``. - Add support for package discovery under package +normalization rules. - The object returned by ``metadata()`` now has a +formally-defined protocol called ``PackageMetadata`` with declared support +for the ``.get_all()`` method. - Synced with importlib_metadata 3.3. diff --git a/Misc/NEWS.d/next/Library/2020-12-14-08-23-57.bpo-36541.qdEtZv.rst b/Misc/NEWS.d/next/Library/2020-12-14-08-23-57.bpo-36541.qdEtZv.rst new file mode 100644 index 00000000000..5678d8c595c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-14-08-23-57.bpo-36541.qdEtZv.rst @@ -0,0 +1,2 @@ +Fixed lib2to3.pgen2 to be able to parse PEP-570 positional only argument +syntax. diff --git a/Misc/NEWS.d/next/Library/2020-12-14-22-31-22.bpo-42639.5Z3iWX.rst b/Misc/NEWS.d/next/Library/2020-12-14-22-31-22.bpo-42639.5Z3iWX.rst new file mode 100644 index 00000000000..bdb2edd7adc --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-14-22-31-22.bpo-42639.5Z3iWX.rst @@ -0,0 +1,3 @@ +At Python exit, if a callback registered with :func:`atexit.register` fails, +its exception is now logged. Previously, only some exceptions were logged, and +the last exception was always silently ignored. diff --git a/Misc/NEWS.d/next/Library/2020-12-15-10-00-04.bpo-42644.XgLCNx.rst b/Misc/NEWS.d/next/Library/2020-12-15-10-00-04.bpo-42644.XgLCNx.rst new file mode 100644 index 00000000000..ee4d111dc34 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-15-10-00-04.bpo-42644.XgLCNx.rst @@ -0,0 +1,3 @@ +``logging.disable`` will now validate the types and value of its parameter. It +also now accepts strings representing the levels (as does ``loging.setLevel``) +instead of only the numerical values. diff --git a/Misc/NEWS.d/next/Library/2020-12-15-15-14-29.bpo-42639.uJ3h8I.rst b/Misc/NEWS.d/next/Library/2020-12-15-15-14-29.bpo-42639.uJ3h8I.rst new file mode 100644 index 00000000000..847c24112f9 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-15-15-14-29.bpo-42639.uJ3h8I.rst @@ -0,0 +1,3 @@ +:func:`atexit._run_exitfuncs` now logs callback exceptions using +:data:`sys.unraisablehook`, rather than logging them directly into +:data:`sys.stderr` and raise the last exception. diff --git a/Misc/NEWS.d/next/Library/2020-12-15-17-51-27.bpo-42630.jf4jBl.rst b/Misc/NEWS.d/next/Library/2020-12-15-17-51-27.bpo-42630.jf4jBl.rst new file mode 100644 index 00000000000..4b4a520931f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-15-17-51-27.bpo-42630.jf4jBl.rst @@ -0,0 +1,4 @@ +:mod:`tkinter` functions and constructors which need a default root window +raise now :exc:`RuntimeError` with descriptive message instead of obscure +:exc:`AttributeError` or :exc:`NameError` if it is not created yet or cannot +be created automatically. diff --git a/Misc/NEWS.d/next/Library/2020-12-16-16-16-33.bpo-37961.jrESEq.rst b/Misc/NEWS.d/next/Library/2020-12-16-16-16-33.bpo-37961.jrESEq.rst new file mode 100644 index 00000000000..5b363ad22d6 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-16-16-16-33.bpo-37961.jrESEq.rst @@ -0,0 +1 @@ +Fix crash in :func:`tracemalloc.Traceback.__repr__` (regressed in Python 3.9). \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-12-16-23-28-52.bpo-1635741.Quy3zn.rst b/Misc/NEWS.d/next/Library/2020-12-16-23-28-52.bpo-1635741.Quy3zn.rst new file mode 100644 index 00000000000..3412c204b05 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-16-23-28-52.bpo-1635741.Quy3zn.rst @@ -0,0 +1,2 @@ +Port the :mod:`_thread` extension module to the multiphase initialization +API (:pep:`489`) and convert its static types to heap types. diff --git a/Misc/NEWS.d/next/Library/2020-12-19-12-33-38.bpo-9694.CkKK9V.rst b/Misc/NEWS.d/next/Library/2020-12-19-12-33-38.bpo-9694.CkKK9V.rst new file mode 100644 index 00000000000..723955270d0 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-19-12-33-38.bpo-9694.CkKK9V.rst @@ -0,0 +1,2 @@ +Argparse help no longer uses the confusing phrase, "optional arguments". +It uses "options" instead. diff --git a/Misc/NEWS.d/next/Library/2020-12-19-17-32-43.bpo-42685.kwZlwp.rst b/Misc/NEWS.d/next/Library/2020-12-19-17-32-43.bpo-42685.kwZlwp.rst new file mode 100644 index 00000000000..068546a34c5 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-19-17-32-43.bpo-42685.kwZlwp.rst @@ -0,0 +1,4 @@ +Improved placing of simple query windows in Tkinter (such as +:func:`tkinter.simpledialog.askinteger`). They are now centered at the +center of the parent window if it is specified and shown, otherwise at the +center of the screen. diff --git a/Misc/NEWS.d/next/Library/2020-12-21-22-59-26.bpo-15303.zozVrq.rst b/Misc/NEWS.d/next/Library/2020-12-21-22-59-26.bpo-15303.zozVrq.rst new file mode 100644 index 00000000000..5a7900aa909 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-21-22-59-26.bpo-15303.zozVrq.rst @@ -0,0 +1 @@ +:mod:`tkinter` supports now widgets with boolean value False. diff --git a/Misc/NEWS.d/next/Library/2020-12-21-23-34-57.bpo-35728.9m-azF.rst b/Misc/NEWS.d/next/Library/2020-12-21-23-34-57.bpo-35728.9m-azF.rst new file mode 100644 index 00000000000..aa57e274ce5 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-21-23-34-57.bpo-35728.9m-azF.rst @@ -0,0 +1 @@ +Added a root parameter to :func:`tkinter.font.nametofont`. diff --git a/Misc/NEWS.d/next/Library/2020-12-22-13-16-43.bpo-25246.GhhCTl.rst b/Misc/NEWS.d/next/Library/2020-12-22-13-16-43.bpo-25246.GhhCTl.rst new file mode 100644 index 00000000000..258bb12ff8b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-22-13-16-43.bpo-25246.GhhCTl.rst @@ -0,0 +1 @@ +Optimized :meth:`collections.deque.remove`. diff --git a/Misc/NEWS.d/next/Library/2020-12-22-22-47-22.bpo-42721.I5Ai5L.rst b/Misc/NEWS.d/next/Library/2020-12-22-22-47-22.bpo-42721.I5Ai5L.rst new file mode 100644 index 00000000000..58ab180d3bf --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-22-22-47-22.bpo-42721.I5Ai5L.rst @@ -0,0 +1,9 @@ +When simple query dialogs (:mod:`tkinter.simpledialog`), message boxes +(:mod:`tkinter.messagebox`) or color choose dialog +(:mod:`tkinter.colorchooser`) are created without arguments *master* and +*parent*, and the default root window is not yet created, and +:func:`~tkinter.NoDefaultRoot` was not called, a new temporal +hidden root window will be created automatically. It will not be set as the +default root window and will be destroyed right after closing the dialog +window. It will help to use these simple dialog windows in programs which +do not need other GUI. diff --git a/Misc/NEWS.d/next/Library/2020-12-23-15-16-12.bpo-38308.lB4Sv0.rst b/Misc/NEWS.d/next/Library/2020-12-23-15-16-12.bpo-38308.lB4Sv0.rst new file mode 100644 index 00000000000..cf3807d9dc4 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-23-15-16-12.bpo-38308.lB4Sv0.rst @@ -0,0 +1 @@ +Add optional *weights* to *statistics.harmonic_mean()*. diff --git a/Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst b/Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst new file mode 100644 index 00000000000..c2ef8eecb85 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst @@ -0,0 +1,2 @@ +``EnumMeta.__prepare__`` now accepts ``**kwds`` to properly support +``__init_subclass__`` diff --git a/Misc/NEWS.d/next/Library/2020-12-25-12-32-47.bpo-42655.W5ytpV.rst b/Misc/NEWS.d/next/Library/2020-12-25-12-32-47.bpo-42655.W5ytpV.rst new file mode 100644 index 00000000000..57c9a666e39 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-25-12-32-47.bpo-42655.W5ytpV.rst @@ -0,0 +1,2 @@ +:mod:`subprocess` *extra_groups* is now correctly passed into setgroups() +system call. diff --git a/Misc/NEWS.d/next/Library/2020-12-25-23-23-11.bpo-42740.F0rQ_E.rst b/Misc/NEWS.d/next/Library/2020-12-25-23-23-11.bpo-42740.F0rQ_E.rst new file mode 100644 index 00000000000..588d90f6233 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-25-23-23-11.bpo-42740.F0rQ_E.rst @@ -0,0 +1,2 @@ +:func:`typing.get_args` and :func:`typing.get_origin` now support :pep:`604` +union types and :pep:`612` additions to ``Callable``. diff --git a/Misc/NEWS.d/next/Library/2020-12-27-18-47-01.bpo-23328._xqepZ.rst b/Misc/NEWS.d/next/Library/2020-12-27-18-47-01.bpo-23328._xqepZ.rst new file mode 100644 index 00000000000..07b15d34e8d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-27-18-47-01.bpo-23328._xqepZ.rst @@ -0,0 +1 @@ +Allow / character in username, password fields on _PROXY envars. diff --git a/Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst b/Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst new file mode 100644 index 00000000000..a5ec7d58203 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst @@ -0,0 +1,3 @@ +Fixed equality comparison of :class:`tkinter.Variable` and +:class:`tkinter.font.Font`. Objects which belong to different Tcl +interpreters are now always different, even if they have the same name. diff --git a/Misc/NEWS.d/next/Security/2020-05-28-06-06-47.bpo-40791.QGZClX.rst b/Misc/NEWS.d/next/Security/2020-05-28-06-06-47.bpo-40791.QGZClX.rst deleted file mode 100644 index 69b9de1beae..00000000000 --- a/Misc/NEWS.d/next/Security/2020-05-28-06-06-47.bpo-40791.QGZClX.rst +++ /dev/null @@ -1 +0,0 @@ -Add ``volatile`` to the accumulator variable in ``hmac.compare_digest``, making constant-time-defeating optimizations less likely. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst b/Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst new file mode 100644 index 00000000000..0451503a52e --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst @@ -0,0 +1 @@ +Port test_ssl and test_uuid to VxWorks RTOS. diff --git a/Misc/NEWS.d/next/Tests/2020-07-30-18-06-15.bpo-31904.y3d8dk.rst b/Misc/NEWS.d/next/Tests/2020-07-30-18-06-15.bpo-31904.y3d8dk.rst new file mode 100644 index 00000000000..fa2974963bf --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-07-30-18-06-15.bpo-31904.y3d8dk.rst @@ -0,0 +1 @@ +Disable os.popen and impacted tests on VxWorks diff --git a/Misc/NEWS.d/next/Tests/2020-07-30-18-43-05.bpo-41443.834gyg.rst b/Misc/NEWS.d/next/Tests/2020-07-30-18-43-05.bpo-41443.834gyg.rst new file mode 100644 index 00000000000..439f3e36470 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-07-30-18-43-05.bpo-41443.834gyg.rst @@ -0,0 +1 @@ +Add more attribute checking in test_posix.py diff --git a/Misc/NEWS.d/next/Tests/2020-09-18-16-14-03.bpo-41561.uPnwrW.rst b/Misc/NEWS.d/next/Tests/2020-09-18-16-14-03.bpo-41561.uPnwrW.rst deleted file mode 100644 index 10bce825961..00000000000 --- a/Misc/NEWS.d/next/Tests/2020-09-18-16-14-03.bpo-41561.uPnwrW.rst +++ /dev/null @@ -1 +0,0 @@ -test_ssl: skip test_min_max_version_mismatch when TLS 1.0 is not available diff --git a/Misc/NEWS.d/next/Tests/2020-10-29-21-26-46.bpo-42199.KksGCV.rst b/Misc/NEWS.d/next/Tests/2020-10-29-21-26-46.bpo-42199.KksGCV.rst new file mode 100644 index 00000000000..4426f336368 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-10-29-21-26-46.bpo-42199.KksGCV.rst @@ -0,0 +1 @@ +Fix bytecode helper assertNotInBytecode. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Tests/2020-11-13-21-51-34.bpo-40754.Ekoxkg.rst b/Misc/NEWS.d/next/Tests/2020-11-13-21-51-34.bpo-40754.Ekoxkg.rst deleted file mode 100644 index 4bd423b54a4..00000000000 --- a/Misc/NEWS.d/next/Tests/2020-11-13-21-51-34.bpo-40754.Ekoxkg.rst +++ /dev/null @@ -1 +0,0 @@ -Include ``_testinternalcapi`` module in Windows installer for test suite diff --git a/Misc/NEWS.d/next/Tests/2020-12-09-15-23-28.bpo-31904.ghj38d.rst b/Misc/NEWS.d/next/Tests/2020-12-09-15-23-28.bpo-31904.ghj38d.rst new file mode 100644 index 00000000000..654562bf407 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-12-09-15-23-28.bpo-31904.ghj38d.rst @@ -0,0 +1 @@ +Skip some tests in _test_all_chown_common() on VxWorks. diff --git a/Misc/NEWS.d/next/Tests/2020-12-15-17-38-04.bpo-42641.uzwlF_.rst b/Misc/NEWS.d/next/Tests/2020-12-15-17-38-04.bpo-42641.uzwlF_.rst new file mode 100644 index 00000000000..bf890b73ee7 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-12-15-17-38-04.bpo-42641.uzwlF_.rst @@ -0,0 +1,2 @@ +Enhance ``test_select.test_select()``: it now takes 500 ms rather than 10 +seconds. Use Python rather than a shell to make the test more portable. diff --git a/Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst b/Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst new file mode 100644 index 00000000000..d74e4666853 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst @@ -0,0 +1 @@ +Skip some asyncio tests on VxWorks. diff --git a/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst new file mode 100644 index 00000000000..577f2259e1f --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst @@ -0,0 +1,2 @@ +Update test_nntplib to use offical group name of news.aioe.org for testing. +Patch by Dong-hee Na. diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-05-03-01-30-46.bpo-36310.xDxxwY.rst b/Misc/NEWS.d/next/Tools-Demos/2020-05-03-01-30-46.bpo-36310.xDxxwY.rst deleted file mode 100644 index 16749a8fc96..00000000000 --- a/Misc/NEWS.d/next/Tools-Demos/2020-05-03-01-30-46.bpo-36310.xDxxwY.rst +++ /dev/null @@ -1,2 +0,0 @@ -Allow :file:`Tools/i18n/pygettext.py` to detect calls to ``gettext`` in -f-strings. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-11-20-15-11-05.bpo-42212.sjzgOf.rst b/Misc/NEWS.d/next/Tools-Demos/2020-11-20-15-11-05.bpo-42212.sjzgOf.rst deleted file mode 100644 index d2cbe3de6fe..00000000000 --- a/Misc/NEWS.d/next/Tools-Demos/2020-11-20-15-11-05.bpo-42212.sjzgOf.rst +++ /dev/null @@ -1,3 +0,0 @@ -The smelly.py script now also checks the Python dynamic library and extension -modules, not only the Python static library. Make also the script more verbose: -explain what it does. diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-12-16-09-10-32.bpo-42613.J-jnm5.rst b/Misc/NEWS.d/next/Tools-Demos/2020-12-16-09-10-32.bpo-42613.J-jnm5.rst new file mode 100644 index 00000000000..140ff8255b9 --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2020-12-16-09-10-32.bpo-42613.J-jnm5.rst @@ -0,0 +1,2 @@ +Fix ``freeze.py`` tool to use the prope config and library directories. +Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst b/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst new file mode 100644 index 00000000000..01a6e7fe55f --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst @@ -0,0 +1,2 @@ +Fixed Python 3 compatibility issue with gdb/libpython.py handling of attribute +dictionaries. diff --git a/Misc/NEWS.d/next/Windows/2020-11-15-23-01-14.bpo-38506.hhdnuP.rst b/Misc/NEWS.d/next/Windows/2020-11-15-23-01-14.bpo-38506.hhdnuP.rst deleted file mode 100644 index 8ad75ef5ea0..00000000000 --- a/Misc/NEWS.d/next/Windows/2020-11-15-23-01-14.bpo-38506.hhdnuP.rst +++ /dev/null @@ -1,2 +0,0 @@ -The Windows launcher now properly handles Python 3.10 when listing installed -Python versions. diff --git a/Misc/NEWS.d/next/Windows/2020-11-16-22-41-02.bpo-42120.9scgko.rst b/Misc/NEWS.d/next/Windows/2020-11-16-22-41-02.bpo-42120.9scgko.rst deleted file mode 100644 index c574956d11d..00000000000 --- a/Misc/NEWS.d/next/Windows/2020-11-16-22-41-02.bpo-42120.9scgko.rst +++ /dev/null @@ -1 +0,0 @@ -Remove macro definition of ``copysign`` (to ``_copysign``) in headers. diff --git a/Misc/NEWS.d/next/macOS/2020-10-23-10-26-53.bpo-38443.vu64tl.rst b/Misc/NEWS.d/next/macOS/2020-10-23-10-26-53.bpo-38443.vu64tl.rst deleted file mode 100644 index 008c972e5c6..00000000000 --- a/Misc/NEWS.d/next/macOS/2020-10-23-10-26-53.bpo-38443.vu64tl.rst +++ /dev/null @@ -1,2 +0,0 @@ -The ``--enable-universalsdk`` and ``--with-universal-archs`` options for the -configure script now check that the specified architectures can be used. diff --git a/Misc/NEWS.d/next/macOS/2020-11-01-15-10-28.bpo-42232.2zI1GN.rst b/Misc/NEWS.d/next/macOS/2020-11-01-15-10-28.bpo-42232.2zI1GN.rst deleted file mode 100644 index d431a9d1e32..00000000000 --- a/Misc/NEWS.d/next/macOS/2020-11-01-15-10-28.bpo-42232.2zI1GN.rst +++ /dev/null @@ -1 +0,0 @@ -Added Darwin specific madvise options to mmap module. \ No newline at end of file diff --git a/Misc/NEWS.d/next/macOS/2020-11-01-16-40-23.bpo-41100.BApztP.rst b/Misc/NEWS.d/next/macOS/2020-11-01-16-40-23.bpo-41100.BApztP.rst deleted file mode 100644 index 6cbb279e762..00000000000 --- a/Misc/NEWS.d/next/macOS/2020-11-01-16-40-23.bpo-41100.BApztP.rst +++ /dev/null @@ -1,8 +0,0 @@ -Add support for macOS 11 and Apple Silicon systems. - -It is now possible to build "Universal 2" binaries using -"--enable-universalsdk --with-universal-archs=universal2". - -Binaries build on later macOS versions can be deployed back to older -versions (tested up to macOS 10.9), when using the correct deployment -target. This is tested using Xcode 11 and later. diff --git a/Misc/NEWS.d/next/macOS/2020-11-15-16-43-45.bpo-41116.oCkbrF.rst b/Misc/NEWS.d/next/macOS/2020-11-15-16-43-45.bpo-41116.oCkbrF.rst deleted file mode 100644 index c982224e92d..00000000000 --- a/Misc/NEWS.d/next/macOS/2020-11-15-16-43-45.bpo-41116.oCkbrF.rst +++ /dev/null @@ -1 +0,0 @@ -Ensure distutils.unixxcompiler.find_library_file can find system provided libraries on macOS 11. \ No newline at end of file diff --git a/Modules/_blake2/blake2b_impl.c b/Modules/_blake2/blake2b_impl.c index 8e1acce56b1..5d108ed008a 100644 --- a/Modules/_blake2/blake2b_impl.c +++ b/Modules/_blake2/blake2b_impl.c @@ -393,7 +393,7 @@ py_blake2b_dealloc(PyObject *self) } PyTypeObject *type = Py_TYPE(self); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(type); } diff --git a/Modules/_blake2/blake2s_impl.c b/Modules/_blake2/blake2s_impl.c index e1de5df37d0..85c2d4edad7 100644 --- a/Modules/_blake2/blake2s_impl.c +++ b/Modules/_blake2/blake2s_impl.c @@ -392,7 +392,7 @@ py_blake2s_dealloc(PyObject *self) } PyTypeObject *type = Py_TYPE(self); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(type); } diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 15787506763..90bafb0ea86 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -1128,38 +1128,6 @@ deque_insert(dequeobject *deque, PyObject *const *args, Py_ssize_t nargs) 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); - - for (i=0 ; ileftblock->data[deque->leftindex]; - int cmp = PyObject_RichCompareBool(item, value, Py_EQ); - - if (Py_SIZE(deque) != n) { - PyErr_SetString(PyExc_IndexError, - "deque mutated during remove()."); - return NULL; - } - if (cmp > 0) { - PyObject *tgt = deque_popleft(deque, NULL); - assert (tgt != NULL); - if (_deque_rotate(deque, i)) - return NULL; - Py_DECREF(tgt); - Py_RETURN_NONE; - } - else if (cmp < 0) { - _deque_rotate(deque, i); - return NULL; - } - _deque_rotate(deque, -1); - } - PyErr_SetString(PyExc_ValueError, "deque.remove(x): x not in deque"); - return NULL; -} - PyDoc_STRVAR(remove_doc, "D.remove(value) -- remove first occurrence of value."); @@ -1227,6 +1195,48 @@ deque_del_item(dequeobject *deque, Py_ssize_t i) return rv; } +static PyObject * +deque_remove(dequeobject *deque, PyObject *value) +{ + PyObject *item; + block *b = deque->leftblock; + Py_ssize_t i, n = Py_SIZE(deque), index = deque->leftindex; + size_t start_state = deque->state; + int cmp, rv; + + for (i = 0 ; i < n; i++) { + item = b->data[index]; + Py_INCREF(item); + cmp = PyObject_RichCompareBool(item, value, Py_EQ); + Py_DECREF(item); + if (cmp < 0) { + return NULL; + } + if (start_state != deque->state) { + PyErr_SetString(PyExc_IndexError, + "deque mutated during iteration"); + return NULL; + } + if (cmp > 0) { + break; + } + index++; + if (index == BLOCKLEN) { + b = b->rightlink; + index = 0; + } + } + if (i == n) { + PyErr_Format(PyExc_ValueError, "%R is not in deque", value); + return NULL; + } + rv = deque_del_item(deque, i); + if (rv == -1) { + return NULL; + } + Py_RETURN_NONE; +} + static int deque_ass_item(dequeobject *deque, Py_ssize_t i, PyObject *v) { diff --git a/Modules/_csv.c b/Modules/_csv.c index 594f6c14727..cade1ca9d47 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -18,9 +18,14 @@ module instead. typedef struct { PyObject *error_obj; /* CSV exception */ PyObject *dialects; /* Dialect registry */ + PyTypeObject *dialect_type; + PyTypeObject *reader_type; + PyTypeObject *writer_type; long field_limit; /* max parsed field size */ } _csvstate; +static struct PyModuleDef _csvmodule; + static inline _csvstate* get_csv_state(PyObject *module) { @@ -30,31 +35,35 @@ get_csv_state(PyObject *module) } static int -_csv_clear(PyObject *m) +_csv_clear(PyObject *module) { - Py_CLEAR(get_csv_state(m)->error_obj); - Py_CLEAR(get_csv_state(m)->dialects); + _csvstate *module_state = PyModule_GetState(module); + Py_CLEAR(module_state->error_obj); + Py_CLEAR(module_state->dialects); + Py_CLEAR(module_state->dialect_type); + Py_CLEAR(module_state->reader_type); + Py_CLEAR(module_state->writer_type); return 0; } static int -_csv_traverse(PyObject *m, visitproc visit, void *arg) +_csv_traverse(PyObject *module, visitproc visit, void *arg) { - Py_VISIT(get_csv_state(m)->error_obj); - Py_VISIT(get_csv_state(m)->dialects); + _csvstate *module_state = PyModule_GetState(module); + Py_VISIT(module_state->error_obj); + Py_VISIT(module_state->dialects); + Py_VISIT(module_state->dialect_type); + Py_VISIT(module_state->reader_type); + Py_VISIT(module_state->writer_type); return 0; } static void -_csv_free(void *m) +_csv_free(void *module) { - _csv_clear((PyObject *)m); + _csv_clear((PyObject *)module); } -static struct PyModuleDef _csvmodule; - -#define _csvstate_global ((_csvstate *)PyModule_GetState(PyState_FindModule(&_csvmodule))) - typedef enum { START_RECORD, START_FIELD, ESCAPED_CHAR, IN_FIELD, IN_QUOTED_FIELD, ESCAPE_IN_QUOTED_FIELD, QUOTE_IN_QUOTED_FIELD, @@ -92,8 +101,6 @@ typedef struct { } DialectObj; -static PyTypeObject Dialect_Type; - typedef struct { PyObject_HEAD @@ -110,8 +117,6 @@ typedef struct { unsigned long line_num; /* Source-file line number */ } ReaderObj; -static PyTypeObject Reader_Type; - typedef struct { PyObject_HEAD @@ -123,26 +128,27 @@ typedef struct { Py_ssize_t rec_size; /* size of allocated record */ Py_ssize_t rec_len; /* length of record */ int num_fields; /* number of fields in record */ -} WriterObj; -static PyTypeObject Writer_Type; + PyObject *error_obj; /* cached error object */ +} WriterObj; /* * DIALECT class */ static PyObject * -get_dialect_from_registry(PyObject * name_obj) +get_dialect_from_registry(PyObject *name_obj, _csvstate *module_state) { PyObject *dialect_obj; - dialect_obj = PyDict_GetItemWithError(_csvstate_global->dialects, name_obj); + dialect_obj = PyDict_GetItemWithError(module_state->dialects, name_obj); if (dialect_obj == NULL) { if (!PyErr_Occurred()) - PyErr_Format(_csvstate_global->error_obj, "unknown dialect"); + PyErr_Format(module_state->error_obj, "unknown dialect"); } else Py_INCREF(dialect_obj); + return dialect_obj; } @@ -309,8 +315,16 @@ static PyGetSetDef Dialect_getsetlist[] = { static void Dialect_dealloc(DialectObj *self) { - Py_XDECREF(self->lineterminator); - Py_TYPE(self)->tp_free((PyObject *)self); + PyTypeObject *tp = Py_TYPE(self); + Py_CLEAR(self->lineterminator); + tp->tp_free((PyObject *)self); + Py_DECREF(tp); +} + +static void +Dialect_finalize(DialectObj *self) +{ + Py_CLEAR(self->lineterminator); } static char *dialect_kws[] = { @@ -326,6 +340,22 @@ static char *dialect_kws[] = { NULL }; +static _csvstate * +_csv_state_from_type(PyTypeObject *type, const char *name) +{ + PyObject *module = _PyType_GetModuleByDef(type, &_csvmodule); + if (module == NULL) { + return NULL; + } + _csvstate *module_state = PyModule_GetState(module); + if (module_state == NULL) { + PyErr_Format(PyExc_SystemError, + "%s: No _csv module state found", name); + return NULL; + } + return module_state; +} + static PyObject * dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { @@ -354,16 +384,21 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) &strict)) return NULL; + _csvstate *module_state = _csv_state_from_type(type, "dialect_new"); + if (module_state == NULL) { + return NULL; + } + if (dialect != NULL) { if (PyUnicode_Check(dialect)) { - dialect = get_dialect_from_registry(dialect); + dialect = get_dialect_from_registry(dialect, module_state); if (dialect == NULL) return NULL; } else Py_INCREF(dialect); /* Can we reuse this instance? */ - if (PyObject_TypeCheck(dialect, &Dialect_Type) && + if (PyObject_TypeCheck(dialect, module_state->dialect_type) && delimiter == NULL && doublequote == NULL && escapechar == NULL && @@ -377,7 +412,7 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) self = (DialectObj *)type->tp_alloc(type, 0); if (self == NULL) { - Py_XDECREF(dialect); + Py_CLEAR(dialect); return NULL; } self->lineterminator = NULL; @@ -441,76 +476,69 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) ret = (PyObject *)self; Py_INCREF(self); err: - Py_XDECREF(self); - Py_XDECREF(dialect); - Py_XDECREF(delimiter); - Py_XDECREF(doublequote); - Py_XDECREF(escapechar); - Py_XDECREF(lineterminator); - Py_XDECREF(quotechar); - Py_XDECREF(quoting); - Py_XDECREF(skipinitialspace); - Py_XDECREF(strict); + Py_CLEAR(self); + Py_CLEAR(dialect); + Py_CLEAR(delimiter); + Py_CLEAR(doublequote); + Py_CLEAR(escapechar); + Py_CLEAR(lineterminator); + Py_CLEAR(quotechar); + Py_CLEAR(quoting); + Py_CLEAR(skipinitialspace); + Py_CLEAR(strict); return ret; } +/* Since dialect is now a heap type, it inherits pickling method for + * protocol 0 and 1 from object, therefore it needs to be overriden */ + +PyDoc_STRVAR(dialect_reduce_doc, "raises an exception to avoid pickling"); + +static PyObject * +Dialect_reduce(PyObject *self, PyObject *args) { + PyErr_Format(PyExc_TypeError, + "cannot pickle '%.100s' instances", _PyType_Name(Py_TYPE(self))); + return NULL; +} + +static struct PyMethodDef dialect_methods[] = { + {"__reduce__", Dialect_reduce, METH_VARARGS, dialect_reduce_doc}, + {"__reduce_ex__", Dialect_reduce, METH_VARARGS, dialect_reduce_doc}, + {NULL, NULL} +}; PyDoc_STRVAR(Dialect_Type_doc, "CSV dialect\n" "\n" "The Dialect type records CSV parsing and generation options.\n"); -static PyTypeObject Dialect_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "_csv.Dialect", /* tp_name */ - sizeof(DialectObj), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)Dialect_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - 0, /* tp_as_async */ - (reprfunc)0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - Dialect_Type_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - Dialect_memberlist, /* tp_members */ - Dialect_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 */ - dialect_new, /* tp_new */ - 0, /* tp_free */ +static PyType_Slot Dialect_Type_slots[] = { + {Py_tp_doc, (char*)Dialect_Type_doc}, + {Py_tp_members, Dialect_memberlist}, + {Py_tp_getset, Dialect_getsetlist}, + {Py_tp_new, dialect_new}, + {Py_tp_methods, dialect_methods}, + {Py_tp_finalize, Dialect_finalize}, + {Py_tp_dealloc, Dialect_dealloc}, + {0, NULL} }; +PyType_Spec Dialect_Type_spec = { + .name = "_csv.Dialect", + .basicsize = sizeof(DialectObj), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + .slots = Dialect_Type_slots, +}; + + /* * Return an instance of the dialect type, given a Python instance or kwarg * description of the dialect */ static PyObject * -_call_dialect(PyObject *dialect_inst, PyObject *kwargs) +_call_dialect(_csvstate *module_state, PyObject *dialect_inst, PyObject *kwargs) { - PyObject *type = (PyObject *)&Dialect_Type; + PyObject *type = (PyObject *)module_state->dialect_type; if (dialect_inst) { return PyObject_VectorcallDict(type, &dialect_inst, 1, kwargs); } @@ -568,11 +596,12 @@ parse_grow_buff(ReaderObj *self) } static int -parse_add_char(ReaderObj *self, Py_UCS4 c) +parse_add_char(ReaderObj *self, _csvstate *module_state, Py_UCS4 c) { - if (self->field_len >= _csvstate_global->field_limit) { - PyErr_Format(_csvstate_global->error_obj, "field larger than field limit (%ld)", - _csvstate_global->field_limit); + if (self->field_len >= module_state->field_limit) { + PyErr_Format(module_state->error_obj, + "field larger than field limit (%ld)", + module_state->field_limit); return -1; } if (self->field_len == self->field_size && !parse_grow_buff(self)) @@ -582,7 +611,7 @@ parse_add_char(ReaderObj *self, Py_UCS4 c) } static int -parse_process_char(ReaderObj *self, Py_UCS4 c) +parse_process_char(ReaderObj *self, _csvstate *module_state, Py_UCS4 c) { DialectObj *dialect = self->dialect; @@ -628,7 +657,7 @@ parse_process_char(ReaderObj *self, Py_UCS4 c) /* begin new unquoted field */ if (dialect->quoting == QUOTE_NONNUMERIC) self->numeric_field = 1; - if (parse_add_char(self, c) < 0) + if (parse_add_char(self, module_state, c) < 0) return -1; self->state = IN_FIELD; } @@ -636,14 +665,14 @@ parse_process_char(ReaderObj *self, Py_UCS4 c) case ESCAPED_CHAR: if (c == '\n' || c=='\r') { - if (parse_add_char(self, c) < 0) + if (parse_add_char(self, module_state, c) < 0) return -1; self->state = AFTER_ESCAPED_CRNL; break; } if (c == '\0') c = '\n'; - if (parse_add_char(self, c) < 0) + if (parse_add_char(self, module_state, c) < 0) return -1; self->state = IN_FIELD; break; @@ -673,7 +702,7 @@ parse_process_char(ReaderObj *self, Py_UCS4 c) } else { /* normal character - save in field */ - if (parse_add_char(self, c) < 0) + if (parse_add_char(self, module_state, c) < 0) return -1; } break; @@ -699,7 +728,7 @@ parse_process_char(ReaderObj *self, Py_UCS4 c) } else { /* normal character - save in field */ - if (parse_add_char(self, c) < 0) + if (parse_add_char(self, module_state, c) < 0) return -1; } break; @@ -707,7 +736,7 @@ parse_process_char(ReaderObj *self, Py_UCS4 c) case ESCAPE_IN_QUOTED_FIELD: if (c == '\0') c = '\n'; - if (parse_add_char(self, c) < 0) + if (parse_add_char(self, module_state, c) < 0) return -1; self->state = IN_QUOTED_FIELD; break; @@ -717,7 +746,7 @@ parse_process_char(ReaderObj *self, Py_UCS4 c) if (dialect->quoting != QUOTE_NONE && c == dialect->quotechar) { /* save "" as " */ - if (parse_add_char(self, c) < 0) + if (parse_add_char(self, module_state, c) < 0) return -1; self->state = IN_QUOTED_FIELD; } @@ -734,13 +763,13 @@ parse_process_char(ReaderObj *self, Py_UCS4 c) self->state = (c == '\0' ? START_RECORD : EAT_CRNL); } else if (!dialect->strict) { - if (parse_add_char(self, c) < 0) + if (parse_add_char(self, module_state, c) < 0) return -1; self->state = IN_FIELD; } else { /* illegal */ - PyErr_Format(_csvstate_global->error_obj, "'%c' expected after '%c'", + PyErr_Format(module_state->error_obj, "'%c' expected after '%c'", dialect->delimiter, dialect->quotechar); return -1; @@ -753,7 +782,8 @@ parse_process_char(ReaderObj *self, Py_UCS4 c) else if (c == '\0') self->state = START_RECORD; else { - PyErr_Format(_csvstate_global->error_obj, "new-line character seen in unquoted field - do you need to open the file in universal-newline mode?"); + PyErr_Format(module_state->error_obj, + "new-line character seen in unquoted field - do you need to open the file in universal-newline mode?"); return -1; } break; @@ -784,6 +814,12 @@ Reader_iternext(ReaderObj *self) const void *data; PyObject *lineobj; + _csvstate *module_state = _csv_state_from_type(Py_TYPE(self), + "Reader.__next__"); + if (module_state == NULL) { + return NULL; + } + if (parse_reset(self) < 0) return NULL; do { @@ -793,7 +829,7 @@ Reader_iternext(ReaderObj *self) if (!PyErr_Occurred() && (self->field_len != 0 || self->state == IN_QUOTED_FIELD)) { if (self->dialect->strict) - PyErr_SetString(_csvstate_global->error_obj, + PyErr_SetString(module_state->error_obj, "unexpected end of data"); else if (parse_save_field(self) >= 0) break; @@ -801,7 +837,7 @@ Reader_iternext(ReaderObj *self) return NULL; } if (!PyUnicode_Check(lineobj)) { - PyErr_Format(_csvstate_global->error_obj, + PyErr_Format(module_state->error_obj, "iterator should return strings, " "not %.200s " "(the file should be opened in text mode)", @@ -823,18 +859,18 @@ Reader_iternext(ReaderObj *self) c = PyUnicode_READ(kind, data, pos); if (c == '\0') { Py_DECREF(lineobj); - PyErr_Format(_csvstate_global->error_obj, + PyErr_Format(module_state->error_obj, "line contains NUL"); goto err; } - if (parse_process_char(self, c) < 0) { + if (parse_process_char(self, module_state, c) < 0) { Py_DECREF(lineobj); goto err; } pos++; } Py_DECREF(lineobj); - if (parse_process_char(self, 0) < 0) + if (parse_process_char(self, module_state, 0) < 0) goto err; } while (self->state != START_RECORD); @@ -847,13 +883,29 @@ err: static void Reader_dealloc(ReaderObj *self) { + PyTypeObject *tp = Py_TYPE(self); PyObject_GC_UnTrack(self); - Py_XDECREF(self->dialect); - Py_XDECREF(self->input_iter); - Py_XDECREF(self->fields); - if (self->field != NULL) + Py_CLEAR(self->dialect); + Py_CLEAR(self->input_iter); + Py_CLEAR(self->fields); + if (self->field != NULL) { PyMem_Free(self->field); + self->field = NULL; + } PyObject_GC_Del(self); + Py_DECREF(tp); +} + +static void +Reader_finalize(ReaderObj *self) +{ + Py_CLEAR(self->dialect); + Py_CLEAR(self->input_iter); + Py_CLEAR(self->fields); + if (self->field != NULL) { + PyMem_Free(self->field); + self->field = NULL; + } } static int @@ -893,47 +945,35 @@ static struct PyMemberDef Reader_memberlist[] = { }; -static PyTypeObject Reader_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "_csv.reader", /*tp_name*/ - sizeof(ReaderObj), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)Reader_dealloc, /*tp_dealloc*/ - 0, /*tp_vectorcall_offset*/ - (getattrfunc)0, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - 0, /*tp_as_async*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)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*/ - Reader_Type_doc, /*tp_doc*/ - (traverseproc)Reader_traverse, /*tp_traverse*/ - (inquiry)Reader_clear, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - PyObject_SelfIter, /*tp_iter*/ - (getiterfunc)Reader_iternext, /*tp_iternext*/ - Reader_methods, /*tp_methods*/ - Reader_memberlist, /*tp_members*/ - 0, /*tp_getset*/ - +static PyType_Slot Reader_Type_slots[] = { + {Py_tp_doc, (char*)Reader_Type_doc}, + {Py_tp_traverse, Reader_traverse}, + {Py_tp_clear, Reader_clear}, + {Py_tp_iter, PyObject_SelfIter}, + {Py_tp_iternext, Reader_iternext}, + {Py_tp_methods, Reader_methods}, + {Py_tp_members, Reader_memberlist}, + {Py_tp_finalize, Reader_finalize}, + {Py_tp_dealloc, Reader_dealloc}, + {0, NULL} }; +PyType_Spec Reader_Type_spec = { + .name = "_csv.reader", + .basicsize = sizeof(ReaderObj), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, + .slots = Reader_Type_slots +}; + + static PyObject * csv_reader(PyObject *module, PyObject *args, PyObject *keyword_args) { PyObject * iterator, * dialect = NULL; - ReaderObj * self = PyObject_GC_New(ReaderObj, &Reader_Type); + _csvstate *module_state = get_csv_state(module); + ReaderObj * self = PyObject_GC_New( + ReaderObj, + module_state->reader_type); if (!self) return NULL; @@ -959,7 +999,8 @@ csv_reader(PyObject *module, PyObject *args, PyObject *keyword_args) Py_DECREF(self); return NULL; } - self->dialect = (DialectObj *)_call_dialect(dialect, keyword_args); + self->dialect = (DialectObj *)_call_dialect(module_state, dialect, + keyword_args); if (self->dialect == NULL) { Py_DECREF(self); return NULL; @@ -1048,7 +1089,7 @@ join_append_data(WriterObj *self, unsigned int field_kind, const void *field_dat } if (want_escape) { if (!dialect->escapechar) { - PyErr_Format(_csvstate_global->error_obj, + PyErr_Format(self->error_obj, "need to escape, but no escapechar set"); return -1; } @@ -1166,7 +1207,7 @@ csv_writerow(WriterObj *self, PyObject *seq) iter = PyObject_GetIter(seq); if (iter == NULL) { if (PyErr_ExceptionMatches(PyExc_TypeError)) { - PyErr_Format(_csvstate_global->error_obj, + PyErr_Format(self->error_obj, "iterable expected, not %.200s", Py_TYPE(seq)->tp_name); } @@ -1223,7 +1264,7 @@ csv_writerow(WriterObj *self, PyObject *seq) if (self->num_fields > 0 && self->rec_len == 0) { if (dialect->quoting == QUOTE_NONE) { - PyErr_Format(_csvstate_global->error_obj, + PyErr_Format(self->error_obj, "single empty field record must be quoted"); return NULL; } @@ -1292,22 +1333,12 @@ static struct PyMemberDef Writer_memberlist[] = { { NULL } }; -static void -Writer_dealloc(WriterObj *self) -{ - PyObject_GC_UnTrack(self); - Py_XDECREF(self->dialect); - Py_XDECREF(self->write); - if (self->rec != NULL) - PyMem_Free(self->rec); - PyObject_GC_Del(self); -} - static int Writer_traverse(WriterObj *self, visitproc visit, void *arg) { Py_VISIT(self->dialect); Py_VISIT(self->write); + Py_VISIT(self->error_obj); return 0; } @@ -1316,9 +1347,19 @@ Writer_clear(WriterObj *self) { Py_CLEAR(self->dialect); Py_CLEAR(self->write); + Py_CLEAR(self->error_obj); return 0; } +static void +Writer_finalize(WriterObj *self) +{ + Writer_clear(self); + if (self->rec != NULL) { + PyMem_Free(self->rec); + } +} + PyDoc_STRVAR(Writer_Type_doc, "CSV writer\n" "\n" @@ -1326,46 +1367,30 @@ PyDoc_STRVAR(Writer_Type_doc, "in CSV format from sequence input.\n" ); -static PyTypeObject Writer_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "_csv.writer", /*tp_name*/ - sizeof(WriterObj), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)Writer_dealloc, /*tp_dealloc*/ - 0, /*tp_vectorcall_offset*/ - (getattrfunc)0, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - 0, /*tp_as_async*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)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*/ - Writer_Type_doc, - (traverseproc)Writer_traverse, /*tp_traverse*/ - (inquiry)Writer_clear, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - (getiterfunc)0, /*tp_iter*/ - (getiterfunc)0, /*tp_iternext*/ - Writer_methods, /*tp_methods*/ - Writer_memberlist, /*tp_members*/ - 0, /*tp_getset*/ +static PyType_Slot Writer_Type_slots[] = { + {Py_tp_finalize, Writer_finalize}, + {Py_tp_doc, (char*)Writer_Type_doc}, + {Py_tp_traverse, Writer_traverse}, + {Py_tp_clear, Writer_clear}, + {Py_tp_methods, Writer_methods}, + {Py_tp_members, Writer_memberlist}, + {0, NULL} }; +PyType_Spec Writer_Type_spec = { + .name = "_csv.writer", + .basicsize = sizeof(WriterObj), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, + .slots = Writer_Type_slots, +}; + + static PyObject * csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args) { PyObject * output_file, * dialect = NULL; - WriterObj * self = PyObject_GC_New(WriterObj, &Writer_Type); + _csvstate *module_state = get_csv_state(module); + WriterObj * self = PyObject_GC_New(WriterObj, module_state->writer_type); _Py_IDENTIFIER(write); if (!self) @@ -1379,6 +1404,8 @@ csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args) self->rec_len = 0; self->num_fields = 0; + self->error_obj = Py_NewRef(module_state->error_obj); + if (!PyArg_UnpackTuple(args, "", 1, 2, &output_file, &dialect)) { Py_DECREF(self); return NULL; @@ -1393,7 +1420,8 @@ csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args) Py_DECREF(self); return NULL; } - self->dialect = (DialectObj *)_call_dialect(dialect, keyword_args); + self->dialect = (DialectObj *)_call_dialect(module_state, dialect, + keyword_args); if (self->dialect == NULL) { Py_DECREF(self); return NULL; @@ -1408,13 +1436,14 @@ csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args) static PyObject * csv_list_dialects(PyObject *module, PyObject *args) { - return PyDict_Keys(_csvstate_global->dialects); + return PyDict_Keys(get_csv_state(module)->dialects); } static PyObject * csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs) { PyObject *name_obj, *dialect_obj = NULL; + _csvstate *module_state = get_csv_state(module); PyObject *dialect; if (!PyArg_UnpackTuple(args, "", 1, 2, &name_obj, &dialect_obj)) @@ -1426,10 +1455,10 @@ csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs) } if (PyUnicode_READY(name_obj) == -1) return NULL; - dialect = _call_dialect(dialect_obj, kwargs); + dialect = _call_dialect(module_state, dialect_obj, kwargs); if (dialect == NULL) return NULL; - if (PyDict_SetItem(_csvstate_global->dialects, name_obj, dialect) < 0) { + if (PyDict_SetItem(module_state->dialects, name_obj, dialect) < 0) { Py_DECREF(dialect); return NULL; } @@ -1440,9 +1469,10 @@ csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs) static PyObject * csv_unregister_dialect(PyObject *module, PyObject *name_obj) { - if (PyDict_DelItem(_csvstate_global->dialects, name_obj) < 0) { + _csvstate *module_state = get_csv_state(module); + if (PyDict_DelItem(module_state->dialects, name_obj) < 0) { if (PyErr_ExceptionMatches(PyExc_KeyError)) { - PyErr_Format(_csvstate_global->error_obj, "unknown dialect"); + PyErr_Format(module_state->error_obj, "unknown dialect"); } return NULL; } @@ -1452,14 +1482,15 @@ csv_unregister_dialect(PyObject *module, PyObject *name_obj) static PyObject * csv_get_dialect(PyObject *module, PyObject *name_obj) { - return get_dialect_from_registry(name_obj); + return get_dialect_from_registry(name_obj, get_csv_state(module)); } static PyObject * csv_field_size_limit(PyObject *module, PyObject *args) { PyObject *new_limit = NULL; - long old_limit = _csvstate_global->field_limit; + _csvstate *module_state = get_csv_state(module); + long old_limit = module_state->field_limit; if (!PyArg_UnpackTuple(args, "field_size_limit", 0, 1, &new_limit)) return NULL; @@ -1469,15 +1500,25 @@ csv_field_size_limit(PyObject *module, PyObject *args) "limit must be an integer"); return NULL; } - _csvstate_global->field_limit = PyLong_AsLong(new_limit); - if (_csvstate_global->field_limit == -1 && PyErr_Occurred()) { - _csvstate_global->field_limit = old_limit; + module_state->field_limit = PyLong_AsLong(new_limit); + if (module_state->field_limit == -1 && PyErr_Occurred()) { + module_state->field_limit = old_limit; return NULL; } } return PyLong_FromLong(old_limit); } +static PyType_Slot error_slots[] = { + {0, NULL}, +}; + +PyType_Spec error_spec = { + .name = "_csv.Error", + .flags = Py_TPFLAGS_DEFAULT, + .slots = error_slots, +}; + /* * MODULE */ @@ -1610,13 +1651,82 @@ static struct PyMethodDef csv_methods[] = { { NULL, NULL } }; +static int +csv_exec(PyObject *module) { + const StyleDesc *style; + PyObject *temp; + _csvstate *module_state = get_csv_state(module); + + temp = PyType_FromModuleAndSpec(module, &Dialect_Type_spec, NULL); + module_state->dialect_type = (PyTypeObject *)temp; + if (PyModule_AddObjectRef(module, "Dialect", temp) < 0) { + return -1; + } + + temp = PyType_FromModuleAndSpec(module, &Reader_Type_spec, NULL); + module_state->reader_type = (PyTypeObject *)temp; + if (PyModule_AddObjectRef(module, "Reader", temp) < 0) { + return -1; + } + + temp = PyType_FromModuleAndSpec(module, &Writer_Type_spec, NULL); + module_state->writer_type = (PyTypeObject *)temp; + if (PyModule_AddObjectRef(module, "Writer", temp) < 0) { + return -1; + } + + /* Add version to the module. */ + if (PyModule_AddStringConstant(module, "__version__", + MODULE_VERSION) == -1) { + return -1; + } + + /* Set the field limit */ + module_state->field_limit = 128 * 1024; + + /* Add _dialects dictionary */ + module_state->dialects = PyDict_New(); + if (PyModule_AddObjectRef(module, "_dialects", module_state->dialects) < 0) { + return -1; + } + + /* Add quote styles into dictionary */ + for (style = quote_styles; style->name; style++) { + if (PyModule_AddIntConstant(module, style->name, + style->style) == -1) + return -1; + } + + /* Add the CSV exception object to the module. */ + PyObject *bases = PyTuple_Pack(1, PyExc_Exception); + if (bases == NULL) { + return -1; + } + module_state->error_obj = PyType_FromModuleAndSpec(module, &error_spec, + bases); + Py_DECREF(bases); + if (module_state->error_obj == NULL) { + return -1; + } + if (PyModule_AddType(module, (PyTypeObject *)module_state->error_obj) != 0) { + return -1; + } + + return 0; +} + +static PyModuleDef_Slot csv_slots[] = { + {Py_mod_exec, csv_exec}, + {0, NULL} +}; + static struct PyModuleDef _csvmodule = { PyModuleDef_HEAD_INIT, "_csv", csv_module_doc, sizeof(_csvstate), csv_methods, - NULL, + csv_slots, _csv_traverse, _csv_clear, _csv_free @@ -1625,53 +1735,5 @@ static struct PyModuleDef _csvmodule = { PyMODINIT_FUNC PyInit__csv(void) { - PyObject *module; - const StyleDesc *style; - - if (PyType_Ready(&Reader_Type) < 0) - return NULL; - - if (PyType_Ready(&Writer_Type) < 0) - return NULL; - - /* Create the module and add the functions */ - module = PyModule_Create(&_csvmodule); - if (module == NULL) - return NULL; - - /* Add version to the module. */ - if (PyModule_AddStringConstant(module, "__version__", - MODULE_VERSION) == -1) - return NULL; - - /* Set the field limit */ - get_csv_state(module)->field_limit = 128 * 1024; - /* Do I still need to add this var to the Module Dict? */ - - /* Add _dialects dictionary */ - get_csv_state(module)->dialects = PyDict_New(); - if (get_csv_state(module)->dialects == NULL) - return NULL; - Py_INCREF(get_csv_state(module)->dialects); - if (PyModule_AddObject(module, "_dialects", get_csv_state(module)->dialects)) - return NULL; - - /* Add quote styles into dictionary */ - for (style = quote_styles; style->name; style++) { - if (PyModule_AddIntConstant(module, style->name, - style->style) == -1) - return NULL; - } - - if (PyModule_AddType(module, &Dialect_Type)) { - return NULL; - } - - /* Add the CSV exception object to the module. */ - get_csv_state(module)->error_obj = PyErr_NewException("_csv.Error", NULL, NULL); - if (get_csv_state(module)->error_obj == NULL) - return NULL; - Py_INCREF(get_csv_state(module)->error_obj); - PyModule_AddObject(module, "Error", get_csv_state(module)->error_obj); - return module; + return PyModuleDef_Init(&_csvmodule); } diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 9b629877a8a..40a05a44edd 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -475,7 +475,7 @@ static void PyCArg_dealloc(PyCArgObject *self) { Py_XDECREF(self->obj); - PyObject_Del(self); + PyObject_Free(self); } static int diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c index 4f220e42ff3..788bae6a96c 100644 --- a/Modules/_ctypes/malloc_closure.c +++ b/Modules/_ctypes/malloc_closure.c @@ -91,11 +91,15 @@ static void more_core(void) /* put the item back into the free list */ void Py_ffi_closure_free(void *p) { -#if USING_APPLE_OS_LIBFFI && HAVE_FFI_CLOSURE_ALLOC +#if HAVE_FFI_CLOSURE_ALLOC +#if USING_APPLE_OS_LIBFFI if (__builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)) { +#endif ffi_closure_free(p); return; +#if USING_APPLE_OS_LIBFFI } +#endif #endif ITEM *item = (ITEM *)p; item->next = free_list; @@ -105,10 +109,14 @@ void Py_ffi_closure_free(void *p) /* return one item from the free list, allocating more if needed */ void *Py_ffi_closure_alloc(size_t size, void** codeloc) { -#if USING_APPLE_OS_LIBFFI && HAVE_FFI_CLOSURE_ALLOC +#if HAVE_FFI_CLOSURE_ALLOC +#if USING_APPLE_OS_LIBFFI if (__builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)) { +#endif return ffi_closure_alloc(size, codeloc); +#if USING_APPLE_OS_LIBFFI } +#endif #endif ITEM *item; if (!free_list) diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c index 1a8f0b63682..d782ccd0867 100644 --- a/Modules/_curses_panel.c +++ b/Modules/_curses_panel.c @@ -282,7 +282,7 @@ PyCursesPanel_Dealloc(PyCursesPanelObject *po) Py_DECREF(po->wo); remove_lop(po); } - PyObject_DEL(po); + PyObject_Free(po); Py_DECREF(tp); } @@ -654,6 +654,7 @@ _curses_panel_exec(PyObject *mod) if (state->PyCursesPanel_Type == NULL) { return -1; } + ((PyTypeObject *)state->PyCursesPanel_Type)->tp_new = NULL; if (PyModule_AddType(mod, state->PyCursesPanel_Type) < 0) { return -1; @@ -715,4 +716,4 @@ PyMODINIT_FUNC PyInit__curses_panel(void) { return PyModuleDef_Init(&_curses_panelmodule); -} \ No newline at end of file +} diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index a59858632e7..1f4789baf7a 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -689,7 +689,7 @@ PyCursesWindow_Dealloc(PyCursesWindowObject *wo) if (wo->win != stdscr) delwin(wo->win); if (wo->encoding != NULL) PyMem_Free(wo->encoding); - PyObject_DEL(wo); + PyObject_Free(wo); } /* Addch, Addstr, Addnstr */ diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index ea16c5a6cd9..9c85d76c6b5 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -1765,7 +1765,7 @@ ctxmanager_dealloc(PyDecContextManagerObject *self) { Py_XDECREF(self->local); Py_XDECREF(self->global); - PyObject_Del(self); + PyObject_Free(self); } static PyObject * diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c index 9fad21fc332..1fcaf299e67 100644 --- a/Modules/_functoolsmodule.c +++ b/Modules/_functoolsmodule.c @@ -1,5 +1,6 @@ #include "Python.h" #include "pycore_long.h" // _PyLong_GetZero() +#include "pycore_object.h" // _PyObject_GC_TRACK #include "pycore_pystate.h" // _PyThreadState_GET() #include "pycore_tuple.h" // _PyTuple_ITEMS() #include "structmember.h" // PyMemberDef @@ -23,9 +24,37 @@ typedef struct { vectorcallfunc vectorcall; } partialobject; -static PyTypeObject partial_type; +typedef struct _functools_state { + /* this object is used delimit args and keywords in the cache keys */ + PyObject *kwd_mark; + PyTypeObject *partial_type; + PyTypeObject *keyobject_type; + PyTypeObject *lru_list_elem_type; +} _functools_state; + +static inline _functools_state * +get_functools_state(PyObject *module) +{ + void *state = PyModule_GetState(module); + assert(state != NULL); + return (_functools_state *)state; +} static void partial_setvectorcall(partialobject *pto); +static struct PyModuleDef _functools_module; +static PyObject * +partial_call(partialobject *pto, PyObject *args, PyObject *kwargs); + +static inline _functools_state * +get_functools_state_by_type(PyTypeObject *type) +{ + PyObject *module = _PyType_GetModuleByDef(type, &_functools_module); + if (module == NULL) { + return NULL; + } + _functools_state *state = get_functools_state(module); + return state; +} static PyObject * partial_new(PyTypeObject *type, PyObject *args, PyObject *kw) @@ -41,7 +70,11 @@ partial_new(PyTypeObject *type, PyObject *args, PyObject *kw) pargs = pkw = NULL; func = PyTuple_GET_ITEM(args, 0); - if (Py_IS_TYPE(func, &partial_type) && type == &partial_type) { + if (Py_TYPE(func)->tp_call == (ternaryfunc)partial_call) { + // The type of "func" might not be exactly the same type object + // as "type", but if it is called using partial_call, it must have the + // same memory layout (fn, args and kw members). + // We can use its underlying function directly and merge the arguments. partialobject *part = (partialobject *)func; if (part->dict == NULL) { pargs = part->args; @@ -116,6 +149,7 @@ partial_new(PyTypeObject *type, PyObject *args, PyObject *kw) static void partial_dealloc(partialobject *pto) { + PyTypeObject *tp = Py_TYPE(pto); /* bpo-31095: UnTrack is needed before calling any callbacks */ PyObject_GC_UnTrack(pto); if (pto->weakreflist != NULL) @@ -124,7 +158,8 @@ partial_dealloc(partialobject *pto) Py_XDECREF(pto->args); Py_XDECREF(pto->kw); Py_XDECREF(pto->dict); - Py_TYPE(pto)->tp_free(pto); + tp->tp_free(pto); + Py_DECREF(tp); } @@ -293,6 +328,12 @@ static PyMemberDef partial_memberlist[] = { "tuple of arguments to future partial calls"}, {"keywords", T_OBJECT, OFF(kw), READONLY, "dictionary of keyword arguments to future partial calls"}, + {"__weaklistoffset__", T_PYSSIZET, + offsetof(partialobject, weakreflist), READONLY}, + {"__dictoffset__", T_PYSSIZET, + offsetof(partialobject, dict), READONLY}, + {"__vectorcalloffset__", T_PYSSIZET, + offsetof(partialobject, vectorcall), READONLY}, {NULL} /* Sentinel */ }; @@ -419,49 +460,28 @@ static PyMethodDef partial_methods[] = { {NULL, NULL} /* sentinel */ }; -static PyTypeObject partial_type = { - PyVarObject_HEAD_INIT(NULL, 0) - "functools.partial", /* tp_name */ - sizeof(partialobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)partial_dealloc, /* tp_dealloc */ - offsetof(partialobject, vectorcall),/* tp_vectorcall_offset */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_as_async */ - (reprfunc)partial_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - (ternaryfunc)partial_call, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - PyObject_GenericSetAttr, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | - Py_TPFLAGS_BASETYPE | - Py_TPFLAGS_HAVE_VECTORCALL, /* tp_flags */ - partial_doc, /* tp_doc */ - (traverseproc)partial_traverse, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - offsetof(partialobject, weakreflist), /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - partial_methods, /* tp_methods */ - partial_memberlist, /* tp_members */ - partial_getsetlist, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - offsetof(partialobject, dict), /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - partial_new, /* tp_new */ - PyObject_GC_Del, /* tp_free */ +static PyType_Slot partial_type_slots[] = { + {Py_tp_dealloc, partial_dealloc}, + {Py_tp_repr, partial_repr}, + {Py_tp_call, partial_call}, + {Py_tp_getattro, PyObject_GenericGetAttr}, + {Py_tp_setattro, PyObject_GenericSetAttr}, + {Py_tp_doc, (void *)partial_doc}, + {Py_tp_traverse, partial_traverse}, + {Py_tp_methods, partial_methods}, + {Py_tp_members, partial_memberlist}, + {Py_tp_getset, partial_getsetlist}, + {Py_tp_new, partial_new}, + {Py_tp_free, PyObject_GC_Del}, + {0, 0} +}; + +static PyType_Spec partial_type_spec = { + .name = "functools.partial", + .basicsize = sizeof(partialobject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_VECTORCALL, + .slots = partial_type_slots }; @@ -473,12 +493,21 @@ typedef struct { PyObject *object; } keyobject; +static int +keyobject_clear(keyobject *ko) +{ + Py_CLEAR(ko->cmp); + Py_CLEAR(ko->object); + return 0; +} + static void keyobject_dealloc(keyobject *ko) { - Py_DECREF(ko->cmp); - Py_XDECREF(ko->object); - PyObject_FREE(ko); + PyTypeObject *tp = Py_TYPE(ko); + keyobject_clear(ko); + PyObject_Free(ko); + Py_DECREF(tp); } static int @@ -489,15 +518,6 @@ keyobject_traverse(keyobject *ko, visitproc visit, void *arg) return 0; } -static int -keyobject_clear(keyobject *ko) -{ - Py_CLEAR(ko->cmp); - if (ko->object) - Py_CLEAR(ko->object); - return 0; -} - static PyMemberDef keyobject_members[] = { {"obj", T_OBJECT, offsetof(keyobject, object), 0, @@ -511,38 +531,22 @@ keyobject_call(keyobject *ko, PyObject *args, PyObject *kwds); static PyObject * keyobject_richcompare(PyObject *ko, PyObject *other, int op); -static PyTypeObject keyobject_type = { - PyVarObject_HEAD_INIT(&PyType_Type, 0) - "functools.KeyWrapper", /* tp_name */ - sizeof(keyobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)keyobject_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - 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 */ - (ternaryfunc)keyobject_call, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - 0, /* tp_doc */ - (traverseproc)keyobject_traverse, /* tp_traverse */ - (inquiry)keyobject_clear, /* tp_clear */ - keyobject_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - keyobject_members, /* tp_members */ - 0, /* tp_getset */ +static PyType_Slot keyobject_type_slots[] = { + {Py_tp_dealloc, keyobject_dealloc}, + {Py_tp_call, keyobject_call}, + {Py_tp_getattro, PyObject_GenericGetAttr}, + {Py_tp_traverse, keyobject_traverse}, + {Py_tp_clear, keyobject_clear}, + {Py_tp_richcompare, keyobject_richcompare}, + {Py_tp_members, keyobject_members}, + {0, 0} +}; + +static PyType_Spec keyobject_type_spec = { + .name = "functools.KeyWrapper", + .basicsize = sizeof(keyobject), + .flags = Py_TPFLAGS_DEFAULT, + .slots = keyobject_type_slots }; static PyObject * @@ -554,9 +558,11 @@ keyobject_call(keyobject *ko, PyObject *args, PyObject *kwds) if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:K", kwargs, &object)) return NULL; - result = PyObject_New(keyobject, &keyobject_type); - if (!result) + + result = PyObject_New(keyobject, Py_TYPE(ko)); + if (result == NULL) { return NULL; + } Py_INCREF(ko->cmp); result->cmp = ko->cmp; Py_INCREF(object); @@ -574,7 +580,7 @@ keyobject_richcompare(PyObject *ko, PyObject *other, int op) PyObject *answer; PyObject* stack[2]; - if (!Py_IS_TYPE(other, &keyobject_type)) { + if (!Py_IS_TYPE(other, Py_TYPE(ko))) { PyErr_Format(PyExc_TypeError, "other argument must be K instance"); return NULL; } @@ -608,10 +614,13 @@ functools_cmp_to_key(PyObject *self, PyObject *args, PyObject *kwds) PyObject *cmp; static char *kwargs[] = {"mycmp", NULL}; keyobject *object; + _functools_state *state; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:cmp_to_key", kwargs, &cmp)) return NULL; - object = PyObject_New(keyobject, &keyobject_type); + + state = get_functools_state(self); + object = PyObject_New(keyobject, state->keyobject_type); if (!object) return NULL; Py_INCREF(cmp); @@ -673,6 +682,11 @@ functools_reduce(PyObject *self, PyObject *args) if ((result = PyObject_Call(func, args, NULL)) == NULL) { goto Fail; } + // bpo-42536: The GC may have untracked this args tuple. Since we're + // recycling it, make sure it's tracked again: + if (!_PyObject_GC_IS_TRACKED(args)) { + _PyObject_GC_TRACK(args); + } } } @@ -723,10 +737,6 @@ iterable is empty."); */ - -/* 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; @@ -740,33 +750,23 @@ typedef struct lru_list_elem { static void lru_list_elem_dealloc(lru_list_elem *link) { + PyTypeObject *tp = Py_TYPE(link); Py_XDECREF(link->key); Py_XDECREF(link->result); - PyObject_Del(link); + PyObject_Free(link); + Py_DECREF(tp); } -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_vectorcall_offset */ - 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 */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ +static PyType_Slot lru_list_elem_type_slots[] = { + {Py_tp_dealloc, lru_list_elem_dealloc}, + {0, 0} +}; + +static PyType_Spec lru_list_elem_type_spec = { + .name = "functools._lru_list_elem", + .basicsize = sizeof(lru_list_elem), + .flags = Py_TPFLAGS_DEFAULT, + .slots = lru_list_elem_type_slots }; @@ -786,10 +786,9 @@ typedef struct lru_cache_object { PyObject *weakreflist; } lru_cache_object; -static PyTypeObject lru_cache_type; - static PyObject * -lru_cache_make_key(PyObject *args, PyObject *kwds, int typed) +lru_cache_make_key(_functools_state *state, PyObject *args, + PyObject *kwds, int typed) { PyObject *key, *keyword, *value; Py_ssize_t key_size, pos, key_pos, kwds_size; @@ -828,8 +827,8 @@ lru_cache_make_key(PyObject *args, PyObject *kwds, int typed) PyTuple_SET_ITEM(key, key_pos++, item); } if (kwds_size) { - Py_INCREF(kwd_mark); - PyTuple_SET_ITEM(key, key_pos++, kwd_mark); + Py_INCREF(state->kwd_mark); + PyTuple_SET_ITEM(key, key_pos++, state->kwd_mark); for (pos = 0; PyDict_Next(kwds, &pos, &keyword, &value);) { Py_INCREF(keyword); PyTuple_SET_ITEM(key, key_pos++, keyword); @@ -873,7 +872,12 @@ infinite_lru_cache_wrapper(lru_cache_object *self, PyObject *args, PyObject *kwd { PyObject *result; Py_hash_t hash; - PyObject *key = lru_cache_make_key(args, kwds, self->typed); + _functools_state *state; + state = get_functools_state_by_type(Py_TYPE(self)); + if (state == NULL) { + return NULL; + } + PyObject *key = lru_cache_make_key(state, args, kwds, self->typed); if (!key) return NULL; hash = PyObject_Hash(key); @@ -973,8 +977,13 @@ bounded_lru_cache_wrapper(lru_cache_object *self, PyObject *args, PyObject *kwds lru_list_elem *link; PyObject *key, *result, *testresult; Py_hash_t hash; + _functools_state *state; - key = lru_cache_make_key(args, kwds, self->typed); + state = get_functools_state_by_type(Py_TYPE(self)); + if (state == NULL) { + return NULL; + } + key = lru_cache_make_key(state, args, kwds, self->typed); if (!key) return NULL; hash = PyObject_Hash(key); @@ -1029,7 +1038,7 @@ bounded_lru_cache_wrapper(lru_cache_object *self, PyObject *args, PyObject *kwds { /* Cache is not full, so put the result in a new link */ link = (lru_list_elem *)PyObject_New(lru_list_elem, - &lru_list_elem_type); + state->lru_list_elem_type); if (link == NULL) { Py_DECREF(key); Py_DECREF(result); @@ -1223,22 +1232,31 @@ lru_cache_clear_list(lru_list_elem *link) } } +static int +lru_cache_tp_clear(lru_cache_object *self) +{ + lru_list_elem *list = lru_cache_unlink_list(self); + 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; +} + static void lru_cache_dealloc(lru_cache_object *obj) { - lru_list_elem *list; + PyTypeObject *tp = Py_TYPE(obj); /* bpo-31095: UnTrack is needed before calling any callbacks */ PyObject_GC_UnTrack(obj); - if (obj->weakreflist != NULL) + if (obj->weakreflist != NULL) { PyObject_ClearWeakRefs((PyObject*)obj); + } - list = lru_cache_unlink_list(obj); - Py_XDECREF(obj->cache); - Py_XDECREF(obj->func); - Py_XDECREF(obj->cache_info_type); - Py_XDECREF(obj->dict); - lru_cache_clear_list(list); - Py_TYPE(obj)->tp_free(obj); + lru_cache_tp_clear(obj); + tp->tp_free(obj); + Py_DECREF(tp); } static PyObject * @@ -1317,18 +1335,6 @@ lru_cache_tp_traverse(lru_cache_object *self, visitproc visit, void *arg) return 0; } -static int -lru_cache_tp_clear(lru_cache_object *self) -{ - lru_list_elem *list = lru_cache_unlink_list(self); - 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\ @@ -1360,51 +1366,37 @@ static PyGetSetDef lru_cache_getsetlist[] = { {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_vectorcall_offset */ - 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 */ - (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 | Py_TPFLAGS_METHOD_DESCRIPTOR, - /* tp_flags */ - lru_cache_doc, /* tp_doc */ - (traverseproc)lru_cache_tp_traverse,/* tp_traverse */ - (inquiry)lru_cache_tp_clear, /* tp_clear */ - 0, /* tp_richcompare */ - offsetof(lru_cache_object, weakreflist), - /* 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 */ +static PyMemberDef lru_cache_memberlist[] = { + {"__dictoffset__", T_PYSSIZET, + offsetof(lru_cache_object, dict), READONLY}, + {"__weaklistoffset__", T_PYSSIZET, + offsetof(lru_cache_object, weakreflist), READONLY}, + {NULL} /* Sentinel */ }; +static PyType_Slot lru_cache_type_slots[] = { + {Py_tp_dealloc, lru_cache_dealloc}, + {Py_tp_call, lru_cache_call}, + {Py_tp_doc, (void *)lru_cache_doc}, + {Py_tp_traverse, lru_cache_tp_traverse}, + {Py_tp_clear, lru_cache_tp_clear}, + {Py_tp_methods, lru_cache_methods}, + {Py_tp_members, lru_cache_memberlist}, + {Py_tp_getset, lru_cache_getsetlist}, + {Py_tp_descr_get, lru_cache_descr_get}, + {Py_tp_new, lru_cache_new}, + {0, 0} +}; + +static PyType_Spec lru_cache_type_spec = { + .name = "functools._lru_cache_wrapper", + .basicsize = sizeof(lru_cache_object), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_METHOD_DESCRIPTOR, + .slots = lru_cache_type_slots +}; + + /* module level code ********************************************************/ PyDoc_STRVAR(_functools_doc, @@ -1417,38 +1409,84 @@ static PyMethodDef _functools_methods[] = { {NULL, NULL} /* sentinel */ }; -static void -_functools_free(void *m) -{ - // FIXME: Do not clear kwd_mark to avoid NULL pointer dereferencing if we have - // other modules instances that could use it. Will fix when PEP-573 land - // and we could move kwd_mark to a per-module state. - // Py_CLEAR(kwd_mark); -} - static int _functools_exec(PyObject *module) { - PyTypeObject *typelist[] = { - &partial_type, - &lru_cache_type - }; - - if (!kwd_mark) { - kwd_mark = _PyObject_CallNoArg((PyObject *)&PyBaseObject_Type); - if (!kwd_mark) { - return -1; - } + _functools_state *state = get_functools_state(module); + state->kwd_mark = _PyObject_CallNoArg((PyObject *)&PyBaseObject_Type); + if (state->kwd_mark == NULL) { + return -1; } - for (size_t i = 0; i < Py_ARRAY_LENGTH(typelist); i++) { - if (PyModule_AddType(module, typelist[i]) < 0) { - return -1; - } + state->partial_type = (PyTypeObject *)PyType_FromModuleAndSpec(module, + &partial_type_spec, NULL); + if (state->partial_type == NULL) { + return -1; } + if (PyModule_AddType(module, state->partial_type) < 0) { + return -1; + } + + PyObject *lru_cache_type = PyType_FromModuleAndSpec(module, + &lru_cache_type_spec, NULL); + if (lru_cache_type == NULL) { + return -1; + } + if (PyModule_AddType(module, (PyTypeObject *)lru_cache_type) < 0) { + Py_DECREF(lru_cache_type); + return -1; + } + Py_DECREF(lru_cache_type); + + state->keyobject_type = (PyTypeObject *)PyType_FromModuleAndSpec(module, + &keyobject_type_spec, NULL); + if (state->keyobject_type == NULL) { + return -1; + } + if (PyModule_AddType(module, state->keyobject_type) < 0) { + return -1; + } + + state->lru_list_elem_type = (PyTypeObject *)PyType_FromModuleAndSpec( + module, &lru_list_elem_type_spec, NULL); + if (state->lru_list_elem_type == NULL) { + return -1; + } + if (PyModule_AddType(module, state->lru_list_elem_type) < 0) { + return -1; + } + return 0; } +static int +_functools_traverse(PyObject *module, visitproc visit, void *arg) +{ + _functools_state *state = get_functools_state(module); + Py_VISIT(state->kwd_mark); + Py_VISIT(state->partial_type); + Py_VISIT(state->keyobject_type); + Py_VISIT(state->lru_list_elem_type); + return 0; +} + +static int +_functools_clear(PyObject *module) +{ + _functools_state *state = get_functools_state(module); + Py_CLEAR(state->kwd_mark); + Py_CLEAR(state->partial_type); + Py_CLEAR(state->keyobject_type); + Py_CLEAR(state->lru_list_elem_type); + return 0; +} + +static void +_functools_free(void *module) +{ + _functools_clear((PyObject *)module); +} + static struct PyModuleDef_Slot _functools_slots[] = { {Py_mod_exec, _functools_exec}, {0, NULL} @@ -1456,14 +1494,14 @@ static struct PyModuleDef_Slot _functools_slots[] = { static struct PyModuleDef _functools_module = { PyModuleDef_HEAD_INIT, - "_functools", - _functools_doc, - 0, - _functools_methods, - _functools_slots, - NULL, - NULL, - _functools_free, + .m_name = "_functools", + .m_doc = _functools_doc, + .m_size = sizeof(_functools_state), + .m_methods = _functools_methods, + .m_slots = _functools_slots, + .m_traverse = _functools_traverse, + .m_clear = _functools_clear, + .m_free = _functools_free, }; PyMODINIT_FUNC diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 7e176cf21d6..d4295d7c363 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -341,7 +341,7 @@ EVP_dealloc(EVPobject *self) if (self->lock != NULL) PyThread_free_lock(self->lock); EVP_MD_CTX_free(self->ctx); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } @@ -1453,7 +1453,7 @@ _hashlib_hmac_new_impl(PyObject *module, Py_buffer *key, PyObject *msg_obj, error: if (ctx) HMAC_CTX_free(ctx); - if (self) PyObject_Del(self); + if (self) PyObject_Free(self); return NULL; } @@ -1546,7 +1546,7 @@ _hmac_dealloc(HMACobject *self) PyThread_free_lock(self->lock); } HMAC_CTX_free(self->ctx); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index 869e3f80f3f..564f5598edc 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -370,8 +370,8 @@ _locale_strcoll_impl(PyObject *module, PyObject *os1, PyObject *os2) result = PyLong_FromLong(wcscoll(ws1, ws2)); done: /* Deallocate everything. */ - if (ws1) PyMem_FREE(ws1); - if (ws2) PyMem_FREE(ws2); + if (ws1) PyMem_Free(ws1); + if (ws2) PyMem_Free(ws2); return result; } #endif diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c index 8732750e11b..9a2d1f85c92 100644 --- a/Modules/_multiprocessing/semaphore.c +++ b/Modules/_multiprocessing/semaphore.c @@ -571,7 +571,7 @@ semlock_dealloc(SemLockObject* self) if (self->handle != SEM_FAILED) SEM_CLOSE(self->handle); PyMem_Free(self->name); - PyObject_Del(self); + PyObject_Free(self); } /*[clinic input] diff --git a/Modules/_pickle.c b/Modules/_pickle.c index ed8afefe4c7..5a8aad9de76 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -442,8 +442,8 @@ Pdata_dealloc(Pdata *self) while (--i >= 0) { Py_DECREF(self->data[i]); } - PyMem_FREE(self->data); - PyObject_Del(self); + PyMem_Free(self->data); + PyObject_Free(self); } static PyTypeObject Pdata_Type = { @@ -465,7 +465,7 @@ Pdata_New(void) self->mark_set = 0; self->fence = 0; self->allocated = 8; - self->data = PyMem_MALLOC(self->allocated * sizeof(PyObject *)); + self->data = PyMem_Malloc(self->allocated * sizeof(PyObject *)); if (self->data) return (PyObject *)self; Py_DECREF(self); @@ -726,7 +726,7 @@ static PyTypeObject Unpickler_Type; static PyMemoTable * PyMemoTable_New(void) { - PyMemoTable *memo = PyMem_MALLOC(sizeof(PyMemoTable)); + PyMemoTable *memo = PyMem_Malloc(sizeof(PyMemoTable)); if (memo == NULL) { PyErr_NoMemory(); return NULL; @@ -735,9 +735,9 @@ PyMemoTable_New(void) memo->mt_used = 0; memo->mt_allocated = MT_MINSIZE; memo->mt_mask = MT_MINSIZE - 1; - memo->mt_table = PyMem_MALLOC(MT_MINSIZE * sizeof(PyMemoEntry)); + memo->mt_table = PyMem_Malloc(MT_MINSIZE * sizeof(PyMemoEntry)); if (memo->mt_table == NULL) { - PyMem_FREE(memo); + PyMem_Free(memo); PyErr_NoMemory(); return NULL; } @@ -758,10 +758,10 @@ PyMemoTable_Copy(PyMemoTable *self) new->mt_mask = self->mt_mask; /* The table we get from _New() is probably smaller than we wanted. Free it and allocate one that's the right size. */ - PyMem_FREE(new->mt_table); + PyMem_Free(new->mt_table); new->mt_table = PyMem_NEW(PyMemoEntry, self->mt_allocated); if (new->mt_table == NULL) { - PyMem_FREE(new); + PyMem_Free(new); PyErr_NoMemory(); return NULL; } @@ -800,8 +800,8 @@ PyMemoTable_Del(PyMemoTable *self) return; PyMemoTable_Clear(self); - PyMem_FREE(self->mt_table); - PyMem_FREE(self); + PyMem_Free(self->mt_table); + PyMem_Free(self); } /* Since entries cannot be deleted from this hashtable, _PyMemoTable_Lookup() @@ -880,7 +880,7 @@ _PyMemoTable_ResizeTable(PyMemoTable *self, size_t min_size) } /* Deallocate the old table. */ - PyMem_FREE(oldtable); + PyMem_Free(oldtable); return 0; } @@ -1582,7 +1582,7 @@ _Unpickler_MemoCleanup(UnpicklerObject *self) while (--i >= 0) { Py_XDECREF(memo[i]); } - PyMem_FREE(memo); + PyMem_Free(memo); } static UnpicklerObject * @@ -7544,7 +7544,7 @@ Unpickler_set_memo(UnpicklerObject *self, PyObject *obj, void *Py_UNUSED(ignored for (size_t i = new_memo_size - 1; i != SIZE_MAX; i--) { Py_XDECREF(new_memo[i]); } - PyMem_FREE(new_memo); + PyMem_Free(new_memo); } return -1; } diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c index 46c41d3c20a..3b0651620e5 100644 --- a/Modules/_posixsubprocess.c +++ b/Modules/_posixsubprocess.c @@ -900,7 +900,7 @@ subprocess_fork_exec(PyObject *module, PyObject *args) if (groups_list != Py_None) { #ifdef HAVE_SETGROUPS Py_ssize_t i; - unsigned long gid; + gid_t gid; if (!PyList_Check(groups_list)) { PyErr_SetString(PyExc_TypeError, @@ -934,10 +934,6 @@ subprocess_fork_exec(PyObject *module, PyObject *args) Py_DECREF(elem); goto cleanup; } else { - /* In posixmodule.c UnsignedLong is used as a fallback value - * if the value provided does not fit in a Long. Since we are - * already doing the bounds checking on the Python side, we - * can go directly to an UnsignedLong here. */ if (!_Py_Gid_Converter(elem, &gid)) { Py_DECREF(elem); PyErr_SetString(PyExc_ValueError, "invalid group id"); diff --git a/Modules/_queuemodule.c b/Modules/_queuemodule.c index a2b6ac87a72..7a52617ade5 100644 --- a/Modules/_queuemodule.c +++ b/Modules/_queuemodule.c @@ -15,7 +15,7 @@ simplequeue_get_state(PyObject *module) return state; } static struct PyModuleDef queuemodule; -#define simplequeue_get_state_by_type(tp) \ +#define simplequeue_get_state_by_type(type) \ (simplequeue_get_state(_PyType_GetModuleByDef(type, &queuemodule))) typedef struct { diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c index ad4fd474428..99be69c0655 100644 --- a/Modules/_randommodule.c +++ b/Modules/_randommodule.c @@ -519,6 +519,7 @@ random_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { RandomObject *self; PyObject *tmp; + PyObject *arg = NULL; _randomstate *state = _randomstate_type(type); if (type == (PyTypeObject*)state->Random_Type && @@ -529,12 +530,22 @@ random_new(PyTypeObject *type, PyObject *args, PyObject *kwds) self = (RandomObject *)PyType_GenericAlloc(type, 0); if (self == NULL) return NULL; - tmp = random_seed(self, args); + + if (PyTuple_GET_SIZE(args) > 1) { + PyErr_SetString(PyExc_TypeError, "Random() requires 0 or 1 argument"); + return NULL; + } + + if (PyTuple_GET_SIZE(args) == 1) + arg = PyTuple_GET_ITEM(args, 0); + + tmp = random_seed(self, arg); if (tmp == NULL) { Py_DECREF(self); return NULL; } Py_DECREF(tmp); + return (PyObject *)self; } diff --git a/Modules/_sha3/sha3module.c b/Modules/_sha3/sha3module.c index da6dde6812f..cae10f99d5b 100644 --- a/Modules/_sha3/sha3module.c +++ b/Modules/_sha3/sha3module.c @@ -274,7 +274,7 @@ SHA3_dealloc(SHA3object *self) } PyTypeObject *tp = Py_TYPE(self); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } diff --git a/Modules/_sqlite/cache.c b/Modules/_sqlite/cache.c index 8cedd07b459..078a484b86c 100644 --- a/Modules/_sqlite/cache.c +++ b/Modules/_sqlite/cache.c @@ -34,11 +34,8 @@ pysqlite_Node* pysqlite_new_node(PyObject* key, PyObject* data) return NULL; } - Py_INCREF(key); - node->key = key; - - Py_INCREF(data); - node->data = data; + node->key = Py_NewRef(key); + node->data = Py_NewRef(data); node->prev = NULL; node->next = NULL; @@ -81,8 +78,7 @@ int pysqlite_cache_init(pysqlite_Cache* self, PyObject* args, PyObject* kwargs) return -1; } - Py_INCREF(factory); - self->factory = factory; + self->factory = Py_NewRef(factory); self->decref_factory = 1; @@ -218,8 +214,7 @@ PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* key) self->last = node; } - Py_INCREF(node->data); - return node->data; + return Py_NewRef(node->data); } PyObject* pysqlite_cache_display(pysqlite_Cache* self, PyObject* args) diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h new file mode 100644 index 00000000000..01b8e37a957 --- /dev/null +++ b/Modules/_sqlite/clinic/connection.c.h @@ -0,0 +1,722 @@ +/*[clinic input] +preserve +[clinic start generated code]*/ + +PyDoc_STRVAR(pysqlite_connection_cursor__doc__, +"cursor($self, /, factory=)\n" +"--\n" +"\n" +"Return a cursor for the connection."); + +#define PYSQLITE_CONNECTION_CURSOR_METHODDEF \ + {"cursor", (PyCFunction)(void(*)(void))pysqlite_connection_cursor, METH_FASTCALL|METH_KEYWORDS, pysqlite_connection_cursor__doc__}, + +static PyObject * +pysqlite_connection_cursor_impl(pysqlite_Connection *self, PyObject *factory); + +static PyObject * +pysqlite_connection_cursor(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"factory", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "cursor", 0}; + PyObject *argsbuf[1]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; + PyObject *factory = NULL; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + if (!args) { + goto exit; + } + if (!noptargs) { + goto skip_optional_pos; + } + factory = args[0]; +skip_optional_pos: + return_value = pysqlite_connection_cursor_impl(self, factory); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_connection_close__doc__, +"close($self, /)\n" +"--\n" +"\n" +"Closes the connection."); + +#define PYSQLITE_CONNECTION_CLOSE_METHODDEF \ + {"close", (PyCFunction)pysqlite_connection_close, METH_NOARGS, pysqlite_connection_close__doc__}, + +static PyObject * +pysqlite_connection_close_impl(pysqlite_Connection *self); + +static PyObject * +pysqlite_connection_close(pysqlite_Connection *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_connection_close_impl(self); +} + +PyDoc_STRVAR(pysqlite_connection_commit__doc__, +"commit($self, /)\n" +"--\n" +"\n" +"Commit the current transaction."); + +#define PYSQLITE_CONNECTION_COMMIT_METHODDEF \ + {"commit", (PyCFunction)pysqlite_connection_commit, METH_NOARGS, pysqlite_connection_commit__doc__}, + +static PyObject * +pysqlite_connection_commit_impl(pysqlite_Connection *self); + +static PyObject * +pysqlite_connection_commit(pysqlite_Connection *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_connection_commit_impl(self); +} + +PyDoc_STRVAR(pysqlite_connection_rollback__doc__, +"rollback($self, /)\n" +"--\n" +"\n" +"Roll back the current transaction."); + +#define PYSQLITE_CONNECTION_ROLLBACK_METHODDEF \ + {"rollback", (PyCFunction)pysqlite_connection_rollback, METH_NOARGS, pysqlite_connection_rollback__doc__}, + +static PyObject * +pysqlite_connection_rollback_impl(pysqlite_Connection *self); + +static PyObject * +pysqlite_connection_rollback(pysqlite_Connection *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_connection_rollback_impl(self); +} + +PyDoc_STRVAR(pysqlite_connection_create_function__doc__, +"create_function($self, /, name, narg, func, *, deterministic=False)\n" +"--\n" +"\n" +"Creates a new function. Non-standard."); + +#define PYSQLITE_CONNECTION_CREATE_FUNCTION_METHODDEF \ + {"create_function", (PyCFunction)(void(*)(void))pysqlite_connection_create_function, METH_FASTCALL|METH_KEYWORDS, pysqlite_connection_create_function__doc__}, + +static PyObject * +pysqlite_connection_create_function_impl(pysqlite_Connection *self, + const char *name, int narg, + PyObject *func, int deterministic); + +static PyObject * +pysqlite_connection_create_function(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"name", "narg", "func", "deterministic", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "create_function", 0}; + PyObject *argsbuf[4]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 3; + const char *name; + int narg; + PyObject *func; + int deterministic = 0; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + if (!args) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("create_function", "argument 'name'", "str", args[0]); + goto exit; + } + Py_ssize_t name_length; + name = PyUnicode_AsUTF8AndSize(args[0], &name_length); + if (name == NULL) { + goto exit; + } + if (strlen(name) != (size_t)name_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + narg = _PyLong_AsInt(args[1]); + if (narg == -1 && PyErr_Occurred()) { + goto exit; + } + func = args[2]; + if (!noptargs) { + goto skip_optional_kwonly; + } + deterministic = PyObject_IsTrue(args[3]); + if (deterministic < 0) { + goto exit; + } +skip_optional_kwonly: + return_value = pysqlite_connection_create_function_impl(self, name, narg, func, deterministic); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_connection_create_aggregate__doc__, +"create_aggregate($self, /, name, n_arg, aggregate_class)\n" +"--\n" +"\n" +"Creates a new aggregate. Non-standard."); + +#define PYSQLITE_CONNECTION_CREATE_AGGREGATE_METHODDEF \ + {"create_aggregate", (PyCFunction)(void(*)(void))pysqlite_connection_create_aggregate, METH_FASTCALL|METH_KEYWORDS, pysqlite_connection_create_aggregate__doc__}, + +static PyObject * +pysqlite_connection_create_aggregate_impl(pysqlite_Connection *self, + const char *name, int n_arg, + PyObject *aggregate_class); + +static PyObject * +pysqlite_connection_create_aggregate(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"name", "n_arg", "aggregate_class", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "create_aggregate", 0}; + PyObject *argsbuf[3]; + const char *name; + int n_arg; + PyObject *aggregate_class; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + if (!args) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("create_aggregate", "argument 'name'", "str", args[0]); + goto exit; + } + Py_ssize_t name_length; + name = PyUnicode_AsUTF8AndSize(args[0], &name_length); + if (name == NULL) { + goto exit; + } + if (strlen(name) != (size_t)name_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + n_arg = _PyLong_AsInt(args[1]); + if (n_arg == -1 && PyErr_Occurred()) { + goto exit; + } + aggregate_class = args[2]; + return_value = pysqlite_connection_create_aggregate_impl(self, name, n_arg, aggregate_class); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_connection_set_authorizer__doc__, +"set_authorizer($self, /, authorizer_callback)\n" +"--\n" +"\n" +"Sets authorizer callback. Non-standard."); + +#define PYSQLITE_CONNECTION_SET_AUTHORIZER_METHODDEF \ + {"set_authorizer", (PyCFunction)(void(*)(void))pysqlite_connection_set_authorizer, METH_FASTCALL|METH_KEYWORDS, pysqlite_connection_set_authorizer__doc__}, + +static PyObject * +pysqlite_connection_set_authorizer_impl(pysqlite_Connection *self, + PyObject *authorizer_cb); + +static PyObject * +pysqlite_connection_set_authorizer(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"authorizer_callback", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "set_authorizer", 0}; + PyObject *argsbuf[1]; + PyObject *authorizer_cb; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + if (!args) { + goto exit; + } + authorizer_cb = args[0]; + return_value = pysqlite_connection_set_authorizer_impl(self, authorizer_cb); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_connection_set_progress_handler__doc__, +"set_progress_handler($self, /, progress_handler, n)\n" +"--\n" +"\n" +"Sets progress handler callback. Non-standard."); + +#define PYSQLITE_CONNECTION_SET_PROGRESS_HANDLER_METHODDEF \ + {"set_progress_handler", (PyCFunction)(void(*)(void))pysqlite_connection_set_progress_handler, METH_FASTCALL|METH_KEYWORDS, pysqlite_connection_set_progress_handler__doc__}, + +static PyObject * +pysqlite_connection_set_progress_handler_impl(pysqlite_Connection *self, + PyObject *progress_handler, + int n); + +static PyObject * +pysqlite_connection_set_progress_handler(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"progress_handler", "n", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "set_progress_handler", 0}; + PyObject *argsbuf[2]; + PyObject *progress_handler; + int n; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + if (!args) { + goto exit; + } + progress_handler = args[0]; + n = _PyLong_AsInt(args[1]); + if (n == -1 && PyErr_Occurred()) { + goto exit; + } + return_value = pysqlite_connection_set_progress_handler_impl(self, progress_handler, n); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_connection_set_trace_callback__doc__, +"set_trace_callback($self, /, trace_callback)\n" +"--\n" +"\n" +"Sets a trace callback called for each SQL statement (passed as unicode).\n" +"\n" +"Non-standard."); + +#define PYSQLITE_CONNECTION_SET_TRACE_CALLBACK_METHODDEF \ + {"set_trace_callback", (PyCFunction)(void(*)(void))pysqlite_connection_set_trace_callback, METH_FASTCALL|METH_KEYWORDS, pysqlite_connection_set_trace_callback__doc__}, + +static PyObject * +pysqlite_connection_set_trace_callback_impl(pysqlite_Connection *self, + PyObject *trace_callback); + +static PyObject * +pysqlite_connection_set_trace_callback(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"trace_callback", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "set_trace_callback", 0}; + PyObject *argsbuf[1]; + PyObject *trace_callback; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + if (!args) { + goto exit; + } + trace_callback = args[0]; + return_value = pysqlite_connection_set_trace_callback_impl(self, trace_callback); + +exit: + return return_value; +} + +#if !defined(SQLITE_OMIT_LOAD_EXTENSION) + +PyDoc_STRVAR(pysqlite_connection_enable_load_extension__doc__, +"enable_load_extension($self, enable, /)\n" +"--\n" +"\n" +"Enable dynamic loading of SQLite extension modules. Non-standard."); + +#define PYSQLITE_CONNECTION_ENABLE_LOAD_EXTENSION_METHODDEF \ + {"enable_load_extension", (PyCFunction)pysqlite_connection_enable_load_extension, METH_O, pysqlite_connection_enable_load_extension__doc__}, + +static PyObject * +pysqlite_connection_enable_load_extension_impl(pysqlite_Connection *self, + int onoff); + +static PyObject * +pysqlite_connection_enable_load_extension(pysqlite_Connection *self, PyObject *arg) +{ + PyObject *return_value = NULL; + int onoff; + + onoff = _PyLong_AsInt(arg); + if (onoff == -1 && PyErr_Occurred()) { + goto exit; + } + return_value = pysqlite_connection_enable_load_extension_impl(self, onoff); + +exit: + return return_value; +} + +#endif /* !defined(SQLITE_OMIT_LOAD_EXTENSION) */ + +#if !defined(SQLITE_OMIT_LOAD_EXTENSION) + +PyDoc_STRVAR(pysqlite_connection_load_extension__doc__, +"load_extension($self, name, /)\n" +"--\n" +"\n" +"Load SQLite extension module. Non-standard."); + +#define PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF \ + {"load_extension", (PyCFunction)pysqlite_connection_load_extension, METH_O, pysqlite_connection_load_extension__doc__}, + +static PyObject * +pysqlite_connection_load_extension_impl(pysqlite_Connection *self, + const char *extension_name); + +static PyObject * +pysqlite_connection_load_extension(pysqlite_Connection *self, PyObject *arg) +{ + PyObject *return_value = NULL; + const char *extension_name; + + if (!PyUnicode_Check(arg)) { + _PyArg_BadArgument("load_extension", "argument", "str", arg); + goto exit; + } + Py_ssize_t extension_name_length; + extension_name = PyUnicode_AsUTF8AndSize(arg, &extension_name_length); + if (extension_name == NULL) { + goto exit; + } + if (strlen(extension_name) != (size_t)extension_name_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + return_value = pysqlite_connection_load_extension_impl(self, extension_name); + +exit: + return return_value; +} + +#endif /* !defined(SQLITE_OMIT_LOAD_EXTENSION) */ + +PyDoc_STRVAR(pysqlite_connection_execute__doc__, +"execute($self, sql, parameters=, /)\n" +"--\n" +"\n" +"Executes a SQL statement. Non-standard."); + +#define PYSQLITE_CONNECTION_EXECUTE_METHODDEF \ + {"execute", (PyCFunction)(void(*)(void))pysqlite_connection_execute, METH_FASTCALL, pysqlite_connection_execute__doc__}, + +static PyObject * +pysqlite_connection_execute_impl(pysqlite_Connection *self, PyObject *sql, + PyObject *parameters); + +static PyObject * +pysqlite_connection_execute(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *sql; + PyObject *parameters = NULL; + + if (!_PyArg_CheckPositional("execute", nargs, 1, 2)) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("execute", "argument 1", "str", args[0]); + goto exit; + } + if (PyUnicode_READY(args[0]) == -1) { + goto exit; + } + sql = args[0]; + if (nargs < 2) { + goto skip_optional; + } + parameters = args[1]; +skip_optional: + return_value = pysqlite_connection_execute_impl(self, sql, parameters); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_connection_executemany__doc__, +"executemany($self, sql, parameters, /)\n" +"--\n" +"\n" +"Repeatedly executes a SQL statement. Non-standard."); + +#define PYSQLITE_CONNECTION_EXECUTEMANY_METHODDEF \ + {"executemany", (PyCFunction)(void(*)(void))pysqlite_connection_executemany, METH_FASTCALL, pysqlite_connection_executemany__doc__}, + +static PyObject * +pysqlite_connection_executemany_impl(pysqlite_Connection *self, + PyObject *sql, PyObject *parameters); + +static PyObject * +pysqlite_connection_executemany(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *sql; + PyObject *parameters; + + if (!_PyArg_CheckPositional("executemany", nargs, 2, 2)) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("executemany", "argument 1", "str", args[0]); + goto exit; + } + if (PyUnicode_READY(args[0]) == -1) { + goto exit; + } + sql = args[0]; + parameters = args[1]; + return_value = pysqlite_connection_executemany_impl(self, sql, parameters); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_connection_executescript__doc__, +"executescript($self, sql_script, /)\n" +"--\n" +"\n" +"Executes a multiple SQL statements at once. Non-standard."); + +#define PYSQLITE_CONNECTION_EXECUTESCRIPT_METHODDEF \ + {"executescript", (PyCFunction)pysqlite_connection_executescript, METH_O, pysqlite_connection_executescript__doc__}, + +PyDoc_STRVAR(pysqlite_connection_interrupt__doc__, +"interrupt($self, /)\n" +"--\n" +"\n" +"Abort any pending database operation. Non-standard."); + +#define PYSQLITE_CONNECTION_INTERRUPT_METHODDEF \ + {"interrupt", (PyCFunction)pysqlite_connection_interrupt, METH_NOARGS, pysqlite_connection_interrupt__doc__}, + +static PyObject * +pysqlite_connection_interrupt_impl(pysqlite_Connection *self); + +static PyObject * +pysqlite_connection_interrupt(pysqlite_Connection *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_connection_interrupt_impl(self); +} + +PyDoc_STRVAR(pysqlite_connection_iterdump__doc__, +"iterdump($self, /)\n" +"--\n" +"\n" +"Returns iterator to the dump of the database in an SQL text format.\n" +"\n" +"Non-standard."); + +#define PYSQLITE_CONNECTION_ITERDUMP_METHODDEF \ + {"iterdump", (PyCFunction)pysqlite_connection_iterdump, METH_NOARGS, pysqlite_connection_iterdump__doc__}, + +static PyObject * +pysqlite_connection_iterdump_impl(pysqlite_Connection *self); + +static PyObject * +pysqlite_connection_iterdump(pysqlite_Connection *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_connection_iterdump_impl(self); +} + +PyDoc_STRVAR(pysqlite_connection_backup__doc__, +"backup($self, /, target=, *, pages=-1, progress=None,\n" +" name=\'main\', sleep=0.25)\n" +"--\n" +"\n" +"Makes a backup of the database. Non-standard."); + +#define PYSQLITE_CONNECTION_BACKUP_METHODDEF \ + {"backup", (PyCFunction)(void(*)(void))pysqlite_connection_backup, METH_FASTCALL|METH_KEYWORDS, pysqlite_connection_backup__doc__}, + +static PyObject * +pysqlite_connection_backup_impl(pysqlite_Connection *self, + pysqlite_Connection *target, int pages, + PyObject *progress, const char *name, + double sleep); + +static PyObject * +pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"target", "pages", "progress", "name", "sleep", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "backup", 0}; + PyObject *argsbuf[5]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; + pysqlite_Connection *target = NULL; + int pages = -1; + PyObject *progress = Py_None; + const char *name = "main"; + double sleep = 0.25; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + if (!args) { + goto exit; + } + if (!noptargs) { + goto skip_optional_pos; + } + if (args[0]) { + if (!PyObject_TypeCheck(args[0], pysqlite_ConnectionType)) { + _PyArg_BadArgument("backup", "argument 'target'", (pysqlite_ConnectionType)->tp_name, args[0]); + goto exit; + } + target = (pysqlite_Connection *)args[0]; + if (!--noptargs) { + goto skip_optional_pos; + } + } +skip_optional_pos: + if (!noptargs) { + goto skip_optional_kwonly; + } + if (args[1]) { + pages = _PyLong_AsInt(args[1]); + if (pages == -1 && PyErr_Occurred()) { + goto exit; + } + if (!--noptargs) { + goto skip_optional_kwonly; + } + } + if (args[2]) { + progress = args[2]; + if (!--noptargs) { + goto skip_optional_kwonly; + } + } + if (args[3]) { + if (!PyUnicode_Check(args[3])) { + _PyArg_BadArgument("backup", "argument 'name'", "str", args[3]); + goto exit; + } + Py_ssize_t name_length; + name = PyUnicode_AsUTF8AndSize(args[3], &name_length); + if (name == NULL) { + goto exit; + } + if (strlen(name) != (size_t)name_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + if (!--noptargs) { + goto skip_optional_kwonly; + } + } + if (PyFloat_CheckExact(args[4])) { + sleep = PyFloat_AS_DOUBLE(args[4]); + } + else + { + sleep = PyFloat_AsDouble(args[4]); + if (sleep == -1.0 && PyErr_Occurred()) { + goto exit; + } + } +skip_optional_kwonly: + return_value = pysqlite_connection_backup_impl(self, target, pages, progress, name, sleep); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_connection_create_collation__doc__, +"create_collation($self, name, callback, /)\n" +"--\n" +"\n" +"Creates a collation function. Non-standard."); + +#define PYSQLITE_CONNECTION_CREATE_COLLATION_METHODDEF \ + {"create_collation", (PyCFunction)(void(*)(void))pysqlite_connection_create_collation, METH_FASTCALL, pysqlite_connection_create_collation__doc__}, + +static PyObject * +pysqlite_connection_create_collation_impl(pysqlite_Connection *self, + PyObject *name, PyObject *callable); + +static PyObject * +pysqlite_connection_create_collation(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *name; + PyObject *callable; + + if (!_PyArg_CheckPositional("create_collation", nargs, 2, 2)) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("create_collation", "argument 1", "str", args[0]); + goto exit; + } + if (PyUnicode_READY(args[0]) == -1) { + goto exit; + } + name = args[0]; + callable = args[1]; + return_value = pysqlite_connection_create_collation_impl(self, name, callable); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_connection_enter__doc__, +"__enter__($self, /)\n" +"--\n" +"\n" +"Called when the connection is used as a context manager.\n" +"\n" +"Returns itself as a convenience to the caller."); + +#define PYSQLITE_CONNECTION_ENTER_METHODDEF \ + {"__enter__", (PyCFunction)pysqlite_connection_enter, METH_NOARGS, pysqlite_connection_enter__doc__}, + +static PyObject * +pysqlite_connection_enter_impl(pysqlite_Connection *self); + +static PyObject * +pysqlite_connection_enter(pysqlite_Connection *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_connection_enter_impl(self); +} + +PyDoc_STRVAR(pysqlite_connection_exit__doc__, +"__exit__($self, type, value, traceback, /)\n" +"--\n" +"\n" +"Called when the connection is used as a context manager.\n" +"\n" +"If there was any exception, a rollback takes place; otherwise we commit."); + +#define PYSQLITE_CONNECTION_EXIT_METHODDEF \ + {"__exit__", (PyCFunction)(void(*)(void))pysqlite_connection_exit, METH_FASTCALL, pysqlite_connection_exit__doc__}, + +static PyObject * +pysqlite_connection_exit_impl(pysqlite_Connection *self, PyObject *exc_type, + PyObject *exc_value, PyObject *exc_tb); + +static PyObject * +pysqlite_connection_exit(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_tb; + + if (!_PyArg_CheckPositional("__exit__", nargs, 3, 3)) { + goto exit; + } + exc_type = args[0]; + exc_value = args[1]; + exc_tb = args[2]; + return_value = pysqlite_connection_exit_impl(self, exc_type, exc_value, exc_tb); + +exit: + return return_value; +} + +#ifndef PYSQLITE_CONNECTION_ENABLE_LOAD_EXTENSION_METHODDEF + #define PYSQLITE_CONNECTION_ENABLE_LOAD_EXTENSION_METHODDEF +#endif /* !defined(PYSQLITE_CONNECTION_ENABLE_LOAD_EXTENSION_METHODDEF) */ + +#ifndef PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF + #define PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF +#endif /* !defined(PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF) */ +/*[clinic end generated code: output=7cb13d491a5970aa input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/row.c.h b/Modules/_sqlite/clinic/row.c.h new file mode 100644 index 00000000000..7ff110940d0 --- /dev/null +++ b/Modules/_sqlite/clinic/row.c.h @@ -0,0 +1,56 @@ +/*[clinic input] +preserve +[clinic start generated code]*/ + +static PyObject * +pysqlite_row_new_impl(PyTypeObject *type, pysqlite_Cursor *cursor, + PyObject *data); + +static PyObject * +pysqlite_row_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + pysqlite_Cursor *cursor; + PyObject *data; + + if ((type == pysqlite_RowType) && + !_PyArg_NoKeywords("Row", kwargs)) { + goto exit; + } + if (!_PyArg_CheckPositional("Row", PyTuple_GET_SIZE(args), 2, 2)) { + goto exit; + } + if (!PyObject_TypeCheck(PyTuple_GET_ITEM(args, 0), pysqlite_CursorType)) { + _PyArg_BadArgument("Row", "argument 1", (pysqlite_CursorType)->tp_name, PyTuple_GET_ITEM(args, 0)); + goto exit; + } + cursor = (pysqlite_Cursor *)PyTuple_GET_ITEM(args, 0); + if (!PyTuple_Check(PyTuple_GET_ITEM(args, 1))) { + _PyArg_BadArgument("Row", "argument 2", "tuple", PyTuple_GET_ITEM(args, 1)); + goto exit; + } + data = PyTuple_GET_ITEM(args, 1); + return_value = pysqlite_row_new_impl(type, cursor, data); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_row_keys__doc__, +"keys($self, /)\n" +"--\n" +"\n" +"Returns the keys of the row."); + +#define PYSQLITE_ROW_KEYS_METHODDEF \ + {"keys", (PyCFunction)pysqlite_row_keys, METH_NOARGS, pysqlite_row_keys__doc__}, + +static PyObject * +pysqlite_row_keys_impl(pysqlite_Row *self); + +static PyObject * +pysqlite_row_keys(pysqlite_Row *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_row_keys_impl(self); +} +/*[clinic end generated code: output=8d29220b9cde035d input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 69203f85e05..1e23daca445 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -37,6 +37,13 @@ #define HAVE_TRACE_V2 #endif +#include "clinic/connection.c.h" +/*[clinic input] +module _sqlite3 +class _sqlite3.Connection "pysqlite_Connection *" "pysqlite_ConnectionType" +[clinic start generated code]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=aa796073bd8f69db]*/ + _Py_IDENTIFIER(cursor); static const char * const begin_statements[] = { @@ -269,16 +276,19 @@ error: return 0; } -PyObject* pysqlite_connection_cursor(pysqlite_Connection* self, PyObject* args, PyObject* kwargs) -{ - static char *kwlist[] = {"factory", NULL}; - PyObject* factory = NULL; - PyObject* cursor; +/*[clinic input] +_sqlite3.Connection.cursor as pysqlite_connection_cursor - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", kwlist, - &factory)) { - return NULL; - } + factory: object = NULL + +Return a cursor for the connection. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_cursor_impl(pysqlite_Connection *self, PyObject *factory) +/*[clinic end generated code: output=562432a9e6af2aa1 input=4127345aa091b650]*/ +{ + PyObject* cursor; if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) { return NULL; @@ -309,7 +319,15 @@ PyObject* pysqlite_connection_cursor(pysqlite_Connection* self, PyObject* args, return cursor; } -PyObject* pysqlite_connection_close(pysqlite_Connection* self, PyObject* args) +/*[clinic input] +_sqlite3.Connection.close as pysqlite_connection_close + +Closes the connection. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_close_impl(pysqlite_Connection *self) +/*[clinic end generated code: output=a546a0da212c9b97 input=3d58064bbffaa3d3]*/ { int rc; @@ -389,7 +407,15 @@ error: } } -PyObject* pysqlite_connection_commit(pysqlite_Connection* self, PyObject* args) +/*[clinic input] +_sqlite3.Connection.commit as pysqlite_connection_commit + +Commit the current transaction. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_commit_impl(pysqlite_Connection *self) +/*[clinic end generated code: output=3da45579e89407f2 input=39c12c04dda276a8]*/ { int rc; const char* tail; @@ -431,7 +457,15 @@ error: } } -PyObject* pysqlite_connection_rollback(pysqlite_Connection* self, PyObject* args) +/*[clinic input] +_sqlite3.Connection.rollback as pysqlite_connection_rollback + +Roll back the current transaction. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_rollback_impl(pysqlite_Connection *self) +/*[clinic end generated code: output=b66fa0d43e7ef305 input=12d4e8d068942830]*/ { int rc; const char* tail; @@ -541,8 +575,7 @@ PyObject* _pysqlite_build_py_params(sqlite3_context *context, int argc, sqlite3_ /* TODO: have a way to show errors here */ if (!cur_py_value) { PyErr_Clear(); - Py_INCREF(Py_None); - cur_py_value = Py_None; + cur_py_value = Py_NewRef(Py_None); } break; case SQLITE_BLOB: @@ -552,8 +585,7 @@ PyObject* _pysqlite_build_py_params(sqlite3_context *context, int argc, sqlite3_ break; case SQLITE_NULL: default: - Py_INCREF(Py_None); - cur_py_value = Py_None; + cur_py_value = Py_NewRef(Py_None); } if (!cur_py_value) { @@ -780,27 +812,31 @@ static void _destructor(void* args) Py_DECREF((PyObject*)args); } -PyObject* pysqlite_connection_create_function(pysqlite_Connection* self, PyObject* args, PyObject* kwargs) -{ - static char *kwlist[] = {"name", "narg", "func", "deterministic", NULL}; +/*[clinic input] +_sqlite3.Connection.create_function as pysqlite_connection_create_function - PyObject* func; - char* name; - int narg; + name: str + narg: int + func: object + * + deterministic: bool = False + +Creates a new function. Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_create_function_impl(pysqlite_Connection *self, + const char *name, int narg, + PyObject *func, int deterministic) +/*[clinic end generated code: output=07d1877dd98c0308 input=f2edcf073e815beb]*/ +{ int rc; - int deterministic = 0; int flags = SQLITE_UTF8; if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) { return NULL; } - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "siO|$p", kwlist, - &name, &narg, &func, &deterministic)) - { - return NULL; - } - if (deterministic) { #if SQLITE_VERSION_NUMBER < 3008003 PyErr_SetString(pysqlite_NotSupportedError, @@ -815,12 +851,11 @@ PyObject* pysqlite_connection_create_function(pysqlite_Connection* self, PyObjec flags |= SQLITE_DETERMINISTIC; #endif } - Py_INCREF(func); rc = sqlite3_create_function_v2(self->db, name, narg, flags, - (void*)func, + (void*)Py_NewRef(func), _pysqlite_func_callback, NULL, NULL, @@ -834,29 +869,33 @@ PyObject* pysqlite_connection_create_function(pysqlite_Connection* self, PyObjec Py_RETURN_NONE; } -PyObject* pysqlite_connection_create_aggregate(pysqlite_Connection* self, PyObject* args, PyObject* kwargs) -{ - PyObject* aggregate_class; +/*[clinic input] +_sqlite3.Connection.create_aggregate as pysqlite_connection_create_aggregate - int n_arg; - char* name; - static char *kwlist[] = { "name", "n_arg", "aggregate_class", NULL }; + name: str + n_arg: int + aggregate_class: object + +Creates a new aggregate. Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_create_aggregate_impl(pysqlite_Connection *self, + const char *name, int n_arg, + PyObject *aggregate_class) +/*[clinic end generated code: output=fbb2f858cfa4d8db input=c2e13bbf234500a5]*/ +{ int rc; if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) { return NULL; } - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "siO:create_aggregate", - kwlist, &name, &n_arg, &aggregate_class)) { - return NULL; - } - Py_INCREF(aggregate_class); rc = sqlite3_create_function_v2(self->db, name, n_arg, SQLITE_UTF8, - (void*)aggregate_class, + (void*)Py_NewRef(aggregate_class), 0, &_pysqlite_step_callback, &_pysqlite_final_callback, @@ -982,22 +1021,25 @@ static void _trace_callback(void* user_arg, const char* statement_string) #endif } -static PyObject* pysqlite_connection_set_authorizer(pysqlite_Connection* self, PyObject* args, PyObject* kwargs) -{ - PyObject* authorizer_cb; +/*[clinic input] +_sqlite3.Connection.set_authorizer as pysqlite_connection_set_authorizer - static char *kwlist[] = { "authorizer_callback", NULL }; + authorizer_callback as authorizer_cb: object + +Sets authorizer callback. Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_set_authorizer_impl(pysqlite_Connection *self, + PyObject *authorizer_cb) +/*[clinic end generated code: output=f18ba575d788b35c input=df079724c020d2f2]*/ +{ int rc; if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) { return NULL; } - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:set_authorizer", - kwlist, &authorizer_cb)) { - return NULL; - } - rc = sqlite3_set_authorizer(self->db, _authorizer_callback, (void*)authorizer_cb); if (rc != SQLITE_OK) { PyErr_SetString(pysqlite_OperationalError, "Error setting authorizer callback"); @@ -1010,22 +1052,25 @@ static PyObject* pysqlite_connection_set_authorizer(pysqlite_Connection* self, P Py_RETURN_NONE; } -static PyObject* pysqlite_connection_set_progress_handler(pysqlite_Connection* self, PyObject* args, PyObject* kwargs) +/*[clinic input] +_sqlite3.Connection.set_progress_handler as pysqlite_connection_set_progress_handler + + progress_handler: object + n: int + +Sets progress handler callback. Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_set_progress_handler_impl(pysqlite_Connection *self, + PyObject *progress_handler, + int n) +/*[clinic end generated code: output=35a7c10364cb1b04 input=857696c25f964c64]*/ { - PyObject* progress_handler; - int n; - - static char *kwlist[] = { "progress_handler", "n", NULL }; - if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) { return NULL; } - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi:set_progress_handler", - kwlist, &progress_handler, &n)) { - return NULL; - } - if (progress_handler == Py_None) { /* None clears the progress handler previously set */ sqlite3_progress_handler(self->db, 0, 0, (void*)0); @@ -1038,28 +1083,33 @@ static PyObject* pysqlite_connection_set_progress_handler(pysqlite_Connection* s Py_RETURN_NONE; } -/* - * Ref. - * - https://sqlite.org/c3ref/c_trace.html - * - https://sqlite.org/c3ref/trace_v2.html - */ -static PyObject* pysqlite_connection_set_trace_callback(pysqlite_Connection* self, PyObject* args, PyObject* kwargs) +/*[clinic input] +_sqlite3.Connection.set_trace_callback as pysqlite_connection_set_trace_callback + + trace_callback: object + +Sets a trace callback called for each SQL statement (passed as unicode). + +Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_set_trace_callback_impl(pysqlite_Connection *self, + PyObject *trace_callback) +/*[clinic end generated code: output=fb0e307b9924d454 input=56d60fd38d763679]*/ { - PyObject* trace_callback; - - static char *kwlist[] = { "trace_callback", NULL }; - if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) { return NULL; } - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:set_trace_callback", - kwlist, &trace_callback)) { - return NULL; - } - if (trace_callback == Py_None) { - /* None clears the trace callback previously set */ + /* + * None clears the trace callback previously set + * + * Ref. + * - https://sqlite.org/c3ref/c_trace.html + * - https://sqlite.org/c3ref/trace_v2.html + */ #ifdef HAVE_TRACE_V2 sqlite3_trace_v2(self->db, SQLITE_TRACE_STMT, 0, 0); #else @@ -1080,19 +1130,26 @@ static PyObject* pysqlite_connection_set_trace_callback(pysqlite_Connection* sel } #ifndef SQLITE_OMIT_LOAD_EXTENSION -static PyObject* pysqlite_enable_load_extension(pysqlite_Connection* self, PyObject* args) +/*[clinic input] +_sqlite3.Connection.enable_load_extension as pysqlite_connection_enable_load_extension + + enable as onoff: bool(accept={int}) + / + +Enable dynamic loading of SQLite extension modules. Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_enable_load_extension_impl(pysqlite_Connection *self, + int onoff) +/*[clinic end generated code: output=9cac37190d388baf input=5c0da5b121121cbc]*/ { int rc; - int onoff; if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) { return NULL; } - if (!PyArg_ParseTuple(args, "i", &onoff)) { - return NULL; - } - rc = sqlite3_enable_load_extension(self->db, onoff); if (rc != SQLITE_OK) { @@ -1103,20 +1160,27 @@ static PyObject* pysqlite_enable_load_extension(pysqlite_Connection* self, PyObj } } -static PyObject* pysqlite_load_extension(pysqlite_Connection* self, PyObject* args) +/*[clinic input] +_sqlite3.Connection.load_extension as pysqlite_connection_load_extension + + name as extension_name: str + / + +Load SQLite extension module. Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_load_extension_impl(pysqlite_Connection *self, + const char *extension_name) +/*[clinic end generated code: output=47eb1d7312bc97a7 input=0b711574560db9fc]*/ { int rc; - char* extension_name; char* errmsg; if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) { return NULL; } - if (!PyArg_ParseTuple(args, "s", &extension_name)) { - return NULL; - } - rc = sqlite3_load_extension(self->db, extension_name, 0, &errmsg); if (rc != 0) { PyErr_SetString(pysqlite_OperationalError, errmsg); @@ -1144,8 +1208,7 @@ int pysqlite_check_thread(pysqlite_Connection* self) static PyObject* pysqlite_connection_get_isolation_level(pysqlite_Connection* self, void* unused) { - Py_INCREF(self->isolation_level); - return self->isolation_level; + return Py_NewRef(self->isolation_level); } static PyObject* pysqlite_connection_get_total_changes(pysqlite_Connection* self, void* unused) @@ -1279,89 +1342,108 @@ error: return NULL; } -PyObject* pysqlite_connection_execute(pysqlite_Connection* self, PyObject* args) +/*[clinic input] +_sqlite3.Connection.execute as pysqlite_connection_execute + + sql: unicode + parameters: object = NULL + / + +Executes a SQL statement. Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_execute_impl(pysqlite_Connection *self, PyObject *sql, + PyObject *parameters) +/*[clinic end generated code: output=5be05ae01ee17ee4 input=fbd17c75c7140271]*/ { + _Py_IDENTIFIER(execute); PyObject* cursor = 0; PyObject* result = 0; - PyObject* method = 0; cursor = _PyObject_CallMethodIdNoArgs((PyObject*)self, &PyId_cursor); if (!cursor) { goto error; } - method = PyObject_GetAttrString(cursor, "execute"); - if (!method) { - Py_CLEAR(cursor); - goto error; - } - - result = PyObject_CallObject(method, args); + result = _PyObject_CallMethodIdObjArgs(cursor, &PyId_execute, sql, parameters, NULL); if (!result) { Py_CLEAR(cursor); } error: Py_XDECREF(result); - Py_XDECREF(method); return cursor; } -PyObject* pysqlite_connection_executemany(pysqlite_Connection* self, PyObject* args) +/*[clinic input] +_sqlite3.Connection.executemany as pysqlite_connection_executemany + + sql: unicode + parameters: object + / + +Repeatedly executes a SQL statement. Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_executemany_impl(pysqlite_Connection *self, + PyObject *sql, PyObject *parameters) +/*[clinic end generated code: output=776cd2fd20bfe71f input=4feab80659ffc82b]*/ { + _Py_IDENTIFIER(executemany); PyObject* cursor = 0; PyObject* result = 0; - PyObject* method = 0; cursor = _PyObject_CallMethodIdNoArgs((PyObject*)self, &PyId_cursor); if (!cursor) { goto error; } - method = PyObject_GetAttrString(cursor, "executemany"); - if (!method) { - Py_CLEAR(cursor); - goto error; - } - - result = PyObject_CallObject(method, args); + result = _PyObject_CallMethodIdObjArgs(cursor, &PyId_executemany, sql, + parameters, NULL); if (!result) { Py_CLEAR(cursor); } error: Py_XDECREF(result); - Py_XDECREF(method); return cursor; } -PyObject* pysqlite_connection_executescript(pysqlite_Connection* self, PyObject* args) +/*[clinic input] +_sqlite3.Connection.executescript as pysqlite_connection_executescript + + sql_script as script_obj: object + / + +Executes a multiple SQL statements at once. Non-standard. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_executescript(pysqlite_Connection *self, + PyObject *script_obj) +/*[clinic end generated code: output=4c4f9d77aa0ae37d input=c0b14695aa6c81d9]*/ { + _Py_IDENTIFIER(executescript); PyObject* cursor = 0; PyObject* result = 0; - PyObject* method = 0; cursor = _PyObject_CallMethodIdNoArgs((PyObject*)self, &PyId_cursor); if (!cursor) { goto error; } - method = PyObject_GetAttrString(cursor, "executescript"); - if (!method) { - Py_CLEAR(cursor); - goto error; - } - - result = PyObject_CallObject(method, args); + result = _PyObject_CallMethodIdObjArgs(cursor, &PyId_executescript, + script_obj, NULL); if (!result) { Py_CLEAR(cursor); } error: Py_XDECREF(result); - Py_XDECREF(method); return cursor; } @@ -1421,8 +1503,15 @@ finally: return result; } +/*[clinic input] +_sqlite3.Connection.interrupt as pysqlite_connection_interrupt + +Abort any pending database operation. Non-standard. +[clinic start generated code]*/ + static PyObject * -pysqlite_connection_interrupt(pysqlite_Connection* self, PyObject* args) +pysqlite_connection_interrupt_impl(pysqlite_Connection *self) +/*[clinic end generated code: output=f193204bc9e70b47 input=4bd0ad083cf93aa7]*/ { PyObject* retval = NULL; @@ -1432,8 +1521,7 @@ pysqlite_connection_interrupt(pysqlite_Connection* self, PyObject* args) sqlite3_interrupt(self->db); - Py_INCREF(Py_None); - retval = Py_None; + retval = Py_NewRef(Py_None); finally: return retval; @@ -1443,8 +1531,17 @@ finally: * Class method of Connection to call the Python function _iterdump * of the sqlite3 module. */ +/*[clinic input] +_sqlite3.Connection.iterdump as pysqlite_connection_iterdump + +Returns iterator to the dump of the database in an SQL text format. + +Non-standard. +[clinic start generated code]*/ + static PyObject * -pysqlite_connection_iterdump(pysqlite_Connection* self, PyObject* args) +pysqlite_connection_iterdump_impl(pysqlite_Connection *self) +/*[clinic end generated code: output=586997aaf9808768 input=53bc907cb5eedb85]*/ { _Py_IDENTIFIER(_iterdump); PyObject* retval = NULL; @@ -1482,51 +1579,41 @@ finally: return retval; } +/*[clinic input] +_sqlite3.Connection.backup as pysqlite_connection_backup + + target: object(type='pysqlite_Connection *', subclass_of='pysqlite_ConnectionType') = NULL + * + pages: int = -1 + progress: object = None + name: str = "main" + sleep: double = 0.250 + +Makes a backup of the database. Non-standard. +[clinic start generated code]*/ + static PyObject * -pysqlite_connection_backup(pysqlite_Connection *self, PyObject *args, PyObject *kwds) +pysqlite_connection_backup_impl(pysqlite_Connection *self, + pysqlite_Connection *target, int pages, + PyObject *progress, const char *name, + double sleep) +/*[clinic end generated code: output=306a3e6a38c36334 input=2f3497ea530144b1]*/ { - PyObject *target = NULL; - int pages = -1; - PyObject *progress = Py_None; - const char *name = "main"; int rc; int callback_error = 0; - PyObject *sleep_obj = NULL; - int sleep_ms = 250; + int sleep_ms = (int)(sleep * 1000.0); sqlite3 *bck_conn; sqlite3_backup *bck_handle; - static char *keywords[] = {"target", "pages", "progress", "name", "sleep", NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|$iOsO:backup", keywords, - pysqlite_ConnectionType, &target, - &pages, &progress, &name, &sleep_obj)) { - return NULL; - } - - if (sleep_obj != NULL) { - _PyTime_t sleep_secs; - if (_PyTime_FromSecondsObject(&sleep_secs, sleep_obj, - _PyTime_ROUND_TIMEOUT)) { - return NULL; - } - _PyTime_t ms = _PyTime_AsMilliseconds(sleep_secs, - _PyTime_ROUND_TIMEOUT); - if (ms < INT_MIN || ms > INT_MAX) { - PyErr_SetString(PyExc_OverflowError, "sleep is too large"); - return NULL; - } - sleep_ms = (int)ms; - } if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) { return NULL; } - if (!pysqlite_check_connection((pysqlite_Connection *)target)) { + if (!pysqlite_check_connection(target)) { return NULL; } - if ((pysqlite_Connection *)target == self) { + if (target == self) { PyErr_SetString(PyExc_ValueError, "target cannot be the same connection instance"); return NULL; } @@ -1534,7 +1621,7 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *args, PyObject * #if SQLITE_VERSION_NUMBER < 3008008 /* Since 3.8.8 this is already done, per commit https://www.sqlite.org/src/info/169b5505498c0a7e */ - if (!sqlite3_get_autocommit(((pysqlite_Connection *)target)->db)) { + if (!sqlite3_get_autocommit(target->db)) { PyErr_SetString(pysqlite_OperationalError, "target is in transaction"); return NULL; } @@ -1549,7 +1636,7 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *args, PyObject * pages = -1; } - bck_conn = ((pysqlite_Connection *)target)->db; + bck_conn = target->db; Py_BEGIN_ALLOW_THREADS bck_handle = sqlite3_backup_init(bck_conn, "main", self->db, name); @@ -1637,13 +1724,22 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *args, PyObject * } } +/*[clinic input] +_sqlite3.Connection.create_collation as pysqlite_connection_create_collation + + name: unicode + callback as callable: object + / + +Creates a collation function. Non-standard. +[clinic start generated code]*/ + static PyObject * -pysqlite_connection_create_collation(pysqlite_Connection* self, PyObject* args) +pysqlite_connection_create_collation_impl(pysqlite_Connection *self, + PyObject *name, PyObject *callable) +/*[clinic end generated code: output=0f63b8995565ae22 input=5c3898813a776cf2]*/ { - PyObject* callable; PyObject* uppercase_name = 0; - PyObject* name; - PyObject* retval; Py_ssize_t i, len; _Py_IDENTIFIER(upper); const char *uppercase_name_str; @@ -1655,11 +1751,6 @@ pysqlite_connection_create_collation(pysqlite_Connection* self, PyObject* args) goto finally; } - if (!PyArg_ParseTuple(args, "UO:create_collation(name, callback)", - &name, &callable)) { - goto finally; - } - uppercase_name = _PyObject_CallMethodIdOneArg((PyObject *)&PyUnicode_Type, &PyId_upper, name); if (!uppercase_name) { @@ -1716,36 +1807,46 @@ finally: Py_XDECREF(uppercase_name); if (PyErr_Occurred()) { - retval = NULL; - } else { - Py_INCREF(Py_None); - retval = Py_None; - } - - return retval; -} - -/* Called when the connection is used as a context manager. Returns itself as a - * convenience to the caller. */ -static PyObject * -pysqlite_connection_enter(pysqlite_Connection* self, PyObject* args) -{ - Py_INCREF(self); - return (PyObject*)self; -} - -/** Called when the connection is used as a context manager. If there was any - * exception, a rollback takes place; otherwise we commit. */ -static PyObject * -pysqlite_connection_exit(pysqlite_Connection* self, PyObject* args) -{ - PyObject* exc_type, *exc_value, *exc_tb; - const char* method_name; - PyObject* result; - - if (!PyArg_ParseTuple(args, "OOO", &exc_type, &exc_value, &exc_tb)) { return NULL; } + return Py_NewRef(Py_None); +} + +/*[clinic input] +_sqlite3.Connection.__enter__ as pysqlite_connection_enter + +Called when the connection is used as a context manager. + +Returns itself as a convenience to the caller. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_enter_impl(pysqlite_Connection *self) +/*[clinic end generated code: output=457b09726d3e9dcd input=127d7a4f17e86d8f]*/ +{ + return Py_NewRef((PyObject *)self); +} + +/*[clinic input] +_sqlite3.Connection.__exit__ as pysqlite_connection_exit + + type as exc_type: object + value as exc_value: object + traceback as exc_tb: object + / + +Called when the connection is used as a context manager. + +If there was any exception, a rollback takes place; otherwise we commit. +[clinic start generated code]*/ + +static PyObject * +pysqlite_connection_exit_impl(pysqlite_Connection *self, PyObject *exc_type, + PyObject *exc_value, PyObject *exc_tb) +/*[clinic end generated code: output=0705200e9321202a input=bd66f1532c9c54a7]*/ +{ + const char* method_name; + PyObject* result; if (exc_type == Py_None && exc_value == Py_None && exc_tb == Py_None) { method_name = "commit"; @@ -1773,48 +1874,26 @@ static PyGetSetDef connection_getset[] = { }; static PyMethodDef connection_methods[] = { - {"cursor", (PyCFunction)(void(*)(void))pysqlite_connection_cursor, METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("Return a cursor for the connection.")}, - {"close", (PyCFunction)pysqlite_connection_close, METH_NOARGS, - PyDoc_STR("Closes the connection.")}, - {"commit", (PyCFunction)pysqlite_connection_commit, METH_NOARGS, - PyDoc_STR("Commit the current transaction.")}, - {"rollback", (PyCFunction)pysqlite_connection_rollback, METH_NOARGS, - PyDoc_STR("Roll back the current transaction.")}, - {"create_function", (PyCFunction)(void(*)(void))pysqlite_connection_create_function, METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("Creates a new function. Non-standard.")}, - {"create_aggregate", (PyCFunction)(void(*)(void))pysqlite_connection_create_aggregate, METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("Creates a new aggregate. Non-standard.")}, - {"set_authorizer", (PyCFunction)(void(*)(void))pysqlite_connection_set_authorizer, METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("Sets authorizer callback. Non-standard.")}, - #ifndef SQLITE_OMIT_LOAD_EXTENSION - {"enable_load_extension", (PyCFunction)pysqlite_enable_load_extension, METH_VARARGS, - PyDoc_STR("Enable dynamic loading of SQLite extension modules. Non-standard.")}, - {"load_extension", (PyCFunction)pysqlite_load_extension, METH_VARARGS, - PyDoc_STR("Load SQLite extension module. Non-standard.")}, - #endif - {"set_progress_handler", (PyCFunction)(void(*)(void))pysqlite_connection_set_progress_handler, METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("Sets progress handler callback. Non-standard.")}, - {"set_trace_callback", (PyCFunction)(void(*)(void))pysqlite_connection_set_trace_callback, METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("Sets a trace callback called for each SQL statement (passed as unicode). Non-standard.")}, - {"execute", (PyCFunction)pysqlite_connection_execute, METH_VARARGS, - PyDoc_STR("Executes a SQL statement. Non-standard.")}, - {"executemany", (PyCFunction)pysqlite_connection_executemany, METH_VARARGS, - PyDoc_STR("Repeatedly executes a SQL statement. Non-standard.")}, - {"executescript", (PyCFunction)pysqlite_connection_executescript, METH_VARARGS, - PyDoc_STR("Executes a multiple SQL statements at once. Non-standard.")}, - {"create_collation", (PyCFunction)pysqlite_connection_create_collation, METH_VARARGS, - PyDoc_STR("Creates a collation function. Non-standard.")}, - {"interrupt", (PyCFunction)pysqlite_connection_interrupt, METH_NOARGS, - PyDoc_STR("Abort any pending database operation. Non-standard.")}, - {"iterdump", (PyCFunction)pysqlite_connection_iterdump, METH_NOARGS, - PyDoc_STR("Returns iterator to the dump of the database in an SQL text format. Non-standard.")}, - {"backup", (PyCFunction)(void(*)(void))pysqlite_connection_backup, METH_VARARGS | METH_KEYWORDS, - PyDoc_STR("Makes a backup of the database. Non-standard.")}, - {"__enter__", (PyCFunction)pysqlite_connection_enter, METH_NOARGS, - PyDoc_STR("For context manager. Non-standard.")}, - {"__exit__", (PyCFunction)pysqlite_connection_exit, METH_VARARGS, - PyDoc_STR("For context manager. Non-standard.")}, + PYSQLITE_CONNECTION_BACKUP_METHODDEF + PYSQLITE_CONNECTION_CLOSE_METHODDEF + PYSQLITE_CONNECTION_COMMIT_METHODDEF + PYSQLITE_CONNECTION_CREATE_AGGREGATE_METHODDEF + PYSQLITE_CONNECTION_CREATE_COLLATION_METHODDEF + PYSQLITE_CONNECTION_CREATE_FUNCTION_METHODDEF + PYSQLITE_CONNECTION_CURSOR_METHODDEF + PYSQLITE_CONNECTION_ENABLE_LOAD_EXTENSION_METHODDEF + PYSQLITE_CONNECTION_ENTER_METHODDEF + PYSQLITE_CONNECTION_EXECUTEMANY_METHODDEF + PYSQLITE_CONNECTION_EXECUTESCRIPT_METHODDEF + PYSQLITE_CONNECTION_EXECUTE_METHODDEF + PYSQLITE_CONNECTION_EXIT_METHODDEF + PYSQLITE_CONNECTION_INTERRUPT_METHODDEF + PYSQLITE_CONNECTION_ITERDUMP_METHODDEF + PYSQLITE_CONNECTION_LOAD_EXTENSION_METHODDEF + PYSQLITE_CONNECTION_ROLLBACK_METHODDEF + PYSQLITE_CONNECTION_SET_AUTHORIZER_METHODDEF + PYSQLITE_CONNECTION_SET_PROGRESS_HANDLER_METHODDEF + PYSQLITE_CONNECTION_SET_TRACE_CALLBACK_METHODDEF {NULL, NULL} }; diff --git a/Modules/_sqlite/connection.h b/Modules/_sqlite/connection.h index aadf439034f..1d1a8ad5ae0 100644 --- a/Modules/_sqlite/connection.h +++ b/Modules/_sqlite/connection.h @@ -110,11 +110,7 @@ extern PyTypeObject *pysqlite_ConnectionType; PyObject* pysqlite_connection_alloc(PyTypeObject* type, int aware); void pysqlite_connection_dealloc(pysqlite_Connection* self); -PyObject* pysqlite_connection_cursor(pysqlite_Connection* self, PyObject* args, PyObject* kwargs); -PyObject* pysqlite_connection_close(pysqlite_Connection* self, PyObject* args); PyObject* _pysqlite_connection_begin(pysqlite_Connection* self); -PyObject* pysqlite_connection_commit(pysqlite_Connection* self, PyObject* args); -PyObject* pysqlite_connection_rollback(pysqlite_Connection* self, PyObject* args); PyObject* pysqlite_connection_new(PyTypeObject* type, PyObject* args, PyObject* kw); int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject* kwargs); diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 3c09c1c6b7e..13385f6d500 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -271,8 +271,7 @@ _pysqlite_fetch_one_row(pysqlite_Cursor* self) nbytes = sqlite3_column_bytes(self->statement->st, i); val_str = (const char*)sqlite3_column_blob(self->statement->st, i); if (!val_str) { - Py_INCREF(Py_None); - converted = Py_None; + converted = Py_NewRef(Py_None); } else { item = PyBytes_FromStringAndSize(val_str, nbytes); if (!item) @@ -285,8 +284,7 @@ _pysqlite_fetch_one_row(pysqlite_Cursor* self) coltype = sqlite3_column_type(self->statement->st, i); Py_END_ALLOW_THREADS if (coltype == SQLITE_NULL) { - Py_INCREF(Py_None); - converted = Py_None; + converted = Py_NewRef(Py_None); } else if (coltype == SQLITE_INTEGER) { converted = PyLong_FromLongLong(sqlite3_column_int64(self->statement->st, i)); } else if (coltype == SQLITE_FLOAT) { @@ -402,8 +400,7 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) if (PyIter_Check(second_argument)) { /* iterator */ - Py_INCREF(second_argument); - parameters_iter = second_argument; + parameters_iter = Py_NewRef(second_argument); } else { /* sequence */ parameters_iter = PyObject_GetIter(second_argument); @@ -456,8 +453,7 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) if (!func_args) { goto error; } - Py_INCREF(operation); - if (PyTuple_SetItem(func_args, 0, operation) != 0) { + if (PyTuple_SetItem(func_args, 0, Py_NewRef(operation)) != 0) { goto error; } @@ -555,12 +551,12 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) goto error; } PyTuple_SetItem(descriptor, 0, column_name); - Py_INCREF(Py_None); PyTuple_SetItem(descriptor, 1, Py_None); - Py_INCREF(Py_None); PyTuple_SetItem(descriptor, 2, Py_None); - Py_INCREF(Py_None); PyTuple_SetItem(descriptor, 3, Py_None); - Py_INCREF(Py_None); PyTuple_SetItem(descriptor, 4, Py_None); - Py_INCREF(Py_None); PyTuple_SetItem(descriptor, 5, Py_None); - Py_INCREF(Py_None); PyTuple_SetItem(descriptor, 6, Py_None); + PyTuple_SetItem(descriptor, 1, Py_NewRef(Py_None)); + PyTuple_SetItem(descriptor, 2, Py_NewRef(Py_None)); + PyTuple_SetItem(descriptor, 3, Py_NewRef(Py_None)); + PyTuple_SetItem(descriptor, 4, Py_NewRef(Py_None)); + PyTuple_SetItem(descriptor, 5, Py_NewRef(Py_None)); + PyTuple_SetItem(descriptor, 6, Py_NewRef(Py_None)); PyTuple_SetItem(self->description, i, descriptor); } } @@ -610,8 +606,7 @@ error: self->rowcount = -1L; return NULL; } else { - Py_INCREF(self); - return (PyObject*)self; + return Py_NewRef((PyObject *)self); } } @@ -628,6 +623,7 @@ PyObject* pysqlite_cursor_executemany(pysqlite_Cursor* self, PyObject* args) static PyObject * pysqlite_cursor_executescript(pysqlite_Cursor* self, PyObject* args) { + _Py_IDENTIFIER(commit); PyObject* script_obj; const char* script_cstr; sqlite3_stmt* statement; @@ -655,7 +651,7 @@ pysqlite_cursor_executescript(pysqlite_Cursor* self, PyObject* args) } /* commit first */ - result = pysqlite_connection_commit(self->connection, NULL); + result = _PyObject_CallMethodIdNoArgs((PyObject *)self->connection, &PyId_commit); if (!result) { goto error; } @@ -705,8 +701,7 @@ error: if (PyErr_Occurred()) { return NULL; } else { - Py_INCREF(self); - return (PyObject*)self; + return Py_NewRef((PyObject *)self); } } diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c index 41f086791ea..e219a7239f8 100644 --- a/Modules/_sqlite/microprotocols.c +++ b/Modules/_sqlite/microprotocols.c @@ -140,8 +140,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt) } if (alt) { - Py_INCREF(alt); - return alt; + return Py_NewRef(alt); } /* else set the right exception and return NULL */ PyErr_SetString(pysqlite_ProgrammingError, "can't adapt"); diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c index 372f3dda4cb..cd2eb576c7b 100644 --- a/Modules/_sqlite/module.c +++ b/Modules/_sqlite/module.c @@ -120,17 +120,11 @@ static PyObject * pysqlite_complete_statement_impl(PyObject *module, const char *statement) /*[clinic end generated code: output=e55f1ff1952df558 input=f6b24996b31c5c33]*/ { - PyObject* result; - if (sqlite3_complete(statement)) { - result = Py_True; + return Py_NewRef(Py_True); } else { - result = Py_False; + return Py_NewRef(Py_False); } - - Py_INCREF(result); - - return result; } /*[clinic input] @@ -219,8 +213,7 @@ pysqlite_register_converter_impl(PyObject *module, PyObject *orig_name, goto error; } - Py_INCREF(Py_None); - retval = Py_None; + retval = Py_NewRef(Py_None); error: Py_XDECREF(name); return retval; diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c index 76b6f04f0cc..04e308fa1c3 100644 --- a/Modules/_sqlite/row.c +++ b/Modules/_sqlite/row.c @@ -23,6 +23,13 @@ #include "row.h" #include "cursor.h" +#include "clinic/row.c.h" + +/*[clinic input] +module _sqlite3 +class _sqlite3.Row "pysqlite_Row *" "pysqlite_RowType" +[clinic start generated code]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=384227da65f250fd]*/ void pysqlite_row_dealloc(pysqlite_Row* self) { @@ -35,48 +42,39 @@ void pysqlite_row_dealloc(pysqlite_Row* self) Py_DECREF(tp); } +/*[clinic input] +@classmethod +_sqlite3.Row.__new__ as pysqlite_row_new + + cursor: object(type='pysqlite_Cursor *', subclass_of='pysqlite_CursorType') + data: object(subclass_of='&PyTuple_Type') + / + +[clinic start generated code]*/ + static PyObject * -pysqlite_row_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) +pysqlite_row_new_impl(PyTypeObject *type, pysqlite_Cursor *cursor, + PyObject *data) +/*[clinic end generated code: output=10d58b09a819a4c1 input=f6cd7e6e0935828d]*/ { pysqlite_Row *self; - PyObject* data; - pysqlite_Cursor* cursor; assert(type != NULL && type->tp_alloc != NULL); - if (!_PyArg_NoKeywords("Row", kwargs)) - return NULL; - if (!PyArg_ParseTuple(args, "OO", &cursor, &data)) - return NULL; - - if (!PyObject_TypeCheck((PyObject*)cursor, pysqlite_CursorType)) { - PyErr_SetString(PyExc_TypeError, "instance of cursor required for first argument"); - return NULL; - } - - if (!PyTuple_Check(data)) { - PyErr_SetString(PyExc_TypeError, "tuple required for second argument"); - return NULL; - } - self = (pysqlite_Row *) type->tp_alloc(type, 0); if (self == NULL) return NULL; - Py_INCREF(data); - self->data = data; - - Py_INCREF(cursor->description); - self->description = cursor->description; + self->data = Py_NewRef(data); + self->description = Py_NewRef(cursor->description); return (PyObject *) self; } PyObject* pysqlite_row_item(pysqlite_Row* self, Py_ssize_t idx) { - PyObject* item = PyTuple_GetItem(self->data, idx); - Py_XINCREF(item); - return item; + PyObject *item = PyTuple_GetItem(self->data, idx); + return Py_XNewRef(item); } static int @@ -111,7 +109,6 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx) { Py_ssize_t _idx; Py_ssize_t nitems, i; - PyObject* item; if (PyLong_Check(idx)) { _idx = PyNumber_AsSsize_t(idx, PyExc_IndexError); @@ -119,9 +116,9 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx) return NULL; if (_idx < 0) _idx += PyTuple_GET_SIZE(self->data); - item = PyTuple_GetItem(self->data, _idx); - Py_XINCREF(item); - return item; + + PyObject *item = PyTuple_GetItem(self->data, _idx); + return Py_XNewRef(item); } else if (PyUnicode_Check(idx)) { nitems = PyTuple_Size(self->description); @@ -135,9 +132,8 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx) } if (eq) { /* found item */ - item = PyTuple_GetItem(self->data, i); - Py_INCREF(item); - return item; + PyObject *item = PyTuple_GetItem(self->data, i); + return Py_XNewRef(item); } } @@ -159,7 +155,15 @@ pysqlite_row_length(pysqlite_Row* self) return PyTuple_GET_SIZE(self->data); } -PyObject* pysqlite_row_keys(pysqlite_Row* self, PyObject *Py_UNUSED(ignored)) +/*[clinic input] +_sqlite3.Row.keys as pysqlite_row_keys + +Returns the keys of the row. +[clinic start generated code]*/ + +static PyObject * +pysqlite_row_keys_impl(pysqlite_Row *self) +/*[clinic end generated code: output=efe3dfb3af6edc07 input=7549a122827c5563]*/ { PyObject* list; Py_ssize_t nitems, i; @@ -210,8 +214,7 @@ static PyObject* pysqlite_row_richcompare(pysqlite_Row *self, PyObject *_other, } static PyMethodDef row_methods[] = { - {"keys", (PyCFunction)pysqlite_row_keys, METH_NOARGS, - PyDoc_STR("Returns the keys of the row.")}, + PYSQLITE_ROW_KEYS_METHODDEF {NULL, NULL} }; diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c index 4682d286c58..b62de58109e 100644 --- a/Modules/_sqlite/statement.c +++ b/Modules/_sqlite/statement.c @@ -72,8 +72,7 @@ int pysqlite_statement_create(pysqlite_Statement* self, pysqlite_Connection* con } self->in_weakreflist = NULL; - Py_INCREF(sql); - self->sql = sql; + self->sql = Py_NewRef(sql); /* Determine if the statement is a DML statement. SELECT is the only exception. See #9924. */ @@ -240,11 +239,11 @@ void pysqlite_statement_bind_parameters(pysqlite_Statement* self, PyObject* para } for (i = 0; i < num_params; i++) { if (PyTuple_CheckExact(parameters)) { - current_param = PyTuple_GET_ITEM(parameters, i); - Py_INCREF(current_param); + PyObject *item = PyTuple_GET_ITEM(parameters, i); + current_param = Py_NewRef(item); } else if (PyList_CheckExact(parameters)) { - current_param = PyList_GetItem(parameters, i); - Py_XINCREF(current_param); + PyObject *item = PyList_GetItem(parameters, i); + current_param = Py_XNewRef(item); } else { current_param = PySequence_GetItem(parameters, i); } @@ -290,8 +289,8 @@ void pysqlite_statement_bind_parameters(pysqlite_Statement* self, PyObject* para return; } if (PyDict_CheckExact(parameters)) { - current_param = PyDict_GetItemWithError(parameters, binding_name_obj); - Py_XINCREF(current_param); + PyObject *item = PyDict_GetItemWithError(parameters, binding_name_obj); + current_param = Py_XNewRef(item); } else { current_param = PyObject_GetItem(parameters, binding_name_obj); } diff --git a/Modules/_sre.c b/Modules/_sre.c index 0a5ca60097a..57faf7bdaae 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -197,7 +197,7 @@ static void data_stack_dealloc(SRE_STATE* state) { if (state->data_stack) { - PyMem_FREE(state->data_stack); + PyMem_Free(state->data_stack); state->data_stack = NULL; } state->data_stack_size = state->data_stack_base = 0; @@ -213,7 +213,7 @@ data_stack_grow(SRE_STATE* state, Py_ssize_t size) void* stack; cursize = minsize+minsize/4+1024; TRACE(("allocate/grow stack %zd\n", cursize)); - stack = PyMem_REALLOC(state->data_stack, cursize); + stack = PyMem_Realloc(state->data_stack, cursize); if (!stack) { data_stack_dealloc(state); return SRE_ERROR_MEMORY; @@ -472,7 +472,7 @@ state_init(SRE_STATE* state, PatternObject* pattern, PyObject* string, /* We add an explicit cast here because MSVC has a bug when compiling C code where it believes that `const void**` cannot be safely casted to `void*`, see bpo-39943 for details. */ - PyMem_Del((void*) state->mark); + PyMem_Free((void*) state->mark); state->mark = NULL; if (state->buffer.buf) PyBuffer_Release(&state->buffer); @@ -487,7 +487,7 @@ state_fini(SRE_STATE* state) Py_XDECREF(state->string); data_stack_dealloc(state); /* See above PyMem_Del for why we explicitly cast here. */ - PyMem_Del((void*) state->mark); + PyMem_Free((void*) state->mark); state->mark = NULL; } @@ -571,7 +571,7 @@ pattern_dealloc(PatternObject* self) Py_XDECREF(self->pattern); Py_XDECREF(self->groupindex); Py_XDECREF(self->indexgroup); - PyObject_DEL(self); + PyObject_Free(self); Py_DECREF(tp); } @@ -1944,7 +1944,7 @@ match_dealloc(MatchObject* self) Py_XDECREF(self->regs); Py_XDECREF(self->string); Py_DECREF(self->pattern); - PyObject_DEL(self); + PyObject_Free(self); Py_DECREF(tp); } @@ -2450,7 +2450,7 @@ scanner_dealloc(ScannerObject* self) state_fini(&self->state); Py_XDECREF(self->pattern); - PyObject_DEL(self); + PyObject_Free(self); Py_DECREF(tp); } diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 6f799ee6618..96d2796fcfa 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -2295,7 +2295,7 @@ PySSL_dealloc(PySSLSocket *self) Py_XDECREF(self->ctx); Py_XDECREF(self->server_hostname); Py_XDECREF(self->owner); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } @@ -3306,10 +3306,10 @@ context_dealloc(PySSLContext *self) context_clear(self); SSL_CTX_free(self->ctx); #if HAVE_NPN - PyMem_FREE(self->npn_protocols); + PyMem_Free(self->npn_protocols); #endif #if HAVE_ALPN - PyMem_FREE(self->alpn_protocols); + PyMem_Free(self->alpn_protocols); #endif Py_TYPE(self)->tp_free(self); Py_DECREF(tp); @@ -3510,7 +3510,7 @@ _ssl__SSLContext__set_alpn_protocols_impl(PySSLContext *self, return NULL; } - PyMem_FREE(self->alpn_protocols); + PyMem_Free(self->alpn_protocols); self->alpn_protocols = PyMem_Malloc(protos->len); if (!self->alpn_protocols) return PyErr_NoMemory(); @@ -6416,7 +6416,7 @@ sslmodule_legacy(PyObject *module) #ifdef HAVE_OPENSSL_CRYPTO_LOCK /* note that this will start threading if not already started */ if (!_setup_ssl_threads()) { - return NULL; + return 0; } #elif OPENSSL_VERSION_1_1 /* OpenSSL 1.1.0 builtin thread support is enabled */ diff --git a/Modules/_struct.c b/Modules/_struct.c index eeccc179654..1a5e0ae28e8 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -1373,14 +1373,14 @@ prepare_s(PyStructObject *self) self->s_size = size; self->s_len = len; - codes = PyMem_MALLOC((ncodes + 1) * sizeof(formatcode)); + codes = PyMem_Malloc((ncodes + 1) * sizeof(formatcode)); if (codes == NULL) { PyErr_NoMemory(); return -1; } /* Free any s_codes value left over from a previous initialization. */ if (self->s_codes != NULL) - PyMem_FREE(self->s_codes); + PyMem_Free(self->s_codes); self->s_codes = codes; s = fmt; @@ -1442,8 +1442,7 @@ s_new(PyTypeObject *type, PyObject *args, PyObject *kwds) self = alloc_func(type, 0); if (self != NULL) { PyStructObject *s = (PyStructObject*)self; - Py_INCREF(Py_None); - s->s_format = Py_None; + s->s_format = Py_NewRef(Py_None); s->s_codes = NULL; s->s_size = -1; s->s_len = -1; @@ -1502,7 +1501,7 @@ s_dealloc(PyStructObject *s) if (s->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *)s); if (s->s_codes != NULL) { - PyMem_FREE(s->s_codes); + PyMem_Free(s->s_codes); } Py_XDECREF(s->s_format); freefunc free_func = PyType_GetSlot(Py_TYPE(s), Py_tp_free); diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c index d8321768bc9..1b4fb09fb8f 100644 --- a/Modules/_testbuffer.c +++ b/Modules/_testbuffer.c @@ -236,7 +236,7 @@ ndarray_dealloc(NDArrayObject *self) ndbuf_pop(self); } } - PyObject_Del(self); + PyObject_Free(self); } static int @@ -2734,7 +2734,7 @@ staticarray_init(PyObject *self, PyObject *args, PyObject *kwds) static void staticarray_dealloc(StaticArrayObject *self) { - PyObject_Del(self); + PyObject_Free(self); } /* Return a buffer for a PyBUF_FULL_RO request. Flags are not checked, diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index a1d4c929b02..4f97927fa23 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -1988,12 +1988,12 @@ unicode_asucs4(PyObject *self, PyObject *args) buffer[str_len] = 0xffffU; if (!PyUnicode_AsUCS4(unicode, buffer, buf_len, copy_null)) { - PyMem_FREE(buffer); + PyMem_Free(buffer); return NULL; } result = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, buffer, buf_len); - PyMem_FREE(buffer); + PyMem_Free(buffer); return result; } @@ -5614,7 +5614,7 @@ static PyObject *test_buildvalue_issue38913(PyObject *, PyObject *); static PyObject* -test_set_type_size(PyObject* self, PyObject* ignored) +test_set_type_size(PyObject *self, PyObject *Py_UNUSED(ignored)) { PyObject *obj = PyList_New(0); if (obj == NULL) { @@ -5636,6 +5636,35 @@ test_set_type_size(PyObject* self, PyObject* ignored) } +// Test Py_NewRef() and Py_XNewRef() functions +static PyObject* +test_refcount(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + PyObject *obj = PyList_New(0); + if (obj == NULL) { + return NULL; + } + assert(Py_REFCNT(obj) == 1); + + // Test Py_NewRef() + PyObject *ref = Py_NewRef(obj); + assert(ref == obj); + assert(Py_REFCNT(obj) == 2); + Py_DECREF(ref); + + // Test Py_XNewRef() + PyObject *xref = Py_XNewRef(obj); + assert(xref == obj); + assert(Py_REFCNT(obj) == 2); + Py_DECREF(xref); + + assert(Py_XNewRef(NULL) == NULL); + + Py_DECREF(obj); + Py_RETURN_NONE; +} + + static PyMethodDef TestMethods[] = { {"raise_exception", raise_exception, METH_VARARGS}, {"raise_memoryerror", raise_memoryerror, METH_NOARGS}, @@ -5908,6 +5937,7 @@ static PyMethodDef TestMethods[] = { {"pynumber_tobase", pynumber_tobase, METH_VARARGS}, {"without_gc", without_gc, METH_O}, {"test_set_type_size", test_set_type_size, METH_NOARGS}, + {"test_refcount", test_refcount, METH_NOARGS}, {NULL, NULL} /* sentinel */ }; @@ -6010,7 +6040,7 @@ test_structmembers_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) static void test_structmembers_free(PyObject *ob) { - PyObject_FREE(ob); + PyObject_Free(ob); } static PyTypeObject test_structmembersType = { @@ -6664,7 +6694,7 @@ static void heapctype_dealloc(HeapCTypeObject *self) { PyTypeObject *tp = Py_TYPE(self); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } @@ -6854,7 +6884,7 @@ heapctypewithdict_dealloc(HeapCTypeWithDictObject* self) PyTypeObject *tp = Py_TYPE(self); Py_XDECREF(self->dict); - PyObject_DEL(self); + PyObject_Free(self); Py_DECREF(tp); } @@ -6925,7 +6955,7 @@ heapctypewithweakref_dealloc(HeapCTypeWithWeakrefObject* self) if (self->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) self); Py_XDECREF(self->weakreflist); - PyObject_DEL(self); + PyObject_Free(self); Py_DECREF(tp); } @@ -6968,7 +6998,7 @@ static void heapctypesetattr_dealloc(HeapCTypeSetattrObject *self) { PyTypeObject *tp = Py_TYPE(self); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index df4725ea0a1..ab6c5965d16 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -12,6 +12,7 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" +#include "pycore_atomic_funcs.h" // _Py_atomic_int_get() #include "pycore_bitutils.h" // _Py_bswap32() #include "pycore_gc.h" // PyGC_Head #include "pycore_hashtable.h" // _Py_hashtable_new() @@ -267,6 +268,17 @@ error: } +static PyObject* +test_atomic_funcs(PyObject *self, PyObject *Py_UNUSED(args)) +{ + // Test _Py_atomic_size_get() and _Py_atomic_size_set() + Py_ssize_t var = 1; + _Py_atomic_size_set(&var, 2); + assert(_Py_atomic_size_get(&var) == 2); + Py_RETURN_NONE; +} + + static PyMethodDef TestMethods[] = { {"get_configs", get_configs, METH_NOARGS}, {"get_recursion_depth", get_recursion_depth, METH_NOARGS}, @@ -276,6 +288,7 @@ static PyMethodDef TestMethods[] = { {"test_hashtable", test_hashtable, METH_NOARGS}, {"get_config", test_get_config, METH_NOARGS}, {"set_config", test_set_config, METH_O}, + {"test_atomic_funcs", test_atomic_funcs, METH_NOARGS}, {NULL, NULL} /* sentinel */ }; diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c index 56ed8a2e2d3..9b8757715a0 100644 --- a/Modules/_threadmodule.c +++ b/Modules/_threadmodule.c @@ -7,13 +7,36 @@ #include "pycore_interp.h" // _PyInterpreterState.num_threads #include "pycore_pystate.h" // _PyThreadState_Init() #include // offsetof() +#include "structmember.h" // PyMemberDef -static PyObject *ThreadError; -static PyObject *str_dict; +// ThreadError is just an alias to PyExc_RuntimeError +#define ThreadError PyExc_RuntimeError + +_Py_IDENTIFIER(__dict__); _Py_IDENTIFIER(stderr); _Py_IDENTIFIER(flush); + +// Forward declarations +static struct PyModuleDef thread_module; + + +typedef struct { + PyTypeObject *lock_type; + PyTypeObject *local_type; + PyTypeObject *local_dummy_type; +} thread_module_state; + +static inline thread_module_state* +get_thread_state(PyObject *module) +{ + void *state = PyModule_GetState(module); + assert(state != NULL); + return (thread_module_state *)state; +} + + /* Lock objects */ typedef struct { @@ -23,18 +46,28 @@ typedef struct { char locked; /* for sanity checking */ } lockobject; +static int +lock_traverse(lockobject *self, visitproc visit, void *arg) +{ + Py_VISIT(Py_TYPE(self)); + return 0; +} + static void lock_dealloc(lockobject *self) { - if (self->in_weakreflist != NULL) + if (self->in_weakreflist != NULL) { PyObject_ClearWeakRefs((PyObject *) self); + } if (self->lock_lock != NULL) { /* Unlock the lock so it's safe to free it */ if (self->locked) PyThread_release_lock(self->lock_lock); PyThread_free_lock(self->lock_lock); } - PyObject_Del(self); + PyTypeObject *tp = Py_TYPE(self); + tp->tp_free((PyObject*)self); + Py_DECREF(tp); } /* Helper to acquire an interruptible lock with a timeout. If the lock acquire @@ -48,12 +81,13 @@ acquire_timed(PyThread_type_lock lock, _PyTime_t timeout) { PyLockStatus r; _PyTime_t endtime = 0; - _PyTime_t microseconds; - if (timeout > 0) + if (timeout > 0) { endtime = _PyTime_GetMonotonicClock() + timeout; + } do { + _PyTime_t microseconds; microseconds = _PyTime_AsMicroseconds(timeout, _PyTime_ROUND_CEILING); /* first a simple non-blocking try without releasing the GIL */ @@ -138,12 +172,10 @@ static PyObject * lock_PyThread_acquire_lock(lockobject *self, PyObject *args, PyObject *kwds) { _PyTime_t timeout; - PyLockStatus r; - if (lock_acquire_parse_args(args, kwds, &timeout) < 0) return NULL; - r = acquire_timed(self->lock_lock, timeout); + PyLockStatus r = acquire_timed(self->lock_lock, timeout); if (r == PY_LOCK_INTR) { return NULL; } @@ -245,36 +277,38 @@ static PyMethodDef lock_methods[] = { {NULL, NULL} /* sentinel */ }; -static PyTypeObject Locktype = { - PyVarObject_HEAD_INIT(&PyType_Type, 0) - "_thread.lock", /*tp_name*/ - sizeof(lockobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)lock_dealloc, /*tp_dealloc*/ - 0, /*tp_vectorcall_offset*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_as_async*/ - (reprfunc)lock_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*/ - offsetof(lockobject, in_weakreflist), /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - lock_methods, /*tp_methods*/ +PyDoc_STRVAR(lock_doc, +"A lock object is a synchronization primitive. To create a lock,\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\ +locked() -- test whether the lock is currently locked\n\ +\n\ +A lock is not owned by the thread that locked it; another thread may\n\ +unlock it. A thread attempting to lock a lock that it has already locked\n\ +will block until another thread unlocks it. Deadlocks may ensue."); + +static PyMemberDef lock_type_members[] = { + {"__weaklistoffset__", T_PYSSIZET, offsetof(lockobject, in_weakreflist), READONLY}, + {NULL}, +}; + +static PyType_Slot lock_type_slots[] = { + {Py_tp_dealloc, (destructor)lock_dealloc}, + {Py_tp_repr, (reprfunc)lock_repr}, + {Py_tp_doc, (void *)lock_doc}, + {Py_tp_methods, lock_methods}, + {Py_tp_traverse, lock_traverse}, + {Py_tp_members, lock_type_members}, + {0, 0} +}; + +static PyType_Spec lock_type_spec = { + .name = "_thread.lock", + .basicsize = sizeof(lockobject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + .slots = lock_type_slots, }; /* Recursive lock objects */ @@ -301,7 +335,9 @@ rlock_dealloc(rlockobject *self) PyThread_free_lock(self->rlock_lock); } - Py_TYPE(self)->tp_free(self); + PyTypeObject *tp = Py_TYPE(self); + tp->tp_free(self); + Py_DECREF(tp); } static PyObject * @@ -525,58 +561,43 @@ static PyMethodDef rlock_methods[] = { }; -static PyTypeObject RLocktype = { - PyVarObject_HEAD_INIT(&PyType_Type, 0) - "_thread.RLock", /*tp_name*/ - sizeof(rlockobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)rlock_dealloc, /*tp_dealloc*/ - 0, /*tp_vectorcall_offset*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_as_async*/ - (reprfunc)rlock_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, /* tp_flags */ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - offsetof(rlockobject, in_weakreflist), /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - rlock_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 */ - PyType_GenericAlloc, /* tp_alloc */ - rlock_new /* tp_new */ +static PyMemberDef rlock_type_members[] = { + {"__weaklistoffset__", T_PYSSIZET, offsetof(rlockobject, in_weakreflist), READONLY}, + {NULL}, +}; + +static PyType_Slot rlock_type_slots[] = { + {Py_tp_dealloc, (destructor)rlock_dealloc}, + {Py_tp_repr, (reprfunc)rlock_repr}, + {Py_tp_methods, rlock_methods}, + {Py_tp_alloc, PyType_GenericAlloc}, + {Py_tp_new, rlock_new}, + {Py_tp_members, rlock_type_members}, + {0, 0}, +}; + +static PyType_Spec rlock_type_spec = { + .name = "_thread.RLock", + .basicsize = sizeof(rlockobject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + .slots = rlock_type_slots, }; static lockobject * -newlockobject(void) +newlockobject(PyObject *module) { - lockobject *self; - self = PyObject_New(lockobject, &Locktype); - if (self == NULL) + thread_module_state *state = get_thread_state(module); + + PyTypeObject *type = state->lock_type; + lockobject *self = (lockobject *)type->tp_alloc(type, 0); + if (self == NULL) { return NULL; + } + self->lock_lock = PyThread_allocate_lock(); self->locked = 0; self->in_weakreflist = NULL; + if (self->lock_lock == NULL) { Py_DECREF(self); PyErr_SetString(ThreadError, "can't allocate lock"); @@ -637,35 +658,28 @@ localdummy_dealloc(localdummyobject *self) { if (self->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) self); - Py_TYPE(self)->tp_free((PyObject*)self); + PyTypeObject *tp = Py_TYPE(self); + tp->tp_free((PyObject*)self); + Py_DECREF(tp); } -static PyTypeObject localdummytype = { - PyVarObject_HEAD_INIT(NULL, 0) - /* tp_name */ "_thread._localdummy", - /* tp_basicsize */ sizeof(localdummyobject), - /* tp_itemsize */ 0, - /* tp_dealloc */ (destructor)localdummy_dealloc, - /* tp_vectorcall_offset */ 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 */ 0, - /* tp_getattro */ 0, - /* tp_setattro */ 0, - /* tp_as_buffer */ 0, - /* tp_flags */ Py_TPFLAGS_DEFAULT, - /* tp_doc */ "Thread-local dummy", - /* tp_traverse */ 0, - /* tp_clear */ 0, - /* tp_richcompare */ 0, - /* tp_weaklistoffset */ offsetof(localdummyobject, weakreflist) +static PyMemberDef local_dummy_type_members[] = { + {"__weaklistoffset__", T_PYSSIZET, offsetof(localdummyobject, weakreflist), READONLY}, + {NULL}, +}; + +static PyType_Slot local_dummy_type_slots[] = { + {Py_tp_dealloc, (destructor)localdummy_dealloc}, + {Py_tp_doc, "Thread-local dummy"}, + {Py_tp_members, local_dummy_type_members}, + {0, 0} +}; + +static PyType_Spec local_dummy_type_spec = { + .name = "_thread._localdummy", + .basicsize = sizeof(localdummyobject), + .flags = Py_TPFLAGS_DEFAULT, + .slots = local_dummy_type_slots, }; @@ -682,19 +696,19 @@ typedef struct { } localobject; /* Forward declaration */ -static PyObject *_ldict(localobject *self); +static PyObject *_ldict(localobject *self, thread_module_state *state); static PyObject *_localdummy_destroyed(PyObject *meth_self, PyObject *dummyweakref); /* Create and register the dummy for the current thread. Returns a borrowed reference of the corresponding local dict */ static PyObject * -_local_create_dummy(localobject *self) +_local_create_dummy(localobject *self, thread_module_state *state) { - PyObject *tdict, *ldict = NULL, *wr = NULL; + PyObject *ldict = NULL, *wr = NULL; localdummyobject *dummy = NULL; - int r; + PyTypeObject *type = state->local_dummy_type; - tdict = PyThreadState_GetDict(); + PyObject *tdict = PyThreadState_GetDict(); if (tdict == NULL) { PyErr_SetString(PyExc_SystemError, "Couldn't get thread-state dictionary"); @@ -702,25 +716,30 @@ _local_create_dummy(localobject *self) } ldict = PyDict_New(); - if (ldict == NULL) + if (ldict == NULL) { goto err; - dummy = (localdummyobject *) localdummytype.tp_alloc(&localdummytype, 0); - if (dummy == NULL) + } + dummy = (localdummyobject *) type->tp_alloc(type, 0); + if (dummy == NULL) { goto err; + } dummy->localdict = ldict; wr = PyWeakref_NewRef((PyObject *) dummy, self->wr_callback); - if (wr == NULL) + if (wr == NULL) { goto err; + } /* As a side-effect, this will cache the weakref's hash before the dummy gets deleted */ - r = PyDict_SetItem(self->dummies, wr, ldict); - if (r < 0) + int r = PyDict_SetItem(self->dummies, wr, ldict); + if (r < 0) { goto err; + } Py_CLEAR(wr); r = PyDict_SetItem(tdict, self->key, (PyObject *) dummy); - if (r < 0) + if (r < 0) { goto err; + } Py_CLEAR(dummy); Py_DECREF(ldict); @@ -736,8 +755,6 @@ err: static PyObject * local_new(PyTypeObject *type, PyObject *args, PyObject *kw) { - localobject *self; - PyObject *wr; static PyMethodDef wr_callback_def = { "_localdummy_destroyed", (PyCFunction) _localdummy_destroyed, METH_O }; @@ -749,42 +766,48 @@ local_new(PyTypeObject *type, PyObject *args, PyObject *kw) if (rc == 0 && kw != NULL) rc = PyObject_IsTrue(kw); if (rc != 0) { - if (rc > 0) + if (rc > 0) { PyErr_SetString(PyExc_TypeError, "Initialization arguments are not supported"); + } return NULL; } } - self = (localobject *)type->tp_alloc(type, 0); - if (self == NULL) - return NULL; + PyObject *module = _PyType_GetModuleByDef(type, &thread_module); + thread_module_state *state = get_thread_state(module); - Py_XINCREF(args); - self->args = args; - Py_XINCREF(kw); - self->kw = kw; + localobject *self = (localobject *)type->tp_alloc(type, 0); + if (self == NULL) { + return NULL; + } + + self->args = Py_XNewRef(args); + self->kw = Py_XNewRef(kw); self->key = PyUnicode_FromFormat("thread.local.%p", self); - if (self->key == NULL) + if (self->key == NULL) { goto err; + } self->dummies = PyDict_New(); - if (self->dummies == NULL) + if (self->dummies == NULL) { goto err; + } /* We use a weak reference to self in the callback closure in order to avoid spurious reference cycles */ - wr = PyWeakref_NewRef((PyObject *) self, NULL); - if (wr == NULL) + PyObject *wr = PyWeakref_NewRef((PyObject *) self, NULL); + if (wr == NULL) { goto err; + } self->wr_callback = PyCFunction_NewEx(&wr_callback_def, wr, NULL); Py_DECREF(wr); - if (self->wr_callback == NULL) + if (self->wr_callback == NULL) { goto err; - - if (_local_create_dummy(self) == NULL) + } + if (_local_create_dummy(self, state) == NULL) { goto err; - + } return (PyObject *)self; err: @@ -795,6 +818,7 @@ local_new(PyTypeObject *type, PyObject *args, PyObject *kw) static int local_traverse(localobject *self, visitproc visit, void *arg) { + Py_VISIT(Py_TYPE(self)); Py_VISIT(self->args); Py_VISIT(self->kw); Py_VISIT(self->dummies); @@ -834,35 +858,38 @@ local_dealloc(localobject *self) { /* Weakrefs must be invalidated right now, otherwise they can be used from code called below, which is very dangerous since Py_REFCNT(self) == 0 */ - if (self->weakreflist != NULL) + if (self->weakreflist != NULL) { PyObject_ClearWeakRefs((PyObject *) self); + } PyObject_GC_UnTrack(self); local_clear(self); Py_XDECREF(self->key); - Py_TYPE(self)->tp_free((PyObject*)self); + + PyTypeObject *tp = Py_TYPE(self); + tp->tp_free((PyObject*)self); + Py_DECREF(tp); } /* Returns a borrowed reference to the local dict, creating it if necessary */ static PyObject * -_ldict(localobject *self) +_ldict(localobject *self, thread_module_state *state) { - PyObject *tdict, *ldict, *dummy; - - tdict = PyThreadState_GetDict(); + PyObject *tdict = PyThreadState_GetDict(); if (tdict == NULL) { PyErr_SetString(PyExc_SystemError, "Couldn't get thread-state dictionary"); return NULL; } - dummy = PyDict_GetItemWithError(tdict, self->key); + PyObject *ldict; + PyObject *dummy = PyDict_GetItemWithError(tdict, self->key); if (dummy == NULL) { if (PyErr_Occurred()) { return NULL; } - ldict = _local_create_dummy(self); + ldict = _local_create_dummy(self, state); if (ldict == NULL) return NULL; @@ -877,7 +904,7 @@ _ldict(localobject *self) } } else { - assert(Py_IS_TYPE(dummy, &localdummytype)); + assert(Py_IS_TYPE(dummy, state->local_dummy_type)); ldict = ((localdummyobject *) dummy)->localdict; } @@ -887,104 +914,97 @@ _ldict(localobject *self) static int local_setattro(localobject *self, PyObject *name, PyObject *v) { - PyObject *ldict; - int r; + PyObject *module = _PyType_GetModuleByDef(Py_TYPE(self), &thread_module); + thread_module_state *state = get_thread_state(module); - ldict = _ldict(self); - if (ldict == NULL) + PyObject *ldict = _ldict(self, state); + if (ldict == NULL) { return -1; + } - r = PyObject_RichCompareBool(name, str_dict, Py_EQ); + PyObject *str_dict = _PyUnicode_FromId(&PyId___dict__); // borrowed ref + if (str_dict == NULL) { + return -1; + } + + int r = PyObject_RichCompareBool(name, str_dict, Py_EQ); + if (r == -1) { + return -1; + } if (r == 1) { PyErr_Format(PyExc_AttributeError, "'%.50s' object attribute '%U' is read-only", Py_TYPE(self)->tp_name, name); return -1; } - if (r == -1) - return -1; return _PyObject_GenericSetAttrWithDict((PyObject *)self, name, v, ldict); } static PyObject *local_getattro(localobject *, PyObject *); -static PyTypeObject localtype = { - PyVarObject_HEAD_INIT(NULL, 0) - /* tp_name */ "_thread._local", - /* tp_basicsize */ sizeof(localobject), - /* tp_itemsize */ 0, - /* tp_dealloc */ (destructor)local_dealloc, - /* tp_vectorcall_offset */ 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 */ 0, - /* tp_getattro */ (getattrofunc)local_getattro, - /* tp_setattro */ (setattrofunc)local_setattro, - /* tp_as_buffer */ 0, - /* tp_flags */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE - | Py_TPFLAGS_HAVE_GC, - /* tp_doc */ "Thread-local data", - /* tp_traverse */ (traverseproc)local_traverse, - /* tp_clear */ (inquiry)local_clear, - /* tp_richcompare */ 0, - /* tp_weaklistoffset */ offsetof(localobject, weakreflist), - /* tp_iter */ 0, - /* tp_iternext */ 0, - /* tp_methods */ 0, - /* tp_members */ 0, - /* tp_getset */ 0, - /* tp_base */ 0, - /* tp_dict */ 0, /* internal use */ - /* tp_descr_get */ 0, - /* tp_descr_set */ 0, - /* tp_dictoffset */ 0, - /* tp_init */ 0, - /* tp_alloc */ 0, - /* tp_new */ local_new, - /* tp_free */ 0, /* Low-level free-mem routine */ - /* tp_is_gc */ 0, /* For PyObject_IS_GC */ +static PyMemberDef local_type_members[] = { + {"__weaklistoffset__", T_PYSSIZET, offsetof(localobject, weakreflist), READONLY}, + {NULL}, +}; + +static PyType_Slot local_type_slots[] = { + {Py_tp_dealloc, (destructor)local_dealloc}, + {Py_tp_getattro, (getattrofunc)local_getattro}, + {Py_tp_setattro, (setattrofunc)local_setattro}, + {Py_tp_doc, "Thread-local data"}, + {Py_tp_traverse, (traverseproc)local_traverse}, + {Py_tp_clear, (inquiry)local_clear}, + {Py_tp_new, local_new}, + {Py_tp_members, local_type_members}, + {0, 0} +}; + +static PyType_Spec local_type_spec = { + .name = "_thread._local", + .basicsize = sizeof(localobject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, + .slots = local_type_slots, }; static PyObject * local_getattro(localobject *self, PyObject *name) { - PyObject *ldict, *value; - int r; + PyObject *module = _PyType_GetModuleByDef(Py_TYPE(self), &thread_module); + thread_module_state *state = get_thread_state(module); - ldict = _ldict(self); + PyObject *ldict = _ldict(self, state); if (ldict == NULL) return NULL; - r = PyObject_RichCompareBool(name, str_dict, Py_EQ); - if (r == 1) { - Py_INCREF(ldict); - return ldict; - } - if (r == -1) + PyObject *str_dict = _PyUnicode_FromId(&PyId___dict__); // borrowed ref + if (str_dict == NULL) { return NULL; + } - if (!Py_IS_TYPE(self, &localtype)) + int r = PyObject_RichCompareBool(name, str_dict, Py_EQ); + if (r == 1) { + return Py_NewRef(ldict); + } + if (r == -1) { + return NULL; + } + + if (!Py_IS_TYPE(self, state->local_type)) { /* use generic lookup for subtypes */ - return _PyObject_GenericGetAttrWithDict( - (PyObject *)self, name, ldict, 0); + return _PyObject_GenericGetAttrWithDict((PyObject *)self, name, + ldict, 0); + } /* Optimization: just look in dict ourselves */ - value = PyDict_GetItemWithError(ldict, name); + PyObject *value = PyDict_GetItemWithError(ldict, name); if (value != NULL) { - Py_INCREF(value); - return value; + return Py_NewRef(value); } - else if (PyErr_Occurred()) { + if (PyErr_Occurred()) { return NULL; } + /* Fall back on generic to get __class__ and __dict__ */ return _PyObject_GenericGetAttrWithDict( (PyObject *)self, name, ldict, 0); @@ -994,17 +1014,15 @@ local_getattro(localobject *self, PyObject *name) static PyObject * _localdummy_destroyed(PyObject *localweakref, PyObject *dummyweakref) { - PyObject *obj; - localobject *self; assert(PyWeakref_CheckRef(localweakref)); - obj = PyWeakref_GET_OBJECT(localweakref); - if (obj == Py_None) + PyObject *obj = PyWeakref_GET_OBJECT(localweakref); + if (obj == Py_None) { Py_RETURN_NONE; - Py_INCREF(obj); - assert(PyObject_TypeCheck(obj, &localtype)); + } + /* If the thread-local object is still alive and not being cleared, remove the corresponding local dict */ - self = (localobject *) obj; + localobject *self = (localobject *)Py_NewRef(obj); if (self->dummies != NULL) { PyObject *ldict; ldict = PyDict_GetItemWithError(self->dummies, dummyweakref); @@ -1024,24 +1042,35 @@ struct bootstate { PyInterpreterState *interp; PyObject *func; PyObject *args; - PyObject *keyw; + PyObject *kwargs; PyThreadState *tstate; _PyRuntimeState *runtime; }; + static void -t_bootstrap(void *boot_raw) +thread_bootstate_free(struct bootstate *boot) +{ + Py_DECREF(boot->func); + Py_DECREF(boot->args); + Py_XDECREF(boot->kwargs); + PyMem_Free(boot); +} + + +static void +thread_run(void *boot_raw) { struct bootstate *boot = (struct bootstate *) boot_raw; PyThreadState *tstate; - PyObject *res; tstate = boot->tstate; tstate->thread_id = PyThread_get_thread_ident(); _PyThreadState_Init(tstate); PyEval_AcquireThread(tstate); tstate->interp->num_threads++; - res = PyObject_Call(boot->func, boot->args, boot->keyw); + + PyObject *res = PyObject_Call(boot->func, boot->args, boot->kwargs); if (res == NULL) { if (PyErr_ExceptionMatches(PyExc_SystemExit)) /* SystemExit is ignored silently */ @@ -1053,13 +1082,12 @@ t_bootstrap(void *boot_raw) else { Py_DECREF(res); } - Py_DECREF(boot->func); - Py_DECREF(boot->args); - Py_XDECREF(boot->keyw); - PyMem_DEL(boot_raw); + + thread_bootstate_free(boot); tstate->interp->num_threads--; PyThreadState_Clear(tstate); _PyThreadState_DeleteCurrent(tstate); + PyThread_exit_thread(); } @@ -1067,12 +1095,10 @@ static PyObject * thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs) { _PyRuntimeState *runtime = &_PyRuntime; - PyObject *func, *args, *keyw = NULL; - struct bootstate *boot; - unsigned long ident; + PyObject *func, *args, *kwargs = NULL; if (!PyArg_UnpackTuple(fargs, "start_new_thread", 2, 3, - &func, &args, &keyw)) + &func, &args, &kwargs)) return NULL; if (!PyCallable_Check(func)) { PyErr_SetString(PyExc_TypeError, @@ -1084,7 +1110,7 @@ thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs) "2nd arg must be a tuple"); return NULL; } - if (keyw != NULL && !PyDict_Check(keyw)) { + if (kwargs != NULL && !PyDict_Check(kwargs)) { PyErr_SetString(PyExc_TypeError, "optional 3rd arg must be a dictionary"); return NULL; @@ -1097,31 +1123,26 @@ thread_PyThread_start_new_thread(PyObject *self, PyObject *fargs) return NULL; } - boot = PyMem_NEW(struct bootstate, 1); - if (boot == NULL) - return PyErr_NoMemory(); - boot->interp = _PyInterpreterState_GET(); - boot->func = func; - boot->args = args; - boot->keyw = keyw; - boot->tstate = _PyThreadState_Prealloc(boot->interp); - boot->runtime = runtime; - if (boot->tstate == NULL) { - PyMem_DEL(boot); + struct bootstate *boot = PyMem_NEW(struct bootstate, 1); + if (boot == NULL) { return PyErr_NoMemory(); } - Py_INCREF(func); - Py_INCREF(args); - Py_XINCREF(keyw); + boot->interp = _PyInterpreterState_GET(); + boot->tstate = _PyThreadState_Prealloc(boot->interp); + if (boot->tstate == NULL) { + PyMem_Free(boot); + return PyErr_NoMemory(); + } + boot->runtime = runtime; + boot->func = Py_NewRef(func); + boot->args = Py_NewRef(args); + boot->kwargs = Py_XNewRef(kwargs); - ident = PyThread_start_new_thread(t_bootstrap, (void*) boot); + unsigned long ident = PyThread_start_new_thread(thread_run, (void*) boot); if (ident == PYTHREAD_INVALID_THREAD_ID) { PyErr_SetString(ThreadError, "can't start new thread"); - Py_DECREF(func); - Py_DECREF(args); - Py_XDECREF(keyw); PyThreadState_Clear(boot->tstate); - PyMem_DEL(boot); + thread_bootstate_free(boot); return NULL; } return PyLong_FromUnsignedLong(ident); @@ -1166,12 +1187,12 @@ Raise a KeyboardInterrupt in the main thread.\n\ A subthread can use this function to interrupt the main thread." ); -static lockobject *newlockobject(void); +static lockobject *newlockobject(PyObject *module); static PyObject * -thread_PyThread_allocate_lock(PyObject *self, PyObject *Py_UNUSED(ignored)) +thread_PyThread_allocate_lock(PyObject *module, PyObject *Py_UNUSED(ignored)) { - return (PyObject *) newlockobject(); + return (PyObject *) newlockobject(module); } PyDoc_STRVAR(allocate_doc, @@ -1248,7 +1269,6 @@ release_sentinel(void *wr_raw) PyObject *obj = PyWeakref_GET_OBJECT(wr); lockobject *lock; if (obj != Py_None) { - assert(Py_IS_TYPE(obj, &Locktype)); lock = (lockobject *) obj; if (lock->locked) { PyThread_release_lock(lock->lock_lock); @@ -1261,7 +1281,7 @@ release_sentinel(void *wr_raw) } static PyObject * -thread__set_sentinel(PyObject *self, PyObject *Py_UNUSED(ignored)) +thread__set_sentinel(PyObject *module, PyObject *Py_UNUSED(ignored)) { PyObject *wr; PyThreadState *tstate = PyThreadState_Get(); @@ -1276,7 +1296,7 @@ thread__set_sentinel(PyObject *self, PyObject *Py_UNUSED(ignored)) tstate->on_delete_data = NULL; Py_DECREF(wr); } - lock = newlockobject(); + lock = newlockobject(module); if (lock == NULL) return NULL; /* The lock is owned by whoever called _set_sentinel(), but the weakref @@ -1429,7 +1449,7 @@ static PyStructSequence_Field ExceptHookArgs_fields[] = { }; static PyStructSequence_Desc ExceptHookArgs_desc = { - .name = "_thread.ExceptHookArgs", + .name = "_thread._ExceptHookArgs", .doc = ExceptHookArgs__doc__, .fields = ExceptHookArgs_fields, .n_in_sequence = 4 @@ -1530,106 +1550,132 @@ static PyMethodDef thread_methods[] = { /* Initialization function */ +static int +thread_module_exec(PyObject *module) +{ + thread_module_state *state = get_thread_state(module); + PyObject *d = PyModule_GetDict(module); + + // Initialize the C thread library + PyThread_init_thread(); + + // Lock + state->lock_type = (PyTypeObject *)PyType_FromSpec(&lock_type_spec); + if (state->lock_type == NULL) { + return -1; + } + if (PyDict_SetItemString(d, "LockType", (PyObject *)state->lock_type) < 0) { + return -1; + } + + // RLock + PyTypeObject *rlock_type = (PyTypeObject *)PyType_FromSpec(&rlock_type_spec); + if (rlock_type == NULL) { + return -1; + } + if (PyModule_AddType(module, rlock_type) < 0) { + Py_DECREF(rlock_type); + return -1; + } + Py_DECREF(rlock_type); + + // Local dummy + state->local_dummy_type = (PyTypeObject *)PyType_FromSpec(&local_dummy_type_spec); + if (state->local_dummy_type == NULL) { + return -1; + } + + // Local + state->local_type = (PyTypeObject *)PyType_FromModuleAndSpec(module, &local_type_spec, NULL); + if (state->local_type == NULL) { + return -1; + } + if (PyModule_AddType(module, state->local_type) < 0) { + return -1; + } + + if (ExceptHookArgsType.tp_name == NULL) { + if (PyStructSequence_InitType2(&ExceptHookArgsType, + &ExceptHookArgs_desc) < 0) { + return -1; + } + } + + // Add module attributes + if (PyDict_SetItemString(d, "error", ThreadError) < 0) { + return -1; + } + if (PyModule_AddType(module, &ExceptHookArgsType) < 0) { + return -1; + } + + // TIMEOUT_MAX + double timeout_max = (_PyTime_t)PY_TIMEOUT_MAX * 1e-6; + double time_max = _PyTime_AsSecondsDouble(_PyTime_MAX); + timeout_max = Py_MIN(timeout_max, time_max); + // Round towards minus infinity + timeout_max = floor(timeout_max); + + if (PyModule_AddObject(module, "TIMEOUT_MAX", + PyFloat_FromDouble(timeout_max)) < 0) { + return -1; + } + + return 0; +} + + +static int +thread_module_traverse(PyObject *module, visitproc visit, void *arg) +{ + thread_module_state *state = get_thread_state(module); + Py_VISIT(state->lock_type); + Py_VISIT(state->local_type); + Py_VISIT(state->local_dummy_type); + return 0; +} + +static int +thread_module_clear(PyObject *module) +{ + thread_module_state *state = get_thread_state(module); + Py_CLEAR(state->lock_type); + Py_CLEAR(state->local_type); + Py_CLEAR(state->local_dummy_type); + return 0; +} + +static void +thread_module_free(void *module) +{ + thread_module_clear((PyObject *)module); +} + + + PyDoc_STRVAR(thread_doc, "This module provides primitive operations to write multi-threaded programs.\n\ 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 threading.Lock(). Methods are:\n\ -\n\ -acquire() -- lock the lock, possibly blocking until it can be obtained\n\ -release() -- unlock of the lock\n\ -locked() -- test whether the lock is currently locked\n\ -\n\ -A lock is not owned by the thread that locked it; another thread may\n\ -unlock it. A thread attempting to lock a lock that it has already locked\n\ -will block until another thread unlocks it. Deadlocks may ensue."); - -static struct PyModuleDef threadmodule = { - PyModuleDef_HEAD_INIT, - "_thread", - thread_doc, - -1, - thread_methods, - NULL, - NULL, - NULL, - NULL +static PyModuleDef_Slot thread_module_slots[] = { + {Py_mod_exec, thread_module_exec}, + {0, NULL} }; +static struct PyModuleDef thread_module = { + PyModuleDef_HEAD_INIT, + .m_name = "_thread", + .m_doc = thread_doc, + .m_size = sizeof(thread_module_state), + .m_methods = thread_methods, + .m_traverse = thread_module_traverse, + .m_clear = thread_module_clear, + .m_free = thread_module_free, + .m_slots = thread_module_slots, +}; PyMODINIT_FUNC PyInit__thread(void) { - PyObject *m, *d, *v; - double time_max; - double timeout_max; - PyInterpreterState *interp = _PyInterpreterState_GET(); - - /* Initialize types: */ - if (PyType_Ready(&localdummytype) < 0) - return NULL; - if (PyType_Ready(&localtype) < 0) - return NULL; - if (PyType_Ready(&Locktype) < 0) - return NULL; - if (PyType_Ready(&RLocktype) < 0) - return NULL; - if (ExceptHookArgsType.tp_name == NULL) { - if (PyStructSequence_InitType2(&ExceptHookArgsType, - &ExceptHookArgs_desc) < 0) { - return NULL; - } - } - - /* Create the module and add the functions */ - m = PyModule_Create(&threadmodule); - if (m == NULL) - return NULL; - - timeout_max = (_PyTime_t)PY_TIMEOUT_MAX * 1e-6; - time_max = _PyTime_AsSecondsDouble(_PyTime_MAX); - timeout_max = Py_MIN(timeout_max, time_max); - /* Round towards minus infinity */ - timeout_max = floor(timeout_max); - - v = PyFloat_FromDouble(timeout_max); - if (!v) - return NULL; - if (PyModule_AddObject(m, "TIMEOUT_MAX", v) < 0) - return NULL; - - /* Add a symbolic constant */ - d = PyModule_GetDict(m); - ThreadError = PyExc_RuntimeError; - Py_INCREF(ThreadError); - - PyDict_SetItemString(d, "error", ThreadError); - Locktype.tp_doc = lock_doc; - Py_INCREF(&Locktype); - PyDict_SetItemString(d, "LockType", (PyObject *)&Locktype); - - Py_INCREF(&RLocktype); - if (PyModule_AddObject(m, "RLock", (PyObject *)&RLocktype) < 0) - return NULL; - - Py_INCREF(&localtype); - if (PyModule_AddObject(m, "_local", (PyObject *)&localtype) < 0) - return NULL; - - Py_INCREF(&ExceptHookArgsType); - if (PyModule_AddObject(m, "_ExceptHookArgs", - (PyObject *)&ExceptHookArgsType) < 0) - return NULL; - - interp->num_threads = 0; - - str_dict = PyUnicode_InternFromString("__dict__"); - if (str_dict == NULL) - return NULL; - - /* Initialize the C thread library */ - PyThread_init_thread(); - return m; + return PyModuleDef_Init(&thread_module); } diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index b30141d4497..46d6a6e0954 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -904,7 +904,7 @@ PyTclObject_dealloc(PyTclObject *self) PyObject *tp = (PyObject *) Py_TYPE(self); Tcl_DecrRefCount(self->value); Py_XDECREF(self->string); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } @@ -2472,7 +2472,7 @@ PythonCmdDelete(ClientData clientData) ENTER_PYTHON Py_XDECREF(data->self); Py_XDECREF(data->func); - PyMem_DEL(data); + PyMem_Free(data); LEAVE_PYTHON } @@ -2545,7 +2545,7 @@ _tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name, CommandEvent *ev = (CommandEvent*)attemptckalloc(sizeof(CommandEvent)); if (ev == NULL) { PyErr_NoMemory(); - PyMem_DEL(data); + PyMem_Free(data); return NULL; } ev->ev.proc = (Tcl_EventProc*)Tkapp_CommandProc; @@ -2568,7 +2568,7 @@ _tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name, } if (err) { PyErr_SetString(Tkinter_TclError, "can't create Tcl command"); - PyMem_DEL(data); + PyMem_Free(data); return NULL; } @@ -2666,7 +2666,7 @@ DeleteFHCD(int id) *pp = p->next; Py_XDECREF(p->func); Py_XDECREF(p->file); - PyMem_DEL(p); + PyMem_Free(p); } else pp = &p->next; @@ -2823,7 +2823,7 @@ Tktt_Dealloc(PyObject *self) Py_XDECREF(func); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } @@ -3096,7 +3096,7 @@ Tkapp_Dealloc(PyObject *self) ENTER_TCL Tcl_DeleteInterp(Tkapp_Interp(self)); LEAVE_TCL - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); DisableEventHook(); } diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index 7888cf86de0..bb32b149668 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -172,7 +172,7 @@ static void update_strong_cache(const PyTypeObject *const type, PyObject *key, PyObject *zone); static PyObject * -zone_from_strong_cache(const PyTypeObject *const type, PyObject *key); +zone_from_strong_cache(const PyTypeObject *const type, PyObject *const key); static PyObject * zoneinfo_new_instance(PyTypeObject *type, PyObject *key) @@ -1214,15 +1214,9 @@ calendarrule_new(uint8_t month, uint8_t week, uint8_t day, int8_t hour, return -1; } - // day is an unsigned integer, so day < 0 should always return false, but - // if day's type changes to a signed integer *without* changing this value, - // it may create a bug. Considering that the compiler should be able to - // optimize out the first comparison if day is an unsigned integer anyway, - // we will leave this comparison in place and disable the compiler warning. -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wtype-limits" - if (day < 0 || day > 6) { -#pragma GCC diagnostic pop + // If the 'day' parameter type is changed to a signed type, + // "day < 0" check must be added. + if (/* day < 0 || */ day > 6) { PyErr_Format(PyExc_ValueError, "Day must be in [0, 6]"); return -1; } diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 2ba2ff43aa8..6583e666119 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -133,7 +133,7 @@ array_resize(arrayobject *self, Py_ssize_t newsize) } if (newsize == 0) { - PyMem_FREE(self->ob_item); + PyMem_Free(self->ob_item); self->ob_item = NULL; Py_SET_SIZE(self, 0); self->allocated = 0; @@ -652,7 +652,7 @@ array_dealloc(arrayobject *op) if (op->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) op); if (op->ob_item != NULL) - PyMem_DEL(op->ob_item); + PyMem_Free(op->ob_item); Py_TYPE(op)->tp_free((PyObject *)op); } diff --git a/Modules/atexitmodule.c b/Modules/atexitmodule.c index fd47ddd7731..49e2a75137e 100644 --- a/Modules/atexitmodule.c +++ b/Modules/atexitmodule.c @@ -7,117 +7,119 @@ */ #include "Python.h" - -/* Forward declaration (for atexit_cleanup) */ -static PyObject *atexit_clear(PyObject*, PyObject*); -/* Forward declaration of module object */ -static struct PyModuleDef atexitmodule; +#include "pycore_initconfig.h" // _PyStatus_NO_MEMORY +#include "pycore_interp.h" // PyInterpreterState.atexit +#include "pycore_pystate.h" // _PyInterpreterState_GET /* ===================================================================== */ /* Callback machinery. */ -typedef struct { - PyObject *func; - PyObject *args; - PyObject *kwargs; -} atexit_callback; - -typedef struct { - atexit_callback **atexit_callbacks; - int ncallbacks; - int callback_len; -} atexitmodule_state; - -static inline atexitmodule_state* -get_atexit_state(PyObject *module) +static inline struct atexit_state* +get_atexit_state(void) { - void *state = PyModule_GetState(module); - assert(state != NULL); - return (atexitmodule_state *)state; + PyInterpreterState *interp = _PyInterpreterState_GET(); + return &interp->atexit; } static void -atexit_delete_cb(atexitmodule_state *modstate, int i) +atexit_delete_cb(struct atexit_state *state, int i) { - atexit_callback *cb; + atexit_callback *cb = state->callbacks[i]; + state->callbacks[i] = NULL; - cb = modstate->atexit_callbacks[i]; - modstate->atexit_callbacks[i] = NULL; Py_DECREF(cb->func); Py_DECREF(cb->args); Py_XDECREF(cb->kwargs); PyMem_Free(cb); } + /* Clear all callbacks without calling them */ static void -atexit_cleanup(atexitmodule_state *modstate) +atexit_cleanup(struct atexit_state *state) { atexit_callback *cb; - int i; - for (i = 0; i < modstate->ncallbacks; i++) { - cb = modstate->atexit_callbacks[i]; + for (int i = 0; i < state->ncallbacks; i++) { + cb = state->callbacks[i]; if (cb == NULL) continue; - atexit_delete_cb(modstate, i); + atexit_delete_cb(state, i); } - modstate->ncallbacks = 0; + state->ncallbacks = 0; +} + + +PyStatus +_PyAtExit_Init(PyThreadState *tstate) +{ + struct atexit_state *state = &tstate->interp->atexit; + // _PyAtExit_Init() must only be called once + assert(state->callbacks == NULL); + + state->callback_len = 32; + state->ncallbacks = 0; + state->callbacks = PyMem_New(atexit_callback*, state->callback_len); + if (state->callbacks == NULL) { + return _PyStatus_NO_MEMORY(); + } + return _PyStatus_OK(); +} + + +void +_PyAtExit_Fini(PyInterpreterState *interp) +{ + struct atexit_state *state = &interp->atexit; + atexit_cleanup(state); + PyMem_Free(state->callbacks); + state->callbacks = NULL; } -/* Installed into pylifecycle.c's atexit mechanism */ static void -atexit_callfuncs(PyObject *module) +atexit_callfuncs(struct atexit_state *state) { - PyObject *exc_type = NULL, *exc_value, *exc_tb, *r; - atexit_callback *cb; - atexitmodule_state *modstate; - int i; + assert(!PyErr_Occurred()); - if (module == NULL) + if (state->ncallbacks == 0) { return; - modstate = get_atexit_state(module); + } - if (modstate->ncallbacks == 0) - return; - - - for (i = modstate->ncallbacks - 1; i >= 0; i--) - { - cb = modstate->atexit_callbacks[i]; - if (cb == NULL) + for (int i = state->ncallbacks - 1; i >= 0; i--) { + atexit_callback *cb = state->callbacks[i]; + if (cb == NULL) { continue; + } - r = PyObject_Call(cb->func, cb->args, cb->kwargs); - Py_XDECREF(r); - if (r == NULL) { - /* Maintain the last exception, but don't leak if there are - multiple exceptions. */ - if (exc_type) { - Py_DECREF(exc_type); - Py_XDECREF(exc_value); - Py_XDECREF(exc_tb); - } - PyErr_Fetch(&exc_type, &exc_value, &exc_tb); - if (!PyErr_GivenExceptionMatches(exc_type, PyExc_SystemExit)) { - PySys_WriteStderr("Error in atexit._run_exitfuncs:\n"); - PyErr_NormalizeException(&exc_type, &exc_value, &exc_tb); - PyErr_Display(exc_type, exc_value, exc_tb); - } + PyObject *res = PyObject_Call(cb->func, cb->args, cb->kwargs); + if (res == NULL) { + _PyErr_WriteUnraisableMsg("in atexit callback", cb->func); + } + else { + Py_DECREF(res); } } - atexit_cleanup(modstate); + atexit_cleanup(state); - if (exc_type) - PyErr_Restore(exc_type, exc_value, exc_tb); + assert(!PyErr_Occurred()); } + +void +_PyAtExit_Call(PyThreadState *tstate) +{ + struct atexit_state *state = &tstate->interp->atexit; + atexit_callfuncs(state); +} + + /* ===================================================================== */ /* Module methods. */ + PyDoc_STRVAR(atexit_register__doc__, "register(func, *args, **kwargs) -> func\n\ \n\ @@ -130,68 +132,63 @@ Register a function to be executed upon normal program termination\n\ func is returned to facilitate usage as a decorator."); static PyObject * -atexit_register(PyObject *self, PyObject *args, PyObject *kwargs) +atexit_register(PyObject *module, PyObject *args, PyObject *kwargs) { - atexitmodule_state *modstate; - atexit_callback *new_callback; - PyObject *func = NULL; - - modstate = get_atexit_state(self); - - if (modstate->ncallbacks >= modstate->callback_len) { - atexit_callback **r; - modstate->callback_len += 16; - r = (atexit_callback**)PyMem_Realloc(modstate->atexit_callbacks, - sizeof(atexit_callback*) * modstate->callback_len); - if (r == NULL) - return PyErr_NoMemory(); - modstate->atexit_callbacks = r; - } - if (PyTuple_GET_SIZE(args) == 0) { PyErr_SetString(PyExc_TypeError, "register() takes at least 1 argument (0 given)"); return NULL; } - func = PyTuple_GET_ITEM(args, 0); + PyObject *func = PyTuple_GET_ITEM(args, 0); if (!PyCallable_Check(func)) { PyErr_SetString(PyExc_TypeError, "the first argument must be callable"); return NULL; } - new_callback = PyMem_Malloc(sizeof(atexit_callback)); - if (new_callback == NULL) - return PyErr_NoMemory(); + struct atexit_state *state = get_atexit_state(); + if (state->ncallbacks >= state->callback_len) { + atexit_callback **r; + state->callback_len += 16; + size_t size = sizeof(atexit_callback*) * (size_t)state->callback_len; + r = (atexit_callback**)PyMem_Realloc(state->callbacks, size); + if (r == NULL) { + return PyErr_NoMemory(); + } + state->callbacks = r; + } - new_callback->args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args)); - if (new_callback->args == NULL) { - PyMem_Free(new_callback); + atexit_callback *callback = PyMem_Malloc(sizeof(atexit_callback)); + if (callback == NULL) { + return PyErr_NoMemory(); + } + + callback->args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args)); + if (callback->args == NULL) { + PyMem_Free(callback); return NULL; } - new_callback->func = func; - new_callback->kwargs = kwargs; - Py_INCREF(func); - Py_XINCREF(kwargs); + callback->func = Py_NewRef(func); + callback->kwargs = Py_XNewRef(kwargs); - modstate->atexit_callbacks[modstate->ncallbacks++] = new_callback; + state->callbacks[state->ncallbacks++] = callback; - Py_INCREF(func); - return func; + return Py_NewRef(func); } PyDoc_STRVAR(atexit_run_exitfuncs__doc__, "_run_exitfuncs() -> None\n\ \n\ -Run all registered exit functions."); +Run all registered exit functions.\n\ +\n\ +If a callaback raises an exception, it is logged with sys.unraisablehook."); static PyObject * -atexit_run_exitfuncs(PyObject *self, PyObject *unused) +atexit_run_exitfuncs(PyObject *module, PyObject *unused) { - atexit_callfuncs(self); - if (PyErr_Occurred()) - return NULL; + struct atexit_state *state = get_atexit_state(); + atexit_callfuncs(state); Py_RETURN_NONE; } @@ -201,9 +198,9 @@ PyDoc_STRVAR(atexit_clear__doc__, Clear the list of previously registered exit functions."); static PyObject * -atexit_clear(PyObject *self, PyObject *unused) +atexit_clear(PyObject *module, PyObject *unused) { - atexit_cleanup(get_atexit_state(self)); + atexit_cleanup(get_atexit_state()); Py_RETURN_NONE; } @@ -213,50 +210,10 @@ PyDoc_STRVAR(atexit_ncallbacks__doc__, Return the number of registered exit functions."); static PyObject * -atexit_ncallbacks(PyObject *self, PyObject *unused) +atexit_ncallbacks(PyObject *module, PyObject *unused) { - atexitmodule_state *modstate; - - modstate = get_atexit_state(self); - - return PyLong_FromSsize_t(modstate->ncallbacks); -} - -static int -atexit_m_traverse(PyObject *self, visitproc visit, void *arg) -{ - int i; - atexitmodule_state *modstate; - - modstate = (atexitmodule_state *)PyModule_GetState(self); - - for (i = 0; i < modstate->ncallbacks; i++) { - atexit_callback *cb = modstate->atexit_callbacks[i]; - if (cb == NULL) - continue; - Py_VISIT(cb->func); - Py_VISIT(cb->args); - Py_VISIT(cb->kwargs); - } - return 0; -} - -static int -atexit_m_clear(PyObject *self) -{ - atexitmodule_state *modstate; - modstate = (atexitmodule_state *)PyModule_GetState(self); - atexit_cleanup(modstate); - return 0; -} - -static void -atexit_free(PyObject *m) -{ - atexitmodule_state *modstate; - modstate = (atexitmodule_state *)PyModule_GetState(m); - atexit_cleanup(modstate); - PyMem_Free(modstate->atexit_callbacks); + struct atexit_state *state = get_atexit_state(); + return PyLong_FromSsize_t(state->ncallbacks); } PyDoc_STRVAR(atexit_unregister__doc__, @@ -268,29 +225,28 @@ atexit.register\n\ func - function to be unregistered"); static PyObject * -atexit_unregister(PyObject *self, PyObject *func) +atexit_unregister(PyObject *module, PyObject *func) { - atexitmodule_state *modstate; - atexit_callback *cb; - int i, eq; - - modstate = get_atexit_state(self); - - for (i = 0; i < modstate->ncallbacks; i++) + struct atexit_state *state = get_atexit_state(); + for (int i = 0; i < state->ncallbacks; i++) { - cb = modstate->atexit_callbacks[i]; - if (cb == NULL) + atexit_callback *cb = state->callbacks[i]; + if (cb == NULL) { continue; + } - eq = PyObject_RichCompareBool(cb->func, func, Py_EQ); - if (eq < 0) + int eq = PyObject_RichCompareBool(cb->func, func, Py_EQ); + if (eq < 0) { return NULL; - if (eq) - atexit_delete_cb(modstate, i); + } + if (eq) { + atexit_delete_cb(state, i); + } } Py_RETURN_NONE; } + static PyMethodDef atexit_methods[] = { {"register", (PyCFunction)(void(*)(void)) atexit_register, METH_VARARGS|METH_KEYWORDS, atexit_register__doc__}, @@ -305,6 +261,7 @@ static PyMethodDef atexit_methods[] = { {NULL, NULL} /* sentinel */ }; + /* ===================================================================== */ /* Initialization function. */ @@ -315,37 +272,12 @@ upon normal program termination.\n\ Two public functions, register and unregister, are defined.\n\ "); -static int -atexit_exec(PyObject *m) { - atexitmodule_state *modstate; - - modstate = get_atexit_state(m); - modstate->callback_len = 32; - modstate->ncallbacks = 0; - modstate->atexit_callbacks = PyMem_New(atexit_callback*, - modstate->callback_len); - if (modstate->atexit_callbacks == NULL) - return -1; - - _Py_PyAtExit(atexit_callfuncs, m); - return 0; -} - -static PyModuleDef_Slot atexit_slots[] = { - {Py_mod_exec, atexit_exec}, - {0, NULL} -}; - static struct PyModuleDef atexitmodule = { PyModuleDef_HEAD_INIT, - "atexit", - atexit__doc__, - sizeof(atexitmodule_state), - atexit_methods, - atexit_slots, - atexit_m_traverse, - atexit_m_clear, - (freefunc)atexit_free + .m_name = "atexit", + .m_doc = atexit__doc__, + .m_size = 0, + .m_methods = atexit_methods, }; PyMODINIT_FUNC diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 86402768b6e..9208b86b0c9 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -691,7 +691,7 @@ static struct PyMethodDef multibytecodec_methods[] = { static void multibytecodec_dealloc(MultibyteCodecObject *self) { - PyObject_Del(self); + PyObject_Free(self); } static PyTypeObject MultibyteCodec_Type = { @@ -1191,13 +1191,13 @@ _multibytecodec_MultibyteIncrementalDecoder_decode_impl(MultibyteIncrementalDeco goto errorexit; if (wdata != data) - PyMem_Del(wdata); + PyMem_Free(wdata); Py_XDECREF(buf.excobj); return res; errorexit: if (wdata != NULL && wdata != data) - PyMem_Del(wdata); + PyMem_Free(wdata); Py_XDECREF(buf.excobj); _PyUnicodeWriter_Dealloc(&buf.writer); return NULL; diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h index c1192bbcb0d..82729eeb56b 100644 --- a/Modules/clinic/itertoolsmodule.c.h +++ b/Modules/clinic/itertoolsmodule.c.h @@ -2,6 +2,37 @@ preserve [clinic start generated code]*/ +PyDoc_STRVAR(pairwise_new__doc__, +"pairwise(iterable, /)\n" +"--\n" +"\n" +"Return an iterator of overlapping pairs taken from the input iterator.\n" +"\n" +" s -> (s0,s1), (s1,s2), (s2, s3), ..."); + +static PyObject * +pairwise_new_impl(PyTypeObject *type, PyObject *iterable); + +static PyObject * +pairwise_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + PyObject *iterable; + + if ((type == &pairwise_type) && + !_PyArg_NoKeywords("pairwise", kwargs)) { + goto exit; + } + if (!_PyArg_CheckPositional("pairwise", PyTuple_GET_SIZE(args), 1, 1)) { + goto exit; + } + iterable = PyTuple_GET_ITEM(args, 0); + return_value = pairwise_new_impl(type, iterable); + +exit: + return return_value; +} + PyDoc_STRVAR(itertools_groupby__doc__, "groupby(iterable, key=None)\n" "--\n" @@ -627,4 +658,4 @@ skip_optional_pos: exit: return return_value; } -/*[clinic end generated code: output=d7f58dc477814b45 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=889c4afc3b13574f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index ee4ee8ceac5..4a72ea0dd56 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -5674,7 +5674,7 @@ exit: #endif /* defined(HAVE_COPY_FILE_RANGE) */ -#if defined(HAVE_SPLICE) +#if ((defined(HAVE_SPLICE) && !defined(_AIX))) PyDoc_STRVAR(os_splice__doc__, "splice($module, /, src, dst, count, offset_src=None, offset_dst=None,\n" @@ -5772,7 +5772,7 @@ exit: return return_value; } -#endif /* defined(HAVE_SPLICE) */ +#endif /* ((defined(HAVE_SPLICE) && !defined(_AIX))) */ #if defined(HAVE_MKFIFO) @@ -9163,4 +9163,4 @@ exit: #ifndef OS_WAITSTATUS_TO_EXITCODE_METHODDEF #define OS_WAITSTATUS_TO_EXITCODE_METHODDEF #endif /* !defined(OS_WAITSTATUS_TO_EXITCODE_METHODDEF) */ -/*[clinic end generated code: output=8a59e91178897267 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f3ec08afcd6cd8f8 input=a9049054013a1b77]*/ diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 45201435f24..fdbba6a7afc 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -2290,7 +2290,7 @@ _PyObject_GC_Resize(PyVarObject *op, Py_ssize_t nitems) } PyGC_Head *g = AS_GC(op); - g = (PyGC_Head *)PyObject_REALLOC(g, sizeof(PyGC_Head) + basicsize); + g = (PyGC_Head *)PyObject_Realloc(g, sizeof(PyGC_Head) + basicsize); if (g == NULL) return (PyVarObject *)PyErr_NoMemory(); op = (PyVarObject *) FROM_GC(g); @@ -2309,7 +2309,7 @@ PyObject_GC_Del(void *op) if (gcstate->generations[0].count > 0) { gcstate->generations[0].count--; } - PyObject_FREE(g); + PyObject_Free(g); } int diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index ce8b4347ef2..293735a8864 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -1,7 +1,9 @@ + #define PY_SSIZE_T_CLEAN #include "Python.h" #include "pycore_long.h" // _PyLong_GetZero() +#include "pycore_object.h" // _PyObject_GC_TRACK() #include "pycore_tuple.h" // _PyTuple_ITEMS() #include // offsetof() @@ -27,8 +29,9 @@ class itertools.accumulate "accumulateobject *" "&accumulate_type" class itertools.compress "compressobject *" "&compress_type" class itertools.filterfalse "filterfalseobject *" "&filterfalse_type" class itertools.count "countobject *" "&count_type" +class itertools.pairwise "pairwiseobject *" "&pairwise_type" [clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=ea05c93c6d94726a]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=6498ed21fbe1bf94]*/ static PyTypeObject groupby_type; static PyTypeObject _grouper_type; @@ -45,9 +48,140 @@ static PyTypeObject accumulate_type; static PyTypeObject compress_type; static PyTypeObject filterfalse_type; static PyTypeObject count_type; +static PyTypeObject pairwise_type; #include "clinic/itertoolsmodule.c.h" +/* pairwise object ***********************************************************/ + +typedef struct { + PyObject_HEAD + PyObject *it; + PyObject *old; +} pairwiseobject; + +/*[clinic input] +@classmethod +itertools.pairwise.__new__ as pairwise_new + iterable: object + / +Return an iterator of overlapping pairs taken from the input iterator. + + s -> (s0,s1), (s1,s2), (s2, s3), ... + +[clinic start generated code]*/ + +static PyObject * +pairwise_new_impl(PyTypeObject *type, PyObject *iterable) +/*[clinic end generated code: output=9f0267062d384456 input=6e7c3cddb431a8d6]*/ +{ + PyObject *it; + pairwiseobject *po; + + it = PyObject_GetIter(iterable); + if (it == NULL) { + return NULL; + } + po = (pairwiseobject *)type->tp_alloc(type, 0); + if (po == NULL) { + Py_DECREF(it); + return NULL; + } + po->it = it; + po->old = NULL; + return (PyObject *)po; +} + +static void +pairwise_dealloc(pairwiseobject *po) +{ + PyObject_GC_UnTrack(po); + Py_XDECREF(po->it); + Py_XDECREF(po->old); + Py_TYPE(po)->tp_free(po); +} + +static int +pairwise_traverse(pairwiseobject *po, visitproc visit, void *arg) +{ + Py_VISIT(po->it); + Py_VISIT(po->old); + return 0; +} + +static PyObject * +pairwise_next(pairwiseobject *po) +{ + PyObject *it = po->it; + PyObject *old = po->old; + PyObject *new, *result; + + if (it == NULL) { + return NULL; + } + if (old == NULL) { + po->old = old = (*Py_TYPE(it)->tp_iternext)(it); + if (old == NULL) { + Py_CLEAR(po->it); + return NULL; + } + } + new = (*Py_TYPE(it)->tp_iternext)(it); + if (new == NULL) { + Py_CLEAR(po->it); + Py_CLEAR(po->old); + return NULL; + } + /* Future optimization: Reuse the result tuple as we do in enumerate() */ + result = PyTuple_Pack(2, old, new); + Py_SETREF(po->old, new); + return result; +} + +static PyTypeObject pairwise_type = { + PyVarObject_HEAD_INIT(&PyType_Type, 0) + "itertools.pairwise", /* tp_name */ + sizeof(pairwiseobject), /* tp_basicsize */ + 0, /* tp_itemsize */ + /* methods */ + (destructor)pairwise_dealloc, /* tp_dealloc */ + 0, /* tp_vectorcall_offset */ + 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 | + Py_TPFLAGS_BASETYPE, /* tp_flags */ + pairwise_new__doc__, /* tp_doc */ + (traverseproc)pairwise_traverse, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + PyObject_SelfIter, /* tp_iter */ + (iternextfunc)pairwise_next, /* 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 */ + PyType_GenericAlloc, /* tp_alloc */ + pairwise_new, /* tp_new */ + PyObject_GC_Del, /* tp_free */ +}; + /* groupby object ************************************************************/ @@ -2245,6 +2379,11 @@ product_next(productobject *lz) lz->result = result; Py_DECREF(old_result); } + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + else if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } /* Now, we've got the only copy so we can update it in-place */ assert (npools==0 || Py_REFCNT(result) == 1); @@ -2568,6 +2707,11 @@ combinations_next(combinationsobject *co) co->result = result; Py_DECREF(old_result); } + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + else if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } /* Now, we've got the only copy so we can update it in-place * CPython's empty tuple is a singleton and cached in * PyTuple's freelist. @@ -2902,6 +3046,11 @@ cwr_next(cwrobject *co) co->result = result; Py_DECREF(old_result); } + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + else if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } /* Now, we've got the only copy so we can update it in-place CPython's empty tuple is a singleton and cached in PyTuple's freelist. */ assert(r == 0 || Py_REFCNT(result) == 1); @@ -3246,6 +3395,11 @@ permutations_next(permutationsobject *po) po->result = result; Py_DECREF(old_result); } + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + else if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } /* Now, we've got the only copy so we can update it in-place */ assert(r == 0 || Py_REFCNT(result) == 1); @@ -4516,6 +4670,11 @@ zip_longest_next(ziplongestobject *lz) PyTuple_SET_ITEM(result, i, item); Py_DECREF(olditem); } + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } } else { result = PyTuple_New(tuplesize); if (result == NULL) @@ -4666,6 +4825,7 @@ groupby(iterable[, keyfunc]) --> sub-iterators grouped by value of keyfunc(v)\n\ filterfalse(pred, seq) --> elements of seq where pred(elem) is False\n\ islice(seq, [start,] stop [, step]) --> elements from\n\ seq[start:stop:step]\n\ +pairwise(s) --> (s[0],s[1]), (s[1],s[2]), (s[2], s[3]), ...\n\ starmap(fun, seq) --> fun(*seq[0]), fun(*seq[1]), ...\n\ tee(it, n=2) --> (it1, it2 , ... itn) splits one iterator into n\n\ takewhile(pred, seq) --> seq[0], seq[1], until pred fails\n\ @@ -4695,6 +4855,7 @@ itertoolsmodule_exec(PyObject *m) &filterfalse_type, &count_type, &ziplongest_type, + &pairwise_type, &permutations_type, &product_type, &repeat_type, diff --git a/Modules/main.c b/Modules/main.c index 2cc891f61aa..ccf096352e9 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -223,7 +223,7 @@ pymain_import_readline(const PyConfig *config) static int -pymain_run_command(wchar_t *command, PyCompilerFlags *cf) +pymain_run_command(wchar_t *command) { PyObject *unicode, *bytes; int ret; @@ -243,7 +243,9 @@ pymain_run_command(wchar_t *command, PyCompilerFlags *cf) goto error; } - ret = PyRun_SimpleStringFlags(PyBytes_AsString(bytes), cf); + PyCompilerFlags cf = _PyCompilerFlags_INIT; + cf.cf_flags |= PyCF_IGNORE_COOKIE; + ret = PyRun_SimpleStringFlags(PyBytes_AsString(bytes), &cf); Py_DECREF(bytes); return (ret != 0); @@ -305,29 +307,23 @@ pymain_run_module(const wchar_t *modname, int set_argv0) static int -pymain_run_file(const PyConfig *config, PyCompilerFlags *cf) +pymain_run_file_obj(PyObject *program_name, PyObject *filename, + int skip_source_first_line) { - const wchar_t *filename = config->run_filename; - if (PySys_Audit("cpython.run_file", "u", filename) < 0) { + if (PySys_Audit("cpython.run_file", "O", filename) < 0) { return pymain_exit_err_print(); } - FILE *fp = _Py_wfopen(filename, L"rb"); + + FILE *fp = _Py_fopen_obj(filename, "rb"); if (fp == NULL) { - char *cfilename_buffer; - const char *cfilename; - int err = errno; - cfilename_buffer = _Py_EncodeLocaleRaw(filename, NULL); - if (cfilename_buffer != NULL) - cfilename = cfilename_buffer; - else - cfilename = ""; - fprintf(stderr, "%ls: can't open file '%s': [Errno %d] %s\n", - config->program_name, cfilename, err, strerror(err)); - PyMem_RawFree(cfilename_buffer); + // Ignore the OSError + PyErr_Clear(); + PySys_FormatStderr("%S: can't open file %R: [Errno %d] %s\n", + program_name, filename, errno, strerror(errno)); return 2; } - if (config->skip_source_first_line) { + if (skip_source_first_line) { int ch; /* Push back first newline so line numbers remain the same */ while ((ch = getc(fp)) != EOF) { @@ -340,104 +336,97 @@ pymain_run_file(const PyConfig *config, PyCompilerFlags *cf) 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", - config->program_name, filename); + PySys_FormatStderr("%S: %R is a directory, cannot continue\n", + program_name, filename); fclose(fp); return 1; } - /* call pending calls like signal handlers (SIGINT) */ + // Call pending calls like signal handlers (SIGINT) if (Py_MakePendingCalls() == -1) { fclose(fp); return pymain_exit_err_print(); } - PyObject *unicode, *bytes = NULL; - const char *filename_str; - - unicode = PyUnicode_FromWideChar(filename, wcslen(filename)); - if (unicode != NULL) { - bytes = PyUnicode_EncodeFSDefault(unicode); - Py_DECREF(unicode); - } - if (bytes != NULL) { - filename_str = PyBytes_AsString(bytes); - } - else { - PyErr_Clear(); - filename_str = ""; - } - /* PyRun_AnyFileExFlags(closeit=1) calls fclose(fp) before running code */ - int run = PyRun_AnyFileExFlags(fp, filename_str, 1, cf); - Py_XDECREF(bytes); + PyCompilerFlags cf = _PyCompilerFlags_INIT; + int run = _PyRun_AnyFileObject(fp, filename, 1, &cf); return (run != 0); } +static int +pymain_run_file(const PyConfig *config) +{ + PyObject *filename = PyUnicode_FromWideChar(config->run_filename, -1); + if (filename == NULL) { + PyErr_Print(); + return -1; + } + PyObject *program_name = PyUnicode_FromWideChar(config->program_name, -1); + if (program_name == NULL) { + Py_DECREF(filename); + PyErr_Print(); + return -1; + } + + int res = pymain_run_file_obj(program_name, filename, + config->skip_source_first_line); + Py_DECREF(filename); + Py_DECREF(program_name); + return res; +} + static int -pymain_run_startup(PyConfig *config, PyCompilerFlags *cf, int *exitcode) +pymain_run_startup(PyConfig *config, int *exitcode) { int ret; - PyObject *startup_obj = NULL; if (!config->use_environment) { return 0; } + PyObject *startup = NULL; #ifdef MS_WINDOWS - const wchar_t *wstartup = _wgetenv(L"PYTHONSTARTUP"); - if (wstartup == NULL || wstartup[0] == L'\0') { + const wchar_t *env = _wgetenv(L"PYTHONSTARTUP"); + if (env == NULL || env[0] == L'\0') { return 0; } - PyObject *startup_bytes = NULL; - startup_obj = PyUnicode_FromWideChar(wstartup, wcslen(wstartup)); - if (startup_obj == NULL) { - goto error; - } - startup_bytes = PyUnicode_EncodeFSDefault(startup_obj); - if (startup_bytes == NULL) { - goto error; - } - const char *startup = PyBytes_AS_STRING(startup_bytes); -#else - const char *startup = _Py_GetEnv(config->use_environment, "PYTHONSTARTUP"); + startup = PyUnicode_FromWideChar(env, wcslen(env)); if (startup == NULL) { + goto error; + } +#else + const char *env = _Py_GetEnv(config->use_environment, "PYTHONSTARTUP"); + if (env == NULL) { return 0; } - startup_obj = PyUnicode_DecodeFSDefault(startup); - if (startup_obj == NULL) { + startup = PyUnicode_DecodeFSDefault(env); + if (startup == NULL) { goto error; } #endif - if (PySys_Audit("cpython.run_startup", "O", startup_obj) < 0) { + if (PySys_Audit("cpython.run_startup", "O", startup) < 0) { goto error; } -#ifdef MS_WINDOWS - FILE *fp = _Py_wfopen(wstartup, L"r"); -#else - FILE *fp = _Py_fopen(startup, "r"); -#endif + FILE *fp = _Py_fopen_obj(startup, "r"); if (fp == NULL) { int save_errno = errno; PyErr_Clear(); PySys_WriteStderr("Could not open PYTHONSTARTUP\n"); errno = save_errno; - PyErr_SetFromErrnoWithFilenameObjects(PyExc_OSError, startup_obj, NULL); + PyErr_SetFromErrnoWithFilenameObjects(PyExc_OSError, startup, NULL); goto error; } - (void) PyRun_SimpleFileExFlags(fp, startup, 0, cf); + PyCompilerFlags cf = _PyCompilerFlags_INIT; + (void) _PyRun_SimpleFileObject(fp, startup, 0, &cf); PyErr_Clear(); fclose(fp); ret = 0; done: -#ifdef MS_WINDOWS - Py_XDECREF(startup_bytes); -#endif - Py_XDECREF(startup_obj); + Py_XDECREF(startup); return ret; error: @@ -484,14 +473,14 @@ error: static int -pymain_run_stdin(PyConfig *config, PyCompilerFlags *cf) +pymain_run_stdin(PyConfig *config) { if (stdin_is_interactive(config)) { config->inspect = 0; Py_InspectFlag = 0; /* do exit on SystemExit */ int exitcode; - if (pymain_run_startup(config, cf, &exitcode)) { + if (pymain_run_startup(config, &exitcode)) { return exitcode; } @@ -509,13 +498,14 @@ pymain_run_stdin(PyConfig *config, PyCompilerFlags *cf) return pymain_exit_err_print(); } - int run = PyRun_AnyFileExFlags(stdin, "", 0, cf); + PyCompilerFlags cf = _PyCompilerFlags_INIT; + int run = PyRun_AnyFileExFlags(stdin, "", 0, &cf); return (run != 0); } static void -pymain_repl(PyConfig *config, PyCompilerFlags *cf, int *exitcode) +pymain_repl(PyConfig *config, int *exitcode) { /* Check this environment variable at the end, to give programs the opportunity to set it from Python. */ @@ -534,7 +524,8 @@ pymain_repl(PyConfig *config, PyCompilerFlags *cf, int *exitcode) return; } - int res = PyRun_AnyFileFlags(stdin, "", cf); + PyCompilerFlags cf = _PyCompilerFlags_INIT; + int res = PyRun_AnyFileFlags(stdin, "", &cf); *exitcode = (res != 0); } @@ -580,13 +571,11 @@ pymain_run_python(int *exitcode) } } - PyCompilerFlags cf = _PyCompilerFlags_INIT; - pymain_header(config); pymain_import_readline(config); if (config->run_command) { - *exitcode = pymain_run_command(config->run_command, &cf); + *exitcode = pymain_run_command(config->run_command); } else if (config->run_module) { *exitcode = pymain_run_module(config->run_module, 1); @@ -595,13 +584,13 @@ pymain_run_python(int *exitcode) *exitcode = pymain_run_module(L"__main__", 0); } else if (config->run_filename != NULL) { - *exitcode = pymain_run_file(config, &cf); + *exitcode = pymain_run_file(config); } else { - *exitcode = pymain_run_stdin(config, &cf); + *exitcode = pymain_run_stdin(config); } - pymain_repl(config, &cf, exitcode); + pymain_repl(config, exitcode); goto done; error: diff --git a/Modules/md5module.c b/Modules/md5module.c index 9bd2bd17e4f..1c401e88438 100644 --- a/Modules/md5module.c +++ b/Modules/md5module.c @@ -342,7 +342,7 @@ static void MD5_dealloc(PyObject *ptr) { PyTypeObject *tp = Py_TYPE(ptr); - PyObject_Del(ptr); + PyObject_Free(ptr); Py_DECREF(tp); } diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c index 2a1ac10814a..4f2d9cb8b7c 100644 --- a/Modules/ossaudiodev.c +++ b/Modules/ossaudiodev.c @@ -154,7 +154,7 @@ oss_dealloc(oss_audio_t *self) /* if already closed, don't reclose it */ if (self->fd != -1) close(self->fd); - PyObject_Del(self); + PyObject_Free(self); } @@ -199,7 +199,7 @@ oss_mixer_dealloc(oss_mixer_t *self) /* if already closed, don't reclose it */ if (self->fd != -1) close(self->fd); - PyObject_Del(self); + PyObject_Free(self); } diff --git a/Modules/overlapped.c b/Modules/overlapped.c index 3829932070a..38dd98f0848 100644 --- a/Modules/overlapped.c +++ b/Modules/overlapped.c @@ -722,7 +722,7 @@ Overlapped_dealloc(OverlappedObject *self) SetLastError(olderr); PyTypeObject *tp = Py_TYPE(self); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index efa96531d49..13e3963bf51 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -672,7 +672,7 @@ _PyLong_FromGid(gid_t gid) } int -_Py_Uid_Converter(PyObject *obj, void *p) +_Py_Uid_Converter(PyObject *obj, uid_t *p) { uid_t uid; PyObject *index; @@ -759,7 +759,7 @@ _Py_Uid_Converter(PyObject *obj, void *p) success: Py_DECREF(index); - *(uid_t *)p = uid; + *p = uid; return 1; underflow: @@ -778,7 +778,7 @@ fail: } int -_Py_Gid_Converter(PyObject *obj, void *p) +_Py_Gid_Converter(PyObject *obj, gid_t *p) { gid_t gid; PyObject *index; @@ -866,7 +866,7 @@ _Py_Gid_Converter(PyObject *obj, void *p) success: Py_DECREF(index); - *(gid_t *)p = gid; + *p = gid; return 1; underflow: @@ -5480,7 +5480,7 @@ free_string_array(EXECV_CHAR **array, Py_ssize_t count) Py_ssize_t i; for (i = 0; i < count; i++) PyMem_Free(array[i]); - PyMem_DEL(array); + PyMem_Free(array); } static int @@ -6510,9 +6510,10 @@ os_spawnve_impl(PyObject *module, int mode, path_t *path, PyObject *argv, res = Py_BuildValue(_Py_PARSE_INTPTR, spawnval); fail_2: - while (--envc >= 0) - PyMem_DEL(envlist[envc]); - PyMem_DEL(envlist); + while (--envc >= 0) { + PyMem_Free(envlist[envc]); + } + PyMem_Free(envlist); fail_1: free_string_array(argvlist, lastarg); fail_0: @@ -7444,7 +7445,7 @@ os_getgrouplist_impl(PyObject *module, const char *user, gid_t basegid) list = PyList_New(ngroups); if (list == NULL) { - PyMem_Del(groups); + PyMem_Free(groups); return NULL; } @@ -7456,13 +7457,13 @@ os_getgrouplist_impl(PyObject *module, const char *user, gid_t basegid) #endif if (o == NULL) { Py_DECREF(list); - PyMem_Del(groups); + PyMem_Free(groups); return NULL; } PyList_SET_ITEM(list, i, o); } - PyMem_Del(groups); + PyMem_Free(groups); return list; } @@ -9407,7 +9408,7 @@ iov_setup(struct iovec **iov, Py_buffer **buf, PyObject *seq, Py_ssize_t cnt, in *buf = PyMem_New(Py_buffer, cnt); if (*buf == NULL) { - PyMem_Del(*iov); + PyMem_Free(*iov); PyErr_NoMemory(); return -1; } @@ -9427,11 +9428,11 @@ iov_setup(struct iovec **iov, Py_buffer **buf, PyObject *seq, Py_ssize_t cnt, in return 0; fail: - PyMem_Del(*iov); + PyMem_Free(*iov); for (j = 0; j < i; j++) { PyBuffer_Release(&(*buf)[j]); } - PyMem_Del(*buf); + PyMem_Free(*buf); return -1; } @@ -9439,11 +9440,11 @@ static void iov_cleanup(struct iovec *iov, Py_buffer *buf, int cnt) { int i; - PyMem_Del(iov); + PyMem_Free(iov); for (i = 0; i < cnt; i++) { PyBuffer_Release(&buf[i]); } - PyMem_Del(buf); + PyMem_Free(buf); } #endif @@ -10369,7 +10370,7 @@ os_copy_file_range_impl(PyObject *module, int src, int dst, Py_ssize_t count, } #endif /* HAVE_COPY_FILE_RANGE*/ -#ifdef HAVE_SPLICE +#if (defined(HAVE_SPLICE) && !defined(_AIX)) /*[clinic input] os.splice @@ -12815,7 +12816,7 @@ os_listxattr_impl(PyObject *module, path_t *path, int follow_symlinks) path_error(path); break; } - buffer = PyMem_MALLOC(buffer_size); + buffer = PyMem_Malloc(buffer_size); if (!buffer) { PyErr_NoMemory(); break; @@ -12832,7 +12833,7 @@ os_listxattr_impl(PyObject *module, path_t *path, int follow_symlinks) if (length < 0) { if (errno == ERANGE) { - PyMem_FREE(buffer); + PyMem_Free(buffer); buffer = NULL; continue; } @@ -12870,7 +12871,7 @@ os_listxattr_impl(PyObject *module, path_t *path, int follow_symlinks) } exit: if (buffer) - PyMem_FREE(buffer); + PyMem_Free(buffer); return result; } #endif /* USE_XATTRS */ diff --git a/Modules/posixmodule.h b/Modules/posixmodule.h index 1e00562abc3..711ac686934 100644 --- a/Modules/posixmodule.h +++ b/Modules/posixmodule.h @@ -14,8 +14,8 @@ extern "C" { #ifndef MS_WINDOWS PyAPI_FUNC(PyObject *) _PyLong_FromUid(uid_t); PyAPI_FUNC(PyObject *) _PyLong_FromGid(gid_t); -PyAPI_FUNC(int) _Py_Uid_Converter(PyObject *, void *); -PyAPI_FUNC(int) _Py_Gid_Converter(PyObject *, void *); +PyAPI_FUNC(int) _Py_Uid_Converter(PyObject *, uid_t *); +PyAPI_FUNC(int) _Py_Gid_Converter(PyObject *, gid_t *); #endif /* MS_WINDOWS */ #if defined(PYPTHREAD_SIGMASK) || defined(HAVE_SIGWAIT) || \ diff --git a/Modules/readline.c b/Modules/readline.c index bbab0f882e3..6cb3ee5c66a 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -51,7 +51,7 @@ extern char **completion_matches(char *, CPFunction *); * * This emulation library is not 100% API compatible with the "real" readline * and cannot be detected at compile-time, - * hence we use a runtime check to detect if the Python readlinke module is + * hence we use a runtime check to detect if the Python readline module is * linked to libedit. * * Currently there is one known API incompatibility: diff --git a/Modules/resource.c b/Modules/resource.c index 4f5dcf84387..f10a80f4776 100644 --- a/Modules/resource.c +++ b/Modules/resource.c @@ -63,8 +63,20 @@ static PyStructSequence_Desc struct_rusage_desc = { 16 /* n_in_sequence */ }; -static int initialized; -static PyTypeObject StructRUsageType; +typedef struct { + PyTypeObject *StructRUsageType; +} resourcemodulestate; + + +static inline resourcemodulestate* +get_resource_state(PyObject *module) +{ + void *state = PyModule_GetState(module); + assert(state != NULL); + return (resourcemodulestate *)state; +} + +static struct PyModuleDef resourcemodule; /*[clinic input] resource.getrusage @@ -91,7 +103,8 @@ resource_getrusage_impl(PyObject *module, int who) return NULL; } - result = PyStructSequence_New(&StructRUsageType); + result = PyStructSequence_New( + get_resource_state(module)->StructRUsageType); if (!result) return NULL; @@ -336,10 +349,10 @@ resource_methods[] = { /* Module initialization */ - static int resource_exec(PyObject *module) { + resourcemodulestate *state = get_resource_state(module); #define ADD_INT(module, value) \ do { \ if (PyModule_AddIntConstant(module, #value, value) < 0) { \ @@ -353,13 +366,12 @@ resource_exec(PyObject *module) Py_DECREF(PyExc_OSError); return -1; } - if (!initialized) { - if (PyStructSequence_InitType2(&StructRUsageType, - &struct_rusage_desc) < 0) - return -1; - } - if(PyModule_AddType(module, &StructRUsageType) < 0) { + state->StructRUsageType = PyStructSequence_NewType(&struct_rusage_desc); + if (state->StructRUsageType == NULL) { + return -1; + } + if (PyModule_AddType(module, state->StructRUsageType) < 0) { return -1; } @@ -483,8 +495,6 @@ resource_exec(PyObject *module) Py_DECREF(v); return -1; } - - initialized = 1; return 0; #undef ADD_INT @@ -495,12 +505,32 @@ static struct PyModuleDef_Slot resource_slots[] = { {0, NULL} }; +static int +resourcemodule_traverse(PyObject *m, visitproc visit, void *arg) { + Py_VISIT(get_resource_state(m)->StructRUsageType); + return 0; +} + +static int +resourcemodule_clear(PyObject *m) { + Py_CLEAR(get_resource_state(m)->StructRUsageType); + return 0; +} + +static void +resourcemodule_free(void *m) { + resourcemodule_clear((PyObject *)m); +} + static struct PyModuleDef resourcemodule = { PyModuleDef_HEAD_INIT, .m_name = "resource", - .m_size = 0, + .m_size = sizeof(resourcemodulestate), .m_methods = resource_methods, .m_slots = resource_slots, + .m_traverse = resourcemodule_traverse, + .m_clear = resourcemodule_clear, + .m_free = resourcemodule_free, }; PyMODINIT_FUNC diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 693a833caea..f80da589540 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -294,9 +294,9 @@ select_select_impl(PyObject *module, PyObject *rlist, PyObject *wlist, wfd2obj = PyMem_NEW(pylist, FD_SETSIZE + 1); efd2obj = PyMem_NEW(pylist, FD_SETSIZE + 1); if (rfd2obj == NULL || wfd2obj == NULL || efd2obj == NULL) { - if (rfd2obj) PyMem_DEL(rfd2obj); - if (wfd2obj) PyMem_DEL(wfd2obj); - if (efd2obj) PyMem_DEL(efd2obj); + if (rfd2obj) PyMem_Free(rfd2obj); + if (wfd2obj) PyMem_Free(wfd2obj); + if (efd2obj) PyMem_Free(efd2obj); return PyErr_NoMemory(); } #endif /* SELECT_USES_HEAP */ @@ -381,9 +381,9 @@ select_select_impl(PyObject *module, PyObject *rlist, PyObject *wlist, reap_obj(wfd2obj); reap_obj(efd2obj); #ifdef SELECT_USES_HEAP - PyMem_DEL(rfd2obj); - PyMem_DEL(wfd2obj); - PyMem_DEL(efd2obj); + PyMem_Free(rfd2obj); + PyMem_Free(wfd2obj); + PyMem_Free(efd2obj); #endif /* SELECT_USES_HEAP */ return ret; } @@ -740,9 +740,9 @@ poll_dealloc(pollObject *self) { PyObject* type = (PyObject *)Py_TYPE(self); if (self->ufds != NULL) - PyMem_DEL(self->ufds); + PyMem_Free(self->ufds); Py_XDECREF(self->dict); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(type); } @@ -1106,7 +1106,7 @@ newDevPollObject(PyObject *module) self = PyObject_New(devpollObject, get_select_state(module)->devpoll_Type); if (self == NULL) { close(fd_devpoll); - PyMem_DEL(fds); + PyMem_Free(fds); return NULL; } self->fd_devpoll = fd_devpoll; @@ -1129,8 +1129,8 @@ devpoll_dealloc(devpollObject *self) { PyObject *type = (PyObject *)Py_TYPE(self); (void)devpoll_internal_close(self); - PyMem_DEL(self->fds); - PyObject_Del(self); + PyMem_Free(self->fds); + PyObject_Free(self); Py_DECREF(type); } diff --git a/Modules/sha1module.c b/Modules/sha1module.c index c22437de256..5209857041d 100644 --- a/Modules/sha1module.c +++ b/Modules/sha1module.c @@ -320,7 +320,7 @@ static void SHA1_dealloc(PyObject *ptr) { PyTypeObject *tp = Py_TYPE(ptr); - PyObject_Del(ptr); + PyObject_Free(ptr); Py_DECREF(tp); } diff --git a/Modules/sha256module.c b/Modules/sha256module.c index edd4d010928..6b8bd8f1d27 100644 --- a/Modules/sha256module.c +++ b/Modules/sha256module.c @@ -397,7 +397,7 @@ static void SHA_dealloc(PyObject *ptr) { PyTypeObject *tp = Py_TYPE(ptr); - PyObject_Del(ptr); + PyObject_Free(ptr); Py_DECREF(tp); } diff --git a/Modules/sha512module.c b/Modules/sha512module.c index 725098def4d..3fd9fa4c8d1 100644 --- a/Modules/sha512module.c +++ b/Modules/sha512module.c @@ -453,7 +453,7 @@ static void SHA512_dealloc(PyObject *ptr) { PyTypeObject *tp = Py_TYPE(ptr); - PyObject_Del(ptr); + PyObject_Free(ptr); Py_DECREF(tp); } diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index fcc8f1cbda2..7ac797a3aa3 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -120,7 +120,11 @@ static volatile struct { #else #define INVALID_FD (-1) static volatile struct { +#ifdef __VXWORKS__ + int fd; +#else sig_atomic_t fd; +#endif int warn_on_full_buffer; } wakeup = {.fd = INVALID_FD, .warn_on_full_buffer = 1}; #endif diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index f8e4de5825f..c686286d779 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -3365,8 +3365,9 @@ sock_getsockname(PySocketSockObject *s, PyObject *Py_UNUSED(ignored)) PyDoc_STRVAR(getsockname_doc, "getsockname() -> address info\n\ \n\ -Return the address of the local endpoint. For IP sockets, the address\n\ -info is a pair (hostaddr, port)."); +Return the address of the local endpoint. The format depends on the\n\ +address family. For IPv4 sockets, the address info is a pair\n\ +(hostaddr, port)."); #ifdef HAVE_GETPEERNAME /* Cray APP doesn't have this :-( */ @@ -6101,13 +6102,10 @@ socket_ntohs(PyObject *self, PyObject *args) return NULL; } if (x > 0xffff) { - if (PyErr_WarnEx(PyExc_DeprecationWarning, - "ntohs: Python int too large to convert to C " - "16-bit unsigned integer (The silent truncation " - "is deprecated)", - 1)) { - return NULL; - } + PyErr_SetString(PyExc_OverflowError, + "ntohs: Python int too large to convert to C " + "16-bit unsigned integer"); + return NULL; } return PyLong_FromUnsignedLong(ntohs((unsigned short)x)); } @@ -6115,12 +6113,7 @@ socket_ntohs(PyObject *self, PyObject *args) PyDoc_STRVAR(ntohs_doc, "ntohs(integer) -> integer\n\ \n\ -Convert a 16-bit unsigned integer from network to host byte order.\n\ -Note that in case the received integer does not fit in 16-bit unsigned\n\ -integer, but does fit in a positive C int, it is silently truncated to\n\ -16-bit unsigned integer.\n\ -However, this silent truncation feature is deprecated, and will raise an\n\ -exception in future versions of Python."); +Convert a 16-bit unsigned integer from network to host byte order."); static PyObject * @@ -6172,13 +6165,10 @@ socket_htons(PyObject *self, PyObject *args) return NULL; } if (x > 0xffff) { - if (PyErr_WarnEx(PyExc_DeprecationWarning, - "htons: Python int too large to convert to C " - "16-bit unsigned integer (The silent truncation " - "is deprecated)", - 1)) { - return NULL; - } + PyErr_SetString(PyExc_OverflowError, + "htons: Python int too large to convert to C " + "16-bit unsigned integer"); + return NULL; } return PyLong_FromUnsignedLong(htons((unsigned short)x)); } @@ -6186,12 +6176,7 @@ socket_htons(PyObject *self, PyObject *args) PyDoc_STRVAR(htons_doc, "htons(integer) -> integer\n\ \n\ -Convert a 16-bit unsigned integer from host to network byte order.\n\ -Note that in case the received integer does not fit in 16-bit unsigned\n\ -integer, but does fit in a positive C int, it is silently truncated to\n\ -16-bit unsigned integer.\n\ -However, this silent truncation feature is deprecated, and will raise an\n\ -exception in future versions of Python."); +Convert a 16-bit unsigned integer from host to network byte order."); static PyObject * diff --git a/Modules/sre_lib.h b/Modules/sre_lib.h index cfe0a4af2c4..322f66fb4da 100644 --- a/Modules/sre_lib.h +++ b/Modules/sre_lib.h @@ -986,7 +986,7 @@ entrance: ctx->pattern[1], ctx->pattern[2])); /* install new repeat context */ - ctx->u.rep = (SRE_REPEAT*) PyObject_MALLOC(sizeof(*ctx->u.rep)); + ctx->u.rep = (SRE_REPEAT*) PyObject_Malloc(sizeof(*ctx->u.rep)); if (!ctx->u.rep) { PyErr_NoMemory(); RETURN_FAILURE; @@ -1000,7 +1000,7 @@ entrance: state->ptr = ctx->ptr; DO_JUMP(JUMP_REPEAT, jump_repeat, ctx->pattern+ctx->pattern[0]); state->repeat = ctx->u.rep->prev; - PyObject_FREE(ctx->u.rep); + PyObject_Free(ctx->u.rep); if (ret) { RETURN_ON_ERROR(ret); diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index fcf801dc9e4..4b8c46c7797 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -1418,7 +1418,7 @@ static void ucd_dealloc(PreviousDBVersion *self) { PyTypeObject *tp = Py_TYPE(self); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(tp); } diff --git a/Modules/xxlimited.c b/Modules/xxlimited.c index 5b05a9454a0..883c8a9b5e1 100644 --- a/Modules/xxlimited.c +++ b/Modules/xxlimited.c @@ -3,47 +3,103 @@ also declares object types. All occurrences of 'Xxo' should be changed to something reasonable for your objects. After that, all other occurrences of 'xx' should be changed to something reasonable for your - module. If your module is named foo your sourcefile should be named - foomodule.c. + module. If your module is named foo your source file should be named + foo.c or foomodule.c. You will probably want to delete all references to 'x_attr' and add your own types of attributes instead. Maybe you want to name your local variables other than 'self'. If your object type is needed in other files, you'll have to create a file "foobarobject.h"; see - floatobject.h for an example. */ + floatobject.h for an example. -/* Xxo objects */ + This module roughly corresponds to:: + + class Xxo: + """A class that explicitly stores attributes in an internal dict""" + + def __init__(self): + # In the C class, "_x_attr" is not accessible from Python code + self._x_attr = {} + + def __getattr__(self, name): + return self._x_attr[name] + + def __setattr__(self, name, value): + self._x_attr[name] = value + + def __delattr__(self, name): + del self._x_attr[name] + + def demo(o, /): + if isinstance(o, str): + return o + elif isinstance(o, Xxo): + return o + else: + raise Error('argument must be str or Xxo') + + class Error(Exception): + """Exception raised by the xxlimited module""" + + def foo(i: int, j: int, /): + """Return the sum of i and j.""" + # Unlike this pseudocode, the C function will *only* work with + # integers and perform C long int arithmetic + return i + j + + def new(): + return Xxo() + + def Str(str): + # A trivial subclass of a built-in type + pass + */ #include "Python.h" -static PyObject *ErrorObject; +// Module state +typedef struct { + PyObject *Xxo_Type; // Xxo class + PyObject *Error_Type; // Error class +} xx_state; + +/* Xxo objects */ + +// Instance state typedef struct { PyObject_HEAD PyObject *x_attr; /* Attributes dictionary */ } XxoObject; -static PyObject *Xxo_Type; - -#define XxoObject_Check(v) Py_IS_TYPE(v, Xxo_Type) +// XXX: no good way to do this yet +// #define XxoObject_Check(v) Py_IS_TYPE(v, Xxo_Type) static XxoObject * -newXxoObject(PyObject *arg) +newXxoObject(PyObject *module) { - XxoObject *self; - self = PyObject_GC_New(XxoObject, (PyTypeObject*)Xxo_Type); - if (self == NULL) + xx_state *state = PyModule_GetState(module); + if (state == NULL) { return NULL; + } + XxoObject *self; + self = PyObject_GC_New(XxoObject, (PyTypeObject*)state->Xxo_Type); + if (self == NULL) { + return NULL; + } self->x_attr = NULL; return self; } -/* Xxo methods */ +/* Xxo finalization */ static int Xxo_traverse(XxoObject *self, visitproc visit, void *arg) { + // Visit the type Py_VISIT(Py_TYPE(self)); + + // Visit the attribute dict Py_VISIT(self->x_attr); return 0; } @@ -54,26 +110,18 @@ Xxo_finalize(XxoObject *self) Py_CLEAR(self->x_attr); } -static PyObject * -Xxo_demo(XxoObject *self, PyObject *args) +static void +Xxo_dealloc(XxoObject *self) { - PyObject *o = NULL; - if (!PyArg_ParseTuple(args, "|O:demo", &o)) - return NULL; - /* Test availability of fast type checks */ - if (o != NULL && PyUnicode_Check(o)) { - Py_INCREF(o); - return o; - } - Py_INCREF(Py_None); - return Py_None; + Xxo_finalize(self); + PyTypeObject *tp = Py_TYPE(self); + freefunc free = PyType_GetSlot(tp, Py_tp_free); + free(self); + Py_DECREF(tp); } -static PyMethodDef Xxo_methods[] = { - {"demo", (PyCFunction)Xxo_demo, METH_VARARGS, - PyDoc_STR("demo() -> None")}, - {NULL, NULL} /* sentinel */ -}; + +/* Xxo attribute handling */ static PyObject * Xxo_getattro(XxoObject *self, PyObject *name) @@ -92,45 +140,109 @@ Xxo_getattro(XxoObject *self, PyObject *name) } static int -Xxo_setattr(XxoObject *self, const char *name, PyObject *v) +Xxo_setattro(XxoObject *self, PyObject *name, PyObject *v) { if (self->x_attr == NULL) { + // prepare the attribute dict self->x_attr = PyDict_New(); - if (self->x_attr == NULL) + if (self->x_attr == NULL) { return -1; + } } if (v == NULL) { - int rv = PyDict_DelItemString(self->x_attr, name); - if (rv < 0 && PyErr_ExceptionMatches(PyExc_KeyError)) + // delete an attribute + int rv = PyDict_DelItem(self->x_attr, name); + if (rv < 0 && PyErr_ExceptionMatches(PyExc_KeyError)) { PyErr_SetString(PyExc_AttributeError, "delete non-existing Xxo attribute"); + return -1; + } return rv; } - else - return PyDict_SetItemString(self->x_attr, name, v); + else { + // set an attribute + return PyDict_SetItem(self->x_attr, name, v); + } } +/* Xxo methods */ + +static PyObject * +Xxo_demo(XxoObject *self, PyTypeObject *defining_class, + PyObject **args, Py_ssize_t nargs, PyObject *kwnames) +{ + if (kwnames != NULL && PyObject_Length(kwnames)) { + PyErr_SetString(PyExc_TypeError, "demo() takes no keyword arguments"); + return NULL; + } + if (nargs != 1) { + PyErr_SetString(PyExc_TypeError, "demo() takes exactly 1 argument"); + return NULL; + } + + PyObject *o = args[0]; + + /* Test if the argument is "str" */ + if (PyUnicode_Check(o)) { + Py_INCREF(o); + return o; + } + + /* test if the argument is of the Xxo class */ + if (PyObject_TypeCheck(o, defining_class)) { + Py_INCREF(o); + return o; + } + + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef Xxo_methods[] = { + {"demo", (PyCFunction)(void(*)(void))Xxo_demo, + METH_METHOD | METH_FASTCALL | METH_KEYWORDS, PyDoc_STR("demo(o) -> o")}, + {NULL, NULL} /* sentinel */ +}; + +/* Xxo type definition */ + +PyDoc_STRVAR(Xxo_doc, + "A class that explicitly stores attributes in an internal dict"); + static PyType_Slot Xxo_Type_slots[] = { - {Py_tp_doc, "The Xxo type"}, + {Py_tp_doc, (char *)Xxo_doc}, {Py_tp_traverse, Xxo_traverse}, {Py_tp_finalize, Xxo_finalize}, + {Py_tp_dealloc, Xxo_dealloc}, {Py_tp_getattro, Xxo_getattro}, - {Py_tp_setattr, Xxo_setattr}, + {Py_tp_setattro, Xxo_setattro}, {Py_tp_methods, Xxo_methods}, - {0, 0}, + {0, 0}, /* sentinel */ }; static PyType_Spec Xxo_Type_spec = { - "xxlimited.Xxo", - sizeof(XxoObject), - 0, - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, - Xxo_Type_slots + .name = "xxlimited.Xxo", + .basicsize = sizeof(XxoObject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + .slots = Xxo_Type_slots, }; -/* --------------------------------------------------------------------- */ -/* Function of two integers returning integer */ +/* Str type definition*/ + +static PyType_Slot Str_Type_slots[] = { + {0, 0}, /* sentinel */ +}; + +static PyType_Spec Str_Type_spec = { + .name = "xxlimited.Str", + .basicsize = 0, + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + .slots = Str_Type_slots, +}; + + +/* Function of two integers returning integer (with C "long int" arithmetic) */ PyDoc_STRVAR(xx_foo_doc, "foo(i,j)\n\ @@ -138,7 +250,7 @@ PyDoc_STRVAR(xx_foo_doc, Return the sum of i and j."); static PyObject * -xx_foo(PyObject *self, PyObject *args) +xx_foo(PyObject *module, PyObject *args) { long i, j; long res; @@ -152,153 +264,110 @@ xx_foo(PyObject *self, PyObject *args) /* Function of no arguments returning new Xxo object */ static PyObject * -xx_new(PyObject *self, PyObject *args) +xx_new(PyObject *module, PyObject *Py_UNUSED(unused)) { XxoObject *rv; - if (!PyArg_ParseTuple(args, ":new")) - return NULL; - rv = newXxoObject(args); + rv = newXxoObject(module); if (rv == NULL) return NULL; return (PyObject *)rv; } -/* Test bad format character */ -static PyObject * -xx_roj(PyObject *self, PyObject *args) -{ - PyObject *a; - long b; - if (!PyArg_ParseTuple(args, "O#:roj", &a, &b)) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - - -/* ---------- */ - -static PyType_Slot Str_Type_slots[] = { - {Py_tp_base, NULL}, /* filled out in module init function */ - {0, 0}, -}; - -static PyType_Spec Str_Type_spec = { - "xxlimited.Str", - 0, - 0, - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, - Str_Type_slots -}; - -/* ---------- */ - -static PyObject * -null_richcompare(PyObject *self, PyObject *other, int op) -{ - Py_RETURN_NOTIMPLEMENTED; -} - -static PyType_Slot Null_Type_slots[] = { - {Py_tp_base, NULL}, /* filled out in module init */ - {Py_tp_new, NULL}, - {Py_tp_richcompare, null_richcompare}, - {0, 0} -}; - -static PyType_Spec Null_Type_spec = { - "xxlimited.Null", - 0, /* basicsize */ - 0, /* itemsize */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, - Null_Type_slots -}; - -/* ---------- */ /* List of functions defined in the module */ static PyMethodDef xx_methods[] = { - {"roj", xx_roj, METH_VARARGS, - PyDoc_STR("roj(a,b) -> None")}, {"foo", xx_foo, METH_VARARGS, xx_foo_doc}, - {"new", xx_new, METH_VARARGS, + {"new", xx_new, METH_NOARGS, PyDoc_STR("new() -> new Xx object")}, {NULL, NULL} /* sentinel */ }; + +/* The module itself */ + PyDoc_STRVAR(module_doc, "This is a template module just for instruction."); static int xx_modexec(PyObject *m) { - PyObject *o; + xx_state *state = PyModule_GetState(m); - /* Due to cross platform compiler issues the slots must be filled - * here. It's required for portability to Windows without requiring - * C++. */ - Null_Type_slots[0].pfunc = &PyBaseObject_Type; - Null_Type_slots[1].pfunc = PyType_GenericNew; - Str_Type_slots[0].pfunc = &PyUnicode_Type; - - Xxo_Type = PyType_FromSpec(&Xxo_Type_spec); - if (Xxo_Type == NULL) - goto fail; - - /* Add some symbolic constants to the module */ - if (ErrorObject == NULL) { - ErrorObject = PyErr_NewException("xxlimited.error", NULL, NULL); - if (ErrorObject == NULL) - goto fail; + state->Error_Type = PyErr_NewException("xxlimited.Error", NULL, NULL); + if (state->Error_Type == NULL) { + return -1; + } + if (PyModule_AddType(m, (PyTypeObject*)state->Error_Type) < 0) { + return -1; } - 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); + state->Xxo_Type = PyType_FromModuleAndSpec(m, &Xxo_Type_spec, NULL); + if (state->Xxo_Type == NULL) { + return -1; + } + if (PyModule_AddType(m, (PyTypeObject*)state->Xxo_Type) < 0) { + return -1; + } - /* Add Str */ - o = PyType_FromSpec(&Str_Type_spec); - if (o == NULL) - goto fail; - PyModule_AddObject(m, "Str", o); + // Add the Str type. It is not needed from C code, so it is only + // added to the module dict. + // It does not inherit from "object" (PyObject_Type), but from "str" + // (PyUnincode_Type). + PyObject *Str_Type = PyType_FromModuleAndSpec( + m, &Str_Type_spec, (PyObject *)&PyUnicode_Type); + if (Str_Type == NULL) { + return -1; + } + if (PyModule_AddType(m, (PyTypeObject*)Str_Type) < 0) { + return -1; + } + Py_DECREF(Str_Type); - /* Add Null */ - o = PyType_FromSpec(&Null_Type_spec); - if (o == NULL) - goto fail; - PyModule_AddObject(m, "Null", o); return 0; - fail: - Py_XDECREF(m); - return -1; } - static PyModuleDef_Slot xx_slots[] = { {Py_mod_exec, xx_modexec}, {0, NULL} }; +static int +xx_traverse(PyObject *module, visitproc visit, void *arg) +{ + xx_state *state = PyModule_GetState(module); + Py_VISIT(state->Xxo_Type); + Py_VISIT(state->Error_Type); + return 0; +} + +static int +xx_clear(PyObject *module) +{ + xx_state *state = PyModule_GetState(module); + Py_CLEAR(state->Xxo_Type); + Py_CLEAR(state->Error_Type); + return 0; +} + static struct PyModuleDef xxmodule = { PyModuleDef_HEAD_INIT, - "xxlimited", - module_doc, - 0, - xx_methods, - xx_slots, - NULL, - NULL, - NULL + .m_name = "xxlimited", + .m_doc = module_doc, + .m_size = sizeof(xx_state), + .m_methods = xx_methods, + .m_slots = xx_slots, + .m_traverse = xx_traverse, + .m_clear = xx_clear, + /* m_free is not necessary here: xx_clear clears all references, + * and the module state is deallocated along with the module. + */ }; + /* Export function for the module (*must* be called PyInit_xx) */ PyMODINIT_FUNC diff --git a/Modules/xxlimited_35.c b/Modules/xxlimited_35.c new file mode 100644 index 00000000000..ce96e8c90ef --- /dev/null +++ b/Modules/xxlimited_35.c @@ -0,0 +1,301 @@ + +/* This module is compiled using limited API from Python 3.5, + * making sure that it works as expected. + * + * See the xxlimited module for an extension module template. + */ + +/* Xxo objects */ + +#include "Python.h" + +static PyObject *ErrorObject; + +typedef struct { + PyObject_HEAD + PyObject *x_attr; /* Attributes dictionary */ +} XxoObject; + +static PyObject *Xxo_Type; + +#define XxoObject_Check(v) Py_IS_TYPE(v, Xxo_Type) + +static XxoObject * +newXxoObject(PyObject *arg) +{ + XxoObject *self; + self = PyObject_GC_New(XxoObject, (PyTypeObject*)Xxo_Type); + if (self == NULL) + return NULL; + self->x_attr = NULL; + return self; +} + +/* Xxo methods */ + +static int +Xxo_traverse(XxoObject *self, visitproc visit, void *arg) +{ + Py_VISIT(Py_TYPE(self)); + Py_VISIT(self->x_attr); + return 0; +} + +static void +Xxo_finalize(XxoObject *self) +{ + Py_CLEAR(self->x_attr); +} + +static PyObject * +Xxo_demo(XxoObject *self, PyObject *args) +{ + PyObject *o = NULL; + if (!PyArg_ParseTuple(args, "|O:demo", &o)) + return NULL; + /* Test availability of fast type checks */ + if (o != NULL && PyUnicode_Check(o)) { + Py_INCREF(o); + return o; + } + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef Xxo_methods[] = { + {"demo", (PyCFunction)Xxo_demo, METH_VARARGS, + PyDoc_STR("demo() -> None")}, + {NULL, NULL} /* sentinel */ +}; + +static PyObject * +Xxo_getattro(XxoObject *self, PyObject *name) +{ + if (self->x_attr != NULL) { + PyObject *v = PyDict_GetItemWithError(self->x_attr, name); + if (v != NULL) { + Py_INCREF(v); + return v; + } + else if (PyErr_Occurred()) { + return NULL; + } + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static int +Xxo_setattr(XxoObject *self, const 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_ExceptionMatches(PyExc_KeyError)) + PyErr_SetString(PyExc_AttributeError, + "delete non-existing Xxo attribute"); + return rv; + } + else + return PyDict_SetItemString(self->x_attr, name, v); +} + +static PyType_Slot Xxo_Type_slots[] = { + {Py_tp_doc, "The Xxo type"}, + {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}, + {0, 0}, +}; + +static PyType_Spec Xxo_Type_spec = { + "xxlimited.Xxo", + sizeof(XxoObject), + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + Xxo_Type_slots +}; + +/* --------------------------------------------------------------------- */ + +/* Function of two integers returning integer */ + +PyDoc_STRVAR(xx_foo_doc, +"foo(i,j)\n\ +\n\ +Return the sum of i and j."); + +static PyObject * +xx_foo(PyObject *self, PyObject *args) +{ + long i, j; + long res; + if (!PyArg_ParseTuple(args, "ll:foo", &i, &j)) + return NULL; + res = i+j; /* XXX Do something here */ + return PyLong_FromLong(res); +} + + +/* Function of no arguments returning new Xxo object */ + +static PyObject * +xx_new(PyObject *self, PyObject *args) +{ + XxoObject *rv; + + if (!PyArg_ParseTuple(args, ":new")) + return NULL; + rv = newXxoObject(args); + if (rv == NULL) + return NULL; + return (PyObject *)rv; +} + +/* Test bad format character */ + +static PyObject * +xx_roj(PyObject *self, PyObject *args) +{ + PyObject *a; + long b; + if (!PyArg_ParseTuple(args, "O#:roj", &a, &b)) + return NULL; + Py_INCREF(Py_None); + return Py_None; +} + + +/* ---------- */ + +static PyType_Slot Str_Type_slots[] = { + {Py_tp_base, NULL}, /* filled out in module init function */ + {0, 0}, +}; + +static PyType_Spec Str_Type_spec = { + "xxlimited.Str", + 0, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + Str_Type_slots +}; + +/* ---------- */ + +static PyObject * +null_richcompare(PyObject *self, PyObject *other, int op) +{ + Py_RETURN_NOTIMPLEMENTED; +} + +static PyType_Slot Null_Type_slots[] = { + {Py_tp_base, NULL}, /* filled out in module init */ + {Py_tp_new, NULL}, + {Py_tp_richcompare, null_richcompare}, + {0, 0} +}; + +static PyType_Spec Null_Type_spec = { + "xxlimited.Null", + 0, /* basicsize */ + 0, /* itemsize */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + Null_Type_slots +}; + +/* ---------- */ + +/* List of functions defined in the module */ + +static PyMethodDef xx_methods[] = { + {"roj", xx_roj, METH_VARARGS, + PyDoc_STR("roj(a,b) -> None")}, + {"foo", xx_foo, METH_VARARGS, + xx_foo_doc}, + {"new", xx_new, METH_VARARGS, + PyDoc_STR("new() -> new Xx object")}, + {NULL, NULL} /* sentinel */ +}; + +PyDoc_STRVAR(module_doc, +"This is a module for testing limited API from Python 3.5."); + +static int +xx_modexec(PyObject *m) +{ + PyObject *o; + + /* Due to cross platform compiler issues the slots must be filled + * here. It's required for portability to Windows without requiring + * C++. */ + Null_Type_slots[0].pfunc = &PyBaseObject_Type; + Null_Type_slots[1].pfunc = PyType_GenericNew; + Str_Type_slots[0].pfunc = &PyUnicode_Type; + + Xxo_Type = PyType_FromSpec(&Xxo_Type_spec); + if (Xxo_Type == NULL) + goto fail; + + /* Add some symbolic constants to the module */ + if (ErrorObject == NULL) { + ErrorObject = PyErr_NewException("xxlimited.error", NULL, NULL); + if (ErrorObject == NULL) + goto fail; + } + 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) + goto fail; + PyModule_AddObject(m, "Str", o); + + /* Add Null */ + o = PyType_FromSpec(&Null_Type_spec); + if (o == NULL) + goto fail; + PyModule_AddObject(m, "Null", o); + return 0; + fail: + Py_XDECREF(m); + return -1; +} + + +static PyModuleDef_Slot xx_slots[] = { + {Py_mod_exec, xx_modexec}, + {0, NULL} +}; + +static struct PyModuleDef xxmodule = { + PyModuleDef_HEAD_INIT, + "xxlimited_35", + module_doc, + 0, + xx_methods, + xx_slots, + NULL, + NULL, + NULL +}; + +/* Export function for the module (*must* be called PyInit_xx) */ + +PyMODINIT_FUNC +PyInit_xxlimited_35(void) +{ + return PyModuleDef_Init(&xxmodule); +} diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c index 17b049c4b9a..edcd62157c0 100644 --- a/Modules/xxmodule.c +++ b/Modules/xxmodule.c @@ -44,7 +44,7 @@ static void Xxo_dealloc(XxoObject *self) { Py_XDECREF(self->x_attr); - PyObject_Del(self); + PyObject_Free(self); } static PyObject * diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index def617671f1..a537087d19d 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -591,7 +591,7 @@ Dealloc(compobject *self) Py_XDECREF(self->unused_data); Py_XDECREF(self->unconsumed_tail); Py_XDECREF(self->zdict); - PyObject_Del(self); + PyObject_Free(self); Py_DECREF(type); } diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 805707a4529..7cb2b1478cf 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -13,10 +13,9 @@ class bytearray "PyByteArrayObject *" "&PyByteArray_Type" [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=5535b77c37a119e0]*/ +/* For PyByteArray_AS_STRING(). */ char _PyByteArray_empty_string[] = ""; -/* end nullbytes support */ - /* Helpers */ static int @@ -266,7 +265,7 @@ PyByteArray_Concat(PyObject *a, PyObject *b) result = (PyByteArrayObject *) \ PyByteArray_FromStringAndSize(NULL, va.len + vb.len); - // result->ob_bytes is NULL if result is an empty string: + // result->ob_bytes is NULL if result is an empty bytearray: // if va.len + vb.len equals zero. if (result != NULL && result->ob_bytes != NULL) { memcpy(result->ob_bytes, va.buf, va.len); @@ -1007,9 +1006,6 @@ bytearray_richcompare(PyObject *self, PyObject *other, int op) Py_buffer self_bytes, other_bytes; int cmp; - /* Bytes can be compared to anything that supports the (binary) - buffer API. Except that a comparison with Unicode is always an - error, even if the comparison is for equality. */ if (!PyObject_CheckBuffer(self) || !PyObject_CheckBuffer(other)) { if (PyUnicode_Check(self) || PyUnicode_Check(other)) { if (_Py_GetConfig()->bytes_warning && (op == Py_EQ || op == Py_NE)) { @@ -1021,6 +1017,7 @@ bytearray_richcompare(PyObject *self, PyObject *other, int op) Py_RETURN_NOTIMPLEMENTED; } + /* Bytearrays can be compared to anything that supports the buffer API. */ if (PyObject_GetBuffer(self, &self_bytes, PyBUF_SIMPLE) != 0) { PyErr_Clear(); Py_RETURN_NOTIMPLEMENTED; @@ -1328,7 +1325,7 @@ bytearray_translate_impl(PyByteArrayObject *self, PyObject *table, if (trans_table[c] != -1) *output++ = (char)trans_table[c]; } - /* Fix the size of the resulting string */ + /* Fix the size of the resulting bytearray */ if (inlen > 0) if (PyByteArray_Resize(result, output - output_start) < 0) { Py_CLEAR(result); @@ -2083,7 +2080,7 @@ bytearray.hex How many bytes between separators. Positive values count from the right, negative values count from the left. -Create a str of hexadecimal numbers from a bytearray object. +Create a string of hexadecimal numbers from a bytearray object. Example: >>> value = bytearray([0xb9, 0x01, 0xef]) @@ -2099,7 +2096,7 @@ Example: static PyObject * bytearray_hex_impl(PyByteArrayObject *self, PyObject *sep, int bytes_per_sep) -/*[clinic end generated code: output=29c4e5ef72c565a0 input=814c15830ac8c4b5]*/ +/*[clinic end generated code: output=29c4e5ef72c565a0 input=808667e49bcccb54]*/ { char* argbuf = PyByteArray_AS_STRING(self); Py_ssize_t arglen = PyByteArray_GET_SIZE(self); @@ -2358,7 +2355,7 @@ PyTypeObject PyByteArray_Type = { PyObject_Del, /* tp_free */ }; -/*********************** Bytes Iterator ****************************/ +/*********************** Bytearray Iterator ****************************/ typedef struct { PyObject_HEAD diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index bb844090b86..ccabbdca1d5 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -5,6 +5,7 @@ #include "Python.h" #include "pycore_abstract.h" // _PyIndex_Check() #include "pycore_bytes_methods.h" // _Py_bytes_startswith() +#include "pycore_format.h" // F_LJUST #include "pycore_initconfig.h" // _PyStatus_OK() #include "pycore_object.h" // _PyObject_GC_TRACK #include "pycore_pymem.h" // PYMEM_CLEANBYTE @@ -21,11 +22,11 @@ class bytes "PyBytesObject *" "&PyBytes_Type" _Py_IDENTIFIER(__bytes__); -/* PyBytesObject_SIZE gives the basic size of a string; any memory allocation - for a string of length n should request PyBytesObject_SIZE + n bytes. +/* PyBytesObject_SIZE gives the basic size of a bytes object; any memory allocation + for a bytes object of length n should request PyBytesObject_SIZE + n bytes. Using PyBytesObject_SIZE instead of sizeof(PyBytesObject) saves - 3 bytes per string allocation on a typical system. + 3 or 7 bytes per bytes object allocation on a typical system. */ #define PyBytesObject_SIZE (offsetof(PyBytesObject, ob_sval) + 1) @@ -198,7 +199,7 @@ PyBytes_FromString(const char *str) } /* Inline PyObject_NewVar */ - op = (PyBytesObject *)PyObject_MALLOC(PyBytesObject_SIZE + size); + op = (PyBytesObject *)PyObject_Malloc(PyBytesObject_SIZE + size); if (op == NULL) { return PyErr_NoMemory(); } @@ -439,19 +440,6 @@ getnextarg(PyObject *args, Py_ssize_t arglen, Py_ssize_t *p_argidx) 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 char* @@ -1475,7 +1463,7 @@ bytes_repeat(PyBytesObject *a, Py_ssize_t n) "repeated bytes are too long"); return NULL; } - op = (PyBytesObject *)PyObject_MALLOC(PyBytesObject_SIZE + nbytes); + op = (PyBytesObject *)PyObject_Malloc(PyBytesObject_SIZE + nbytes); if (op == NULL) { return PyErr_NoMemory(); } @@ -1560,7 +1548,7 @@ bytes_richcompare(PyBytesObject *a, PyBytesObject *b, int op) case Py_EQ: case Py_LE: case Py_GE: - /* a string is equal to itself */ + /* a byte string is equal to itself */ Py_RETURN_TRUE; case Py_NE: case Py_LT: @@ -2149,7 +2137,7 @@ bytes_translate_impl(PyBytesObject *self, PyObject *table, Py_INCREF(input_obj); return input_obj; } - /* Fix the size of the resulting string */ + /* Fix the size of the resulting byte string */ if (inlen > 0) _PyBytes_Resize(&result, output - output_start); return result; @@ -2453,7 +2441,7 @@ bytes.hex How many bytes between separators. Positive values count from the right, negative values count from the left. -Create a str of hexadecimal numbers from a bytes object. +Create a string of hexadecimal numbers from a bytes object. Example: >>> value = b'\xb9\x01\xef' @@ -2469,7 +2457,7 @@ Example: static PyObject * bytes_hex_impl(PyBytesObject *self, PyObject *sep, int bytes_per_sep) -/*[clinic end generated code: output=1f134da504064139 input=f1238d3455990218]*/ +/*[clinic end generated code: output=1f134da504064139 input=1a21282b1f1ae595]*/ { const char *argbuf = PyBytes_AS_STRING(self); Py_ssize_t arglen = PyBytes_GET_SIZE(self); @@ -2771,7 +2759,7 @@ _PyBytes_FromIterator(PyObject *it, PyObject *x) Py_ssize_t i, size; _PyBytesWriter writer; - /* For iterator version, create a string object and resize as needed */ + /* For iterator version, create a bytes object and resize as needed */ size = PyObject_LengthHint(x, 64); if (size == -1 && PyErr_Occurred()) return NULL; @@ -3054,9 +3042,9 @@ _PyBytes_Resize(PyObject **pv, Py_ssize_t newsize) _Py_ForgetReference(v); #endif *pv = (PyObject *) - PyObject_REALLOC(v, PyBytesObject_SIZE + newsize); + PyObject_Realloc(v, PyBytesObject_SIZE + newsize); if (*pv == NULL) { - PyObject_Del(v); + PyObject_Free(v); PyErr_NoMemory(); return -1; } diff --git a/Objects/call.c b/Objects/call.c index 30fa14ccfd7..35b06a9b9c4 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -205,6 +205,7 @@ PyObject * PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs) { PyThreadState *tstate = _PyThreadState_GET(); + vectorcallfunc func; /* get vectorcallfunc as in PyVectorcall_Function, but without * the Py_TPFLAGS_HAVE_VECTORCALL check */ @@ -215,7 +216,7 @@ PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs) Py_TYPE(callable)->tp_name); return NULL; } - vectorcallfunc func = *(vectorcallfunc *)(((char *)callable) + offset); + memcpy(&func, (char *) callable + offset, sizeof(func)); if (func == NULL) { _PyErr_Format(tstate, PyExc_TypeError, "'%.200s' object does not support vectorcall", diff --git a/Objects/capsule.c b/Objects/capsule.c index ed24cc1d6a2..800a6c4b25c 100644 --- a/Objects/capsule.c +++ b/Objects/capsule.c @@ -198,7 +198,7 @@ PyCapsule_Import(const char *name, int no_block) void *return_value = NULL; char *trace; size_t name_length = (strlen(name) + 1) * sizeof(char); - char *name_dup = (char *)PyMem_MALLOC(name_length); + char *name_dup = (char *)PyMem_Malloc(name_length); if (!name_dup) { return PyErr_NoMemory(); @@ -247,7 +247,7 @@ PyCapsule_Import(const char *name, int no_block) EXIT: Py_XDECREF(object); if (name_dup) { - PyMem_FREE(name_dup); + PyMem_Free(name_dup); } return return_value; } @@ -260,7 +260,7 @@ capsule_dealloc(PyObject *o) if (capsule->destructor) { capsule->destructor(o); } - PyObject_DEL(o); + PyObject_Free(o); } diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index 3452b241740..1e3f1975615 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -990,7 +990,7 @@ PyDoc_STRVAR(bytearray_hex__doc__, "hex($self, /, sep=, bytes_per_sep=1)\n" "--\n" "\n" -"Create a str of hexadecimal numbers from a bytearray object.\n" +"Create a string of hexadecimal numbers from a bytearray object.\n" "\n" " sep\n" " An optional single character or byte to separate hex bytes.\n" @@ -1120,4 +1120,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=47cd9ad3fdc3ac0c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a82659f581e55629 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 27ac6b10674..9e365ce1a08 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -750,7 +750,7 @@ PyDoc_STRVAR(bytes_hex__doc__, "hex($self, /, sep=, bytes_per_sep=1)\n" "--\n" "\n" -"Create a str of hexadecimal numbers from a bytes object.\n" +"Create a string of hexadecimal numbers from a bytes object.\n" "\n" " sep\n" " An optional single character or byte to separate hex bytes.\n" @@ -878,4 +878,4 @@ skip_optional_pos: exit: return return_value; } -/*[clinic end generated code: output=6101b417d6a6a717 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b3f0ec2753246b9c input=a9049054013a1b77]*/ diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 7b224cc145e..0b0b8f98ae4 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -213,7 +213,7 @@ PyCode_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, PyObject *arg = PyTuple_GET_ITEM(varnames, j); int cmp = PyUnicode_Compare(cell, arg); if (cmp == -1 && PyErr_Occurred()) { - PyMem_FREE(cell2arg); + PyMem_Free(cell2arg); return NULL; } if (cmp == 0) { @@ -224,14 +224,14 @@ PyCode_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, } } if (!used_cell2arg) { - PyMem_FREE(cell2arg); + PyMem_Free(cell2arg); cell2arg = NULL; } } co = PyObject_New(PyCodeObject, &PyCode_Type); if (co == NULL) { if (cell2arg) - PyMem_FREE(cell2arg); + PyMem_Free(cell2arg); return NULL; } co->co_argcount = argcount; @@ -314,12 +314,12 @@ _PyCode_InitOpcache(PyCodeObject *co) if (opts) { co->co_opcache = (_PyOpcache *)PyMem_Calloc(opts, sizeof(_PyOpcache)); if (co->co_opcache == NULL) { - PyMem_FREE(co->co_opcache_map); + PyMem_Free(co->co_opcache_map); return -1; } } else { - PyMem_FREE(co->co_opcache_map); + PyMem_Free(co->co_opcache_map); co->co_opcache_map = NULL; co->co_opcache = NULL; } @@ -631,10 +631,10 @@ static void code_dealloc(PyCodeObject *co) { if (co->co_opcache != NULL) { - PyMem_FREE(co->co_opcache); + PyMem_Free(co->co_opcache); } if (co->co_opcache_map != NULL) { - PyMem_FREE(co->co_opcache_map); + PyMem_Free(co->co_opcache_map); } co->co_opcache_flag = 0; co->co_opcache_size = 0; @@ -664,12 +664,12 @@ code_dealloc(PyCodeObject *co) Py_XDECREF(co->co_name); Py_XDECREF(co->co_linetable); if (co->co_cell2arg != NULL) - PyMem_FREE(co->co_cell2arg); + PyMem_Free(co->co_cell2arg); if (co->co_zombieframe != NULL) PyObject_GC_Del(co->co_zombieframe); if (co->co_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject*)co); - PyObject_DEL(co); + PyObject_Free(co); } static PyObject * diff --git a/Objects/complexobject.c b/Objects/complexobject.c index a481d9ad8bb..a65ebdfa6cd 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -233,7 +233,7 @@ PyObject * PyComplex_FromCComplex(Py_complex cval) { /* Inline PyObject_New */ - PyComplexObject *op = PyObject_MALLOC(sizeof(PyComplexObject)); + PyComplexObject *op = PyObject_Malloc(sizeof(PyComplexObject)); if (op == NULL) { return PyErr_NoMemory(); } diff --git a/Objects/descrobject.c b/Objects/descrobject.c index a8ce13c7aa4..16c695a08f4 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -1490,6 +1490,7 @@ typedef struct { PyObject *prop_set; PyObject *prop_del; PyObject *prop_doc; + PyObject *prop_name; int getter_doc; } propertyobject; @@ -1535,10 +1536,33 @@ property_deleter(PyObject *self, PyObject *deleter) } +PyDoc_STRVAR(set_name_doc, + "Method to set name of a property."); + +static PyObject * +property_set_name(PyObject *self, PyObject *args) { + if (PyTuple_GET_SIZE(args) != 2) { + PyErr_Format( + PyExc_TypeError, + "__set_name__() takes 2 positional arguments but %d were given", + PyTuple_GET_SIZE(args)); + return NULL; + } + + propertyobject *prop = (propertyobject *)self; + PyObject *name = PyTuple_GET_ITEM(args, 1); + + Py_XINCREF(name); + Py_XSETREF(prop->prop_name, name); + + Py_RETURN_NONE; +} + static PyMethodDef property_methods[] = { {"getter", property_getter, METH_O, getter_doc}, {"setter", property_setter, METH_O, setter_doc}, {"deleter", property_deleter, METH_O, deleter_doc}, + {"__set_name__", property_set_name, METH_VARARGS, set_name_doc}, {0} }; @@ -1553,6 +1577,7 @@ property_dealloc(PyObject *self) Py_XDECREF(gs->prop_set); Py_XDECREF(gs->prop_del); Py_XDECREF(gs->prop_doc); + Py_XDECREF(gs->prop_name); Py_TYPE(self)->tp_free(self); } @@ -1566,7 +1591,12 @@ property_descr_get(PyObject *self, PyObject *obj, PyObject *type) propertyobject *gs = (propertyobject *)self; if (gs->prop_get == NULL) { - PyErr_SetString(PyExc_AttributeError, "unreadable attribute"); + if (gs->prop_name != NULL) { + PyErr_Format(PyExc_AttributeError, "unreadable attribute %R", gs->prop_name); + } else { + PyErr_SetString(PyExc_AttributeError, "unreadable attribute"); + } + return NULL; } @@ -1584,10 +1614,18 @@ property_descr_set(PyObject *self, PyObject *obj, PyObject *value) else func = gs->prop_set; if (func == NULL) { - PyErr_SetString(PyExc_AttributeError, + if (gs->prop_name != NULL) { + PyErr_Format(PyExc_AttributeError, value == NULL ? - "can't delete attribute" : - "can't set attribute"); + "can't delete attribute %R" : + "can't set attribute %R", + gs->prop_name); + } else { + PyErr_SetString(PyExc_AttributeError, + value == NULL ? + "can't delete attribute" : + "can't set attribute"); + } return -1; } if (value == NULL) @@ -1634,6 +1672,9 @@ property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *del) Py_DECREF(type); if (new == NULL) return NULL; + + Py_XINCREF(pold->prop_name); + Py_XSETREF(((propertyobject *) new)->prop_name, pold->prop_name); return new; } @@ -1695,6 +1736,8 @@ property_init_impl(propertyobject *self, PyObject *fget, PyObject *fset, Py_XSETREF(self->prop_set, fset); Py_XSETREF(self->prop_del, fdel); Py_XSETREF(self->prop_doc, doc); + Py_XSETREF(self->prop_name, NULL); + self->getter_doc = 0; /* if no docstring given and the getter has one, use that one */ @@ -1769,6 +1812,7 @@ property_traverse(PyObject *self, visitproc visit, void *arg) Py_VISIT(pp->prop_set); Py_VISIT(pp->prop_del); Py_VISIT(pp->prop_doc); + Py_VISIT(pp->prop_name); return 0; } diff --git a/Objects/dictobject.c b/Objects/dictobject.c index faa8696153c..35e881fe272 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -269,7 +269,7 @@ _PyDict_ClearFreeList(PyThreadState *tstate) PyObject_GC_Del(op); } while (state->keys_numfree) { - PyObject_FREE(state->keys_free_list[--state->keys_numfree]); + PyObject_Free(state->keys_free_list[--state->keys_numfree]); } } @@ -597,7 +597,7 @@ new_keys_object(Py_ssize_t size) } else { - dk = PyObject_MALLOC(sizeof(PyDictKeysObject) + dk = PyObject_Malloc(sizeof(PyDictKeysObject) + es * size + sizeof(PyDictKeyEntry) * usable); if (dk == NULL) { @@ -636,11 +636,11 @@ free_keys_object(PyDictKeysObject *keys) state->keys_free_list[state->keys_numfree++] = keys; return; } - PyObject_FREE(keys); + PyObject_Free(keys); } #define new_values(size) PyMem_NEW(PyObject *, size) -#define free_values(values) PyMem_FREE(values) +#define free_values(values) PyMem_Free(values) /* Consumes a reference to the keys object */ static PyObject * @@ -1303,7 +1303,7 @@ dictresize(PyDictObject *mp, Py_ssize_t newsize) state->keys_free_list[state->keys_numfree++] = oldkeys; } else { - PyObject_FREE(oldkeys); + PyObject_Free(oldkeys); } } @@ -3989,6 +3989,11 @@ dictiter_iternextitem(dictiterobject *di) Py_INCREF(result); Py_DECREF(oldkey); Py_DECREF(oldvalue); + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } } else { result = PyTuple_New(2); @@ -4104,6 +4109,11 @@ dictreviter_iternext(dictiterobject *di) Py_INCREF(result); Py_DECREF(oldkey); Py_DECREF(oldvalue); + // bpo-42536: The GC may have untracked this result tuple. Since + // we're recycling it, make sure it's tracked again: + if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } } else { result = PyTuple_New(2); diff --git a/Objects/enumobject.c b/Objects/enumobject.c index 8b5e7d3a3c6..98ece3f13fc 100644 --- a/Objects/enumobject.c +++ b/Objects/enumobject.c @@ -2,6 +2,7 @@ #include "Python.h" #include "pycore_long.h" // _PyLong_GetOne() +#include "pycore_object.h" // _PyObject_GC_TRACK() #include "clinic/enumobject.c.h" @@ -131,6 +132,11 @@ enum_next_long(enumobject *en, PyObject* next_item) PyTuple_SET_ITEM(result, 1, next_item); Py_DECREF(old_index); Py_DECREF(old_item); + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } return result; } result = PyTuple_New(2); @@ -176,6 +182,11 @@ enum_next(enumobject *en) PyTuple_SET_ITEM(result, 1, next_item); Py_DECREF(old_index); Py_DECREF(old_item); + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } return result; } result = PyTuple_New(2); diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 1550b2eedc8..34fb57a946a 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -237,7 +237,7 @@ float_dealloc(PyFloatObject *op) assert(state->numfree != -1); #endif if (state->numfree >= PyFloat_MAXFREELIST) { - PyObject_FREE(op); + PyObject_Free(op); return; } state->numfree++; @@ -2032,7 +2032,7 @@ _PyFloat_ClearFreeList(PyThreadState *tstate) PyFloatObject *f = state->free_list; while (f != NULL) { PyFloatObject *next = (PyFloatObject*) Py_TYPE(f); - PyObject_FREE(f); + PyObject_Free(f); f = next; } state->free_list = NULL; diff --git a/Objects/genericaliasobject.c b/Objects/genericaliasobject.c index 6102e05c165..4cc82ffcdf3 100644 --- a/Objects/genericaliasobject.c +++ b/Objects/genericaliasobject.c @@ -156,13 +156,24 @@ error: return NULL; } -// isinstance(obj, TypeVar) without importing typing.py. -// Returns -1 for errors. -static int -is_typevar(PyObject *obj) +/* Checks if a variable number of names are from typing.py. +* If any one of the names are found, return 1, else 0. +**/ +static inline int +is_typing_name(PyObject *obj, int num, ...) { + va_list names; + va_start(names, num); + PyTypeObject *type = Py_TYPE(obj); - if (strcmp(type->tp_name, "TypeVar") != 0) { + int hit = 0; + for (int i = 0; i < num; ++i) { + if (!strcmp(type->tp_name, va_arg(names, const char *))) { + hit = 1; + break; + } + } + if (!hit) { return 0; } PyObject *module = PyObject_GetAttrString((PyObject *)type, "__module__"); @@ -172,9 +183,25 @@ is_typevar(PyObject *obj) int res = PyUnicode_Check(module) && _PyUnicode_EqualToASCIIString(module, "typing"); Py_DECREF(module); + + va_end(names); return res; } +// isinstance(obj, (TypeVar, ParamSpec)) without importing typing.py. +// Returns -1 for errors. +static inline int +is_typevarlike(PyObject *obj) +{ + return is_typing_name(obj, 2, "TypeVar", "ParamSpec"); +} + +static inline int +is_paramspec(PyObject *obj) +{ + return is_typing_name(obj, 1, "ParamSpec"); +} + // Index of item in self[:len], or -1 if not found (self is a tuple) static Py_ssize_t tuple_index(PyObject *self, Py_ssize_t len, PyObject *item) @@ -209,7 +236,7 @@ make_parameters(PyObject *args) Py_ssize_t iparam = 0; for (Py_ssize_t iarg = 0; iarg < nargs; iarg++) { PyObject *t = PyTuple_GET_ITEM(args, iarg); - int typevar = is_typevar(t); + int typevar = is_typevarlike(t); if (typevar < 0) { Py_DECREF(parameters); return NULL; @@ -279,7 +306,14 @@ subs_tvars(PyObject *obj, PyObject *params, PyObject **argitems) if (iparam >= 0) { arg = argitems[iparam]; } - Py_INCREF(arg); + // convert all the lists inside args to tuples to help + // with caching in other libaries + if (PyList_CheckExact(arg)) { + arg = PyList_AsTuple(arg); + } + else { + Py_INCREF(arg); + } PyTuple_SET_ITEM(subargs, i, arg); } @@ -314,11 +348,19 @@ ga_getitem(PyObject *self, PyObject *item) int is_tuple = PyTuple_Check(item); Py_ssize_t nitems = is_tuple ? PyTuple_GET_SIZE(item) : 1; PyObject **argitems = is_tuple ? &PyTuple_GET_ITEM(item, 0) : &item; - if (nitems != nparams) { - return PyErr_Format(PyExc_TypeError, - "Too %s arguments for %R", - nitems > nparams ? "many" : "few", - self); + // A special case in PEP 612 where if X = Callable[P, int], + // then X[int, str] == X[[int, str]]. + if (nparams == 1 && nitems > 1 && is_tuple && + is_paramspec(PyTuple_GET_ITEM(alias->parameters, 0))) { + argitems = &item; + } + else { + if (nitems != nparams) { + return PyErr_Format(PyExc_TypeError, + "Too %s arguments for %R", + nitems > nparams ? "many" : "few", + self); + } } /* Replace all type variables (specified by alias->parameters) with corresponding values specified by argitems. @@ -333,7 +375,7 @@ ga_getitem(PyObject *self, PyObject *item) } for (Py_ssize_t iarg = 0; iarg < nargs; iarg++) { PyObject *arg = PyTuple_GET_ITEM(alias->args, iarg); - int typevar = is_typevar(arg); + int typevar = is_typevarlike(arg); if (typevar < 0) { Py_DECREF(newargs); return NULL; @@ -342,7 +384,13 @@ ga_getitem(PyObject *self, PyObject *item) Py_ssize_t iparam = tuple_index(alias->parameters, nparams, arg); assert(iparam >= 0); arg = argitems[iparam]; - Py_INCREF(arg); + // convert lists to tuples to help with caching in other libaries. + if (PyList_CheckExact(arg)) { + arg = PyList_AsTuple(arg); + } + else { + Py_INCREF(arg); + } } else { arg = subs_tvars(arg, alias->parameters, argitems); @@ -429,8 +477,8 @@ ga_getattro(PyObject *self, PyObject *name) static PyObject * ga_richcompare(PyObject *a, PyObject *b, int op) { - if (!Py_IS_TYPE(a, &Py_GenericAliasType) || - !Py_IS_TYPE(b, &Py_GenericAliasType) || + if (!PyObject_TypeCheck(a, &Py_GenericAliasType) || + !PyObject_TypeCheck(b, &Py_GenericAliasType) || (op != Py_EQ && op != Py_NE)) { Py_RETURN_NOTIMPLEMENTED; @@ -564,10 +612,33 @@ static PyGetSetDef ga_properties[] = { {0} }; +/* A helper function to create GenericAlias' args tuple and set its attributes. + * Returns 1 on success, 0 on failure. + */ +static inline int +setup_ga(gaobject *alias, PyObject *origin, PyObject *args) { + if (!PyTuple_Check(args)) { + args = PyTuple_Pack(1, args); + if (args == NULL) { + return 0; + } + } + else { + Py_INCREF(args); + } + + Py_INCREF(origin); + alias->origin = origin; + alias->args = args; + alias->parameters = NULL; + alias->weakreflist = NULL; + return 1; +} + static PyObject * ga_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - if (!_PyArg_NoKwnames("GenericAlias", kwds)) { + if (!_PyArg_NoKeywords("GenericAlias", kwds)) { return NULL; } if (!_PyArg_CheckPositional("GenericAlias", PyTuple_GET_SIZE(args), 2, 2)) { @@ -575,7 +646,15 @@ ga_new(PyTypeObject *type, PyObject *args, PyObject *kwds) } PyObject *origin = PyTuple_GET_ITEM(args, 0); PyObject *arguments = PyTuple_GET_ITEM(args, 1); - return Py_GenericAlias(origin, arguments); + gaobject *self = (gaobject *)type->tp_alloc(type, 0); + if (self == NULL) { + return NULL; + } + if (!setup_ga(self, origin, arguments)) { + type->tp_free((PyObject *)self); + return NULL; + } + return (PyObject *)self; } static PyNumberMethods ga_as_number = { @@ -600,7 +679,7 @@ PyTypeObject Py_GenericAliasType = { .tp_hash = ga_hash, .tp_call = ga_call, .tp_getattro = ga_getattro, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, .tp_traverse = ga_traverse, .tp_richcompare = ga_richcompare, .tp_weaklistoffset = offsetof(gaobject, weakreflist), @@ -615,27 +694,14 @@ PyTypeObject Py_GenericAliasType = { PyObject * Py_GenericAlias(PyObject *origin, PyObject *args) { - if (!PyTuple_Check(args)) { - args = PyTuple_Pack(1, args); - if (args == NULL) { - return NULL; - } - } - else { - Py_INCREF(args); - } - gaobject *alias = PyObject_GC_New(gaobject, &Py_GenericAliasType); if (alias == NULL) { - Py_DECREF(args); return NULL; } - - Py_INCREF(origin); - alias->origin = origin; - alias->args = args; - alias->parameters = NULL; - alias->weakreflist = NULL; + if (!setup_ga(alias, origin, args)) { + PyObject_GC_Del((PyObject *)alias); + return NULL; + } _PyObject_GC_TRACK(alias); return (PyObject *)alias; } diff --git a/Objects/listobject.c b/Objects/listobject.c index aac87ea1b61..ca9df599a0b 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -341,7 +341,7 @@ list_dealloc(PyListObject *op) while (--i >= 0) { Py_XDECREF(op->ob_item[i]); } - PyMem_FREE(op->ob_item); + PyMem_Free(op->ob_item); } struct _Py_list_state *state = get_list_state(); #ifdef Py_DEBUG @@ -592,7 +592,7 @@ _list_clear(PyListObject *a) while (--i >= 0) { Py_XDECREF(item[i]); } - PyMem_FREE(item); + PyMem_Free(item); } /* Never fails; the return value can be ignored. Note that there is no guarantee that the list is actually empty @@ -668,7 +668,7 @@ list_ass_slice(PyListObject *a, Py_ssize_t ilow, Py_ssize_t ihigh, PyObject *v) /* If norig == 0, item might be NULL, in which case we may not memcpy from it. */ if (s) { if (s > sizeof(recycle_on_stack)) { - recycle = (PyObject **)PyMem_MALLOC(s); + recycle = (PyObject **)PyMem_Malloc(s); if (recycle == NULL) { PyErr_NoMemory(); goto Error; @@ -706,7 +706,7 @@ list_ass_slice(PyListObject *a, Py_ssize_t ilow, Py_ssize_t ihigh, PyObject *v) result = 0; Error: if (recycle != recycle_on_stack) - PyMem_FREE(recycle); + PyMem_Free(recycle); Py_XDECREF(v_as_SF); return result; #undef b @@ -2230,7 +2230,7 @@ list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse) /* Leverage stack space we allocated but won't otherwise use */ keys = &ms.temparray[saved_ob_size+1]; else { - keys = PyMem_MALLOC(sizeof(PyObject *) * saved_ob_size); + keys = PyMem_Malloc(sizeof(PyObject *) * saved_ob_size); if (keys == NULL) { PyErr_NoMemory(); goto keyfunc_fail; @@ -2243,7 +2243,7 @@ list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse) for (i=i-1 ; i>=0 ; i--) Py_DECREF(keys[i]); if (saved_ob_size >= MERGESTATE_TEMP_SIZE/2) - PyMem_FREE(keys); + PyMem_Free(keys); goto keyfunc_fail; } } @@ -2414,7 +2414,7 @@ fail: for (i = 0; i < saved_ob_size; i++) Py_DECREF(keys[i]); if (saved_ob_size >= MERGESTATE_TEMP_SIZE/2) - PyMem_FREE(keys); + PyMem_Free(keys); } if (self->allocated != -1 && result != NULL) { @@ -2442,7 +2442,7 @@ keyfunc_fail: while (--i >= 0) { Py_XDECREF(final_ob_item[i]); } - PyMem_FREE(final_ob_item); + PyMem_Free(final_ob_item); } Py_XINCREF(result); return result; @@ -2908,7 +2908,7 @@ list_ass_subscript(PyListObject* self, PyObject* item, PyObject* value) } garbage = (PyObject**) - PyMem_MALLOC(slicelength*sizeof(PyObject*)); + PyMem_Malloc(slicelength*sizeof(PyObject*)); if (!garbage) { PyErr_NoMemory(); return -1; @@ -2949,7 +2949,7 @@ list_ass_subscript(PyListObject* self, PyObject* item, PyObject* value) for (i = 0; i < slicelength; i++) { Py_DECREF(garbage[i]); } - PyMem_FREE(garbage); + PyMem_Free(garbage); return res; } @@ -2990,7 +2990,7 @@ list_ass_subscript(PyListObject* self, PyObject* item, PyObject* value) } garbage = (PyObject**) - PyMem_MALLOC(slicelength*sizeof(PyObject*)); + PyMem_Malloc(slicelength*sizeof(PyObject*)); if (!garbage) { Py_DECREF(seq); PyErr_NoMemory(); @@ -3011,7 +3011,7 @@ list_ass_subscript(PyListObject* self, PyObject* item, PyObject* value) Py_DECREF(garbage[i]); } - PyMem_FREE(garbage); + PyMem_Free(garbage); Py_DECREF(seq); return 0; diff --git a/Objects/longobject.c b/Objects/longobject.c index e0d6410fe68..240e92a41e0 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -131,7 +131,7 @@ _PyLong_New(Py_ssize_t size) "too many digits in integer"); return NULL; } - result = PyObject_MALLOC(offsetof(PyLongObject, ob_digit) + + result = PyObject_Malloc(offsetof(PyLongObject, ob_digit) + size*sizeof(digit)); if (!result) { PyErr_NoMemory(); diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index c3ceb788e8e..6590387dac5 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -211,7 +211,7 @@ _PyModule_CreateInitialized(struct PyModuleDef* module, int module_api_version) return NULL; if (module->m_size > 0) { - m->md_state = PyMem_MALLOC(module->m_size); + m->md_state = PyMem_Malloc(module->m_size); if (!m->md_state) { PyErr_NoMemory(); Py_DECREF(m); @@ -377,7 +377,7 @@ PyModule_ExecDef(PyObject *module, PyModuleDef *def) 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); + md->md_state = PyMem_Malloc(def->m_size); if (!md->md_state) { PyErr_NoMemory(); return -1; @@ -681,7 +681,7 @@ module_dealloc(PyModuleObject *m) Py_XDECREF(m->md_dict); Py_XDECREF(m->md_name); if (m->md_state != NULL) - PyMem_FREE(m->md_state); + PyMem_Free(m->md_state); Py_TYPE(m)->tp_free((PyObject *)m); } diff --git a/Objects/object.c b/Objects/object.c index 2e8717f506c..0a8621b3503 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -161,7 +161,7 @@ PyObject_InitVar(PyVarObject *op, PyTypeObject *tp, Py_ssize_t size) PyObject * _PyObject_New(PyTypeObject *tp) { - PyObject *op = (PyObject *) PyObject_MALLOC(_PyObject_SIZE(tp)); + PyObject *op = (PyObject *) PyObject_Malloc(_PyObject_SIZE(tp)); if (op == NULL) { return PyErr_NoMemory(); } @@ -174,7 +174,7 @@ _PyObject_NewVar(PyTypeObject *tp, Py_ssize_t nitems) { PyVarObject *op; const size_t size = _PyObject_VAR_SIZE(tp, nitems); - op = (PyVarObject *) PyObject_MALLOC(size); + op = (PyVarObject *) PyObject_Malloc(size); if (op == NULL) { return (PyVarObject *)PyErr_NoMemory(); } diff --git a/Objects/odictobject.c b/Objects/odictobject.c index b4ac560d235..6c7f1175cd6 100644 --- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -459,7 +459,7 @@ later: - 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? +- use PyObject_Malloc (small object allocator) for odict nodes? - support subclasses better (e.g. in odict_richcompare) */ @@ -567,14 +567,14 @@ _odict_resize(PyODictObject *od) i = _odict_get_index_raw(od, _odictnode_KEY(node), _odictnode_HASH(node)); if (i < 0) { - PyMem_FREE(fast_nodes); + PyMem_Free(fast_nodes); return -1; } fast_nodes[i] = node; } /* Replace the old fast nodes table. */ - PyMem_FREE(od->od_fast_nodes); + PyMem_Free(od->od_fast_nodes); od->od_fast_nodes = fast_nodes; od->od_fast_nodes_size = size; od->od_resize_sentinel = ((PyDictObject *)od)->ma_keys; @@ -683,7 +683,7 @@ _odict_add_new_node(PyODictObject *od, PyObject *key, Py_hash_t hash) } /* must not be added yet */ - node = (_ODictNode *)PyMem_MALLOC(sizeof(_ODictNode)); + node = (_ODictNode *)PyMem_Malloc(sizeof(_ODictNode)); if (node == NULL) { Py_DECREF(key); PyErr_NoMemory(); @@ -701,7 +701,7 @@ _odict_add_new_node(PyODictObject *od, PyObject *key, Py_hash_t hash) #define _odictnode_DEALLOC(node) \ do { \ Py_DECREF(_odictnode_KEY(node)); \ - PyMem_FREE((void *)node); \ + PyMem_Free((void *)node); \ } while (0) /* Repeated calls on the same node are no-ops. */ @@ -776,7 +776,7 @@ _odict_clear_nodes(PyODictObject *od) { _ODictNode *node, *next; - PyMem_FREE(od->od_fast_nodes); + PyMem_Free(od->od_fast_nodes); od->od_fast_nodes = NULL; od->od_fast_nodes_size = 0; od->od_resize_sentinel = NULL; @@ -1814,6 +1814,11 @@ odictiter_iternext(odictiterobject *di) Py_INCREF(result); Py_DECREF(PyTuple_GET_ITEM(result, 0)); /* borrowed */ Py_DECREF(PyTuple_GET_ITEM(result, 1)); /* borrowed */ + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } } else { result = PyTuple_New(2); diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 787d1138009..530426c8ac9 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -171,7 +171,7 @@ range_dealloc(rangeobject *r) Py_DECREF(r->stop); Py_DECREF(r->step); Py_DECREF(r->length); - PyObject_Del(r); + PyObject_Free(r); } /* Return number of items in range (lo, hi, step) as a PyLong object, @@ -1021,7 +1021,7 @@ longrangeiter_dealloc(longrangeiterobject *r) Py_XDECREF(r->start); Py_XDECREF(r->step); Py_XDECREF(r->len); - PyObject_Del(r); + PyObject_Free(r); } static PyObject * diff --git a/Objects/setobject.c b/Objects/setobject.c index af8ee03d831..79e84511926 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -289,7 +289,7 @@ set_table_resize(PySetObject *so, Py_ssize_t minused) } if (is_oldtable_malloced) - PyMem_DEL(oldtable); + PyMem_Free(oldtable); return 0; } @@ -424,7 +424,7 @@ set_clear_internal(PySetObject *so) } if (table_is_malloced) - PyMem_DEL(table); + PyMem_Free(table); return 0; } @@ -484,7 +484,7 @@ set_dealloc(PySetObject *so) } } if (so->table != so->smalltable) - PyMem_DEL(so->table); + PyMem_Free(so->table); Py_TYPE(so)->tp_free(so); Py_TRASHCAN_END } diff --git a/Objects/stringlib/join.h b/Objects/stringlib/join.h index 53bcbdea7ad..62e4c98de7f 100644 --- a/Objects/stringlib/join.h +++ b/Objects/stringlib/join.h @@ -155,7 +155,7 @@ done: for (i = 0; i < nbufs; i++) PyBuffer_Release(&buffers[i]); if (buffers != static_buffers) - PyMem_FREE(buffers); + PyMem_Free(buffers); return res; } diff --git a/Objects/stringlib/unicode_format.h b/Objects/stringlib/unicode_format.h index b526ad21b82..7152ec6ebe7 100644 --- a/Objects/stringlib/unicode_format.h +++ b/Objects/stringlib/unicode_format.h @@ -983,7 +983,7 @@ static void formatteriter_dealloc(formatteriterobject *it) { Py_XDECREF(it->str); - PyObject_FREE(it); + PyObject_Free(it); } /* returns a tuple: @@ -1147,7 +1147,7 @@ static void fieldnameiter_dealloc(fieldnameiterobject *it) { Py_XDECREF(it->str); - PyObject_FREE(it); + PyObject_Free(it); } /* returns a tuple: diff --git a/Objects/structseq.c b/Objects/structseq.c index bb28e113978..5d71fcff346 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -467,14 +467,14 @@ PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc *desc) type->tp_members = members; if (PyType_Ready(type) < 0) { - PyMem_FREE(members); + PyMem_Free(members); return -1; } Py_INCREF(type); if (initialize_structseq_dict( desc, type->tp_dict, n_members, n_unnamed_members) < 0) { - PyMem_FREE(members); + PyMem_Free(members); Py_DECREF(type); return -1; } @@ -526,7 +526,7 @@ PyStructSequence_NewType(PyStructSequence_Desc *desc) spec.slots = slots; type = (PyTypeObject *)PyType_FromSpecWithBases(&spec, (PyObject *)&PyTuple_Type); - PyMem_FREE(members); + PyMem_Free(members); if (type == NULL) { return NULL; } diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 3a6143a8ad6..3498f0d484e 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -20,20 +20,13 @@ class object "PyObject *" "&PyBaseObject_Type" #include "clinic/typeobject.c.h" -/* bpo-40521: Type method cache is shared by all subinterpreters */ -#ifndef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS -# define MCACHE -#endif - -#ifdef MCACHE -/* Support type attribute cache */ +/* Support type attribute lookup cache */ /* The cache can keep references to the names alive for longer than they normally would. This is why the maximum size is limited to 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 12 #define MCACHE_HASH(version, name_hash) \ (((unsigned int)(version) ^ (unsigned int)(name_hash)) \ & ((1 << MCACHE_SIZE_EXP) - 1)) @@ -44,35 +37,16 @@ class object "PyObject *" "&PyBaseObject_Type" #define MCACHE_CACHEABLE_NAME(name) \ PyUnicode_CheckExact(name) && \ PyUnicode_IS_READY(name) && \ - PyUnicode_GET_LENGTH(name) <= MCACHE_MAX_ATTR_SIZE + (PyUnicode_GET_LENGTH(name) <= MCACHE_MAX_ATTR_SIZE) -struct method_cache_entry { - unsigned int version; - PyObject *name; /* reference to exactly a str or None */ - PyObject *value; /* borrowed */ -}; - -static struct method_cache_entry method_cache[1 << MCACHE_SIZE_EXP]; +// Used to set PyTypeObject.tp_version_tag static unsigned int next_version_tag = 0; -#endif typedef struct PySlot_Offset { short subslot_offset; short slot_offset; } PySlot_Offset; -#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 - -/* bpo-40521: Interned strings are shared by all subinterpreters */ -#ifndef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS -# define INTERN_NAME_STRINGS -#endif /* alphabetical order */ _Py_IDENTIFIER(__abstractmethods__); @@ -229,46 +203,95 @@ _PyType_GetTextSignatureFromInternalDoc(const char *name, const char *internal_d return PyUnicode_FromStringAndSize(start, end - start); } + +static struct type_cache* +get_type_cache(void) +{ + PyInterpreterState *interp = _PyInterpreterState_GET(); + return &interp->type_cache; +} + + +static void +type_cache_clear(struct type_cache *cache, int use_none) +{ + for (Py_ssize_t i = 0; i < (1 << MCACHE_SIZE_EXP); i++) { + struct type_cache_entry *entry = &cache->hashtable[i]; + entry->version = 0; + if (use_none) { + // Set to None so _PyType_Lookup() can use Py_SETREF(), + // rather than using slower Py_XSETREF(). + Py_XSETREF(entry->name, Py_NewRef(Py_None)); + } + else { + Py_CLEAR(entry->name); + } + entry->value = NULL; + } + + // Mark all version tags as invalid + PyType_Modified(&PyBaseObject_Type); +} + + +void +_PyType_InitCache(PyInterpreterState *interp) +{ + struct type_cache *cache = &interp->type_cache; + for (Py_ssize_t i = 0; i < (1 << MCACHE_SIZE_EXP); i++) { + struct type_cache_entry *entry = &cache->hashtable[i]; + assert(entry->name == NULL); + + entry->version = 0; + // Set to None so _PyType_Lookup() can use Py_SETREF(), + // rather than using slower Py_XSETREF(). + entry->name = Py_NewRef(Py_None); + entry->value = NULL; + } +} + + +static unsigned int +_PyType_ClearCache(struct type_cache *cache) +{ +#if MCACHE_STATS + size_t total = cache->hits + cache->collisions + cache->misses; + fprintf(stderr, "-- Method cache hits = %zd (%d%%)\n", + cache->hits, (int) (100.0 * cache->hits / total)); + fprintf(stderr, "-- Method cache true misses = %zd (%d%%)\n", + cache->misses, (int) (100.0 * cache->misses / total)); + fprintf(stderr, "-- Method cache collisions = %zd (%d%%)\n", + cache->collisions, (int) (100.0 * cache->collisions / total)); + fprintf(stderr, "-- Method cache size = %zd KiB\n", + sizeof(cache->hashtable) / 1024); +#endif + + unsigned int cur_version_tag = next_version_tag - 1; + next_version_tag = 0; + type_cache_clear(cache, 0); + + return cur_version_tag; +} + + unsigned int PyType_ClearCache(void) { -#ifdef MCACHE - 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 KiB\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); - method_cache[i].value = NULL; - } - next_version_tag = 0; - /* mark all version tags as invalid */ - PyType_Modified(&PyBaseObject_Type); - return cur_version_tag; -#else - return 0; -#endif + struct type_cache *cache = get_type_cache(); + return _PyType_ClearCache(cache); } + void -_PyType_Fini(void) +_PyType_Fini(PyThreadState *tstate) { - PyType_ClearCache(); - clear_slotdefs(); + _PyType_ClearCache(&tstate->interp->type_cache); + if (_Py_IsMainInterpreter(tstate)) { + clear_slotdefs(); + } } + void PyType_Modified(PyTypeObject *type) { @@ -370,9 +393,8 @@ type_mro_modified(PyTypeObject *type, PyObject *bases) { Py_TPFLAGS_VALID_VERSION_TAG); } -#ifdef MCACHE static int -assign_version_tag(PyTypeObject *type) +assign_version_tag(struct type_cache *cache, PyTypeObject *type) { /* Ensure that the tp_version_tag is valid and set Py_TPFLAGS_VALID_VERSION_TAG. To respect the invariant, this @@ -393,31 +415,22 @@ assign_version_tag(PyTypeObject *type) /* for stress-testing: next_version_tag &= 0xFF; */ if (type->tp_version_tag == 0) { - /* wrap-around or just starting Python - clear the whole - cache by filling names with references to Py_None. - Values are also set to NULL for added protection, as they - are borrowed reference */ - for (i = 0; i < (1 << MCACHE_SIZE_EXP); i++) { - method_cache[i].value = NULL; - Py_INCREF(Py_None); - Py_XSETREF(method_cache[i].name, Py_None); - } - /* mark all version tags as invalid */ - PyType_Modified(&PyBaseObject_Type); + // Wrap-around or just starting Python - clear the whole cache + type_cache_clear(cache, 1); return 1; } + bases = type->tp_bases; n = PyTuple_GET_SIZE(bases); for (i = 0; i < n; i++) { PyObject *b = PyTuple_GET_ITEM(bases, i); assert(PyType_Check(b)); - if (!assign_version_tag((PyTypeObject *)b)) + if (!assign_version_tag(cache, (PyTypeObject *)b)) return 0; } type->tp_flags |= Py_TPFLAGS_VALID_VERSION_TAG; return 1; } -#endif static PyMemberDef type_members[] = { @@ -1059,7 +1072,7 @@ PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems) obj = _PyObject_GC_Malloc(size); } else { - obj = (PyObject *)PyObject_MALLOC(size); + obj = (PyObject *)PyObject_Malloc(size); } if (obj == NULL) { @@ -1779,7 +1792,7 @@ pmerge(PyObject *acc, PyObject **to_merge, Py_ssize_t to_merge_size) } out: - PyMem_Del(remain); + PyMem_Free(remain); return res; } @@ -1859,7 +1872,7 @@ mro_implementation(PyTypeObject *type) result = PyList_New(1); if (result == NULL) { - PyMem_Del(to_merge); + PyMem_Free(to_merge); return NULL; } @@ -1869,7 +1882,7 @@ mro_implementation(PyTypeObject *type) Py_CLEAR(result); } - PyMem_Del(to_merge); + PyMem_Free(to_merge); return result; } @@ -2707,7 +2720,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) goto error; /* Silently truncate the docstring if it contains null bytes. */ len = strlen(doc_str); - tp_doc = (char *)PyObject_MALLOC(len + 1); + tp_doc = (char *)PyObject_Malloc(len + 1); if (tp_doc == NULL) { PyErr_NoMemory(); goto error; @@ -3047,7 +3060,7 @@ PyType_FromModuleAndSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) continue; } size_t len = strlen(slot->pfunc)+1; - char *tp_doc = PyObject_MALLOC(len); + char *tp_doc = PyObject_Malloc(len); if (tp_doc == NULL) { type->tp_doc = NULL; PyErr_NoMemory(); @@ -3316,20 +3329,19 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name) PyObject *res; int error; -#ifdef MCACHE if (MCACHE_CACHEABLE_NAME(name) && _PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG)) { /* fast path */ unsigned int h = MCACHE_HASH_METHOD(type, name); - if (method_cache[h].version == type->tp_version_tag && - method_cache[h].name == name) { + struct type_cache *cache = get_type_cache(); + struct type_cache_entry *entry = &cache->hashtable[h]; + if (entry->version == type->tp_version_tag && entry->name == name) { #if MCACHE_STATS - method_cache_hits++; + cache->hits++; #endif - return method_cache[h].value; + return entry->value; } } -#endif /* We may end up clearing live exceptions below, so make sure it's ours. */ assert(!PyErr_Occurred()); @@ -3351,22 +3363,25 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name) return NULL; } -#ifdef MCACHE - if (MCACHE_CACHEABLE_NAME(name) && assign_version_tag(type)) { - unsigned int h = MCACHE_HASH_METHOD(type, name); - method_cache[h].version = type->tp_version_tag; - method_cache[h].value = res; /* borrowed */ - Py_INCREF(name); - assert(((PyASCIIObject *)(name))->hash != -1); + if (MCACHE_CACHEABLE_NAME(name)) { + struct type_cache *cache = get_type_cache(); + if (assign_version_tag(cache, type)) { + unsigned int h = MCACHE_HASH_METHOD(type, name); + struct type_cache_entry *entry = &cache->hashtable[h]; + entry->version = type->tp_version_tag; + entry->value = res; /* borrowed */ + 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++; + if (entry->name != Py_None && entry->name != name) { + cache->collisions++; + } + else { + cache->misses++; + } #endif - Py_SETREF(method_cache[h].name, name); + Py_SETREF(entry->name, Py_NewRef(name)); + } } -#endif return res; } @@ -3509,7 +3524,6 @@ type_setattro(PyTypeObject *type, PyObject *name, PyObject *value) if (name == NULL) return -1; } -#ifdef INTERN_NAME_STRINGS if (!PyUnicode_CHECK_INTERNED(name)) { PyUnicode_InternInPlace(&name); if (!PyUnicode_CHECK_INTERNED(name)) { @@ -3519,7 +3533,6 @@ type_setattro(PyTypeObject *type, PyObject *name, PyObject *value) return -1; } } -#endif } else { /* Will fail in _PyObject_GenericSetAttrWithDict. */ @@ -7665,17 +7678,10 @@ _PyTypes_InitSlotDefs(void) for (slotdef *p = slotdefs; p->name; p++) { /* Slots must be ordered by their offset in the PyHeapTypeObject. */ assert(!p[1].name || p->offset <= p[1].offset); -#ifdef INTERN_NAME_STRINGS p->name_strobj = PyUnicode_InternFromString(p->name); if (!p->name_strobj || !PyUnicode_CHECK_INTERNED(p->name_strobj)) { return _PyStatus_NO_MEMORY(); } -#else - p->name_strobj = PyUnicode_FromString(p->name); - if (!p->name_strobj) { - return _PyStatus_NO_MEMORY(); - } -#endif } slotdefs_initialized = 1; return _PyStatus_OK(); @@ -7700,24 +7706,16 @@ update_slot(PyTypeObject *type, PyObject *name) int offset; assert(PyUnicode_CheckExact(name)); -#ifdef INTERN_NAME_STRINGS assert(PyUnicode_CHECK_INTERNED(name)); -#endif assert(slotdefs_initialized); pp = ptrs; for (p = slotdefs; p->name; p++) { assert(PyUnicode_CheckExact(p->name_strobj)); assert(PyUnicode_CheckExact(name)); -#ifdef INTERN_NAME_STRINGS if (p->name_strobj == name) { *pp++ = p; } -#else - if (p->name_strobj == name || _PyUnicode_EQ(p->name_strobj, name)) { - *pp++ = p; - } -#endif } *pp = NULL; for (pp = ptrs; *pp; pp++) { diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 70688c8c013..64fd408085d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -41,7 +41,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define PY_SSIZE_T_CLEAN #include "Python.h" #include "pycore_abstract.h" // _PyIndex_Check() +#include "pycore_atomic_funcs.h" // _Py_atomic_size_get() #include "pycore_bytes_methods.h" // _Py_bytes_lower() +#include "pycore_format.h" // F_LJUST #include "pycore_initconfig.h" // _PyStatus_OK() #include "pycore_interp.h" // PyInterpreterState.fs_codec #include "pycore_object.h" // _PyObject_GC_TRACK() @@ -204,22 +206,6 @@ extern "C" { # define OVERALLOCATE_FACTOR 4 #endif -/* bpo-40521: Interned strings are shared by all interpreters. */ -#ifndef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS -# define INTERNED_STRINGS -#endif - -/* This dictionary holds all interned unicode strings. Note that references - to strings in this dictionary are *not* counted in the string's ob_refcnt. - When the interned string reaches a refcnt of 0 the string deallocation - function will delete the reference from this dictionary. - - Another way to look at this is that to say that the actual reference - count of a string is: s->ob_refcnt + (s->state ? 2 : 0) -*/ -#ifdef INTERNED_STRINGS -static PyObject *interned = NULL; -#endif static struct _Py_unicode_state* get_unicode_state(void) @@ -301,9 +287,6 @@ unicode_decode_utf8(const char *s, Py_ssize_t size, _Py_error_handler error_handler, const char *errors, Py_ssize_t *consumed); -/* List of static strings. */ -static _Py_Identifier *static_strings = NULL; - /* Fast detection of the most frequent whitespace characters */ const unsigned char _Py_ascii_whitespace[] = { 0, 0, 0, 0, 0, 0, 0, 0, @@ -1061,7 +1044,7 @@ resize_compact(PyObject *unicode, Py_ssize_t length) new_size = (struct_size + (length + 1) * char_size); if (_PyUnicode_HAS_UTF8_MEMORY(unicode)) { - PyObject_DEL(_PyUnicode_UTF8(unicode)); + PyObject_Free(_PyUnicode_UTF8(unicode)); _PyUnicode_UTF8(unicode) = NULL; _PyUnicode_UTF8_LENGTH(unicode) = 0; } @@ -1072,7 +1055,7 @@ resize_compact(PyObject *unicode, Py_ssize_t length) _Py_ForgetReference(unicode); #endif - new_unicode = (PyObject *)PyObject_REALLOC(unicode, new_size); + new_unicode = (PyObject *)PyObject_Realloc(unicode, new_size); if (new_unicode == NULL) { _Py_NewReference(unicode); PyErr_NoMemory(); @@ -1088,7 +1071,7 @@ resize_compact(PyObject *unicode, Py_ssize_t length) _PyUnicode_WSTR_LENGTH(unicode) = length; } else if (_PyUnicode_HAS_WSTR_MEMORY(unicode)) { - PyObject_DEL(_PyUnicode_WSTR(unicode)); + PyObject_Free(_PyUnicode_WSTR(unicode)); _PyUnicode_WSTR(unicode) = NULL; if (!PyUnicode_IS_ASCII(unicode)) _PyUnicode_WSTR_LENGTH(unicode) = 0; @@ -1131,12 +1114,12 @@ resize_inplace(PyObject *unicode, Py_ssize_t length) if (!share_utf8 && _PyUnicode_HAS_UTF8_MEMORY(unicode)) { - PyObject_DEL(_PyUnicode_UTF8(unicode)); + PyObject_Free(_PyUnicode_UTF8(unicode)); _PyUnicode_UTF8(unicode) = NULL; _PyUnicode_UTF8_LENGTH(unicode) = 0; } - data = (PyObject *)PyObject_REALLOC(data, new_size); + data = (PyObject *)PyObject_Realloc(data, new_size); if (data == NULL) { PyErr_NoMemory(); return -1; @@ -1169,7 +1152,7 @@ resize_inplace(PyObject *unicode, Py_ssize_t length) } new_size = sizeof(wchar_t) * (length + 1); wstr = _PyUnicode_WSTR(unicode); - wstr = PyObject_REALLOC(wstr, new_size); + wstr = PyObject_Realloc(wstr, new_size); if (!wstr) { PyErr_NoMemory(); return -1; @@ -1259,7 +1242,7 @@ _PyUnicode_New(Py_ssize_t length) _PyUnicode_UTF8(unicode) = NULL; _PyUnicode_UTF8_LENGTH(unicode) = 0; - _PyUnicode_WSTR(unicode) = (Py_UNICODE*) PyObject_MALLOC(new_size); + _PyUnicode_WSTR(unicode) = (Py_UNICODE*) PyObject_Malloc(new_size); if (!_PyUnicode_WSTR(unicode)) { Py_DECREF(unicode); PyErr_NoMemory(); @@ -1456,7 +1439,7 @@ PyUnicode_New(Py_ssize_t size, Py_UCS4 maxchar) * PyObject_New() so we are able to allocate space for the object and * it's data buffer. */ - obj = (PyObject *) PyObject_MALLOC(struct_size + (size + 1) * char_size); + obj = (PyObject *) PyObject_Malloc(struct_size + (size + 1) * char_size); if (obj == NULL) { return PyErr_NoMemory(); } @@ -1838,7 +1821,7 @@ _PyUnicode_Ready(PyObject *unicode) return -1; if (maxchar < 256) { - _PyUnicode_DATA_ANY(unicode) = PyObject_MALLOC(_PyUnicode_WSTR_LENGTH(unicode) + 1); + _PyUnicode_DATA_ANY(unicode) = PyObject_Malloc(_PyUnicode_WSTR_LENGTH(unicode) + 1); if (!_PyUnicode_DATA_ANY(unicode)) { PyErr_NoMemory(); return -1; @@ -1859,7 +1842,7 @@ _PyUnicode_Ready(PyObject *unicode) _PyUnicode_UTF8(unicode) = NULL; _PyUnicode_UTF8_LENGTH(unicode) = 0; } - PyObject_FREE(_PyUnicode_WSTR(unicode)); + PyObject_Free(_PyUnicode_WSTR(unicode)); _PyUnicode_WSTR(unicode) = NULL; _PyUnicode_WSTR_LENGTH(unicode) = 0; } @@ -1879,7 +1862,7 @@ _PyUnicode_Ready(PyObject *unicode) _PyUnicode_UTF8_LENGTH(unicode) = 0; #else /* sizeof(wchar_t) == 4 */ - _PyUnicode_DATA_ANY(unicode) = PyObject_MALLOC( + _PyUnicode_DATA_ANY(unicode) = PyObject_Malloc( 2 * (_PyUnicode_WSTR_LENGTH(unicode) + 1)); if (!_PyUnicode_DATA_ANY(unicode)) { PyErr_NoMemory(); @@ -1893,7 +1876,7 @@ _PyUnicode_Ready(PyObject *unicode) _PyUnicode_STATE(unicode).kind = PyUnicode_2BYTE_KIND; _PyUnicode_UTF8(unicode) = NULL; _PyUnicode_UTF8_LENGTH(unicode) = 0; - PyObject_FREE(_PyUnicode_WSTR(unicode)); + PyObject_Free(_PyUnicode_WSTR(unicode)); _PyUnicode_WSTR(unicode) = NULL; _PyUnicode_WSTR_LENGTH(unicode) = 0; #endif @@ -1908,7 +1891,7 @@ _PyUnicode_Ready(PyObject *unicode) PyErr_NoMemory(); return -1; } - _PyUnicode_DATA_ANY(unicode) = PyObject_MALLOC(4 * (length_wo_surrogates + 1)); + _PyUnicode_DATA_ANY(unicode) = PyObject_Malloc(4 * (length_wo_surrogates + 1)); if (!_PyUnicode_DATA_ANY(unicode)) { PyErr_NoMemory(); return -1; @@ -1920,7 +1903,7 @@ _PyUnicode_Ready(PyObject *unicode) /* unicode_convert_wchar_to_ucs4() requires a ready string */ _PyUnicode_STATE(unicode).ready = 1; unicode_convert_wchar_to_ucs4(_PyUnicode_WSTR(unicode), end, unicode); - PyObject_FREE(_PyUnicode_WSTR(unicode)); + PyObject_Free(_PyUnicode_WSTR(unicode)); _PyUnicode_WSTR(unicode) = NULL; _PyUnicode_WSTR_LENGTH(unicode) = 0; #else @@ -1947,7 +1930,8 @@ unicode_dealloc(PyObject *unicode) break; case SSTATE_INTERNED_MORTAL: -#ifdef INTERNED_STRINGS + { + struct _Py_unicode_state *state = get_unicode_state(); /* Revive the dead object temporarily. PyDict_DelItem() removes two references (key and value) which were ignored by PyUnicode_InternInPlace(). Use refcnt=3 rather than refcnt=2 @@ -1955,14 +1939,14 @@ unicode_dealloc(PyObject *unicode) PyDict_DelItem(). */ assert(Py_REFCNT(unicode) == 0); Py_SET_REFCNT(unicode, 3); - if (PyDict_DelItem(interned, unicode) != 0) { + if (PyDict_DelItem(state->interned, unicode) != 0) { _PyErr_WriteUnraisableMsg("deletion of interned string failed", NULL); } assert(Py_REFCNT(unicode) == 1); Py_SET_REFCNT(unicode, 0); -#endif break; + } case SSTATE_INTERNED_IMMORTAL: _PyObject_ASSERT_FAILED_MSG(unicode, "Immortal interned string died"); @@ -1973,13 +1957,13 @@ unicode_dealloc(PyObject *unicode) } if (_PyUnicode_HAS_WSTR_MEMORY(unicode)) { - PyObject_DEL(_PyUnicode_WSTR(unicode)); + PyObject_Free(_PyUnicode_WSTR(unicode)); } if (_PyUnicode_HAS_UTF8_MEMORY(unicode)) { - PyObject_DEL(_PyUnicode_UTF8(unicode)); + PyObject_Free(_PyUnicode_UTF8(unicode)); } if (!PyUnicode_IS_COMPACT(unicode) && _PyUnicode_DATA_ANY(unicode)) { - PyObject_DEL(_PyUnicode_DATA_ANY(unicode)); + PyObject_Free(_PyUnicode_DATA_ANY(unicode)); } Py_TYPE(unicode)->tp_free(unicode); @@ -2311,42 +2295,84 @@ PyUnicode_FromString(const char *u) return PyUnicode_DecodeUTF8Stateful(u, (Py_ssize_t)size, NULL, NULL); } + PyObject * _PyUnicode_FromId(_Py_Identifier *id) { - if (id->object) { - return id->object; + PyInterpreterState *interp = _PyInterpreterState_GET(); + struct _Py_unicode_ids *ids = &interp->unicode.ids; + + Py_ssize_t index = _Py_atomic_size_get(&id->index); + if (index < 0) { + struct _Py_unicode_runtime_ids *rt_ids = &interp->runtime->unicode_ids; + + PyThread_acquire_lock(rt_ids->lock, WAIT_LOCK); + // Check again to detect concurrent access. Another thread can have + // initialized the index while this thread waited for the lock. + index = _Py_atomic_size_get(&id->index); + if (index < 0) { + assert(rt_ids->next_index < PY_SSIZE_T_MAX); + index = rt_ids->next_index; + rt_ids->next_index++; + _Py_atomic_size_set(&id->index, index); + } + PyThread_release_lock(rt_ids->lock); } + assert(index >= 0); PyObject *obj; - obj = PyUnicode_DecodeUTF8Stateful(id->string, - strlen(id->string), + if (index < ids->size) { + obj = ids->array[index]; + if (obj) { + // Return a borrowed reference + return obj; + } + } + + obj = PyUnicode_DecodeUTF8Stateful(id->string, strlen(id->string), NULL, NULL); if (!obj) { return NULL; } PyUnicode_InternInPlace(&obj); - assert(!id->next); - id->object = obj; - id->next = static_strings; - static_strings = id; - return id->object; + if (index >= ids->size) { + // Overallocate to reduce the number of realloc + Py_ssize_t new_size = Py_MAX(index * 2, 16); + Py_ssize_t item_size = sizeof(ids->array[0]); + PyObject **new_array = PyMem_Realloc(ids->array, new_size * item_size); + if (new_array == NULL) { + PyErr_NoMemory(); + return NULL; + } + memset(&new_array[ids->size], 0, (new_size - ids->size) * item_size); + ids->array = new_array; + ids->size = new_size; + } + + // The array stores a strong reference + ids->array[index] = obj; + + // Return a borrowed reference + return obj; } + static void -unicode_clear_static_strings(void) +unicode_clear_identifiers(struct _Py_unicode_state *state) { - _Py_Identifier *tmp, *s = static_strings; - while (s) { - Py_CLEAR(s->object); - tmp = s->next; - s->next = NULL; - s = tmp; + struct _Py_unicode_ids *ids = &state->ids; + for (Py_ssize_t i=0; i < ids->size; i++) { + Py_XDECREF(ids->array[i]); } - static_strings = NULL; + ids->size = 0; + PyMem_Free(ids->array); + ids->array = NULL; + // Don't reset _PyRuntime next_index: _Py_Identifier.id remains valid + // after Py_Finalize(). } + /* Internal function, doesn't check maximum character */ PyObject* @@ -3298,7 +3324,7 @@ PyUnicode_AsWideCharString(PyObject *unicode, *size = buflen; } else if (wcslen(buffer) != (size_t)buflen) { - PyMem_FREE(buffer); + PyMem_Free(buffer); PyErr_SetString(PyExc_ValueError, "embedded null character"); return NULL; @@ -4199,7 +4225,7 @@ PyUnicode_AsUnicodeAndSize(PyObject *unicode, Py_ssize_t *size) PyErr_NoMemory(); return NULL; } - w = (wchar_t *) PyObject_MALLOC(sizeof(wchar_t) * (wlen + 1)); + w = (wchar_t *) PyObject_Malloc(sizeof(wchar_t) * (wlen + 1)); if (w == NULL) { PyErr_NoMemory(); return NULL; @@ -5627,7 +5653,7 @@ unicode_fill_utf8(PyObject *unicode) PyBytes_AS_STRING(writer.buffer); Py_ssize_t len = end - start; - char *cache = PyObject_MALLOC(len + 1); + char *cache = PyObject_Malloc(len + 1); if (cache == NULL) { _PyBytesWriter_Dealloc(&writer); PyErr_NoMemory(); @@ -8544,7 +8570,7 @@ PyUnicode_BuildEncodingMap(PyObject* string) } /* Create a three-level trie */ - result = PyObject_MALLOC(sizeof(struct encoding_map) + + result = PyObject_Malloc(sizeof(struct encoding_map) + 16*count2 + 128*count3 - 1); if (!result) { return PyErr_NoMemory(); @@ -10211,7 +10237,7 @@ case_operation(PyObject *self, PyErr_SetString(PyExc_OverflowError, "string is too long"); return NULL; } - tmp = PyMem_MALLOC(sizeof(Py_UCS4) * 3 * length); + tmp = PyMem_Malloc(sizeof(Py_UCS4) * 3 * length); if (tmp == NULL) return PyErr_NoMemory(); newlength = perform(kind, data, length, tmp, &maxchar); @@ -10235,7 +10261,7 @@ case_operation(PyObject *self, Py_UNREACHABLE(); } leave: - PyMem_FREE(tmp); + PyMem_Free(tmp); return res; } @@ -11050,11 +11076,11 @@ replace(PyObject *self, PyObject *str1, assert(release1 == (buf1 != PyUnicode_DATA(str1))); assert(release2 == (buf2 != PyUnicode_DATA(str2))); if (srelease) - PyMem_FREE((void *)sbuf); + PyMem_Free((void *)sbuf); if (release1) - PyMem_FREE((void *)buf1); + PyMem_Free((void *)buf1); if (release2) - PyMem_FREE((void *)buf2); + PyMem_Free((void *)buf2); assert(_PyUnicode_CheckConsistency(u, 1)); return u; @@ -11064,11 +11090,11 @@ replace(PyObject *self, PyObject *str1, assert(release1 == (buf1 != PyUnicode_DATA(str1))); assert(release2 == (buf2 != PyUnicode_DATA(str2))); if (srelease) - PyMem_FREE((void *)sbuf); + PyMem_Free((void *)sbuf); if (release1) - PyMem_FREE((void *)buf1); + PyMem_Free((void *)buf1); if (release2) - PyMem_FREE((void *)buf2); + PyMem_Free((void *)buf2); return unicode_result_unchanged(self); error: @@ -11076,11 +11102,11 @@ replace(PyObject *self, PyObject *str1, assert(release1 == (buf1 != PyUnicode_DATA(str1))); assert(release2 == (buf2 != PyUnicode_DATA(str2))); if (srelease) - PyMem_FREE((void *)sbuf); + PyMem_Free((void *)sbuf); if (release1) - PyMem_FREE((void *)buf1); + PyMem_Free((void *)buf1); if (release2) - PyMem_FREE((void *)buf2); + PyMem_Free((void *)buf2); return NULL; } @@ -11494,12 +11520,11 @@ _PyUnicode_EqualToASCIIId(PyObject *left, _Py_Identifier *right) if (PyUnicode_CHECK_INTERNED(left)) return 0; -#ifdef INTERNED_STRINGS assert(_PyUnicode_HASH(right_uni) != -1); Py_hash_t hash = _PyUnicode_HASH(left); - if (hash != -1 && hash != _PyUnicode_HASH(right_uni)) + if (hash != -1 && hash != _PyUnicode_HASH(right_uni)) { return 0; -#endif + } return unicode_compare_eq(left, right_uni); } @@ -15567,7 +15592,7 @@ unicode_subtype_new(PyTypeObject *type, PyObject *unicode) PyErr_NoMemory(); goto onError; } - data = PyObject_MALLOC((length + 1) * char_size); + data = PyObject_Malloc((length + 1) * char_size); if (data == NULL) { PyErr_NoMemory(); goto onError; @@ -15723,23 +15748,21 @@ PyUnicode_InternInPlace(PyObject **p) return; } -#ifdef INTERNED_STRINGS if (PyUnicode_READY(s) == -1) { PyErr_Clear(); return; } - if (interned == NULL) { - interned = PyDict_New(); - if (interned == NULL) { + struct _Py_unicode_state *state = get_unicode_state(); + if (state->interned == NULL) { + state->interned = PyDict_New(); + if (state->interned == NULL) { PyErr_Clear(); /* Don't leave an exception */ return; } } - PyObject *t; - t = PyDict_SetDefault(interned, s, s); - + PyObject *t = PyDict_SetDefault(state->interned, s, s); if (t == NULL) { PyErr_Clear(); return; @@ -15756,13 +15779,9 @@ PyUnicode_InternInPlace(PyObject **p) this. */ Py_SET_REFCNT(s, Py_REFCNT(s) - 2); _PyUnicode_STATE(s).interned = SSTATE_INTERNED_MORTAL; -#else - // PyDict expects that interned strings have their hash - // (PyASCIIObject.hash) already computed. - (void)unicode_hash(s); -#endif } + void PyUnicode_InternImmortal(PyObject **p) { @@ -15796,35 +15815,25 @@ PyUnicode_InternFromString(const char *cp) void _PyUnicode_ClearInterned(PyThreadState *tstate) { - if (!_Py_IsMainInterpreter(tstate)) { - // interned dict is shared by all interpreters + struct _Py_unicode_state *state = &tstate->interp->unicode; + if (state->interned == NULL) { return; } - - if (interned == NULL) { - return; - } - assert(PyDict_CheckExact(interned)); - - PyObject *keys = PyDict_Keys(interned); - if (keys == NULL) { - PyErr_Clear(); - return; - } - assert(PyList_CheckExact(keys)); + assert(PyDict_CheckExact(state->interned)); /* Interned unicode strings are not forcibly deallocated; rather, we give them their stolen references back, and then clear and DECREF the interned dict. */ - Py_ssize_t n = PyList_GET_SIZE(keys); #ifdef INTERNED_STATS - fprintf(stderr, "releasing %zd interned strings\n", n); + fprintf(stderr, "releasing %zd interned strings\n", + PyDict_GET_SIZE(state->interned)); Py_ssize_t immortal_size = 0, mortal_size = 0; #endif - for (Py_ssize_t i = 0; i < n; i++) { - PyObject *s = PyList_GET_ITEM(keys, i); + Py_ssize_t pos = 0; + PyObject *s, *ignored_value; + while (PyDict_Next(state->interned, &pos, &s, &ignored_value)) { assert(PyUnicode_IS_READY(s)); switch (PyUnicode_CHECK_INTERNED(s)) { @@ -15854,10 +15863,9 @@ _PyUnicode_ClearInterned(PyThreadState *tstate) "total size of all interned strings: %zd/%zd mortal/immortal\n", mortal_size, immortal_size); #endif - Py_DECREF(keys); - PyDict_Clear(interned); - Py_CLEAR(interned); + PyDict_Clear(state->interned); + Py_CLEAR(state->interned); } @@ -16227,21 +16235,19 @@ _PyUnicode_EnableLegacyWindowsFSEncoding(void) void _PyUnicode_Fini(PyThreadState *tstate) { - // _PyUnicode_ClearInterned() must be called before - struct _Py_unicode_state *state = &tstate->interp->unicode; - Py_CLEAR(state->empty_string); + // _PyUnicode_ClearInterned() must be called before + assert(state->interned == NULL); + + _PyUnicode_FiniEncodings(&state->fs_codec); + + unicode_clear_identifiers(state); for (Py_ssize_t i = 0; i < 256; i++) { Py_CLEAR(state->latin1[i]); } - - if (_Py_IsMainInterpreter(tstate)) { - unicode_clear_static_strings(); - } - - _PyUnicode_FiniEncodings(&tstate->interp->unicode.fs_codec); + Py_CLEAR(state->empty_string); } diff --git a/Objects/unionobject.c b/Objects/unionobject.c index 2308bfc9f2a..32aa5078afc 100644 --- a/Objects/unionobject.c +++ b/Objects/unionobject.c @@ -237,8 +237,8 @@ dedup_and_flatten_args(PyObject* args) PyObject* i_element = PyTuple_GET_ITEM(args, i); for (Py_ssize_t j = i + 1; j < arg_length; j++) { PyObject* j_element = PyTuple_GET_ITEM(args, j); - int is_ga = Py_TYPE(i_element) == &Py_GenericAliasType && - Py_TYPE(j_element) == &Py_GenericAliasType; + int is_ga = PyObject_TypeCheck(i_element, &Py_GenericAliasType) && + PyObject_TypeCheck(j_element, &Py_GenericAliasType); // RichCompare to also deduplicate GenericAlias types (slower) is_duplicate = is_ga ? PyObject_RichCompareBool(i_element, j_element, Py_EQ) : i_element == j_element; @@ -296,7 +296,7 @@ is_unionable(PyObject *obj) is_new_type(obj) || is_special_form(obj) || PyType_Check(obj) || - type == &Py_GenericAliasType || + PyObject_TypeCheck(obj, &Py_GenericAliasType) || type == &_Py_UnionType); } diff --git a/PC/_msi.c b/PC/_msi.c index 504899d0757..01516e85ccf 100644 --- a/PC/_msi.c +++ b/PC/_msi.c @@ -351,7 +351,7 @@ msiobj_dealloc(msiobj* msidb) { MsiCloseHandle(msidb->h); msidb->h = 0; - PyObject_Del(msidb); + PyObject_Free(msidb); } static PyObject* diff --git a/PC/layout/main.py b/PC/layout/main.py index 3eef7556299..8c69c91542d 100644 --- a/PC/layout/main.py +++ b/PC/layout/main.py @@ -36,7 +36,7 @@ from .support.nuspec import * BDIST_WININST_FILES_ONLY = FileNameSet("wininst-*", "bdist_wininst.py") BDIST_WININST_STUB = "PC/layout/support/distutils.command.bdist_wininst.py" -TEST_PYDS_ONLY = FileStemSet("xxlimited", "_ctypes_test", "_test*") +TEST_PYDS_ONLY = FileStemSet("xxlimited", "xxlimited_35", "_ctypes_test", "_test*") TEST_DIRS_ONLY = FileNameSet("test", "tests") IDLE_DIRS_ONLY = FileNameSet("idlelib") diff --git a/PC/python3dll.c b/PC/python3dll.c index 27cc315de2d..fa44a46fb76 100644 --- a/PC/python3dll.c +++ b/PC/python3dll.c @@ -49,6 +49,7 @@ EXPORT_FUNC(Py_Exit) EXPORT_FUNC(Py_FatalError) EXPORT_FUNC(Py_Finalize) EXPORT_FUNC(Py_FinalizeEx) +EXPORT_FUNC(Py_FrozenMain) EXPORT_FUNC(Py_GenericAlias) EXPORT_FUNC(Py_GenericAliasType) EXPORT_FUNC(Py_GetArgcArgv) @@ -256,6 +257,8 @@ EXPORT_FUNC(PyFloat_FromString) EXPORT_FUNC(PyFloat_GetInfo) EXPORT_FUNC(PyFloat_GetMax) EXPORT_FUNC(PyFloat_GetMin) +EXPORT_FUNC(PyFrame_GetLineNumber) +EXPORT_FUNC(PyFrame_GetCode) EXPORT_FUNC(PyFrozenSet_New) EXPORT_FUNC(PyGC_Collect) EXPORT_FUNC(PyGILState_Ensure) @@ -404,6 +407,7 @@ EXPORT_FUNC(PyObject_CallFunction) EXPORT_FUNC(PyObject_CallFunctionObjArgs) EXPORT_FUNC(PyObject_CallMethod) EXPORT_FUNC(PyObject_CallMethodObjArgs) +EXPORT_FUNC(PyObject_CallNoArgs) EXPORT_FUNC(PyObject_CallObject) EXPORT_FUNC(PyObject_Calloc) EXPORT_FUNC(PyObject_ClearWeakRefs) @@ -534,6 +538,9 @@ EXPORT_FUNC(PyThreadState_Delete) EXPORT_FUNC(PyThreadState_DeleteCurrent) EXPORT_FUNC(PyThreadState_Get) EXPORT_FUNC(PyThreadState_GetDict) +EXPORT_FUNC(PyThreadState_GetFrame) +EXPORT_FUNC(PyThreadState_GetID) +EXPORT_FUNC(PyThreadState_GetInterpreter) EXPORT_FUNC(PyThreadState_New) EXPORT_FUNC(PyThreadState_SetAsyncExc) EXPORT_FUNC(PyThreadState_Swap) @@ -790,6 +797,7 @@ EXPORT_DATA(PyMemoryView_Type) EXPORT_DATA(PyMethodDescr_Type) EXPORT_DATA(PyModule_Type) EXPORT_DATA(PyModuleDef_Type) +EXPORT_DATA(PyModule_AddObjectRef) EXPORT_DATA(PyNullImporter_Type) EXPORT_DATA(PyODict_Type) EXPORT_DATA(PyODictItems_Type) diff --git a/PC/winreg.c b/PC/winreg.c index 78c08693a8a..d62a7be28d3 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -145,7 +145,7 @@ PyHKEY_deallocFunc(PyObject *ob) PyHKEYObject *obkey = (PyHKEYObject *)ob; if (obkey->hkey) RegCloseKey((HKEY)obkey->hkey); - PyObject_DEL(ob); + PyObject_Free(ob); } static int @@ -459,7 +459,7 @@ PyObject * PyHKEY_FromHKEY(HKEY h) { /* Inline PyObject_New */ - PyHKEYObject *op = (PyHKEYObject *) PyObject_MALLOC(sizeof(PyHKEYObject)); + PyHKEYObject *op = (PyHKEYObject *) PyObject_Malloc(sizeof(PyHKEYObject)); if (op == NULL) { return PyErr_NoMemory(); } @@ -1818,7 +1818,7 @@ winreg_SetValueEx_impl(PyObject *module, HKEY key, Py_BEGIN_ALLOW_THREADS rc = RegSetValueExW(key, value_name, 0, type, data, len); Py_END_ALLOW_THREADS - PyMem_DEL(data); + PyMem_Free(data); if (rc != ERROR_SUCCESS) return PyErr_SetFromWindowsErrWithFunction(rc, "RegSetValueEx"); diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj index 4d416c589e4..8e7088d47d2 100644 --- a/PCbuild/pcbuild.proj +++ b/PCbuild/pcbuild.proj @@ -66,6 +66,7 @@ + false diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 18edba855d6..fd27dea9dae 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -146,6 +146,7 @@ + @@ -167,6 +168,7 @@ + @@ -176,6 +178,7 @@ + diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 281bce1c5f4..75a653dcbda 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -459,6 +459,9 @@ Include\cpython + + Include\cpython + Include\cpython @@ -483,6 +486,9 @@ Include\internal + + Include + Include\internal @@ -510,6 +516,9 @@ Include\internal + + Include\internal + Include\internal diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index 73833d54637..4335c9f71d0 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -125,6 +125,9 @@ python3dll xxlimited builds an example module that makes use of the PEP 384 Stable ABI, see Modules\xxlimited.c +xxlimited_35 + ditto for testing the Python 3.5 stable ABI, see + Modules\xxlimited_35.c The following sub-projects are for individual modules of the standard library which are implemented in C; each one builds a DLL (renamed to diff --git a/PCbuild/xxlimited.vcxproj b/PCbuild/xxlimited.vcxproj index 776335a15cb..ece169127a2 100644 --- a/PCbuild/xxlimited.vcxproj +++ b/PCbuild/xxlimited.vcxproj @@ -94,7 +94,7 @@ - %(PreprocessorDefinitions);Py_LIMITED_API=0x03060000 + %(PreprocessorDefinitions);Py_LIMITED_API=0x03100000 wsock32.lib;%(AdditionalDependencies) @@ -111,4 +111,4 @@ - \ No newline at end of file + diff --git a/PCbuild/xxlimited_35.vcxproj b/PCbuild/xxlimited_35.vcxproj new file mode 100644 index 00000000000..7e49eadf903 --- /dev/null +++ b/PCbuild/xxlimited_35.vcxproj @@ -0,0 +1,114 @@ + + + + + Debug + ARM + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + PGInstrument + ARM + + + PGInstrument + ARM64 + + + PGInstrument + Win32 + + + PGInstrument + x64 + + + PGUpdate + ARM + + + PGUpdate + ARM64 + + + PGUpdate + Win32 + + + PGUpdate + x64 + + + Release + ARM + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {fb868ea7-f93a-4d9b-be78-ca4e9ba14fff} + xxlimited_35 + Win32Proj + + + + + DynamicLibrary + NotSet + false + + + + .pyd + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + + + + %(PreprocessorDefinitions);Py_LIMITED_API=0x03060000 + + + wsock32.lib;%(AdditionalDependencies) + + + + + + + + {885d4898-d08d-4091-9c40-c700cfe3fc5a} + + + + + + diff --git a/PCbuild/xxlimited_35.vcxproj.filters b/PCbuild/xxlimited_35.vcxproj.filters new file mode 100644 index 00000000000..35bfb05c239 --- /dev/null +++ b/PCbuild/xxlimited_35.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {5be27194-6530-452d-8d86-3767b991fa83} + + + + + Source Files + + + diff --git a/Parser/parser.c b/Parser/parser.c index f469c8f0e49..2559969f86e 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -75,8 +75,8 @@ static KeywordToken *reserved_keywords[] = { #define statements_type 1006 #define statement_type 1007 #define statement_newline_type 1008 -#define simple_stmt_type 1009 -#define small_stmt_type 1010 +#define simple_stmts_type 1009 +#define simple_stmt_type 1010 #define compound_stmt_type 1011 #define assignment_type 1012 #define augassign_type 1013 @@ -391,8 +391,8 @@ static asdl_expr_seq* type_expressions_rule(Parser *p); static asdl_stmt_seq* statements_rule(Parser *p); static asdl_stmt_seq* statement_rule(Parser *p); static asdl_stmt_seq* statement_newline_rule(Parser *p); -static asdl_stmt_seq* simple_stmt_rule(Parser *p); -static stmt_ty small_stmt_rule(Parser *p); +static asdl_stmt_seq* simple_stmts_rule(Parser *p); +static stmt_ty simple_stmt_rule(Parser *p); static stmt_ty compound_stmt_rule(Parser *p); static stmt_ty assignment_rule(Parser *p); static AugOperator* augassign_rule(Parser *p); @@ -1213,7 +1213,7 @@ statements_rule(Parser *p) return _res; } -// statement: compound_stmt | simple_stmt +// statement: compound_stmt | simple_stmts static asdl_stmt_seq* statement_rule(Parser *p) { @@ -1248,18 +1248,18 @@ statement_rule(Parser *p) D(fprintf(stderr, "%*c%s statement[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "compound_stmt")); } - { // simple_stmt + { // simple_stmts if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> statement[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "simple_stmt")); + D(fprintf(stderr, "%*c> statement[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "simple_stmts")); asdl_stmt_seq* a; if ( - (a = (asdl_stmt_seq*)simple_stmt_rule(p)) // simple_stmt + (a = (asdl_stmt_seq*)simple_stmts_rule(p)) // simple_stmts ) { - D(fprintf(stderr, "%*c+ statement[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "simple_stmt")); + D(fprintf(stderr, "%*c+ statement[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "simple_stmts")); _res = a; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -1270,7 +1270,7 @@ statement_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s statement[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "simple_stmt")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "simple_stmts")); } _res = NULL; done: @@ -1278,7 +1278,7 @@ statement_rule(Parser *p) return _res; } -// statement_newline: compound_stmt NEWLINE | simple_stmt | NEWLINE | $ +// statement_newline: compound_stmt NEWLINE | simple_stmts | NEWLINE | $ static asdl_stmt_seq* statement_newline_rule(Parser *p) { @@ -1325,24 +1325,24 @@ statement_newline_rule(Parser *p) D(fprintf(stderr, "%*c%s statement_newline[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "compound_stmt NEWLINE")); } - { // simple_stmt + { // simple_stmts if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> statement_newline[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "simple_stmt")); - asdl_stmt_seq* simple_stmt_var; + D(fprintf(stderr, "%*c> statement_newline[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "simple_stmts")); + asdl_stmt_seq* simple_stmts_var; if ( - (simple_stmt_var = simple_stmt_rule(p)) // simple_stmt + (simple_stmts_var = simple_stmts_rule(p)) // simple_stmts ) { - D(fprintf(stderr, "%*c+ statement_newline[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "simple_stmt")); - _res = simple_stmt_var; + D(fprintf(stderr, "%*c+ statement_newline[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "simple_stmts")); + _res = simple_stmts_var; goto done; } p->mark = _mark; D(fprintf(stderr, "%*c%s statement_newline[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "simple_stmt")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "simple_stmts")); } { // NEWLINE if (p->error_indicator) { @@ -1407,9 +1407,9 @@ statement_newline_rule(Parser *p) return _res; } -// simple_stmt: small_stmt !';' NEWLINE | ';'.small_stmt+ ';'? NEWLINE +// simple_stmts: simple_stmt !';' NEWLINE | ';'.simple_stmt+ ';'? NEWLINE static asdl_stmt_seq* -simple_stmt_rule(Parser *p) +simple_stmts_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -1418,23 +1418,23 @@ simple_stmt_rule(Parser *p) } asdl_stmt_seq* _res = NULL; int _mark = p->mark; - { // small_stmt !';' NEWLINE + { // simple_stmt !';' NEWLINE if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "small_stmt !';' NEWLINE")); + D(fprintf(stderr, "%*c> simple_stmts[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "simple_stmt !';' NEWLINE")); stmt_ty a; Token * newline_var; if ( - (a = small_stmt_rule(p)) // small_stmt + (a = simple_stmt_rule(p)) // simple_stmt && _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 13) // token=';' && (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' ) { - D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "small_stmt !';' NEWLINE")); + D(fprintf(stderr, "%*c+ simple_stmts[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "simple_stmt !';' NEWLINE")); _res = ( asdl_stmt_seq * ) _PyPegen_singleton_seq ( p , a ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -1444,28 +1444,28 @@ simple_stmt_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "small_stmt !';' NEWLINE")); + D(fprintf(stderr, "%*c%s simple_stmts[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "simple_stmt !';' NEWLINE")); } - { // ';'.small_stmt+ ';'? NEWLINE + { // ';'.simple_stmt+ ';'? NEWLINE if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "';'.small_stmt+ ';'? NEWLINE")); + D(fprintf(stderr, "%*c> simple_stmts[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "';'.simple_stmt+ ';'? NEWLINE")); void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings asdl_stmt_seq* a; Token * newline_var; if ( - (a = (asdl_stmt_seq*)_gather_12_rule(p)) // ';'.small_stmt+ + (a = (asdl_stmt_seq*)_gather_12_rule(p)) // ';'.simple_stmt+ && (_opt_var = _PyPegen_expect_token(p, 13), 1) // ';'? && (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' ) { - D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "';'.small_stmt+ ';'? NEWLINE")); + D(fprintf(stderr, "%*c+ simple_stmts[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "';'.simple_stmt+ ';'? NEWLINE")); _res = a; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -1475,8 +1475,8 @@ simple_stmt_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "';'.small_stmt+ ';'? NEWLINE")); + D(fprintf(stderr, "%*c%s simple_stmts[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "';'.simple_stmt+ ';'? NEWLINE")); } _res = NULL; done: @@ -1484,7 +1484,7 @@ simple_stmt_rule(Parser *p) return _res; } -// small_stmt: +// simple_stmt: // | assignment // | star_expressions // | &'return' return_stmt @@ -1499,7 +1499,7 @@ simple_stmt_rule(Parser *p) // | &'global' global_stmt // | &'nonlocal' nonlocal_stmt static stmt_ty -small_stmt_rule(Parser *p) +simple_stmt_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -1507,7 +1507,7 @@ small_stmt_rule(Parser *p) return NULL; } stmt_ty _res = NULL; - if (_PyPegen_is_memoized(p, small_stmt_type, &_res)) { + if (_PyPegen_is_memoized(p, simple_stmt_type, &_res)) { D(p->level--); return _res; } @@ -1526,18 +1526,18 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "assignment")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "assignment")); stmt_ty assignment_var; if ( (assignment_var = assignment_rule(p)) // assignment ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "assignment")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "assignment")); _res = assignment_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "assignment")); } { // star_expressions @@ -1545,13 +1545,13 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); expr_ty e; if ( (e = star_expressions_rule(p)) // star_expressions ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -1570,7 +1570,7 @@ small_stmt_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_expressions")); } { // &'return' return_stmt @@ -1578,7 +1578,7 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'return' return_stmt")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'return' return_stmt")); stmt_ty return_stmt_var; if ( _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 500) // token='return' @@ -1586,12 +1586,12 @@ small_stmt_rule(Parser *p) (return_stmt_var = return_stmt_rule(p)) // return_stmt ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'return' return_stmt")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'return' return_stmt")); _res = return_stmt_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&'return' return_stmt")); } { // &('import' | 'from') import_stmt @@ -1599,7 +1599,7 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&('import' | 'from') import_stmt")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&('import' | 'from') import_stmt")); stmt_ty import_stmt_var; if ( _PyPegen_lookahead(1, _tmp_14_rule, p) @@ -1607,12 +1607,12 @@ small_stmt_rule(Parser *p) (import_stmt_var = import_stmt_rule(p)) // import_stmt ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&('import' | 'from') import_stmt")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&('import' | 'from') import_stmt")); _res = import_stmt_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&('import' | 'from') import_stmt")); } { // &'raise' raise_stmt @@ -1620,7 +1620,7 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'raise' raise_stmt")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'raise' raise_stmt")); stmt_ty raise_stmt_var; if ( _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 501) // token='raise' @@ -1628,12 +1628,12 @@ small_stmt_rule(Parser *p) (raise_stmt_var = raise_stmt_rule(p)) // raise_stmt ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'raise' raise_stmt")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'raise' raise_stmt")); _res = raise_stmt_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&'raise' raise_stmt")); } { // 'pass' @@ -1641,13 +1641,13 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'pass'")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'pass'")); Token * _keyword; if ( (_keyword = _PyPegen_expect_token(p, 502)) // token='pass' ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'pass'")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'pass'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -1666,7 +1666,7 @@ small_stmt_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'pass'")); } { // &'del' del_stmt @@ -1674,7 +1674,7 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'del' del_stmt")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'del' del_stmt")); stmt_ty del_stmt_var; if ( _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 503) // token='del' @@ -1682,12 +1682,12 @@ small_stmt_rule(Parser *p) (del_stmt_var = del_stmt_rule(p)) // del_stmt ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'del' del_stmt")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'del' del_stmt")); _res = del_stmt_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&'del' del_stmt")); } { // &'yield' yield_stmt @@ -1695,7 +1695,7 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'yield' yield_stmt")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'yield' yield_stmt")); stmt_ty yield_stmt_var; if ( _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 504) // token='yield' @@ -1703,12 +1703,12 @@ small_stmt_rule(Parser *p) (yield_stmt_var = yield_stmt_rule(p)) // yield_stmt ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'yield' yield_stmt")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'yield' yield_stmt")); _res = yield_stmt_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&'yield' yield_stmt")); } { // &'assert' assert_stmt @@ -1716,7 +1716,7 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'assert' assert_stmt")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'assert' assert_stmt")); stmt_ty assert_stmt_var; if ( _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 505) // token='assert' @@ -1724,12 +1724,12 @@ small_stmt_rule(Parser *p) (assert_stmt_var = assert_stmt_rule(p)) // assert_stmt ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'assert' assert_stmt")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'assert' assert_stmt")); _res = assert_stmt_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&'assert' assert_stmt")); } { // 'break' @@ -1737,13 +1737,13 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'break'")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'break'")); Token * _keyword; if ( (_keyword = _PyPegen_expect_token(p, 506)) // token='break' ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'break'")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'break'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -1762,7 +1762,7 @@ small_stmt_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'break'")); } { // 'continue' @@ -1770,13 +1770,13 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'continue'")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'continue'")); Token * _keyword; if ( (_keyword = _PyPegen_expect_token(p, 507)) // token='continue' ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'continue'")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'continue'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -1795,7 +1795,7 @@ small_stmt_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'continue'")); } { // &'global' global_stmt @@ -1803,7 +1803,7 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'global' global_stmt")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'global' global_stmt")); stmt_ty global_stmt_var; if ( _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 508) // token='global' @@ -1811,12 +1811,12 @@ small_stmt_rule(Parser *p) (global_stmt_var = global_stmt_rule(p)) // global_stmt ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'global' global_stmt")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'global' global_stmt")); _res = global_stmt_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&'global' global_stmt")); } { // &'nonlocal' nonlocal_stmt @@ -1824,7 +1824,7 @@ small_stmt_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> small_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'nonlocal' nonlocal_stmt")); + D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'nonlocal' nonlocal_stmt")); stmt_ty nonlocal_stmt_var; if ( _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 509) // token='nonlocal' @@ -1832,17 +1832,17 @@ small_stmt_rule(Parser *p) (nonlocal_stmt_var = nonlocal_stmt_rule(p)) // nonlocal_stmt ) { - D(fprintf(stderr, "%*c+ small_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'nonlocal' nonlocal_stmt")); + D(fprintf(stderr, "%*c+ simple_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&'nonlocal' nonlocal_stmt")); _res = nonlocal_stmt_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s small_stmt[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s simple_stmt[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&'nonlocal' nonlocal_stmt")); } _res = NULL; done: - _PyPegen_insert_memo(p, _mark, small_stmt_type, _res); + _PyPegen_insert_memo(p, _mark, simple_stmt_type, _res); D(p->level--); return _res; } @@ -6235,7 +6235,7 @@ class_def_raw_rule(Parser *p) return _res; } -// block: NEWLINE INDENT statements DEDENT | simple_stmt | invalid_block +// block: NEWLINE INDENT statements DEDENT | simple_stmts | invalid_block static asdl_stmt_seq* block_rule(Parser *p) { @@ -6283,24 +6283,24 @@ block_rule(Parser *p) D(fprintf(stderr, "%*c%s block[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "NEWLINE INDENT statements DEDENT")); } - { // simple_stmt + { // simple_stmts if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> block[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "simple_stmt")); - asdl_stmt_seq* simple_stmt_var; + D(fprintf(stderr, "%*c> block[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "simple_stmts")); + asdl_stmt_seq* simple_stmts_var; if ( - (simple_stmt_var = simple_stmt_rule(p)) // simple_stmt + (simple_stmts_var = simple_stmts_rule(p)) // simple_stmts ) { - D(fprintf(stderr, "%*c+ block[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "simple_stmt")); - _res = simple_stmt_var; + D(fprintf(stderr, "%*c+ block[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "simple_stmts")); + _res = simple_stmts_var; goto done; } p->mark = _mark; D(fprintf(stderr, "%*c%s block[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "simple_stmt")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "simple_stmts")); } if (p->call_invalid_rules) { // invalid_block if (p->error_indicator) { @@ -14562,12 +14562,12 @@ invalid_kwarg_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_kwarg[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression '='")); - Token * _literal; - expr_ty a; + Token * a; + expr_ty expression_var; if ( - (a = expression_rule(p)) // expression + (expression_var = expression_rule(p)) // expression && - (_literal = _PyPegen_expect_token(p, 22)) // token='=' + (a = _PyPegen_expect_token(p, 22)) // token='=' ) { D(fprintf(stderr, "%*c+ invalid_kwarg[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression '='")); @@ -16274,7 +16274,7 @@ _loop1_11_rule(Parser *p) return _seq; } -// _loop0_13: ';' small_stmt +// _loop0_13: ';' simple_stmt static asdl_seq * _loop0_13_rule(Parser *p) { @@ -16295,18 +16295,18 @@ _loop0_13_rule(Parser *p) } ssize_t _children_capacity = 1; ssize_t _n = 0; - { // ';' small_stmt + { // ';' simple_stmt if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_13[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "';' small_stmt")); + D(fprintf(stderr, "%*c> _loop0_13[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "';' simple_stmt")); Token * _literal; stmt_ty elem; while ( (_literal = _PyPegen_expect_token(p, 13)) // token=';' && - (elem = small_stmt_rule(p)) // small_stmt + (elem = simple_stmt_rule(p)) // simple_stmt ) { _res = elem; @@ -16332,7 +16332,7 @@ _loop0_13_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s _loop0_13[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "';' small_stmt")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "';' simple_stmt")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); if (!_seq) { @@ -16349,7 +16349,7 @@ _loop0_13_rule(Parser *p) return _seq; } -// _gather_12: small_stmt _loop0_13 +// _gather_12: simple_stmt _loop0_13 static asdl_seq * _gather_12_rule(Parser *p) { @@ -16360,27 +16360,27 @@ _gather_12_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // small_stmt _loop0_13 + { // simple_stmt _loop0_13 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_12[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "small_stmt _loop0_13")); + D(fprintf(stderr, "%*c> _gather_12[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "simple_stmt _loop0_13")); stmt_ty elem; asdl_seq * seq; if ( - (elem = small_stmt_rule(p)) // small_stmt + (elem = simple_stmt_rule(p)) // simple_stmt && (seq = _loop0_13_rule(p)) // _loop0_13 ) { - D(fprintf(stderr, "%*c+ _gather_12[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "small_stmt _loop0_13")); + D(fprintf(stderr, "%*c+ _gather_12[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "simple_stmt _loop0_13")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; D(fprintf(stderr, "%*c%s _gather_12[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "small_stmt _loop0_13")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "simple_stmt _loop0_13")); } _res = NULL; done: diff --git a/Parser/string_parser.c b/Parser/string_parser.c index 8f6433dbcec..09b8c35106e 100644 --- a/Parser/string_parser.c +++ b/Parser/string_parser.c @@ -384,7 +384,7 @@ fstring_compile_expr(Parser *p, const char *expr_start, const char *expr_end, int lines, cols; if (!fstring_find_expr_location(t, str, &lines, &cols)) { - PyMem_FREE(str); + PyMem_Free(str); return NULL; } diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index f3c1d9b20ad..96539bd5565 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -51,7 +51,7 @@ static const char* type_comment_prefix = "# type: "; static struct tok_state * tok_new(void) { - struct tok_state *tok = (struct tok_state *)PyMem_MALLOC( + struct tok_state *tok = (struct tok_state *)PyMem_Malloc( sizeof(struct tok_state)); if (tok == NULL) return NULL; @@ -93,7 +93,7 @@ tok_new(void) static char * new_string(const char *s, Py_ssize_t len, struct tok_state *tok) { - char* result = (char *)PyMem_MALLOC(len + 1); + char* result = (char *)PyMem_Malloc(len + 1); if (!result) { tok->done = E_NOMEM; return NULL; @@ -108,7 +108,7 @@ error_ret(struct tok_state *tok) /* XXX */ { tok->decoding_erred = 1; if (tok->fp != NULL && tok->buf != NULL) /* see PyTokenizer_Free */ - PyMem_FREE(tok->buf); + PyMem_Free(tok->buf); tok->buf = tok->cur = tok->inp = NULL; tok->start = NULL; tok->end = NULL; @@ -184,7 +184,7 @@ get_coding_spec(const char *s, char **spec, Py_ssize_t size, struct tok_state *t return 0; q = get_normal_name(r); if (r != q) { - PyMem_FREE(r); + PyMem_Free(r); r = new_string(q, strlen(q), tok); if (!r) return 0; @@ -244,7 +244,7 @@ check_coding_spec(const char* line, Py_ssize_t size, struct tok_state *tok, else { PyErr_Format(PyExc_SyntaxError, "encoding problem: %s", cs); - PyMem_FREE(cs); + PyMem_Free(cs); } } } else { /* then, compare cs with BOM */ @@ -252,7 +252,7 @@ check_coding_spec(const char* line, Py_ssize_t size, struct tok_state *tok, if (!r) PyErr_Format(PyExc_SyntaxError, "encoding problem: %s with BOM", cs); - PyMem_FREE(cs); + PyMem_Free(cs); } return r; } @@ -315,7 +315,7 @@ check_bom(int get_char(struct tok_state *), return 1; } if (tok->encoding != NULL) - PyMem_FREE(tok->encoding); + PyMem_Free(tok->encoding); tok->encoding = new_string("utf-8", 5, tok); if (!tok->encoding) return 0; @@ -620,7 +620,7 @@ translate_newlines(const char *s, int exec_input, struct tok_state *tok) { size_t needed_length = strlen(s) + 2, final_length; char *buf, *current; char c = '\0'; - buf = PyMem_MALLOC(needed_length); + buf = PyMem_Malloc(needed_length); if (buf == NULL) { tok->done = E_NOMEM; return NULL; @@ -651,9 +651,9 @@ translate_newlines(const char *s, int exec_input, struct tok_state *tok) { final_length = current - buf + 1; if (final_length < needed_length && final_length) { /* should never fail */ - char* result = PyMem_REALLOC(buf, final_length); + char* result = PyMem_Realloc(buf, final_length); if (result == NULL) { - PyMem_FREE(buf); + PyMem_Free(buf); } buf = result; } @@ -757,7 +757,7 @@ PyTokenizer_FromUTF8(const char *str, int exec_input) tok->read_coding_spec = 1; tok->enc = NULL; tok->str = translated; - tok->encoding = (char *)PyMem_MALLOC(6); + tok->encoding = (char *)PyMem_Malloc(6); if (!tok->encoding) { PyTokenizer_Free(tok); return NULL; @@ -778,7 +778,7 @@ PyTokenizer_FromFile(FILE *fp, const char* enc, struct tok_state *tok = tok_new(); if (tok == NULL) return NULL; - if ((tok->buf = (char *)PyMem_MALLOC(BUFSIZ)) == NULL) { + if ((tok->buf = (char *)PyMem_Malloc(BUFSIZ)) == NULL) { PyTokenizer_Free(tok); return NULL; } @@ -790,7 +790,7 @@ PyTokenizer_FromFile(FILE *fp, const char* enc, if (enc != NULL) { /* Must copy encoding declaration since it gets copied into the parse tree. */ - tok->encoding = PyMem_MALLOC(strlen(enc)+1); + tok->encoding = PyMem_Malloc(strlen(enc)+1); if (!tok->encoding) { PyTokenizer_Free(tok); return NULL; @@ -808,15 +808,15 @@ void PyTokenizer_Free(struct tok_state *tok) { if (tok->encoding != NULL) - PyMem_FREE(tok->encoding); + PyMem_Free(tok->encoding); Py_XDECREF(tok->decoding_readline); Py_XDECREF(tok->decoding_buffer); Py_XDECREF(tok->filename); if (tok->fp != NULL && tok->buf != NULL) - PyMem_FREE(tok->buf); + PyMem_Free(tok->buf); if (tok->input) - PyMem_FREE(tok->input); - PyMem_FREE(tok); + PyMem_Free(tok->input); + PyMem_Free(tok); } /* Get next char, updating state; error code goes into tok->done */ @@ -852,7 +852,7 @@ tok_nextc(struct tok_state *tok) char *newtok = PyOS_Readline(stdin, stdout, tok->prompt); if (newtok != NULL) { char *translated = translate_newlines(newtok, 0, tok); - PyMem_FREE(newtok); + PyMem_Free(newtok); if (translated == NULL) return EOF; newtok = translated; @@ -862,14 +862,14 @@ tok_nextc(struct tok_state *tok) Py_ssize_t buflen; const char* buf; PyObject *u = translate_into_utf8(newtok, tok->encoding); - PyMem_FREE(newtok); + PyMem_Free(newtok); if (!u) { tok->done = E_DECODE; return EOF; } buflen = PyBytes_GET_SIZE(u); buf = PyBytes_AS_STRING(u); - newtok = PyMem_MALLOC(buflen+1); + newtok = PyMem_Malloc(buflen+1); if (newtok == NULL) { Py_DECREF(u); tok->done = E_NOMEM; @@ -883,7 +883,7 @@ tok_nextc(struct tok_state *tok) if (newtok == NULL) tok->done = E_INTR; else if (*newtok == '\0') { - PyMem_FREE(newtok); + PyMem_Free(newtok); tok->done = E_EOF; } else if (tok->start != NULL) { @@ -892,12 +892,12 @@ tok_nextc(struct tok_state *tok) size_t newlen = oldlen + strlen(newtok); Py_ssize_t cur_multi_line_start = tok->multi_line_start - tok->buf; char *buf = tok->buf; - buf = (char *)PyMem_REALLOC(buf, newlen+1); + buf = (char *)PyMem_Realloc(buf, newlen+1); tok->lineno++; if (buf == NULL) { - PyMem_FREE(tok->buf); + PyMem_Free(tok->buf); tok->buf = NULL; - PyMem_FREE(newtok); + PyMem_Free(newtok); tok->done = E_NOMEM; return EOF; } @@ -906,7 +906,7 @@ tok_nextc(struct tok_state *tok) tok->multi_line_start = tok->buf + cur_multi_line_start; tok->line_start = tok->cur; strcpy(tok->buf + oldlen, newtok); - PyMem_FREE(newtok); + PyMem_Free(newtok); tok->inp = tok->buf + newlen; tok->end = tok->inp + 1; tok->start = tok->buf + start; @@ -914,7 +914,7 @@ tok_nextc(struct tok_state *tok) else { tok->lineno++; if (tok->buf != NULL) - PyMem_FREE(tok->buf); + PyMem_Free(tok->buf); tok->buf = newtok; tok->cur = tok->buf; tok->line_start = tok->buf; @@ -929,7 +929,7 @@ tok_nextc(struct tok_state *tok) if (tok->start == NULL) { if (tok->buf == NULL) { tok->buf = (char *) - PyMem_MALLOC(BUFSIZ); + PyMem_Malloc(BUFSIZ); if (tok->buf == NULL) { tok->done = E_NOMEM; return EOF; @@ -966,7 +966,7 @@ tok_nextc(struct tok_state *tok) Py_ssize_t curvalid = tok->inp - tok->buf; Py_ssize_t newsize = curvalid + BUFSIZ; char *newbuf = tok->buf; - newbuf = (char *)PyMem_REALLOC(newbuf, + newbuf = (char *)PyMem_Realloc(newbuf, newsize); if (newbuf == NULL) { tok->done = E_NOMEM; @@ -1851,7 +1851,7 @@ PyTokenizer_Get(struct tok_state *tok, const char **p_start, const char **p_end) encoding in the first or second line of the file (in which case the encoding should be assumed to be UTF-8). - The char* returned is malloc'ed via PyMem_MALLOC() and thus must be freed + The char* returned is malloc'ed via PyMem_Malloc() and thus must be freed by the caller. */ char * @@ -1894,7 +1894,7 @@ PyTokenizer_FindEncodingFilename(int fd, PyObject *filename) } fclose(fp); if (tok->encoding) { - encoding = (char *)PyMem_MALLOC(strlen(tok->encoding) + 1); + encoding = (char *)PyMem_Malloc(strlen(tok->encoding) + 1); if (encoding) strcpy(encoding, tok->encoding); } diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 1ce55b6ec5a..352fb83d55e 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2089,7 +2089,7 @@ builtin_input_impl(PyObject *module, PyObject *prompt) Py_DECREF(stdin_encoding); Py_DECREF(stdin_errors); Py_XDECREF(po); - PyMem_FREE(s); + PyMem_Free(s); if (result != NULL) { if (PySys_Audit("builtins.input/result", "O", result) < 0) { @@ -2636,6 +2636,11 @@ zip_next(zipobject *lz) PyTuple_SET_ITEM(result, i, item); Py_DECREF(olditem); } + // bpo-42536: The GC may have untracked this result tuple. Since we're + // recycling it, make sure it's tracked again: + if (!_PyObject_GC_IS_TRACKED(result)) { + _PyObject_GC_TRACK(result); + } } else { result = PyTuple_New(tuplesize); if (result == NULL) diff --git a/Python/ceval.c b/Python/ceval.c index 693852e15b7..f0f39539c97 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -857,20 +857,22 @@ _Py_CheckRecursiveCall(PyThreadState *tstate, const char *where) return -1; } #endif - if (tstate->overflowed) { + if (tstate->recursion_headroom) { if (tstate->recursion_depth > recursion_limit + 50) { /* Overflowing while handling an overflow. Give up. */ Py_FatalError("Cannot recover from stack overflow."); } - return 0; } - if (tstate->recursion_depth > recursion_limit) { - --tstate->recursion_depth; - tstate->overflowed = 1; - _PyErr_Format(tstate, PyExc_RecursionError, - "maximum recursion depth exceeded%s", - where); - return -1; + else { + if (tstate->recursion_depth > recursion_limit) { + tstate->recursion_headroom++; + _PyErr_Format(tstate, PyExc_RecursionError, + "maximum recursion depth exceeded%s", + where); + tstate->recursion_headroom--; + --tstate->recursion_depth; + return -1; + } } return 0; } @@ -2428,6 +2430,10 @@ main_loop: } case TARGET(RERAISE): { + assert(f->f_iblock > 0); + if (oparg) { + f->f_lasti = f->f_blockstack[f->f_iblock-1].b_handler; + } PyObject *exc = POP(); PyObject *val = POP(); PyObject *tb = POP(); @@ -4037,7 +4043,7 @@ exception_unwind: int handler = b->b_handler; _PyErr_StackItem *exc_info = tstate->exc_info; /* Beware, this invalidates all b->b_* fields */ - PyFrame_BlockSetup(f, EXCEPT_HANDLER, -1, STACK_LEVEL()); + PyFrame_BlockSetup(f, EXCEPT_HANDLER, f->f_lasti, STACK_LEVEL()); PUSH(exc_info->exc_traceback); PUSH(exc_info->exc_value); if (exc_info->exc_type != NULL) { diff --git a/Python/compile.c b/Python/compile.c index 57aa43476be..4ba91400001 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -228,7 +228,7 @@ static int compiler_slice(struct compiler *, expr_ty); static int inplace_binop(operator_ty); static int are_all_items_const(asdl_expr_seq *, Py_ssize_t, Py_ssize_t); -static int expr_constant(expr_ty); + static int compiler_with(struct compiler *, stmt_ty, int); static int compiler_async_with(struct compiler *, stmt_ty, int); @@ -812,6 +812,28 @@ compiler_use_next_block(struct compiler *c, basicblock *block) return block; } +static basicblock * +compiler_copy_block(struct compiler *c, basicblock *block) +{ + /* Cannot copy a block if it has a fallthrough, since + * a block can only have one fallthrough predecessor. + */ + assert(block->b_nofallthrough); + basicblock *result = compiler_next_block(c); + if (result == NULL) { + return NULL; + } + for (int i = 0; i < block->b_iused; i++) { + int n = compiler_next_instr(result); + if (n < 0) { + return NULL; + } + result->b_instr[n] = block->b_instr[i]; + } + result->b_exit = block->b_exit; + return result; +} + /* Returns the offset of the next instruction in the current block's b_instr array. Resizes the b_instr as necessary. Returns -1 on failure. @@ -1410,26 +1432,30 @@ compiler_addop_i(struct compiler *c, int opcode, Py_ssize_t oparg) return 1; } +static int add_jump_to_block(basicblock *b, int opcode, int lineno, basicblock *target) +{ + assert(HAS_ARG(opcode)); + assert(b != NULL); + assert(target != NULL); + + int off = compiler_next_instr(b); + struct instr *i = &b->b_instr[off]; + if (off < 0) { + return 0; + } + i->i_opcode = opcode; + i->i_target = target; + i->i_lineno = lineno; + return 1; +} + static int compiler_addop_j(struct compiler *c, int opcode, basicblock *b) { - struct instr *i; - int off; - if (c->c_do_not_emit_bytecode) { return 1; } - - assert(HAS_ARG(opcode)); - assert(b != NULL); - off = compiler_next_instr(c->u->u_curblock); - if (off < 0) - return 0; - i = &c->u->u_curblock->b_instr[off]; - i->i_opcode = opcode; - i->i_target = b; - i->i_lineno = c->u->u_lineno; - return 1; + return add_jump_to_block(c->u->u_curblock, opcode, c->u->u_lineno, b); } /* NEXT_BLOCK() creates an implicit jump from the current block @@ -1550,17 +1576,6 @@ compiler_addop_j(struct compiler *c, int opcode, basicblock *b) } \ } -/* These macros allows to check only for errors and not emmit bytecode - * while visiting nodes. -*/ - -#define BEGIN_DO_NOT_EMIT_BYTECODE { \ - c->c_do_not_emit_bytecode++; - -#define END_DO_NOT_EMIT_BYTECODE \ - c->c_do_not_emit_bytecode--; \ -} - /* Search if variable annotations are present statically in a block. */ static int @@ -1684,19 +1699,22 @@ compiler_unwind_fblock(struct compiler *c, struct fblockinfo *info, return 1; case FINALLY_TRY: + /* This POP_BLOCK gets the line number of the unwinding statement */ ADDOP(c, POP_BLOCK); if (preserve_tos) { if (!compiler_push_fblock(c, POP_VALUE, NULL, NULL, NULL)) { return 0; } } - /* Emit the finally block, restoring the line number when done */ - int saved_lineno = c->u->u_lineno; + /* Emit the finally block */ VISIT_SEQ(c, stmt, info->fb_datum); - c->u->u_lineno = saved_lineno; if (preserve_tos) { compiler_pop_fblock(c, POP_VALUE, NULL); } + /* The finally block should appear to execute after the + * statement causing the unwinding, so make the unwinding + * instruction artificial */ + c->u->u_lineno = -1; return 1; case FINALLY_END: @@ -2682,48 +2700,28 @@ static int compiler_if(struct compiler *c, stmt_ty s) { basicblock *end, *next; - int constant; assert(s->kind == If_kind); end = compiler_new_block(c); - if (end == NULL) + if (end == NULL) { return 0; - - constant = expr_constant(s->v.If.test); - /* constant = 0: "if 0" - * constant = 1: "if 1", "if 2", ... - * constant = -1: rest */ - if (constant == 0) { - BEGIN_DO_NOT_EMIT_BYTECODE - VISIT_SEQ(c, stmt, s->v.If.body); - END_DO_NOT_EMIT_BYTECODE - if (s->v.If.orelse) { - VISIT_SEQ(c, stmt, s->v.If.orelse); - } - } else if (constant == 1) { - VISIT_SEQ(c, stmt, s->v.If.body); - if (s->v.If.orelse) { - BEGIN_DO_NOT_EMIT_BYTECODE - VISIT_SEQ(c, stmt, s->v.If.orelse); - END_DO_NOT_EMIT_BYTECODE - } - } else { - if (asdl_seq_LEN(s->v.If.orelse)) { - next = compiler_new_block(c); - if (next == NULL) - return 0; - } - else { - next = end; - } - if (!compiler_jump_if(c, s->v.If.test, next, 0)) { + } + if (asdl_seq_LEN(s->v.If.orelse)) { + next = compiler_new_block(c); + if (next == NULL) { return 0; } - VISIT_SEQ(c, stmt, s->v.If.body); - if (asdl_seq_LEN(s->v.If.orelse)) { - ADDOP_JUMP(c, JUMP_FORWARD, end); - compiler_use_next_block(c, next); - VISIT_SEQ(c, stmt, s->v.If.orelse); - } + } + else { + next = end; + } + if (!compiler_jump_if(c, s->v.If.test, next, 0)) { + return 0; + } + VISIT_SEQ(c, stmt, s->v.If.body); + if (asdl_seq_LEN(s->v.If.orelse)) { + ADDOP_JUMP(c, JUMP_FORWARD, end); + compiler_use_next_block(c, next); + VISIT_SEQ(c, stmt, s->v.If.orelse); } compiler_use_next_block(c, end); return 1; @@ -2732,12 +2730,13 @@ compiler_if(struct compiler *c, stmt_ty s) static int compiler_for(struct compiler *c, stmt_ty s) { - basicblock *start, *cleanup, *end; + basicblock *start, *body, *cleanup, *end; start = compiler_new_block(c); + body = compiler_new_block(c); cleanup = compiler_new_block(c); end = compiler_new_block(c); - if (start == NULL || end == NULL || cleanup == NULL) { + if (start == NULL || body == NULL || end == NULL || cleanup == NULL) { return 0; } if (!compiler_push_fblock(c, FOR_LOOP, start, end, NULL)) { @@ -2747,8 +2746,11 @@ compiler_for(struct compiler *c, stmt_ty s) ADDOP(c, GET_ITER); compiler_use_next_block(c, start); ADDOP_JUMP(c, FOR_ITER, cleanup); + compiler_use_next_block(c, body); VISIT(c, expr, s->v.For.target); VISIT_SEQ(c, stmt, s->v.For.body); + /* Mark jump as artificial */ + c->u->u_lineno = -1; ADDOP_JUMP(c, JUMP_ABSOLUTE, start); compiler_use_next_block(c, cleanup); @@ -2816,25 +2818,6 @@ static int compiler_while(struct compiler *c, stmt_ty s) { basicblock *loop, *body, *end, *anchor = NULL; - int constant = expr_constant(s->v.While.test); - - if (constant == 0) { - BEGIN_DO_NOT_EMIT_BYTECODE - // Push a dummy block so the VISIT_SEQ knows that we are - // inside a while loop so it can correctly evaluate syntax - // errors. - if (!compiler_push_fblock(c, WHILE_LOOP, NULL, NULL, NULL)) { - return 0; - } - VISIT_SEQ(c, stmt, s->v.While.body); - // Remove the dummy block now that is not needed. - compiler_pop_fblock(c, WHILE_LOOP, NULL); - END_DO_NOT_EMIT_BYTECODE - if (s->v.While.orelse) { - VISIT_SEQ(c, stmt, s->v.While.orelse); - } - return 1; - } loop = compiler_new_block(c); body = compiler_new_block(c); anchor = compiler_new_block(c); @@ -2846,15 +2829,16 @@ compiler_while(struct compiler *c, stmt_ty s) if (!compiler_push_fblock(c, WHILE_LOOP, loop, end, NULL)) { return 0; } - if (constant == -1) { - if (!compiler_jump_if(c, s->v.While.test, anchor, 0)) { - return 0; - } + if (!compiler_jump_if(c, s->v.While.test, anchor, 0)) { + return 0; } compiler_use_next_block(c, body); VISIT_SEQ(c, stmt, s->v.While.body); - ADDOP_JUMP(c, JUMP_ABSOLUTE, loop); + SET_LOC(c, s); + if (!compiler_jump_if(c, s->v.While.test, body, 1)) { + return 0; + } compiler_pop_fblock(c, WHILE_LOOP, loop); @@ -2882,6 +2866,12 @@ compiler_return(struct compiler *c, stmt_ty s) } if (preserve_tos) { VISIT(c, expr, s->v.Return.value); + } else { + /* Emit instruction with line number for expression */ + if (s->v.Return.value != NULL) { + SET_LOC(c, s->v.Return.value); + ADDOP(c, NOP); + } } if (!compiler_unwind_fblock_stack(c, preserve_tos, NULL)) return 0; @@ -2889,7 +2879,7 @@ compiler_return(struct compiler *c, stmt_ty s) ADDOP_LOAD_CONST(c, Py_None); } else if (!preserve_tos) { - VISIT(c, expr, s->v.Return.value); + ADDOP_LOAD_CONST(c, s->v.Return.value->v.Constant.value); } ADDOP(c, RETURN_VALUE); NEXT_BLOCK(c); @@ -2983,6 +2973,8 @@ compiler_try_finally(struct compiler *c, stmt_ty s) else { VISIT_SEQ(c, stmt, s->v.Try.body); } + /* Mark code as artificial */ + c->u->u_lineno = -1; ADDOP(c, POP_BLOCK); compiler_pop_fblock(c, FINALLY_TRY, body); VISIT_SEQ(c, stmt, s->v.Try.finalbody); @@ -2993,7 +2985,7 @@ compiler_try_finally(struct compiler *c, stmt_ty s) return 0; VISIT_SEQ(c, stmt, s->v.Try.finalbody); compiler_pop_fblock(c, FINALLY_END, end); - ADDOP(c, RERAISE); + ADDOP_I(c, RERAISE, 0); compiler_use_next_block(c, exit); return 1; } @@ -3119,7 +3111,7 @@ compiler_try_except(struct compiler *c, stmt_ty s) compiler_nameop(c, handler->v.ExceptHandler.name, Store); compiler_nameop(c, handler->v.ExceptHandler.name, Del); - ADDOP(c, RERAISE); + ADDOP_I(c, RERAISE, 1); } else { basicblock *cleanup_body; @@ -3141,7 +3133,9 @@ compiler_try_except(struct compiler *c, stmt_ty s) compiler_use_next_block(c, except); } compiler_pop_fblock(c, EXCEPTION_HANDLER, NULL); - ADDOP(c, RERAISE); + /* Mark as artificial */ + c->u->u_lineno = -1; + ADDOP_I(c, RERAISE, 0); compiler_use_next_block(c, orelse); VISIT_SEQ(c, stmt, s->v.Try.orelse); compiler_use_next_block(c, end); @@ -4763,15 +4757,6 @@ compiler_visit_keyword(struct compiler *c, keyword_ty k) Return values: 1 for true, 0 for false, -1 for non-constant. */ -static int -expr_constant(expr_ty e) -{ - if (e->kind == Constant_kind) { - return PyObject_IsTrue(e->v.Constant.value); - } - return -1; -} - static int compiler_with_except_finish(struct compiler *c) { basicblock *exit; @@ -4780,7 +4765,7 @@ compiler_with_except_finish(struct compiler *c) { return 0; ADDOP_JUMP(c, POP_JUMP_IF_TRUE, exit); NEXT_BLOCK(c); - ADDOP(c, RERAISE); + ADDOP_I(c, RERAISE, 1); compiler_use_next_block(c, exit); ADDOP(c, POP_TOP); ADDOP(c, POP_TOP); @@ -5929,9 +5914,16 @@ dump_basicblock(const basicblock *b) } #endif + +static int +normalize_basic_block(basicblock *bb); + static int optimize_cfg(struct assembler *a, PyObject *consts); +static int +ensure_exits_have_lineno(struct compiler *c); + static PyCodeObject * assemble(struct compiler *c, int addNone) { @@ -5952,6 +5944,16 @@ assemble(struct compiler *c, int addNone) ADDOP(c, RETURN_VALUE); } + for (basicblock *b = c->u->u_blocks; b != NULL; b = b->b_list) { + if (normalize_basic_block(b)) { + goto error; + } + } + + if (ensure_exits_have_lineno(c)) { + goto error; + } + nblocks = 0; entryblock = NULL; for (b = c->u->u_blocks; b != NULL; b = b->b_list) { @@ -5966,6 +5968,7 @@ assemble(struct compiler *c, int addNone) else c->u->u_firstlineno = 1; } + if (!assemble_init(&a, nblocks, c->u->u_firstlineno)) goto error; a.a_entry = entryblock; @@ -6068,6 +6071,27 @@ fold_tuple_on_constants(struct instr *inst, return 0; } + +static int +eliminate_jump_to_jump(basicblock *bb, int opcode) { + assert (bb->b_iused > 0); + struct instr *inst = &bb->b_instr[bb->b_iused-1]; + assert (is_jump(inst)); + assert (inst->i_target->b_iused > 0); + struct instr *target = &inst->i_target->b_instr[0]; + if (inst->i_target == target->i_target) { + /* Nothing to do */ + return 0; + } + int lineno = target->i_lineno; + if (add_jump_to_block(bb, opcode, lineno, target->i_target) == 0) { + return -1; + } + assert (bb->b_iused >= 2); + bb->b_instr[bb->b_iused-2].i_opcode = NOP; + return 0; +} + /* Maximum size of basic block that should be copied in optimizer */ #define MAX_COPY_SIZE 4 @@ -6184,22 +6208,27 @@ optimize_basic_block(basicblock *bb, PyObject *consts) case JUMP_IF_FALSE_OR_POP: switch(target->i_opcode) { case POP_JUMP_IF_FALSE: - *inst = *target; - --i; + if (inst->i_lineno == target->i_lineno) { + *inst = *target; + i--; + } break; case JUMP_ABSOLUTE: case JUMP_FORWARD: case JUMP_IF_FALSE_OR_POP: - if (inst->i_target != target->i_target) { + if (inst->i_lineno == target->i_lineno && + inst->i_target != target->i_target) { inst->i_target = target->i_target; - --i; + i--; } break; case JUMP_IF_TRUE_OR_POP: assert (inst->i_target->b_iused == 1); - inst->i_opcode = POP_JUMP_IF_FALSE; - inst->i_target = inst->i_target->b_next; - --i; + if (inst->i_lineno == target->i_lineno) { + inst->i_opcode = POP_JUMP_IF_FALSE; + inst->i_target = inst->i_target->b_next; + --i; + } break; } break; @@ -6207,22 +6236,27 @@ optimize_basic_block(basicblock *bb, PyObject *consts) case JUMP_IF_TRUE_OR_POP: switch(target->i_opcode) { case POP_JUMP_IF_TRUE: - *inst = *target; - --i; + if (inst->i_lineno == target->i_lineno) { + *inst = *target; + i--; + } break; case JUMP_ABSOLUTE: case JUMP_FORWARD: case JUMP_IF_TRUE_OR_POP: - if (inst->i_target != target->i_target) { + if (inst->i_lineno == target->i_lineno && + inst->i_target != target->i_target) { inst->i_target = target->i_target; - --i; + i--; } break; case JUMP_IF_FALSE_OR_POP: assert (inst->i_target->b_iused == 1); - inst->i_opcode = POP_JUMP_IF_TRUE; - inst->i_target = inst->i_target->b_next; - --i; + if (inst->i_lineno == target->i_lineno) { + inst->i_opcode = POP_JUMP_IF_TRUE; + inst->i_target = inst->i_target->b_next; + --i; + } break; } break; @@ -6231,9 +6265,9 @@ optimize_basic_block(basicblock *bb, PyObject *consts) switch(target->i_opcode) { case JUMP_ABSOLUTE: case JUMP_FORWARD: - if (inst->i_target != target->i_target) { + if (inst->i_lineno == target->i_lineno) { inst->i_target = target->i_target; - --i; + i--; } break; } @@ -6243,9 +6277,9 @@ optimize_basic_block(basicblock *bb, PyObject *consts) switch(target->i_opcode) { case JUMP_ABSOLUTE: case JUMP_FORWARD: - if (inst->i_target != target->i_target) { + if (inst->i_lineno == target->i_lineno) { inst->i_target = target->i_target; - --i; + i--; } break; } @@ -6256,32 +6290,30 @@ optimize_basic_block(basicblock *bb, PyObject *consts) assert (i == bb->b_iused-1); switch(target->i_opcode) { case JUMP_FORWARD: - if (inst->i_target != target->i_target) { - inst->i_target = target->i_target; - --i; + if (eliminate_jump_to_jump(bb, inst->i_opcode)) { + goto error; } break; + case JUMP_ABSOLUTE: - if (inst->i_target != target->i_target) { - inst->i_target = target->i_target; - inst->i_opcode = target->i_opcode; - --i; + if (eliminate_jump_to_jump(bb, JUMP_ABSOLUTE)) { + goto error; } break; - } - if (inst->i_target->b_exit && inst->i_target->b_iused <= MAX_COPY_SIZE) { - basicblock *to_copy = inst->i_target; - *inst = to_copy->b_instr[0]; - for (i = 1; i < to_copy->b_iused; i++) { - int index = compiler_next_instr(bb); - if (index < 0) { - return -1; + default: + if (inst->i_target->b_exit && inst->i_target->b_iused <= MAX_COPY_SIZE) { + basicblock *to_copy = inst->i_target; + inst->i_opcode = NOP; + for (i = 0; i < to_copy->b_iused; i++) { + int index = compiler_next_instr(bb); + if (index < 0) { + return -1; + } + bb->b_instr[index] = to_copy->b_instr[i]; + } + bb->b_exit = 1; } - bb->b_instr[index] = to_copy->b_instr[i]; - } - bb->b_exit = 1; } - break; } } return 0; @@ -6338,7 +6370,6 @@ clean_basic_block(basicblock *bb) { bb->b_iused = dest; } - static int normalize_basic_block(basicblock *bb) { /* Mark blocks as exit and/or nofallthrough. @@ -6349,7 +6380,8 @@ normalize_basic_block(basicblock *bb) { case RAISE_VARARGS: case RERAISE: bb->b_exit = 1; - /* fall through */ + bb->b_nofallthrough = 1; + break; case JUMP_ABSOLUTE: case JUMP_FORWARD: bb->b_nofallthrough = 1; @@ -6358,16 +6390,21 @@ normalize_basic_block(basicblock *bb) { case POP_JUMP_IF_TRUE: case JUMP_IF_FALSE_OR_POP: case JUMP_IF_TRUE_OR_POP: + case FOR_ITER: if (i != bb->b_iused-1) { PyErr_SetString(PyExc_SystemError, "malformed control flow graph."); return -1; } + /* Skip over empty basic blocks. */ + while (bb->b_instr[i].i_target->b_iused == 0) { + bb->b_instr[i].i_target = bb->b_instr[i].i_target->b_next; + } + } } return 0; } - static int mark_reachable(struct assembler *a) { basicblock **stack, **sp; @@ -6398,8 +6435,27 @@ mark_reachable(struct assembler *a) { return 0; } +/* If an instruction has no line number, but it's predecessor in the BB does, + * then copy the line number. This reduces the size of the line number table, + * but has no impact on the generated line number events. + */ +static void +minimize_lineno_table(struct assembler *a) { + for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { + int prev_lineno = -1; + for (int i = 0; i < b->b_iused; i++) { + if (b->b_instr[i].i_lineno < 0) { + b->b_instr[i].i_lineno = prev_lineno; + } + else { + prev_lineno = b->b_instr[i].i_lineno; + } + } -/* Perform basic peephole optimizations on a control flow graph. + } +} + +/* Perform optimizations on a control flow graph. The consts object should still be in list form to allow new constants to be appended. @@ -6411,11 +6467,6 @@ mark_reachable(struct assembler *a) { static int optimize_cfg(struct assembler *a, PyObject *consts) { - for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { - if (normalize_basic_block(b)) { - return -1; - } - } for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { if (optimize_basic_block(b, consts)) { return -1; @@ -6430,11 +6481,113 @@ optimize_cfg(struct assembler *a, PyObject *consts) for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { if (b->b_reachable == 0) { b->b_iused = 0; + b->b_nofallthrough = 0; } } + /* Delete jump instructions made redundant by previous step. If a non-empty + block ends with a jump instruction, check if the next non-empty block + reached through normal flow control is the target of that jump. If it + is, then the jump instruction is redundant and can be deleted. + */ + for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { + if (b->b_iused > 0) { + struct instr *b_last_instr = &b->b_instr[b->b_iused - 1]; + if (b_last_instr->i_opcode == POP_JUMP_IF_FALSE || + b_last_instr->i_opcode == POP_JUMP_IF_TRUE || + b_last_instr->i_opcode == JUMP_ABSOLUTE || + b_last_instr->i_opcode == JUMP_FORWARD) { + basicblock *b_next_act = b->b_next; + while (b_next_act != NULL && b_next_act->b_iused == 0) { + b_next_act = b_next_act->b_next; + } + if (b_last_instr->i_target == b_next_act) { + b->b_nofallthrough = 0; + switch(b_last_instr->i_opcode) { + case POP_JUMP_IF_FALSE: + case POP_JUMP_IF_TRUE: + b_last_instr->i_opcode = POP_TOP; + b_last_instr->i_target = NULL; + b_last_instr->i_oparg = 0; + break; + case JUMP_ABSOLUTE: + case JUMP_FORWARD: + b_last_instr->i_opcode = NOP; + clean_basic_block(b); + break; + } + /* The blocks after this one are now reachable through it */ + b_next_act = b->b_next; + while (b_next_act != NULL && b_next_act->b_iused == 0) { + b_next_act->b_reachable = 1; + b_next_act = b_next_act->b_next; + } + } + } + } + } + minimize_lineno_table(a); + return 0; +} + +static inline int +is_exit_without_lineno(basicblock *b) { + return b->b_exit && b->b_instr[0].i_lineno < 0; +} + +/* PEP 626 mandates that the f_lineno of a frame is correct + * after a frame terminates. It would be prohibitively expensive + * to continuously update the f_lineno field at runtime, + * so we make sure that all exiting instruction (raises and returns) + * have a valid line number, allowing us to compute f_lineno lazily. + * We can do this by duplicating the exit blocks without line number + * so that none have more than one predecessor. We can then safely + * copy the line number from the sole predecessor block. + */ +static int +ensure_exits_have_lineno(struct compiler *c) +{ + basicblock *entry = NULL; + /* Copy all exit blocks without line number that are targets of a jump. + */ + for (basicblock *b = c->u->u_blocks; b != NULL; b = b->b_list) { + if (b->b_iused > 0 && is_jump(&b->b_instr[b->b_iused-1])) { + switch (b->b_instr[b->b_iused-1].i_opcode) { + /* Note: Only actual jumps, not exception handlers */ + case SETUP_ASYNC_WITH: + case SETUP_WITH: + case SETUP_FINALLY: + continue; + } + basicblock *target = b->b_instr[b->b_iused-1].i_target; + if (is_exit_without_lineno(target)) { + basicblock *new_target = compiler_copy_block(c, target); + if (new_target == NULL) { + return -1; + } + new_target->b_instr[0].i_lineno = b->b_instr[b->b_iused-1].i_lineno; + b->b_instr[b->b_iused-1].i_target = new_target; + } + } + entry = b; + } + assert(entry != NULL); + if (is_exit_without_lineno(entry)) { + entry->b_instr[0].i_lineno = c->u->u_firstlineno; + } + /* Any remaining reachable exit blocks without line number can only be reached by + * fall through, and thus can only have a single predecessor */ + for (basicblock *b = c->u->u_blocks; b != NULL; b = b->b_list) { + if (!b->b_nofallthrough && b->b_next && b->b_iused > 0) { + if (is_exit_without_lineno(b->b_next)) { + assert(b->b_next->b_iused > 0); + b->b_next->b_instr[0].i_lineno = b->b_instr[b->b_iused-1].i_lineno; + } + } + } return 0; } + /* Retained for API compatibility. * Optimization is now done in optimize_cfg */ diff --git a/Python/errors.c b/Python/errors.c index f80ae21fdde..9bac7ba70f5 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -290,12 +290,14 @@ _PyErr_NormalizeException(PyThreadState *tstate, PyObject **exc, PyObject **val, PyObject **tb) { int recursion_depth = 0; + tstate->recursion_headroom++; PyObject *type, *value, *initial_tb; restart: type = *exc; if (type == NULL) { /* There was no exception, so nothing to do. */ + tstate->recursion_headroom--; return; } @@ -347,6 +349,7 @@ _PyErr_NormalizeException(PyThreadState *tstate, PyObject **exc, } *exc = type; *val = value; + tstate->recursion_headroom--; return; error: @@ -1531,9 +1534,6 @@ PyErr_WriteUnraisable(PyObject *obj) } -extern PyObject *PyModule_GetWarningsModule(void); - - void PyErr_SyntaxLocation(const char *filename, int lineno) { @@ -1697,13 +1697,18 @@ after_loop: PyObject * PyErr_ProgramText(const char *filename, int lineno) { - FILE *fp; - if (filename == NULL || *filename == '\0' || lineno <= 0) { + if (filename == NULL) { return NULL; } - PyThreadState *tstate = _PyThreadState_GET(); - fp = _Py_fopen(filename, "r" PY_STDIOTEXTMODE); - return err_programtext(tstate, fp, lineno); + + PyObject *filename_obj = PyUnicode_DecodeFSDefault(filename); + if (filename_obj == NULL) { + PyErr_Clear(); + return NULL; + } + PyObject *res = PyErr_ProgramTextObject(filename_obj, lineno); + Py_DECREF(filename_obj); + return res; } PyObject * diff --git a/Python/fileutils.c b/Python/fileutils.c index b589d7390d4..8dc90fbe2b2 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1455,33 +1455,6 @@ _Py_wfopen(const wchar_t *path, const wchar_t *mode) return f; } -/* 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) -{ - PyObject *pathname_obj = PyUnicode_DecodeFSDefault(pathname); - if (pathname_obj == NULL) { - return NULL; - } - if (PySys_Audit("open", "Osi", pathname_obj, mode, 0) < 0) { - Py_DECREF(pathname_obj); - return NULL; - } - Py_DECREF(pathname_obj); - - FILE *f = fopen(pathname, mode); - if (f == NULL) - return NULL; - if (make_non_inheritable(fileno(f)) < 0) { - fclose(f); - return NULL; - } - return f; -} /* Open a file. Call _wfopen() on Windows, or encode the path to the filesystem encoding and call fopen() otherwise. @@ -2070,7 +2043,9 @@ _Py_get_blocking(int fd) int _Py_set_blocking(int fd, int blocking) { -#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO) +/* bpo-41462: On VxWorks, ioctl(FIONBIO) only works on sockets. + Use fcntl() instead. */ +#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO) && !defined(__VXWORKS__) int arg = !blocking; if (ioctl(fd, FIONBIO, &arg) < 0) goto error; diff --git a/Python/getargs.c b/Python/getargs.c index c85ff6d4777..8839492e5ef 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -202,7 +202,7 @@ static int cleanup_ptr(PyObject *self, void *ptr) { if (ptr) { - PyMem_FREE(ptr); + PyMem_Free(ptr); } return 0; } @@ -246,7 +246,7 @@ cleanreturn(int retval, freelist_t *freelist) } } if (freelist->entries_malloced) - PyMem_FREE(freelist->entries); + PyMem_Free(freelist->entries); return retval; } diff --git a/Python/importlib.h b/Python/importlib.h index c76ee3c5592..2f100515b55 100644 --- a/Python/importlib.h +++ b/Python/importlib.h @@ -1,1825 +1,1859 @@ /* Auto-generated by Programs/_freeze_importlib.c */ const unsigned char _Py_M__importlib_bootstrap[] = { 99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,4,0,0,0,64,0,0,0,115,206,1,0,0,100,0, - 90,0,100,1,90,1,100,1,90,2,100,1,90,3,100,1, - 97,4,100,2,100,3,132,0,90,5,100,4,100,5,132,0, - 90,6,105,0,90,7,105,0,90,8,71,0,100,6,100,7, - 132,0,100,7,101,9,131,3,90,10,71,0,100,8,100,9, - 132,0,100,9,131,2,90,11,71,0,100,10,100,11,132,0, - 100,11,131,2,90,12,71,0,100,12,100,13,132,0,100,13, - 131,2,90,13,100,14,100,15,132,0,90,14,100,16,100,17, + 0,4,0,0,0,64,0,0,0,115,214,1,0,0,100,0, + 90,0,100,1,100,2,132,0,90,1,100,3,90,2,100,3, + 90,3,100,3,90,4,100,3,97,5,100,4,100,5,132,0, + 90,6,100,6,100,7,132,0,90,7,105,0,90,8,105,0, + 90,9,71,0,100,8,100,9,132,0,100,9,101,10,131,3, + 90,11,71,0,100,10,100,11,132,0,100,11,131,2,90,12, + 71,0,100,12,100,13,132,0,100,13,131,2,90,13,71,0, + 100,14,100,15,132,0,100,15,131,2,90,14,100,16,100,17, 132,0,90,15,100,18,100,19,132,0,90,16,100,20,100,21, - 156,1,100,22,100,23,132,2,90,17,100,24,100,25,132,0, + 132,0,90,17,100,22,100,23,156,1,100,24,100,25,132,2, 90,18,100,26,100,27,132,0,90,19,100,28,100,29,132,0, - 90,20,100,30,100,31,132,0,90,21,71,0,100,32,100,33, - 132,0,100,33,131,2,90,22,100,1,100,1,100,34,156,2, - 100,35,100,36,132,2,90,23,100,94,100,37,100,38,132,1, - 90,24,100,39,100,40,156,1,100,41,100,42,132,2,90,25, - 100,43,100,44,132,0,90,26,100,45,100,46,132,0,90,27, + 90,20,100,30,100,31,132,0,90,21,100,32,100,33,132,0, + 90,22,71,0,100,34,100,35,132,0,100,35,131,2,90,23, + 100,3,100,3,100,36,156,2,100,37,100,38,132,2,90,24, + 100,96,100,39,100,40,132,1,90,25,100,41,100,42,156,1, + 100,43,100,44,132,2,90,26,100,45,100,46,132,0,90,27, 100,47,100,48,132,0,90,28,100,49,100,50,132,0,90,29, 100,51,100,52,132,0,90,30,100,53,100,54,132,0,90,31, - 71,0,100,55,100,56,132,0,100,56,131,2,90,32,71,0, - 100,57,100,58,132,0,100,58,131,2,90,33,71,0,100,59, - 100,60,132,0,100,60,131,2,90,34,100,61,100,62,132,0, - 90,35,100,63,100,64,132,0,90,36,100,95,100,65,100,66, - 132,1,90,37,100,67,100,68,132,0,90,38,100,69,90,39, - 101,39,100,70,23,0,90,40,100,71,100,72,132,0,90,41, - 101,42,131,0,90,43,100,73,100,74,132,0,90,44,100,96, - 100,76,100,77,132,1,90,45,100,39,100,78,156,1,100,79, - 100,80,132,2,90,46,100,81,100,82,132,0,90,47,100,97, - 100,84,100,85,132,1,90,48,100,86,100,87,132,0,90,49, + 100,55,100,56,132,0,90,32,71,0,100,57,100,58,132,0, + 100,58,131,2,90,33,71,0,100,59,100,60,132,0,100,60, + 131,2,90,34,71,0,100,61,100,62,132,0,100,62,131,2, + 90,35,100,63,100,64,132,0,90,36,100,65,100,66,132,0, + 90,37,100,97,100,67,100,68,132,1,90,38,100,69,100,70, + 132,0,90,39,100,71,90,40,101,40,100,72,23,0,90,41, + 100,73,100,74,132,0,90,42,101,43,131,0,90,44,100,75, + 100,76,132,0,90,45,100,98,100,78,100,79,132,1,90,46, + 100,41,100,80,156,1,100,81,100,82,132,2,90,47,100,83, + 100,84,132,0,90,48,100,99,100,86,100,87,132,1,90,49, 100,88,100,89,132,0,90,50,100,90,100,91,132,0,90,51, - 100,92,100,93,132,0,90,52,100,1,83,0,41,98,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, - 0,0,0,0,3,0,0,0,7,0,0,0,67,0,0,0, - 115,56,0,0,0,100,1,68,0,93,32,125,2,116,0,124, - 1,124,2,131,2,114,4,116,1,124,0,124,2,116,2,124, - 1,124,2,131,2,131,3,1,0,113,4,124,0,106,3,160, - 4,124,1,106,3,161,1,1,0,100,2,83,0,41,3,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, - 41,4,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,34,0,0,0,115,12,0,0,0,8,2,10,1,20,1, - 14,1,4,128,255,128,114,12,0,0,0,99,1,0,0,0, - 0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0, - 67,0,0,0,115,12,0,0,0,116,0,116,1,131,1,124, - 0,131,1,83,0,169,1,78,41,2,218,4,116,121,112,101, - 218,3,115,121,115,169,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,42,0,0,0,115,4,0, - 0,0,12,1,255,128,114,18,0,0,0,99,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, - 64,0,0,0,115,12,0,0,0,101,0,90,1,100,0,90, - 2,100,1,83,0,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,19,0, - 0,0,55,0,0,0,115,6,0,0,0,8,0,4,1,255, - 128,114,19,0,0,0,99,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,115, - 56,0,0,0,101,0,90,1,100,0,90,2,100,1,90,3, - 100,2,100,3,132,0,90,4,100,4,100,5,132,0,90,5, - 100,6,100,7,132,0,90,6,100,8,100,9,132,0,90,7, - 100,10,100,11,132,0,90,8,100,12,83,0,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,0, - 0,0,0,2,0,0,0,2,0,0,0,67,0,0,0,115, - 48,0,0,0,116,0,160,1,161,0,124,0,95,2,116,0, - 160,1,161,0,124,0,95,3,124,1,124,0,95,4,100,0, - 124,0,95,5,100,1,124,0,95,6,100,1,124,0,95,7, - 100,0,83,0,169,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,17,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, - 169,2,218,4,115,101,108,102,114,17,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,65,0,0,0,115,16,0,0,0,10, - 1,10,1,6,1,6,1,6,1,6,1,4,128,255,128,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,0,0, - 0,0,5,0,0,0,3,0,0,0,67,0,0,0,115,84, - 0,0,0,116,0,160,1,161,0,125,1,124,0,106,2,125, - 2,116,3,131,0,125,3,116,4,160,5,124,2,161,1,125, - 4,124,4,100,0,117,0,114,42,100,1,83,0,124,4,106, - 2,125,2,124,2,124,1,107,2,114,60,100,2,83,0,124, - 2,124,3,118,0,114,72,100,1,83,0,124,3,160,6,124, - 2,161,1,1,0,113,20,41,3,78,70,84,41,7,114,23, - 0,0,0,218,9,103,101,116,95,105,100,101,110,116,114,26, - 0,0,0,218,3,115,101,116,218,12,95,98,108,111,99,107, - 105,110,103,95,111,110,218,3,103,101,116,218,3,97,100,100, - 41,5,114,30,0,0,0,90,2,109,101,218,3,116,105,100, - 90,4,115,101,101,110,114,24,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,73,0,0,0,115,26,0,0, - 0,8,2,6,1,6,1,10,2,8,1,4,1,6,1,8, - 1,4,1,8,1,4,6,12,1,255,128,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,0,0, - 0,0,2,0,0,0,8,0,0,0,67,0,0,0,115,196, - 0,0,0,116,0,160,1,161,0,125,1,124,0,116,2,124, - 1,60,0,122,170,124,0,106,3,143,126,1,0,124,0,106, - 4,100,1,107,2,115,46,124,0,106,5,124,1,107,2,114, - 90,124,1,124,0,95,5,124,0,4,0,106,4,100,2,55, - 0,2,0,95,4,87,0,100,3,4,0,4,0,131,3,1, - 0,87,0,116,2,124,1,61,0,100,4,83,0,124,0,160, - 6,161,0,114,110,116,7,100,5,124,0,22,0,131,1,130, - 1,124,0,106,8,160,9,100,6,161,1,114,136,124,0,4, - 0,106,10,100,2,55,0,2,0,95,10,87,0,100,3,4, - 0,4,0,131,3,1,0,110,16,49,0,115,156,48,0,1, - 0,1,0,1,0,89,0,1,0,124,0,106,8,160,9,161, - 0,1,0,124,0,106,8,160,11,161,0,1,0,113,18,116, - 2,124,1,61,0,48,0,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,22,0,0,0,233,1,0,0,0,78,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,41,12,114,23,0,0, - 0,114,32,0,0,0,114,34,0,0,0,114,24,0,0,0, - 114,27,0,0,0,114,26,0,0,0,114,38,0,0,0,114, - 19,0,0,0,114,25,0,0,0,218,7,97,99,113,117,105, - 114,101,114,28,0,0,0,218,7,114,101,108,101,97,115,101, - 169,2,114,30,0,0,0,114,37,0,0,0,114,10,0,0, - 0,114,10,0,0,0,114,11,0,0,0,114,40,0,0,0, - 94,0,0,0,115,36,0,0,0,8,6,8,1,2,1,8, - 2,20,1,6,1,14,1,14,1,6,9,4,247,8,1,12, - 1,12,1,44,1,10,2,12,1,8,2,255,128,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,0,0,0,0,2, - 0,0,0,8,0,0,0,67,0,0,0,115,144,0,0,0, - 116,0,160,1,161,0,125,1,124,0,106,2,143,110,1,0, - 124,0,106,3,124,1,107,3,114,34,116,4,100,1,131,1, - 130,1,124,0,106,5,100,2,107,4,115,48,74,0,130,1, - 124,0,4,0,106,5,100,3,56,0,2,0,95,5,124,0, - 106,5,100,2,107,2,114,108,100,0,124,0,95,3,124,0, - 106,6,114,108,124,0,4,0,106,6,100,3,56,0,2,0, - 95,6,124,0,106,7,160,8,161,0,1,0,87,0,100,0, - 4,0,4,0,131,3,1,0,100,0,83,0,49,0,115,130, - 48,0,1,0,1,0,1,0,89,0,1,0,100,0,83,0, - 41,4,78,250,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,22,0,0,0,114,39,0,0,0,41,9, - 114,23,0,0,0,114,32,0,0,0,114,24,0,0,0,114, - 26,0,0,0,218,12,82,117,110,116,105,109,101,69,114,114, - 111,114,114,27,0,0,0,114,28,0,0,0,114,25,0,0, - 0,114,41,0,0,0,114,42,0,0,0,114,10,0,0,0, - 114,10,0,0,0,114,11,0,0,0,114,41,0,0,0,119, - 0,0,0,115,30,0,0,0,8,1,8,1,10,1,8,1, - 14,1,14,1,10,1,6,1,6,1,14,1,22,1,4,128, - 16,0,4,128,255,128,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,0,0,0,0,1,0,0,0,5,0,0,0, - 67,0,0,0,115,18,0,0,0,100,1,160,0,124,0,106, - 1,116,2,124,0,131,1,161,2,83,0,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,169,3,218,6,102,111,114,109,97, - 116,114,17,0,0,0,218,2,105,100,169,1,114,30,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,4, - 0,0,0,18,1,255,128,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,31,0,0,0,114,38,0,0,0,114,40, - 0,0,0,114,41,0,0,0,114,49,0,0,0,114,10,0, - 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0, - 0,114,20,0,0,0,59,0,0,0,115,16,0,0,0,8, - 0,4,1,8,5,8,8,8,21,8,25,12,13,255,128,114, - 20,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,64,0,0,0,115,48,0, - 0,0,101,0,90,1,100,0,90,2,100,1,90,3,100,2, - 100,3,132,0,90,4,100,4,100,5,132,0,90,5,100,6, - 100,7,132,0,90,6,100,8,100,9,132,0,90,7,100,10, - 83,0,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,0,0,0,0,2,0,0,0,2, - 0,0,0,67,0,0,0,115,16,0,0,0,124,1,124,0, - 95,0,100,1,124,0,95,1,100,0,83,0,114,21,0,0, - 0,41,2,114,17,0,0,0,114,27,0,0,0,114,29,0, - 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0, - 0,114,31,0,0,0,140,0,0,0,115,8,0,0,0,6, - 1,6,1,4,128,255,128,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,0,0,0,0,1, - 0,0,0,3,0,0,0,67,0,0,0,115,18,0,0,0, - 124,0,4,0,106,0,100,1,55,0,2,0,95,0,100,2, - 83,0,41,3,78,114,39,0,0,0,84,41,1,114,27,0, - 0,0,114,48,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,114,40,0,0,0,144,0,0,0,115, - 6,0,0,0,14,1,4,1,255,128,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,0,0,0, - 0,1,0,0,0,3,0,0,0,67,0,0,0,115,36,0, - 0,0,124,0,106,0,100,1,107,2,114,18,116,1,100,2, - 131,1,130,1,124,0,4,0,106,0,100,3,56,0,2,0, - 95,0,100,0,83,0,41,4,78,114,22,0,0,0,114,43, - 0,0,0,114,39,0,0,0,41,2,114,27,0,0,0,114, - 44,0,0,0,114,48,0,0,0,114,10,0,0,0,114,10, - 0,0,0,114,11,0,0,0,114,41,0,0,0,148,0,0, - 0,115,10,0,0,0,10,1,8,1,14,1,4,128,255,128, - 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,0,0,0,0,1,0,0,0,5,0,0,0,67, - 0,0,0,115,18,0,0,0,100,1,160,0,124,0,106,1, - 116,2,124,0,131,1,161,2,83,0,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,114,45,0,0,0, - 114,48,0,0,0,114,10,0,0,0,114,10,0,0,0,114, - 11,0,0,0,114,49,0,0,0,153,0,0,0,115,4,0, - 0,0,18,1,255,128,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,31,0,0,0,114,40,0, - 0,0,114,41,0,0,0,114,49,0,0,0,114,10,0,0, - 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0, - 114,50,0,0,0,136,0,0,0,115,14,0,0,0,8,0, - 4,1,8,3,8,4,8,4,12,5,255,128,114,50,0,0, + 100,92,100,93,132,0,90,52,100,94,100,95,132,0,90,53, + 100,3,83,0,41,100,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,99,1, + 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8, + 0,0,0,67,0,0,0,115,38,0,0,0,122,8,124,0, + 106,0,87,0,83,0,4,0,116,1,121,36,1,0,1,0, + 1,0,116,2,124,0,131,1,106,0,6,0,89,0,83,0, + 119,0,169,1,78,41,3,218,12,95,95,113,117,97,108,110, + 97,109,101,95,95,218,14,65,116,116,114,105,98,117,116,101, + 69,114,114,111,114,218,4,116,121,112,101,41,1,218,3,111, + 98,106,169,0,114,5,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,12,95,111,98,106,101,99, + 116,95,110,97,109,101,23,0,0,0,115,12,0,0,0,2, + 1,8,1,12,1,14,1,2,255,255,128,114,7,0,0,0, + 78,99,2,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,7,0,0,0,67,0,0,0,115,56,0,0,0,100, + 1,68,0,93,32,125,2,116,0,124,1,124,2,131,2,114, + 36,116,1,124,0,124,2,116,2,124,1,124,2,131,2,131, + 3,1,0,113,4,124,0,106,3,160,4,124,1,106,3,161, + 1,1,0,100,2,83,0,41,3,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,41,4,218,10,95,95, + 109,111,100,117,108,101,95,95,218,8,95,95,110,97,109,101, + 95,95,114,1,0,0,0,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,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,218,5,95,119,114,97,112,40,0,0,0,115, + 12,0,0,0,8,2,10,1,18,1,2,128,18,1,255,128, + 114,17,0,0,0,99,1,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,2,0,0,0,67,0,0,0,115,12, + 0,0,0,116,0,116,1,131,1,124,0,131,1,83,0,114, + 0,0,0,0,41,2,114,3,0,0,0,218,3,115,121,115, + 169,1,218,4,110,97,109,101,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,218,11,95,110,101,119,95,109,111, + 100,117,108,101,48,0,0,0,115,4,0,0,0,12,1,255, + 128,114,21,0,0,0,99,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,64,0,0,0,115, + 12,0,0,0,101,0,90,1,100,0,90,2,100,1,83,0, + 41,2,218,14,95,68,101,97,100,108,111,99,107,69,114,114, + 111,114,78,41,3,114,9,0,0,0,114,8,0,0,0,114, + 1,0,0,0,114,5,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,6,0,0,0,114,22,0,0,0,61,0,0, + 0,115,6,0,0,0,8,0,4,1,255,128,114,22,0,0, 0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,2,0,0,0,64,0,0,0,115,36,0,0,0,101, - 0,90,1,100,0,90,2,100,1,100,2,132,0,90,3,100, - 3,100,4,132,0,90,4,100,5,100,6,132,0,90,5,100, - 7,83,0,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,0,0,0,0,2,0,0,0,2,0,0,0,67,0, - 0,0,115,16,0,0,0,124,1,124,0,95,0,100,0,124, - 0,95,1,100,0,83,0,114,13,0,0,0,41,2,218,5, - 95,110,97,109,101,218,5,95,108,111,99,107,114,29,0,0, - 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0, - 114,31,0,0,0,159,0,0,0,115,8,0,0,0,6,1, - 6,1,4,128,255,128,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,0,0,0,0, - 1,0,0,0,2,0,0,0,67,0,0,0,115,26,0,0, - 0,116,0,124,0,106,1,131,1,124,0,95,2,124,0,106, - 2,160,3,161,0,1,0,100,0,83,0,114,13,0,0,0, - 41,4,218,16,95,103,101,116,95,109,111,100,117,108,101,95, - 108,111,99,107,114,52,0,0,0,114,53,0,0,0,114,40, - 0,0,0,114,48,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,163,0,0,0,115,8,0,0,0,12,1,10,1,4, - 128,255,128,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,0,0,0,0,3,0, - 0,0,2,0,0,0,79,0,0,0,115,14,0,0,0,124, - 0,106,0,160,1,161,0,1,0,100,0,83,0,114,13,0, - 0,0,41,2,114,53,0,0,0,114,41,0,0,0,41,3, - 114,30,0,0,0,218,4,97,114,103,115,90,6,107,119,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,167,0,0,0, - 115,6,0,0,0,10,1,4,128,255,128,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,31,0,0,0,114, - 55,0,0,0,114,57,0,0,0,114,10,0,0,0,114,10, - 0,0,0,114,10,0,0,0,114,11,0,0,0,114,51,0, - 0,0,157,0,0,0,115,10,0,0,0,8,0,8,2,8, - 4,12,4,255,128,114,51,0,0,0,99,1,0,0,0,0, - 0,0,0,0,0,0,0,3,0,0,0,8,0,0,0,67, - 0,0,0,115,134,0,0,0,116,0,160,1,161,0,1,0, - 122,114,122,14,116,2,124,0,25,0,131,0,125,1,87,0, - 110,22,4,0,116,3,121,46,1,0,1,0,1,0,100,1, - 125,1,89,0,110,2,48,0,124,1,100,1,117,0,114,110, - 116,4,100,1,117,0,114,74,116,5,124,0,131,1,125,1, - 110,8,116,6,124,0,131,1,125,1,124,0,102,1,100,2, - 100,3,132,1,125,2,116,7,160,8,124,1,124,2,161,2, - 116,2,124,0,60,0,87,0,116,0,160,9,161,0,1,0, - 124,1,83,0,116,0,160,9,161,0,1,0,48,0,41,4, - 122,139,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,65,99, - 113,117,105,114,101,47,114,101,108,101,97,115,101,32,105,110, - 116,101,114,110,97,108,108,121,32,116,104,101,32,103,108,111, - 98,97,108,32,105,109,112,111,114,116,32,108,111,99,107,32, - 116,111,32,112,114,111,116,101,99,116,10,32,32,32,32,95, - 109,111,100,117,108,101,95,108,111,99,107,115,46,78,99,2, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,8, - 0,0,0,83,0,0,0,115,54,0,0,0,116,0,160,1, - 161,0,1,0,122,34,116,2,160,3,124,1,161,1,124,0, - 117,0,114,30,116,2,124,1,61,0,87,0,116,0,160,4, - 161,0,1,0,100,0,83,0,116,0,160,4,161,0,1,0, - 48,0,114,13,0,0,0,41,5,218,4,95,105,109,112,218, - 12,97,99,113,117,105,114,101,95,108,111,99,107,218,13,95, - 109,111,100,117,108,101,95,108,111,99,107,115,114,35,0,0, - 0,218,12,114,101,108,101,97,115,101,95,108,111,99,107,41, - 2,218,3,114,101,102,114,17,0,0,0,114,10,0,0,0, - 114,10,0,0,0,114,11,0,0,0,218,2,99,98,192,0, - 0,0,115,16,0,0,0,8,1,2,1,14,4,8,1,8, - 2,4,128,10,0,255,128,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,10,114,58,0,0,0,114,59,0,0, - 0,114,60,0,0,0,218,8,75,101,121,69,114,114,111,114, - 114,23,0,0,0,114,50,0,0,0,114,20,0,0,0,218, - 8,95,119,101,97,107,114,101,102,114,62,0,0,0,114,61, - 0,0,0,41,3,114,17,0,0,0,114,24,0,0,0,114, - 63,0,0,0,114,10,0,0,0,114,10,0,0,0,114,11, - 0,0,0,114,54,0,0,0,173,0,0,0,115,32,0,0, - 0,8,6,2,1,2,1,14,1,12,1,10,1,8,2,8, - 1,10,1,8,2,12,2,18,11,8,2,4,2,10,254,255, - 128,114,54,0,0,0,99,1,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,8,0,0,0,67,0,0,0,115, - 54,0,0,0,116,0,124,0,131,1,125,1,122,12,124,1, - 160,1,161,0,1,0,87,0,110,20,4,0,116,2,121,40, - 1,0,1,0,1,0,89,0,100,1,83,0,48,0,124,1, - 160,3,161,0,1,0,100,1,83,0,41,2,122,189,65,99, - 113,117,105,114,101,115,32,116,104,101,110,32,114,101,108,101, - 97,115,101,115,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,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,32,32,32,32,78,41,4,114,54, - 0,0,0,114,40,0,0,0,114,19,0,0,0,114,41,0, - 0,0,41,2,114,17,0,0,0,114,24,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,210,0,0,0,115,20,0,0,0,8,6,2,1,12, - 1,12,1,2,3,4,128,2,0,8,2,4,128,255,128,114, - 66,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0, - 0,3,0,0,0,4,0,0,0,79,0,0,0,115,14,0, - 0,0,124,0,124,1,105,0,124,2,164,1,142,1,83,0, - 41,2,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,78,114,10,0,0,0,41,3,218,1,102, - 114,56,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,227,0,0,0,115,4,0,0,0,14,8, - 255,128,114,68,0,0,0,114,39,0,0,0,41,1,218,9, - 118,101,114,98,111,115,105,116,121,99,1,0,0,0,0,0, - 0,0,1,0,0,0,3,0,0,0,4,0,0,0,71,0, - 0,0,115,54,0,0,0,116,0,106,1,106,2,124,1,107, - 5,114,50,124,0,160,3,100,1,161,1,115,30,100,2,124, - 0,23,0,125,0,116,4,124,0,106,5,124,2,142,0,116, - 0,106,6,100,3,141,2,1,0,100,4,83,0,41,5,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,41,2, - 250,1,35,122,7,105,109,112,111,114,116,32,122,2,35,32, - 41,1,90,4,102,105,108,101,78,41,7,114,15,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,46,0,0,0,218,6,115,116,100,101,114,114, - 41,3,218,7,109,101,115,115,97,103,101,114,69,0,0,0, - 114,56,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,238,0,0,0,115,12,0,0,0,12, - 2,10,1,8,1,20,1,4,128,255,128,114,77,0,0,0, - 99,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,3,0,0,0,3,0,0,0,115,26,0,0,0,135,0, - 102,1,100,1,100,2,132,8,125,1,116,0,124,1,136,0, - 131,2,1,0,124,1,83,0,41,4,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,0,0,0,0,2,0,0,0,4,0, - 0,0,19,0,0,0,115,38,0,0,0,124,1,116,0,106, - 1,118,1,114,28,116,2,100,1,160,3,124,1,161,1,124, - 1,100,2,141,2,130,1,136,0,124,0,124,1,131,2,83, - 0,41,3,78,250,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,16,0,0,0,41,4,114,15,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,46,0,0,0,169,2,114,30,0,0,0,218,8, - 102,117,108,108,110,97,109,101,169,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,248,0,0,0,115,12,0,0,0,10,1,10, - 1,2,1,6,255,10,2,255,128,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,78, - 169,1,114,12,0,0,0,41,2,114,84,0,0,0,114,85, - 0,0,0,114,10,0,0,0,114,83,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,246,0,0,0,115,8,0,0,0,12,2, - 10,5,4,1,255,128,114,87,0,0,0,99,1,0,0,0, - 0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0, - 3,0,0,0,115,26,0,0,0,135,0,102,1,100,1,100, - 2,132,8,125,1,116,0,124,1,136,0,131,2,1,0,124, - 1,83,0,41,4,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,0, - 0,0,0,2,0,0,0,4,0,0,0,19,0,0,0,115, - 38,0,0,0,116,0,160,1,124,1,161,1,115,28,116,2, - 100,1,160,3,124,1,161,1,124,1,100,2,141,2,130,1, - 136,0,124,0,124,1,131,2,83,0,169,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,16,0,0,0,41, - 4,114,58,0,0,0,218,9,105,115,95,102,114,111,122,101, - 110,114,80,0,0,0,114,46,0,0,0,114,81,0,0,0, - 114,83,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,3,1,0,0,115,12,0, - 0,0,10,1,10,1,2,1,6,255,10,2,255,128,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,78,114,86,0,0,0,41,2,114,84,0,0,0,114, - 90,0,0,0,114,10,0,0,0,114,83,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,1,1,0,0,115,8,0,0,0,12,2, - 10,5,4,1,255,128,114,91,0,0,0,99,2,0,0,0, - 0,0,0,0,0,0,0,0,4,0,0,0,3,0,0,0, - 67,0,0,0,115,58,0,0,0,116,0,124,1,124,0,131, - 2,125,2,124,1,116,1,106,2,118,0,114,50,116,1,106, - 2,124,1,25,0,125,3,116,3,124,2,124,3,131,2,1, - 0,116,1,106,2,124,1,25,0,83,0,116,4,124,2,131, - 1,83,0,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,15,0,0, - 0,218,7,109,111,100,117,108,101,115,218,5,95,101,120,101, - 99,218,5,95,108,111,97,100,41,4,114,30,0,0,0,114, - 82,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,13,1,0,0,115,14,0,0,0,10,6,10, - 1,10,1,10,1,10,1,8,2,255,128,114,98,0,0,0, - 99,1,0,0,0,0,0,0,0,0,0,0,0,5,0,0, - 0,8,0,0,0,67,0,0,0,115,210,0,0,0,116,0, - 124,0,100,1,100,0,131,3,125,1,116,1,124,1,100,2, - 131,2,114,54,122,12,124,1,160,2,124,0,161,1,87,0, - 83,0,4,0,116,3,121,52,1,0,1,0,1,0,89,0, - 110,2,48,0,122,10,124,0,106,4,125,2,87,0,110,18, - 4,0,116,5,121,82,1,0,1,0,1,0,89,0,110,18, - 48,0,124,2,100,0,117,1,114,100,116,6,124,2,131,1, - 83,0,122,10,124,0,106,7,125,3,87,0,110,22,4,0, - 116,5,121,132,1,0,1,0,1,0,100,3,125,3,89,0, - 110,2,48,0,122,10,124,0,106,8,125,4,87,0,110,52, - 4,0,116,5,121,196,1,0,1,0,1,0,124,1,100,0, - 117,0,114,180,100,4,160,9,124,3,161,1,6,0,89,0, - 83,0,100,5,160,9,124,3,124,1,161,2,6,0,89,0, - 83,0,48,0,100,6,160,9,124,3,124,4,161,2,83,0, - 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,250, - 13,60,109,111,100,117,108,101,32,123,33,114,125,62,250,20, - 60,109,111,100,117,108,101,32,123,33,114,125,32,40,123,33, - 114,125,41,62,250,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,100,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,46,0,0,0,41, - 5,114,97,0,0,0,218,6,108,111,97,100,101,114,114,96, - 0,0,0,114,17,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,29, - 1,0,0,115,48,0,0,0,12,2,10,1,2,4,12,1, - 12,1,6,1,2,1,10,1,12,1,6,1,8,2,8,1, - 2,4,10,1,12,1,10,1,2,1,10,1,12,1,8,1, - 14,1,18,2,12,2,255,128,114,112,0,0,0,99,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0, - 0,0,64,0,0,0,115,114,0,0,0,101,0,90,1,100, - 0,90,2,100,1,90,3,100,2,100,2,100,2,100,3,156, - 3,100,4,100,5,132,2,90,4,100,6,100,7,132,0,90, - 5,100,8,100,9,132,0,90,6,101,7,100,10,100,11,132, - 0,131,1,90,8,101,8,106,9,100,12,100,11,132,0,131, - 1,90,8,101,7,100,13,100,14,132,0,131,1,90,10,101, - 7,100,15,100,16,132,0,131,1,90,11,101,11,106,9,100, - 17,100,16,132,0,131,1,90,11,100,2,83,0,41,18,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, - 78,41,3,218,6,111,114,105,103,105,110,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,0,0,0,0,3,0, - 0,0,6,0,0,0,2,0,0,0,67,0,0,0,115,54, - 0,0,0,124,1,124,0,95,0,124,2,124,0,95,1,124, - 3,124,0,95,2,124,4,124,0,95,3,124,5,114,32,103, - 0,110,2,100,0,124,0,95,4,100,1,124,0,95,5,100, - 0,124,0,95,6,100,0,83,0,41,2,78,70,41,7,114, - 17,0,0,0,114,110,0,0,0,114,114,0,0,0,114,115, - 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,30,0,0,0,114,17, - 0,0,0,114,110,0,0,0,114,114,0,0,0,114,115,0, - 0,0,114,116,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,114,31,0,0,0,102,1,0,0,115, - 18,0,0,0,6,2,6,1,6,1,6,1,14,1,6,3, - 6,1,4,128,255,128,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,0,0,0,0,2,0,0,0,6,0,0,0, - 67,0,0,0,115,102,0,0,0,100,1,160,0,124,0,106, - 1,161,1,100,2,160,0,124,0,106,2,161,1,103,2,125, - 1,124,0,106,3,100,0,117,1,114,52,124,1,160,4,100, - 3,160,0,124,0,106,3,161,1,161,1,1,0,124,0,106, - 5,100,0,117,1,114,80,124,1,160,4,100,4,160,0,124, - 0,106,5,161,1,161,1,1,0,100,5,160,0,124,0,106, - 6,106,7,100,6,160,8,124,1,161,1,161,2,83,0,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,46,0,0,0,114,17,0,0,0,114,110, - 0,0,0,114,114,0,0,0,218,6,97,112,112,101,110,100, - 114,117,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,30,0, - 0,0,114,56,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,114,49,0,0,0,114,1,0,0,115, - 22,0,0,0,10,1,10,1,4,255,10,2,18,1,10,1, - 8,1,4,1,6,255,22,2,255,128,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,0,0,0,0,3,0,0,0, - 8,0,0,0,67,0,0,0,115,102,0,0,0,124,0,106, - 0,125,2,122,72,124,0,106,1,124,1,106,1,107,2,111, - 76,124,0,106,2,124,1,106,2,107,2,111,76,124,0,106, - 3,124,1,106,3,107,2,111,76,124,2,124,1,106,0,107, - 2,111,76,124,0,106,4,124,1,106,4,107,2,111,76,124, - 0,106,5,124,1,106,5,107,2,87,0,83,0,4,0,116, - 6,121,100,1,0,1,0,1,0,116,7,6,0,89,0,83, - 0,48,0,114,13,0,0,0,41,8,114,117,0,0,0,114, - 17,0,0,0,114,110,0,0,0,114,114,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,107,0,0,0,218,14,78,111,116,73,109, - 112,108,101,109,101,110,116,101,100,41,3,114,30,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,124,1,0,0,115,32,0,0,0,6,1,2, - 1,12,1,10,1,2,255,10,2,2,254,8,3,2,253,10, - 4,2,252,10,5,4,251,12,6,10,1,255,128,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,0,0,0,0,1,0,0, - 0,3,0,0,0,67,0,0,0,115,58,0,0,0,124,0, - 106,0,100,0,117,0,114,52,124,0,106,1,100,0,117,1, - 114,52,124,0,106,2,114,52,116,3,100,0,117,0,114,38, - 116,4,130,1,116,3,160,5,124,0,106,1,161,1,124,0, - 95,0,124,0,106,0,83,0,114,13,0,0,0,41,6,114, - 119,0,0,0,114,114,0,0,0,114,118,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,114,48,0,0,0,114,10,0,0,0,114, - 10,0,0,0,114,11,0,0,0,114,123,0,0,0,136,1, - 0,0,115,14,0,0,0,10,2,16,1,8,1,4,1,14, - 1,6,1,255,128,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,0,0,0,0,2,0,0,0,2,0,0,0,67,0,0, - 0,115,10,0,0,0,124,1,124,0,95,0,100,0,83,0, - 114,13,0,0,0,41,1,114,119,0,0,0,41,2,114,30, - 0,0,0,114,123,0,0,0,114,10,0,0,0,114,10,0, - 0,0,114,11,0,0,0,114,123,0,0,0,145,1,0,0, - 115,6,0,0,0,6,2,4,128,255,128,99,1,0,0,0, - 0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0, - 67,0,0,0,115,32,0,0,0,124,0,106,0,100,1,117, - 0,114,26,124,0,106,1,160,2,100,2,161,1,100,3,25, - 0,83,0,124,0,106,1,83,0,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,22,0,0,0,41,3,114,117,0,0,0,114,17,0, - 0,0,218,10,114,112,97,114,116,105,116,105,111,110,114,48, - 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,149,1,0,0,115,8, - 0,0,0,10,3,16,1,6,2,255,128,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,0,0,0,0,1,0,0,0,1, - 0,0,0,67,0,0,0,115,6,0,0,0,124,0,106,0, - 83,0,114,13,0,0,0,41,1,114,118,0,0,0,114,48, - 0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,0, - 0,0,114,124,0,0,0,157,1,0,0,115,4,0,0,0, - 6,2,255,128,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,0,0,0,0,2,0,0,0,2,0, - 0,0,67,0,0,0,115,14,0,0,0,116,0,124,1,131, - 1,124,0,95,1,100,0,83,0,114,13,0,0,0,41,2, - 218,4,98,111,111,108,114,118,0,0,0,41,2,114,30,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,124,0,0,0,161,1,0, - 0,115,6,0,0,0,10,2,4,128,255,128,41,12,114,1, - 0,0,0,114,0,0,0,0,114,2,0,0,0,114,3,0, - 0,0,114,31,0,0,0,114,49,0,0,0,114,126,0,0, - 0,218,8,112,114,111,112,101,114,116,121,114,123,0,0,0, - 218,6,115,101,116,116,101,114,114,131,0,0,0,114,124,0, - 0,0,114,10,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,114,113,0,0,0,65,1,0,0,115, - 36,0,0,0,8,0,4,1,4,36,2,1,12,255,8,12, - 8,10,2,12,10,1,4,8,10,1,2,3,10,1,2,7, - 10,1,4,3,14,1,255,128,114,113,0,0,0,169,2,114, - 114,0,0,0,114,116,0,0,0,99,2,0,0,0,0,0, - 0,0,2,0,0,0,6,0,0,0,8,0,0,0,67,0, - 0,0,115,150,0,0,0,116,0,124,1,100,1,131,2,114, - 74,116,1,100,2,117,0,114,22,116,2,130,1,116,1,106, - 3,125,4,124,3,100,2,117,0,114,48,124,4,124,0,124, - 1,100,3,141,2,83,0,124,3,114,56,103,0,110,2,100, - 2,125,5,124,4,124,0,124,1,124,5,100,4,141,3,83, - 0,124,3,100,2,117,0,114,134,116,0,124,1,100,5,131, - 2,114,130,122,14,124,1,160,4,124,0,161,1,125,3,87, - 0,110,26,4,0,116,5,121,128,1,0,1,0,1,0,100, - 2,125,3,89,0,110,6,48,0,100,6,125,3,116,6,124, - 0,124,1,124,2,124,3,100,7,141,4,83,0,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,41,1,114,110,0,0,0,41,2,114,110, - 0,0,0,114,117,0,0,0,114,116,0,0,0,70,114,136, - 0,0,0,41,7,114,4,0,0,0,114,127,0,0,0,114, - 128,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,116,0, - 0,0,114,80,0,0,0,114,113,0,0,0,41,6,114,17, - 0,0,0,114,110,0,0,0,114,114,0,0,0,114,116,0, - 0,0,114,137,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,92, - 0,0,0,166,1,0,0,115,38,0,0,0,10,2,8,1, - 4,1,6,1,8,2,12,1,12,1,6,1,2,1,6,255, - 8,3,10,1,2,1,14,1,12,1,10,1,4,3,16,2, - 255,128,114,92,0,0,0,99,3,0,0,0,0,0,0,0, - 0,0,0,0,8,0,0,0,8,0,0,0,67,0,0,0, - 115,40,1,0,0,122,10,124,0,106,0,125,3,87,0,110, - 18,4,0,116,1,121,28,1,0,1,0,1,0,89,0,110, - 14,48,0,124,3,100,0,117,1,114,42,124,3,83,0,124, - 0,106,2,125,4,124,1,100,0,117,0,114,86,122,10,124, - 0,106,3,125,1,87,0,110,18,4,0,116,1,121,84,1, - 0,1,0,1,0,89,0,110,2,48,0,122,10,124,0,106, - 4,125,5,87,0,110,22,4,0,116,1,121,118,1,0,1, - 0,1,0,100,0,125,5,89,0,110,2,48,0,124,2,100, - 0,117,0,114,174,124,5,100,0,117,0,114,170,122,10,124, - 1,106,5,125,2,87,0,110,26,4,0,116,1,121,168,1, - 0,1,0,1,0,100,0,125,2,89,0,110,6,48,0,124, - 5,125,2,122,10,124,0,106,6,125,6,87,0,110,22,4, - 0,116,1,121,206,1,0,1,0,1,0,100,0,125,6,89, - 0,110,2,48,0,122,14,116,7,124,0,106,8,131,1,125, - 7,87,0,110,22,4,0,116,1,121,244,1,0,1,0,1, - 0,100,0,125,7,89,0,110,2,48,0,116,9,124,4,124, - 1,124,2,100,1,141,3,125,3,124,5,100,0,117,0,144, - 1,114,18,100,2,110,2,100,3,124,3,95,10,124,6,124, - 3,95,11,124,7,124,3,95,12,124,3,83,0,41,4,78, - 169,1,114,114,0,0,0,70,84,41,13,114,106,0,0,0, - 114,107,0,0,0,114,1,0,0,0,114,99,0,0,0,114, - 109,0,0,0,218,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,113,0,0,0,114,118, - 0,0,0,114,123,0,0,0,114,117,0,0,0,41,8,114, - 97,0,0,0,114,110,0,0,0,114,114,0,0,0,114,96, - 0,0,0,114,17,0,0,0,90,8,108,111,99,97,116,105, - 111,110,114,123,0,0,0,114,117,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,192,1, - 0,0,115,74,0,0,0,2,2,10,1,12,1,6,1,8, - 2,4,1,6,2,8,1,2,1,10,1,12,1,6,2,2, - 1,10,1,12,1,10,1,8,1,8,1,2,1,10,1,12, - 1,10,1,4,2,2,1,10,1,12,1,10,1,2,1,14, - 1,12,1,10,1,14,2,20,1,6,1,6,1,4,1,255, - 128,114,143,0,0,0,70,169,1,218,8,111,118,101,114,114, - 105,100,101,99,2,0,0,0,0,0,0,0,1,0,0,0, - 5,0,0,0,8,0,0,0,67,0,0,0,115,214,1,0, - 0,124,2,115,20,116,0,124,1,100,1,100,0,131,3,100, - 0,117,0,114,52,122,12,124,0,106,1,124,1,95,2,87, - 0,110,18,4,0,116,3,121,50,1,0,1,0,1,0,89, - 0,110,2,48,0,124,2,115,72,116,0,124,1,100,2,100, - 0,131,3,100,0,117,0,114,174,124,0,106,4,125,3,124, - 3,100,0,117,0,114,144,124,0,106,5,100,0,117,1,114, - 144,116,6,100,0,117,0,114,108,116,7,130,1,116,6,106, - 8,125,4,124,4,160,9,124,4,161,1,125,3,124,0,106, - 5,124,3,95,10,124,3,124,0,95,4,100,0,124,1,95, - 11,122,10,124,3,124,1,95,12,87,0,110,18,4,0,116, - 3,121,172,1,0,1,0,1,0,89,0,110,2,48,0,124, - 2,115,194,116,0,124,1,100,3,100,0,131,3,100,0,117, - 0,114,226,122,12,124,0,106,13,124,1,95,14,87,0,110, - 18,4,0,116,3,121,224,1,0,1,0,1,0,89,0,110, - 2,48,0,122,10,124,0,124,1,95,15,87,0,110,18,4, - 0,116,3,121,254,1,0,1,0,1,0,89,0,110,2,48, - 0,124,2,144,1,115,24,116,0,124,1,100,4,100,0,131, - 3,100,0,117,0,144,1,114,70,124,0,106,5,100,0,117, - 1,144,1,114,70,122,12,124,0,106,5,124,1,95,16,87, - 0,110,20,4,0,116,3,144,1,121,68,1,0,1,0,1, - 0,89,0,110,2,48,0,124,0,106,17,144,1,114,210,124, - 2,144,1,115,102,116,0,124,1,100,5,100,0,131,3,100, - 0,117,0,144,1,114,136,122,12,124,0,106,18,124,1,95, - 11,87,0,110,20,4,0,116,3,144,1,121,134,1,0,1, - 0,1,0,89,0,110,2,48,0,124,2,144,1,115,160,116, - 0,124,1,100,6,100,0,131,3,100,0,117,0,144,1,114, - 210,124,0,106,19,100,0,117,1,144,1,114,210,122,14,124, - 0,106,19,124,1,95,20,87,0,124,1,83,0,4,0,116, - 3,144,1,121,208,1,0,1,0,1,0,89,0,124,1,83, - 0,48,0,124,1,83,0,41,7,78,114,1,0,0,0,114, - 99,0,0,0,218,11,95,95,112,97,99,107,97,103,101,95, - 95,114,142,0,0,0,114,109,0,0,0,114,140,0,0,0, - 41,21,114,6,0,0,0,114,17,0,0,0,114,1,0,0, - 0,114,107,0,0,0,114,110,0,0,0,114,117,0,0,0, - 114,127,0,0,0,114,128,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,109,0,0, - 0,114,99,0,0,0,114,131,0,0,0,114,146,0,0,0, - 114,106,0,0,0,114,142,0,0,0,114,124,0,0,0,114, - 114,0,0,0,114,123,0,0,0,114,140,0,0,0,41,5, - 114,96,0,0,0,114,97,0,0,0,114,145,0,0,0,114, - 110,0,0,0,114,147,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,237,1,0,0, - 115,104,0,0,0,20,4,2,1,12,1,12,1,6,1,20, - 2,6,1,8,1,10,2,8,1,4,1,6,1,10,2,8, - 1,6,1,6,11,2,1,10,1,12,1,6,1,20,2,2, - 1,12,1,12,1,6,1,2,2,10,1,12,1,6,1,24, - 2,12,1,2,1,12,1,14,1,6,1,8,2,24,1,2, - 1,12,1,14,1,6,1,24,2,12,1,2,1,10,1,4, - 3,14,254,2,1,4,1,2,255,4,1,255,128,114,149,0, - 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,2, - 0,0,0,3,0,0,0,67,0,0,0,115,82,0,0,0, - 100,1,125,1,116,0,124,0,106,1,100,2,131,2,114,30, - 124,0,106,1,160,2,124,0,161,1,125,1,110,20,116,0, - 124,0,106,1,100,3,131,2,114,50,116,3,100,4,131,1, - 130,1,124,1,100,1,117,0,114,68,116,4,124,0,106,5, - 131,1,125,1,116,6,124,0,124,1,131,2,1,0,124,1, - 83,0,41,5,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,66, - 108,111,97,100,101,114,115,32,116,104,97,116,32,100,101,102, - 105,110,101,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,41,7,114,4,0,0,0,114,110,0,0,0,114,150, - 0,0,0,114,80,0,0,0,114,18,0,0,0,114,17,0, - 0,0,114,149,0,0,0,169,2,114,96,0,0,0,114,97, - 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,53,2,0,0,115,20,0,0,0,4,3,12, - 1,14,3,12,1,8,1,8,2,10,1,10,1,4,1,255, - 128,114,153,0,0,0,99,1,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,4,0,0,0,67,0,0,0,115, - 100,0,0,0,124,0,106,0,100,1,117,0,114,14,100,2, - 110,4,124,0,106,0,125,1,124,0,106,1,100,1,117,0, - 114,64,124,0,106,2,100,1,117,0,114,50,100,3,160,3, - 124,1,161,1,83,0,100,4,160,3,124,1,124,0,106,2, - 161,2,83,0,124,0,106,4,114,84,100,5,160,3,124,1, - 124,0,106,1,161,2,83,0,100,6,160,3,124,0,106,0, - 124,0,106,1,161,2,83,0,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,101,0,0,0,114,102,0,0,0,114,103,0, - 0,0,114,104,0,0,0,250,18,60,109,111,100,117,108,101, - 32,123,33,114,125,32,40,123,125,41,62,41,5,114,17,0, - 0,0,114,114,0,0,0,114,110,0,0,0,114,46,0,0, - 0,114,124,0,0,0,41,2,114,96,0,0,0,114,17,0, - 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0, - 0,114,108,0,0,0,70,2,0,0,115,18,0,0,0,20, - 3,10,1,10,1,10,1,14,2,6,2,14,1,16,2,255, - 128,114,108,0,0,0,99,2,0,0,0,0,0,0,0,0, - 0,0,0,4,0,0,0,10,0,0,0,67,0,0,0,115, - 252,0,0,0,124,0,106,0,125,2,116,1,124,2,131,1, - 143,218,1,0,116,2,106,3,160,4,124,2,161,1,124,1, - 117,1,114,54,100,1,160,5,124,2,161,1,125,3,116,6, - 124,3,124,2,100,2,141,2,130,1,122,132,124,0,106,7, - 100,3,117,0,114,106,124,0,106,8,100,3,117,0,114,90, - 116,6,100,4,124,0,106,0,100,2,141,2,130,1,116,9, - 124,0,124,1,100,5,100,6,141,3,1,0,110,52,116,9, - 124,0,124,1,100,5,100,6,141,3,1,0,116,10,124,0, - 106,7,100,7,131,2,115,146,124,0,106,7,160,11,124,2, - 161,1,1,0,110,12,124,0,106,7,160,12,124,1,161,1, - 1,0,87,0,116,2,106,3,160,13,124,0,106,0,161,1, - 125,1,124,1,116,2,106,3,124,0,106,0,60,0,110,28, - 116,2,106,3,160,13,124,0,106,0,161,1,125,1,124,1, - 116,2,106,3,124,0,106,0,60,0,48,0,87,0,100,3, - 4,0,4,0,131,3,1,0,124,1,83,0,49,0,115,238, - 48,0,1,0,1,0,1,0,89,0,1,0,124,1,83,0, - 41,8,122,70,69,120,101,99,117,116,101,32,116,104,101,32, - 115,112,101,99,39,115,32,115,112,101,99,105,102,105,101,100, - 32,109,111,100,117,108,101,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,16,0,0,0,78, - 250,14,109,105,115,115,105,110,103,32,108,111,97,100,101,114, - 84,114,144,0,0,0,114,151,0,0,0,41,14,114,17,0, - 0,0,114,51,0,0,0,114,15,0,0,0,114,93,0,0, - 0,114,35,0,0,0,114,46,0,0,0,114,80,0,0,0, - 114,110,0,0,0,114,117,0,0,0,114,149,0,0,0,114, - 4,0,0,0,218,11,108,111,97,100,95,109,111,100,117,108, - 101,114,151,0,0,0,218,3,112,111,112,41,4,114,96,0, - 0,0,114,97,0,0,0,114,17,0,0,0,218,3,109,115, - 103,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0, - 114,94,0,0,0,87,2,0,0,115,44,0,0,0,6,2, - 10,1,16,1,10,1,12,1,2,1,10,1,10,1,14,1, - 16,2,14,2,12,1,14,4,14,2,14,4,14,1,14,255, - 26,1,4,1,16,255,4,1,255,128,114,94,0,0,0,99, - 1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 8,0,0,0,67,0,0,0,115,18,1,0,0,122,18,124, - 0,106,0,160,1,124,0,106,2,161,1,1,0,87,0,110, - 46,1,0,1,0,1,0,124,0,106,2,116,3,106,4,118, - 0,114,64,116,3,106,4,160,5,124,0,106,2,161,1,125, - 1,124,1,116,3,106,4,124,0,106,2,60,0,130,0,116, - 3,106,4,160,5,124,0,106,2,161,1,125,1,124,1,116, - 3,106,4,124,0,106,2,60,0,116,6,124,1,100,1,100, - 0,131,3,100,0,117,0,114,140,122,12,124,0,106,0,124, - 1,95,7,87,0,110,18,4,0,116,8,121,138,1,0,1, - 0,1,0,89,0,110,2,48,0,116,6,124,1,100,2,100, - 0,131,3,100,0,117,0,114,216,122,40,124,1,106,9,124, - 1,95,10,116,11,124,1,100,3,131,2,115,194,124,0,106, - 2,160,12,100,4,161,1,100,5,25,0,124,1,95,10,87, - 0,110,18,4,0,116,8,121,214,1,0,1,0,1,0,89, - 0,110,2,48,0,116,6,124,1,100,6,100,0,131,3,100, - 0,117,0,144,1,114,14,122,12,124,0,124,1,95,13,87, - 0,124,1,83,0,4,0,116,8,144,1,121,12,1,0,1, - 0,1,0,89,0,124,1,83,0,48,0,124,1,83,0,41, - 7,78,114,99,0,0,0,114,146,0,0,0,114,142,0,0, - 0,114,129,0,0,0,114,22,0,0,0,114,106,0,0,0, - 41,14,114,110,0,0,0,114,156,0,0,0,114,17,0,0, - 0,114,15,0,0,0,114,93,0,0,0,114,157,0,0,0, - 114,6,0,0,0,114,99,0,0,0,114,107,0,0,0,114, - 1,0,0,0,114,146,0,0,0,114,4,0,0,0,114,130, - 0,0,0,114,106,0,0,0,114,152,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,117,2,0,0,115,62,0,0,0, - 2,4,18,1,6,1,12,1,14,1,12,1,2,1,14,3, - 12,1,16,1,2,1,12,1,12,1,6,1,16,1,2,1, - 8,4,10,1,22,1,12,1,6,1,18,1,2,1,8,1, - 4,3,14,254,2,1,4,1,2,255,4,1,255,128,114,159, - 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, - 2,0,0,0,11,0,0,0,67,0,0,0,115,212,0,0, - 0,124,0,106,0,100,0,117,1,114,30,116,1,124,0,106, - 0,100,1,131,2,115,30,116,2,124,0,131,1,83,0,116, - 3,124,0,131,1,125,1,100,2,124,0,95,4,122,158,124, - 1,116,5,106,6,124,0,106,7,60,0,122,50,124,0,106, - 0,100,0,117,0,114,94,124,0,106,8,100,0,117,0,114, - 106,116,9,100,3,124,0,106,7,100,4,141,2,130,1,124, - 0,106,0,160,10,124,1,161,1,1,0,87,0,110,40,1, - 0,1,0,1,0,122,14,116,5,106,6,124,0,106,7,61, - 0,87,0,130,0,4,0,116,11,121,148,1,0,1,0,1, - 0,89,0,130,0,48,0,116,5,106,6,160,12,124,0,106, - 7,161,1,125,1,124,1,116,5,106,6,124,0,106,7,60, - 0,116,13,100,5,124,0,106,7,124,0,106,0,131,3,1, - 0,87,0,100,6,124,0,95,4,124,1,83,0,100,6,124, - 0,95,4,48,0,41,7,78,114,151,0,0,0,84,114,155, - 0,0,0,114,16,0,0,0,122,18,105,109,112,111,114,116, - 32,123,33,114,125,32,35,32,123,33,114,125,70,41,14,114, - 110,0,0,0,114,4,0,0,0,114,159,0,0,0,114,153, - 0,0,0,90,13,95,105,110,105,116,105,97,108,105,122,105, - 110,103,114,15,0,0,0,114,93,0,0,0,114,17,0,0, - 0,114,117,0,0,0,114,80,0,0,0,114,151,0,0,0, - 114,64,0,0,0,114,157,0,0,0,114,77,0,0,0,114, - 152,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,154,2,0,0,115,54,0,0,0,10,2,12,2, - 8,1,8,2,6,5,2,1,12,1,2,1,10,1,10,1, - 14,1,16,3,6,1,2,1,12,1,2,3,12,254,2,1, - 2,1,2,255,14,6,12,1,18,1,6,2,4,2,8,254, - 255,128,114,160,0,0,0,99,1,0,0,0,0,0,0,0, - 0,0,0,0,1,0,0,0,8,0,0,0,67,0,0,0, - 115,54,0,0,0,116,0,124,0,106,1,131,1,143,24,1, - 0,116,2,124,0,131,1,87,0,2,0,100,1,4,0,4, - 0,131,3,1,0,83,0,49,0,115,40,48,0,1,0,1, - 0,1,0,89,0,1,0,100,1,83,0,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, - 3,114,51,0,0,0,114,17,0,0,0,114,160,0,0,0, - 169,1,114,96,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,114,95,0,0,0,196,2,0,0,115, - 8,0,0,0,12,9,38,1,4,128,255,128,114,95,0,0, + 0,0,2,0,0,0,64,0,0,0,115,56,0,0,0,101, + 0,90,1,100,0,90,2,100,1,90,3,100,2,100,3,132, + 0,90,4,100,4,100,5,132,0,90,5,100,6,100,7,132, + 0,90,6,100,8,100,9,132,0,90,7,100,10,100,11,132, + 0,90,8,100,12,83,0,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,0,0,0,0,2,0, + 0,0,2,0,0,0,67,0,0,0,115,48,0,0,0,116, + 0,160,1,161,0,124,0,95,2,116,0,160,1,161,0,124, + 0,95,3,124,1,124,0,95,4,100,0,124,0,95,5,100, + 1,124,0,95,6,100,1,124,0,95,7,100,0,83,0,169, + 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, + 20,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,169,2,218,4,115, + 101,108,102,114,20,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,218,8,95,95,105,110,105,116,95, + 95,71,0,0,0,115,14,0,0,0,10,1,10,1,6,1, + 6,1,6,1,10,1,255,128,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,0,0,0,0,5,0,0,0,3, + 0,0,0,67,0,0,0,115,86,0,0,0,116,0,160,1, + 161,0,125,1,124,0,106,2,125,2,116,3,131,0,125,3, + 9,0,116,4,160,5,124,2,161,1,125,4,124,4,100,0, + 117,0,114,44,100,2,83,0,124,4,106,2,125,2,124,2, + 124,1,107,2,114,62,100,1,83,0,124,2,124,3,118,0, + 114,74,100,2,83,0,124,3,160,6,124,2,161,1,1,0, + 113,22,41,3,78,84,70,41,7,114,26,0,0,0,218,9, + 103,101,116,95,105,100,101,110,116,114,29,0,0,0,218,3, + 115,101,116,218,12,95,98,108,111,99,107,105,110,103,95,111, + 110,218,3,103,101,116,218,3,97,100,100,41,5,114,33,0, + 0,0,90,2,109,101,218,3,116,105,100,90,4,115,101,101, + 110,114,27,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,6,0,0,0,218,12,104,97,115,95,100,101,97,100,108, + 111,99,107,79,0,0,0,115,30,0,0,0,8,2,6,1, + 6,1,2,1,10,1,8,1,4,1,6,1,8,1,4,1, + 8,1,4,6,10,1,2,242,255,128,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,0,0,0, + 0,2,0,0,0,8,0,0,0,67,0,0,0,115,198,0, + 0,0,116,0,160,1,161,0,125,1,124,0,116,2,124,1, + 60,0,122,172,9,0,124,0,106,3,143,126,1,0,124,0, + 106,4,100,2,107,2,115,48,124,0,106,5,124,1,107,2, + 114,92,124,1,124,0,95,5,124,0,4,0,106,4,100,3, + 55,0,2,0,95,4,87,0,100,4,4,0,4,0,131,3, + 1,0,87,0,116,2,124,1,61,0,100,1,83,0,124,0, + 160,6,161,0,114,112,116,7,100,5,124,0,22,0,131,1, + 130,1,124,0,106,8,160,9,100,6,161,1,114,138,124,0, + 4,0,106,10,100,3,55,0,2,0,95,10,87,0,100,4, + 4,0,4,0,131,3,1,0,110,16,49,0,115,158,119,1, + 1,0,1,0,1,0,89,0,1,0,124,0,106,8,160,9, + 161,0,1,0,124,0,106,8,160,11,161,0,1,0,113,20, + 116,2,124,1,61,0,119,0,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,84,114,25,0,0,0,233,1,0,0,0, + 78,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,41,12,114,26,0, + 0,0,114,35,0,0,0,114,37,0,0,0,114,27,0,0, + 0,114,30,0,0,0,114,29,0,0,0,114,41,0,0,0, + 114,22,0,0,0,114,28,0,0,0,218,7,97,99,113,117, + 105,114,101,114,31,0,0,0,218,7,114,101,108,101,97,115, + 101,169,2,114,33,0,0,0,114,40,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,6,0,0,0,114,43,0,0, + 0,100,0,0,0,115,38,0,0,0,8,6,8,1,2,1, + 2,1,8,1,20,1,6,1,14,1,14,1,10,9,8,248, + 12,1,12,1,44,1,10,2,10,1,2,244,8,14,255,128, + 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,0,0, + 0,0,2,0,0,0,8,0,0,0,67,0,0,0,115,144, + 0,0,0,116,0,160,1,161,0,125,1,124,0,106,2,143, + 110,1,0,124,0,106,3,124,1,107,3,114,34,116,4,100, + 1,131,1,130,1,124,0,106,5,100,2,107,4,115,48,74, + 0,130,1,124,0,4,0,106,5,100,3,56,0,2,0,95, + 5,124,0,106,5,100,2,107,2,114,108,100,0,124,0,95, + 3,124,0,106,6,114,108,124,0,4,0,106,6,100,3,56, + 0,2,0,95,6,124,0,106,7,160,8,161,0,1,0,87, + 0,100,0,4,0,4,0,131,3,1,0,100,0,83,0,49, + 0,115,130,119,1,1,0,1,0,1,0,89,0,1,0,100, + 0,83,0,41,4,78,250,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,25,0,0,0,114,42,0,0, + 0,41,9,114,26,0,0,0,114,35,0,0,0,114,27,0, + 0,0,114,29,0,0,0,218,12,82,117,110,116,105,109,101, + 69,114,114,111,114,114,30,0,0,0,114,31,0,0,0,114, + 28,0,0,0,114,44,0,0,0,114,45,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,44,0, + 0,0,125,0,0,0,115,24,0,0,0,8,1,8,1,10, + 1,8,1,14,1,14,1,10,1,6,1,6,1,14,1,46, + 1,255,128,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,0,0,0,0,1,0,0,0,5,0,0,0,67,0,0, + 0,115,18,0,0,0,100,1,160,0,124,0,106,1,116,2, + 124,0,131,1,161,2,83,0,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,169,3,218,6,102,111,114,109,97,116,114,20, + 0,0,0,218,2,105,100,169,1,114,33,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,218,8,95, + 95,114,101,112,114,95,95,138,0,0,0,115,4,0,0,0, + 18,1,255,128,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,9,0, + 0,0,114,8,0,0,0,114,1,0,0,0,114,10,0,0, + 0,114,34,0,0,0,114,41,0,0,0,114,43,0,0,0, + 114,44,0,0,0,114,52,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,114,23, + 0,0,0,65,0,0,0,115,16,0,0,0,8,0,4,1, + 8,5,8,8,8,21,8,25,12,13,255,128,114,23,0,0, 0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,4,0,0,0,64,0,0,0,115,140,0,0,0,101, - 0,90,1,100,0,90,2,100,1,90,3,100,2,90,4,101, - 5,100,3,100,4,132,0,131,1,90,6,101,7,100,20,100, - 6,100,7,132,1,131,1,90,8,101,7,100,21,100,8,100, - 9,132,1,131,1,90,9,101,5,100,10,100,11,132,0,131, - 1,90,10,101,5,100,12,100,13,132,0,131,1,90,11,101, - 7,101,12,100,14,100,15,132,0,131,1,131,1,90,13,101, - 7,101,12,100,16,100,17,132,0,131,1,131,1,90,14,101, - 7,101,12,100,18,100,19,132,0,131,1,131,1,90,15,101, - 7,101,16,131,1,90,17,100,5,83,0,41,22,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, - 122,8,98,117,105,108,116,45,105,110,99,1,0,0,0,0, - 0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,67, - 0,0,0,115,22,0,0,0,100,1,124,0,106,0,155,2, - 100,2,116,1,106,2,155,0,100,3,157,5,83,0,41,5, - 250,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,8,60,109,111,100,117,108,101,32,122, - 2,32,40,122,2,41,62,78,41,3,114,1,0,0,0,114, - 162,0,0,0,114,139,0,0,0,169,1,114,97,0,0,0, - 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,114, - 100,0,0,0,222,2,0,0,115,4,0,0,0,22,7,255, - 128,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,0,0,0,0,4,0,0,0, - 5,0,0,0,67,0,0,0,115,42,0,0,0,124,2,100, - 0,117,1,114,12,100,0,83,0,116,0,160,1,124,1,161, - 1,114,38,116,2,124,1,124,0,124,0,106,3,100,1,141, - 3,83,0,100,0,83,0,169,2,78,114,138,0,0,0,41, - 4,114,58,0,0,0,90,10,105,115,95,98,117,105,108,116, - 105,110,114,92,0,0,0,114,139,0,0,0,169,4,218,3, - 99,108,115,114,82,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, - 231,2,0,0,115,12,0,0,0,8,2,4,1,10,1,16, - 1,4,2,255,128,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,0,0,0,0,4,0,0, - 0,4,0,0,0,67,0,0,0,115,30,0,0,0,124,0, - 160,0,124,1,124,2,161,2,125,3,124,3,100,1,117,1, - 114,26,124,3,106,1,83,0,100,1,83,0,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,170,0,0,0,114,110,0,0,0,41,4,114,167, - 0,0,0,114,82,0,0,0,114,168,0,0,0,114,96,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,240,2, - 0,0,115,6,0,0,0,12,9,18,1,255,128,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,1,0,0,0,0, - 0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,67, - 0,0,0,115,46,0,0,0,124,0,106,0,116,1,106,2, - 118,1,114,34,116,3,100,1,160,4,124,0,106,0,161,1, - 124,0,106,0,100,2,141,2,130,1,116,5,116,6,106,7, - 124,0,131,2,83,0,41,4,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,114,78,0,0,0,114,16,0,0,0,78,41,8,114, - 17,0,0,0,114,15,0,0,0,114,79,0,0,0,114,80, - 0,0,0,114,46,0,0,0,114,68,0,0,0,114,58,0, - 0,0,90,14,99,114,101,97,116,101,95,98,117,105,108,116, - 105,110,114,161,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,114,150,0,0,0,252,2,0,0,115, - 12,0,0,0,12,3,12,1,4,1,6,255,12,2,255,128, - 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, + 0,0,2,0,0,0,64,0,0,0,115,48,0,0,0,101, + 0,90,1,100,0,90,2,100,1,90,3,100,2,100,3,132, + 0,90,4,100,4,100,5,132,0,90,5,100,6,100,7,132, + 0,90,6,100,8,100,9,132,0,90,7,100,10,83,0,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,0,0,0,0,2,0,0,0,2,0,0,0, + 67,0,0,0,115,16,0,0,0,124,1,124,0,95,0,100, + 1,124,0,95,1,100,0,83,0,114,24,0,0,0,41,2, + 114,20,0,0,0,114,30,0,0,0,114,32,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,114,34, + 0,0,0,146,0,0,0,115,6,0,0,0,6,1,10,1, + 255,128,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,0,0,0,0,1,0,0,0,3,0, + 0,0,67,0,0,0,115,18,0,0,0,124,0,4,0,106, + 0,100,1,55,0,2,0,95,0,100,2,83,0,41,3,78, + 114,42,0,0,0,84,41,1,114,30,0,0,0,114,51,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,114,43,0,0,0,150,0,0,0,115,6,0,0,0,14, + 1,4,1,255,128,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,0,0,0,0,1,0,0,0, - 3,0,0,0,67,0,0,0,115,16,0,0,0,116,0,116, - 1,106,2,124,0,131,2,1,0,100,1,83,0,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,68,0,0,0,114, - 58,0,0,0,90,12,101,120,101,99,95,98,117,105,108,116, - 105,110,114,164,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,114,151,0,0,0,4,3,0,0,115, - 6,0,0,0,12,3,4,128,255,128,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, - 0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,0, - 115,4,0,0,0,100,1,83,0,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,169,2,114,167, - 0,0,0,114,82,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,9,3,0,0,115,4,0,0,0,4,4,255,128,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,0,0,0,0,2,0,0,0,1,0,0,0,67,0,0, - 0,115,4,0,0,0,100,1,83,0,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,10,0,0,0,114,172,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,15,3,0,0, - 115,4,0,0,0,4,4,255,128,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,0,0, - 0,0,2,0,0,0,1,0,0,0,67,0,0,0,115,4, - 0,0,0,100,1,83,0,41,3,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, - 78,114,10,0,0,0,114,172,0,0,0,114,10,0,0,0, - 114,10,0,0,0,114,11,0,0,0,114,116,0,0,0,21, - 3,0,0,115,4,0,0,0,4,4,255,128,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,2,78,78,41,1,78,41, - 18,114,1,0,0,0,114,0,0,0,0,114,2,0,0,0, - 114,3,0,0,0,114,139,0,0,0,218,12,115,116,97,116, - 105,99,109,101,116,104,111,100,114,100,0,0,0,218,11,99, - 108,97,115,115,109,101,116,104,111,100,114,170,0,0,0,114, - 171,0,0,0,114,150,0,0,0,114,151,0,0,0,114,87, - 0,0,0,114,173,0,0,0,114,174,0,0,0,114,116,0, - 0,0,114,98,0,0,0,114,156,0,0,0,114,10,0,0, - 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0, - 114,162,0,0,0,211,2,0,0,115,48,0,0,0,8,0, - 4,2,4,7,2,2,10,1,2,8,12,1,2,8,12,1, - 2,11,10,1,2,7,10,1,2,4,2,1,12,1,2,4, - 2,1,12,1,2,4,2,1,12,1,12,4,255,128,114,162, - 0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,4,0,0,0,64,0,0,0,115,144,0,0, - 0,101,0,90,1,100,0,90,2,100,1,90,3,100,2,90, - 4,101,5,100,3,100,4,132,0,131,1,90,6,101,7,100, - 22,100,6,100,7,132,1,131,1,90,8,101,7,100,23,100, - 8,100,9,132,1,131,1,90,9,101,5,100,10,100,11,132, - 0,131,1,90,10,101,5,100,12,100,13,132,0,131,1,90, - 11,101,7,100,14,100,15,132,0,131,1,90,12,101,7,101, - 13,100,16,100,17,132,0,131,1,131,1,90,14,101,7,101, - 13,100,18,100,19,132,0,131,1,131,1,90,15,101,7,101, - 13,100,20,100,21,132,0,131,1,131,1,90,16,100,5,83, - 0,41,24,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,90,6,102,114,111,122,101,110,99,1,0,0,0, - 0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0, - 67,0,0,0,115,16,0,0,0,100,1,160,0,124,0,106, - 1,116,2,106,3,161,2,83,0,41,3,114,163,0,0,0, - 114,154,0,0,0,78,41,4,114,46,0,0,0,114,1,0, - 0,0,114,177,0,0,0,114,139,0,0,0,41,1,218,1, - 109,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0, - 114,100,0,0,0,41,3,0,0,115,4,0,0,0,16,7, - 255,128,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,0,0,0,0,4,0,0,0, - 5,0,0,0,67,0,0,0,115,30,0,0,0,116,0,160, - 1,124,1,161,1,114,26,116,2,124,1,124,0,124,0,106, - 3,100,1,141,3,83,0,100,0,83,0,114,165,0,0,0, - 41,4,114,58,0,0,0,114,89,0,0,0,114,92,0,0, - 0,114,139,0,0,0,114,166,0,0,0,114,10,0,0,0, - 114,10,0,0,0,114,11,0,0,0,114,170,0,0,0,50, - 3,0,0,115,8,0,0,0,10,2,16,1,4,2,255,128, - 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,0,0,0,0,3,0,0,0,3,0,0,0,67, - 0,0,0,115,18,0,0,0,116,0,160,1,124,1,161,1, - 114,14,124,0,83,0,100,1,83,0,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,58, - 0,0,0,114,89,0,0,0,41,3,114,167,0,0,0,114, - 82,0,0,0,114,168,0,0,0,114,10,0,0,0,114,10, - 0,0,0,114,11,0,0,0,114,171,0,0,0,57,3,0, - 0,115,4,0,0,0,18,7,255,128,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,0, - 0,0,0,1,0,0,0,1,0,0,0,67,0,0,0,115, - 4,0,0,0,100,1,83,0,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,114,161,0,0, - 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0, - 114,150,0,0,0,66,3,0,0,115,4,0,0,0,4,128, - 255,128,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,0,0,0,0,3,0,0, - 0,4,0,0,0,67,0,0,0,115,64,0,0,0,124,0, - 106,0,106,1,125,1,116,2,160,3,124,1,161,1,115,36, - 116,4,100,1,160,5,124,1,161,1,124,1,100,2,141,2, - 130,1,116,6,116,2,106,7,124,1,131,2,125,2,116,8, - 124,2,124,0,106,9,131,2,1,0,100,0,83,0,114,88, - 0,0,0,41,10,114,106,0,0,0,114,17,0,0,0,114, - 58,0,0,0,114,89,0,0,0,114,80,0,0,0,114,46, - 0,0,0,114,68,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,97,0,0,0,114,17,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,151,0,0,0,70,3,0,0, - 115,18,0,0,0,8,2,10,1,10,1,2,1,6,255,12, - 2,12,1,4,128,255,128,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,0,0,0,0, - 2,0,0,0,3,0,0,0,67,0,0,0,115,10,0,0, - 0,116,0,124,0,124,1,131,2,83,0,41,2,122,95,76, - 111,97,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,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, - 1,114,98,0,0,0,114,172,0,0,0,114,10,0,0,0, - 114,10,0,0,0,114,11,0,0,0,114,156,0,0,0,79, - 3,0,0,115,4,0,0,0,10,7,255,128,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,0,0,0,0,2,0,0,0,3,0,0,0,67,0,0, - 0,115,10,0,0,0,116,0,160,1,124,1,161,1,83,0, - 41,2,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,78,41,2,114,58,0,0,0,114,179,0,0,0,114,172, - 0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,0, - 0,0,114,173,0,0,0,88,3,0,0,115,4,0,0,0, - 10,4,255,128,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,0,0,0,0,2,0,0,0,1,0, - 0,0,67,0,0,0,115,4,0,0,0,100,1,83,0,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,10,0,0,0,114, - 172,0,0,0,114,10,0,0,0,114,10,0,0,0,114,11, - 0,0,0,114,174,0,0,0,94,3,0,0,115,4,0,0, - 0,4,4,255,128,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, + 3,0,0,0,67,0,0,0,115,36,0,0,0,124,0,106, + 0,100,1,107,2,114,18,116,1,100,2,131,1,130,1,124, + 0,4,0,106,0,100,3,56,0,2,0,95,0,100,0,83, + 0,41,4,78,114,25,0,0,0,114,46,0,0,0,114,42, + 0,0,0,41,2,114,30,0,0,0,114,47,0,0,0,114, + 51,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,114,44,0,0,0,154,0,0,0,115,8,0,0, + 0,10,1,8,1,18,1,255,128,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,0,0,0,0, + 1,0,0,0,5,0,0,0,67,0,0,0,115,18,0,0, + 0,100,1,160,0,124,0,106,1,116,2,124,0,131,1,161, + 2,83,0,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,114,48,0,0,0,114,51,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,52,0, + 0,0,159,0,0,0,115,4,0,0,0,18,1,255,128,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,9,0, + 0,0,114,8,0,0,0,114,1,0,0,0,114,10,0,0, + 0,114,34,0,0,0,114,43,0,0,0,114,44,0,0,0, + 114,52,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,114,53,0,0,0,142,0, + 0,0,115,14,0,0,0,8,0,4,1,8,3,8,4,8, + 4,12,5,255,128,114,53,0,0,0,99,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,64, + 0,0,0,115,36,0,0,0,101,0,90,1,100,0,90,2, + 100,1,100,2,132,0,90,3,100,3,100,4,132,0,90,4, + 100,5,100,6,132,0,90,5,100,7,83,0,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,0,0,0,0,2, + 0,0,0,2,0,0,0,67,0,0,0,115,16,0,0,0, + 124,1,124,0,95,0,100,0,124,0,95,1,100,0,83,0, + 114,0,0,0,0,41,2,218,5,95,110,97,109,101,218,5, + 95,108,111,99,107,114,32,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,114,34,0,0,0,165,0, + 0,0,115,6,0,0,0,6,1,10,1,255,128,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,0,0,0,0,1,0,0,0,2,0,0,0,67, + 0,0,0,115,26,0,0,0,116,0,124,0,106,1,131,1, + 124,0,95,2,124,0,106,2,160,3,161,0,1,0,100,0, + 83,0,114,0,0,0,0,41,4,218,16,95,103,101,116,95, + 109,111,100,117,108,101,95,108,111,99,107,114,55,0,0,0, + 114,56,0,0,0,114,43,0,0,0,114,51,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,9, + 95,95,101,110,116,101,114,95,95,169,0,0,0,115,6,0, + 0,0,12,1,14,1,255,128,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,0, + 0,0,0,3,0,0,0,2,0,0,0,79,0,0,0,115, + 14,0,0,0,124,0,106,0,160,1,161,0,1,0,100,0, + 83,0,114,0,0,0,0,41,2,114,56,0,0,0,114,44, + 0,0,0,41,3,114,33,0,0,0,218,4,97,114,103,115, + 90,6,107,119,97,114,103,115,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,218,8,95,95,101,120,105,116,95, + 95,173,0,0,0,115,4,0,0,0,14,1,255,128,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,9, + 0,0,0,114,8,0,0,0,114,1,0,0,0,114,34,0, + 0,0,114,58,0,0,0,114,60,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 114,54,0,0,0,163,0,0,0,115,10,0,0,0,8,0, + 8,2,8,4,12,4,255,128,114,54,0,0,0,99,1,0, + 0,0,0,0,0,0,0,0,0,0,3,0,0,0,8,0, + 0,0,67,0,0,0,115,132,0,0,0,116,0,160,1,161, + 0,1,0,122,110,122,14,116,2,124,0,25,0,131,0,125, + 1,87,0,110,18,4,0,116,3,121,130,1,0,1,0,1, + 0,100,1,125,1,89,0,124,1,100,1,117,0,114,106,116, + 4,100,1,117,0,114,70,116,5,124,0,131,1,125,1,110, + 8,116,6,124,0,131,1,125,1,124,0,102,1,100,2,100, + 3,132,1,125,2,116,7,160,8,124,1,124,2,161,2,116, + 2,124,0,60,0,87,0,116,0,160,9,161,0,1,0,124, + 1,83,0,116,0,160,9,161,0,1,0,119,0,119,0,41, + 4,122,139,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,65, + 99,113,117,105,114,101,47,114,101,108,101,97,115,101,32,105, + 110,116,101,114,110,97,108,108,121,32,116,104,101,32,103,108, + 111,98,97,108,32,105,109,112,111,114,116,32,108,111,99,107, + 32,116,111,32,112,114,111,116,101,99,116,10,32,32,32,32, + 95,109,111,100,117,108,101,95,108,111,99,107,115,46,78,99, + 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, + 8,0,0,0,83,0,0,0,115,54,0,0,0,116,0,160, + 1,161,0,1,0,122,34,116,2,160,3,124,1,161,1,124, + 0,117,0,114,30,116,2,124,1,61,0,87,0,116,0,160, + 4,161,0,1,0,100,0,83,0,116,0,160,4,161,0,1, + 0,119,0,114,0,0,0,0,41,5,218,4,95,105,109,112, + 218,12,97,99,113,117,105,114,101,95,108,111,99,107,218,13, + 95,109,111,100,117,108,101,95,108,111,99,107,115,114,38,0, + 0,0,218,12,114,101,108,101,97,115,101,95,108,111,99,107, + 41,2,218,3,114,101,102,114,20,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,6,0,0,0,218,2,99,98,198, + 0,0,0,115,14,0,0,0,8,1,2,1,14,4,6,1, + 2,128,22,2,255,128,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,10,114,61,0,0,0,114,62,0,0,0, + 114,63,0,0,0,218,8,75,101,121,69,114,114,111,114,114, + 26,0,0,0,114,53,0,0,0,114,23,0,0,0,218,8, + 95,119,101,97,107,114,101,102,114,65,0,0,0,114,64,0, + 0,0,41,3,114,20,0,0,0,114,27,0,0,0,114,66, + 0,0,0,114,5,0,0,0,114,5,0,0,0,114,6,0, + 0,0,114,57,0,0,0,179,0,0,0,115,36,0,0,0, + 8,6,2,1,2,1,14,1,12,1,6,1,8,2,8,1, + 10,1,8,2,12,2,16,11,2,128,8,2,4,2,10,254, + 2,234,255,128,114,57,0,0,0,99,1,0,0,0,0,0, + 0,0,0,0,0,0,2,0,0,0,8,0,0,0,67,0, + 0,0,115,54,0,0,0,116,0,124,0,131,1,125,1,122, + 12,124,1,160,1,161,0,1,0,87,0,110,18,4,0,116, + 2,121,52,1,0,1,0,1,0,89,0,100,1,83,0,124, + 1,160,3,161,0,1,0,100,1,83,0,119,0,41,2,122, + 189,65,99,113,117,105,114,101,115,32,116,104,101,110,32,114, + 101,108,101,97,115,101,115,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,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,32,32,32,32,78,41, + 4,114,57,0,0,0,114,43,0,0,0,114,22,0,0,0, + 114,44,0,0,0,41,2,114,20,0,0,0,114,27,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 218,19,95,108,111,99,107,95,117,110,108,111,99,107,95,109, + 111,100,117,108,101,216,0,0,0,115,16,0,0,0,8,6, + 2,1,12,1,12,1,6,3,12,2,2,251,255,128,114,69, + 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, + 3,0,0,0,4,0,0,0,79,0,0,0,115,14,0,0, + 0,124,0,124,1,105,0,124,2,164,1,142,1,83,0,41, + 2,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,78,114,5,0,0,0,41,3,218,1,102,114, + 59,0,0,0,90,4,107,119,100,115,114,5,0,0,0,114, + 5,0,0,0,114,6,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,233,0,0,0,115,4,0,0,0,14,8,255, + 128,114,71,0,0,0,114,42,0,0,0,41,1,218,9,118, + 101,114,98,111,115,105,116,121,99,1,0,0,0,0,0,0, + 0,1,0,0,0,3,0,0,0,4,0,0,0,71,0,0, + 0,115,58,0,0,0,116,0,106,1,106,2,124,1,107,5, + 114,54,124,0,160,3,100,1,161,1,115,30,100,2,124,0, + 23,0,125,0,116,4,124,0,106,5,124,2,142,0,116,0, + 106,6,100,3,141,2,1,0,100,4,83,0,100,4,83,0, + 41,5,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,41,2,250,1,35,122,7,105,109,112,111,114,116,32,122, + 2,35,32,41,1,90,4,102,105,108,101,78,41,7,114,18, + 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,49,0,0,0,218,6,115,116,100, + 101,114,114,41,3,218,7,109,101,115,115,97,103,101,114,72, + 0,0,0,114,59,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,218,16,95,118,101,114,98,111,115, + 101,95,109,101,115,115,97,103,101,244,0,0,0,115,12,0, + 0,0,12,2,10,1,8,1,24,1,4,253,255,128,114,80, + 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, + 2,0,0,0,3,0,0,0,3,0,0,0,115,26,0,0, + 0,135,0,102,1,100,1,100,2,132,8,125,1,116,0,124, + 1,136,0,131,2,1,0,124,1,83,0,41,4,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,0,0,0,0,2,0,0, + 0,4,0,0,0,19,0,0,0,115,38,0,0,0,124,1, + 116,0,106,1,118,1,114,28,116,2,100,1,160,3,124,1, + 161,1,124,1,100,2,141,2,130,1,136,0,124,0,124,1, + 131,2,83,0,41,3,78,250,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,19,0,0,0,41,4,114,18,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,49,0,0,0,169,2,114,33,0,0, + 0,218,8,102,117,108,108,110,97,109,101,169,1,218,3,102, + 120,110,114,5,0,0,0,114,6,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,254,0,0,0,115,12,0,0,0, + 10,1,10,1,2,1,6,255,10,2,255,128,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,78,169,1,114,17,0,0,0,41,2,114,87,0,0, + 0,114,88,0,0,0,114,5,0,0,0,114,86,0,0,0, + 114,6,0,0,0,218,17,95,114,101,113,117,105,114,101,115, + 95,98,117,105,108,116,105,110,252,0,0,0,115,8,0,0, + 0,12,2,10,5,4,1,255,128,114,90,0,0,0,99,1, + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3, + 0,0,0,3,0,0,0,115,26,0,0,0,135,0,102,1, + 100,1,100,2,132,8,125,1,116,0,124,1,136,0,131,2, + 1,0,124,1,83,0,41,4,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,0,0,0,0,2,0,0,0,4,0,0,0,19,0, + 0,0,115,38,0,0,0,116,0,160,1,124,1,161,1,115, + 28,116,2,100,1,160,3,124,1,161,1,124,1,100,2,141, + 2,130,1,136,0,124,0,124,1,131,2,83,0,169,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,19,0, + 0,0,41,4,114,61,0,0,0,218,9,105,115,95,102,114, + 111,122,101,110,114,83,0,0,0,114,49,0,0,0,114,84, + 0,0,0,114,86,0,0,0,114,5,0,0,0,114,6,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,9,1,0,0, + 115,12,0,0,0,10,1,10,1,2,1,6,255,10,2,255, + 128,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,78,114,89,0,0,0,41,2,114,87,0, + 0,0,114,93,0,0,0,114,5,0,0,0,114,86,0,0, + 0,114,6,0,0,0,218,16,95,114,101,113,117,105,114,101, + 115,95,102,114,111,122,101,110,7,1,0,0,115,8,0,0, + 0,12,2,10,5,4,1,255,128,114,94,0,0,0,99,2, + 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,4, + 0,0,0,67,0,0,0,115,74,0,0,0,100,1,125,2, + 116,0,160,1,124,2,116,2,161,2,1,0,116,3,124,1, + 124,0,131,2,125,3,124,1,116,4,106,5,118,0,114,66, + 116,4,106,5,124,1,25,0,125,4,116,6,124,3,124,4, + 131,2,1,0,116,4,106,5,124,1,25,0,83,0,116,7, + 124,3,131,1,83,0,41,3,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,122,103,116,104,101,32, + 108,111,97,100,95,109,111,100,117,108,101,40,41,32,109,101, + 116,104,111,100,32,105,115,32,100,101,112,114,101,99,97,116, + 101,100,32,97,110,100,32,115,108,97,116,101,100,32,102,111, + 114,32,114,101,109,111,118,97,108,32,105,110,32,80,121,116, + 104,111,110,32,51,46,49,50,59,32,117,115,101,32,101,120, + 101,99,95,109,111,100,117,108,101,40,41,32,105,110,115,116, + 101,97,100,78,41,8,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,16,115,112,101, + 99,95,102,114,111,109,95,108,111,97,100,101,114,114,18,0, + 0,0,218,7,109,111,100,117,108,101,115,218,5,95,101,120, + 101,99,218,5,95,108,111,97,100,41,5,114,33,0,0,0, + 114,85,0,0,0,218,3,109,115,103,218,4,115,112,101,99, + 218,6,109,111,100,117,108,101,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,218,17,95,108,111,97,100,95,109, + 111,100,117,108,101,95,115,104,105,109,19,1,0,0,115,18, + 0,0,0,4,6,12,2,10,1,10,1,10,1,10,1,10, + 1,8,2,255,128,114,105,0,0,0,99,1,0,0,0,0, + 0,0,0,0,0,0,0,5,0,0,0,8,0,0,0,67, + 0,0,0,115,206,0,0,0,116,0,124,0,100,1,100,0, + 131,3,125,1,116,1,124,1,100,2,131,2,114,50,122,12, + 124,1,160,2,124,0,161,1,87,0,83,0,4,0,116,3, + 121,204,1,0,1,0,1,0,89,0,122,10,124,0,106,4, + 125,2,87,0,110,16,4,0,116,5,121,202,1,0,1,0, + 1,0,89,0,110,16,124,2,100,0,117,1,114,94,116,6, + 124,2,131,1,83,0,122,10,124,0,106,7,125,3,87,0, + 110,18,4,0,116,5,121,200,1,0,1,0,1,0,100,3, + 125,3,89,0,122,10,124,0,106,8,125,4,87,0,110,50, + 4,0,116,5,121,198,1,0,1,0,1,0,124,1,100,0, + 117,0,114,170,100,4,160,9,124,3,161,1,6,0,89,0, + 83,0,100,5,160,9,124,3,124,1,161,2,6,0,89,0, + 83,0,100,6,160,9,124,3,124,4,161,2,83,0,119,0, + 119,0,119,0,119,0,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,250,13,60,109,111,100,117,108,101,32,123, + 33,114,125,62,250,20,60,109,111,100,117,108,101,32,123,33, + 114,125,32,40,123,33,114,125,41,62,250,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,13,0,0,0,114,11,0,0,0,114, + 107,0,0,0,218,9,69,120,99,101,112,116,105,111,110,218, + 8,95,95,115,112,101,99,95,95,114,2,0,0,0,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,9,0,0,0,218,8,95,95,102, + 105,108,101,95,95,114,49,0,0,0,41,5,114,104,0,0, + 0,218,6,108,111,97,100,101,114,114,103,0,0,0,114,20, + 0,0,0,218,8,102,105,108,101,110,97,109,101,114,5,0, + 0,0,114,5,0,0,0,114,6,0,0,0,218,12,95,109, + 111,100,117,108,101,95,114,101,112,114,38,1,0,0,115,56, + 0,0,0,12,2,10,1,2,4,12,1,12,1,2,1,2, + 1,10,1,12,1,4,1,8,2,8,1,2,4,10,1,12, + 1,6,1,2,1,10,1,12,1,8,1,14,1,16,2,12, + 2,2,250,2,252,2,246,2,252,255,128,114,118,0,0,0, + 99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,4,0,0,0,64,0,0,0,115,114,0,0,0,101,0, + 90,1,100,0,90,2,100,1,90,3,100,2,100,2,100,2, + 100,3,156,3,100,4,100,5,132,2,90,4,100,6,100,7, + 132,0,90,5,100,8,100,9,132,0,90,6,101,7,100,10, + 100,11,132,0,131,1,90,8,101,8,106,9,100,12,100,11, + 132,0,131,1,90,8,101,7,100,13,100,14,132,0,131,1, + 90,10,101,7,100,15,100,16,132,0,131,1,90,11,101,11, + 106,9,100,17,100,16,132,0,131,1,90,11,100,2,83,0, + 41,18,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,78,41,3,218,6,111,114,105,103,105,110,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,0,0,0, + 0,3,0,0,0,6,0,0,0,2,0,0,0,67,0,0, + 0,115,54,0,0,0,124,1,124,0,95,0,124,2,124,0, + 95,1,124,3,124,0,95,2,124,4,124,0,95,3,124,5, + 114,32,103,0,110,2,100,0,124,0,95,4,100,1,124,0, + 95,5,100,0,124,0,95,6,100,0,83,0,41,2,78,70, + 41,7,114,20,0,0,0,114,116,0,0,0,114,120,0,0, + 0,114,121,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,33,0,0, + 0,114,20,0,0,0,114,116,0,0,0,114,120,0,0,0, + 114,121,0,0,0,114,122,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,114,34,0,0,0,111,1, + 0,0,115,16,0,0,0,6,2,6,1,6,1,6,1,14, + 1,6,3,10,1,255,128,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,0,0,0,0,2,0,0,0,6,0,0, + 0,67,0,0,0,115,102,0,0,0,100,1,160,0,124,0, + 106,1,161,1,100,2,160,0,124,0,106,2,161,1,103,2, + 125,1,124,0,106,3,100,0,117,1,114,52,124,1,160,4, + 100,3,160,0,124,0,106,3,161,1,161,1,1,0,124,0, + 106,5,100,0,117,1,114,80,124,1,160,4,100,4,160,0, + 124,0,106,5,161,1,161,1,1,0,100,5,160,0,124,0, + 106,6,106,7,100,6,160,8,124,1,161,1,161,2,83,0, + 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,49,0,0,0,114,20,0,0,0,114, + 116,0,0,0,114,120,0,0,0,218,6,97,112,112,101,110, + 100,114,123,0,0,0,218,9,95,95,99,108,97,115,115,95, + 95,114,9,0,0,0,218,4,106,111,105,110,41,2,114,33, + 0,0,0,114,59,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,114,52,0,0,0,123,1,0,0, + 115,22,0,0,0,10,1,10,1,4,255,10,2,18,1,10, + 1,8,1,4,1,6,255,22,2,255,128,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,0,0,0,0,3,0,0, + 0,8,0,0,0,67,0,0,0,115,102,0,0,0,124,0, + 106,0,125,2,122,72,124,0,106,1,124,1,106,1,107,2, + 111,76,124,0,106,2,124,1,106,2,107,2,111,76,124,0, + 106,3,124,1,106,3,107,2,111,76,124,2,124,1,106,0, + 107,2,111,76,124,0,106,4,124,1,106,4,107,2,111,76, + 124,0,106,5,124,1,106,5,107,2,87,0,83,0,4,0, + 116,6,121,100,1,0,1,0,1,0,116,7,6,0,89,0, + 83,0,119,0,114,0,0,0,0,41,8,114,123,0,0,0, + 114,20,0,0,0,114,116,0,0,0,114,120,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,2,0,0,0,218,14,78,111,116,73, + 109,112,108,101,109,101,110,116,101,100,41,3,114,33,0,0, + 0,90,5,111,116,104,101,114,90,4,115,109,115,108,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,218,6,95, + 95,101,113,95,95,133,1,0,0,115,34,0,0,0,6,1, + 2,1,12,1,10,1,2,255,10,2,2,254,8,3,2,253, + 10,4,2,252,10,5,4,251,12,6,8,1,2,255,255,128, + 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,0,0,0,0, + 1,0,0,0,3,0,0,0,67,0,0,0,115,58,0,0, + 0,124,0,106,0,100,0,117,0,114,52,124,0,106,1,100, + 0,117,1,114,52,124,0,106,2,114,52,116,3,100,0,117, + 0,114,38,116,4,130,1,116,3,160,5,124,0,106,1,161, + 1,124,0,95,0,124,0,106,0,83,0,114,0,0,0,0, + 41,6,114,125,0,0,0,114,120,0,0,0,114,124,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,114,51,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,6,0,0,0,114,129,0,0, + 0,145,1,0,0,115,14,0,0,0,10,2,16,1,8,1, + 4,1,14,1,6,1,255,128,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,0,0,0,0,2,0,0,0,2,0,0,0, + 67,0,0,0,115,10,0,0,0,124,1,124,0,95,0,100, + 0,83,0,114,0,0,0,0,41,1,114,125,0,0,0,41, + 2,114,33,0,0,0,114,129,0,0,0,114,5,0,0,0, + 114,5,0,0,0,114,6,0,0,0,114,129,0,0,0,154, + 1,0,0,115,4,0,0,0,10,2,255,128,99,1,0,0, + 0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0, + 0,67,0,0,0,115,32,0,0,0,124,0,106,0,100,1, + 117,0,114,26,124,0,106,1,160,2,100,2,161,1,100,3, + 25,0,83,0,124,0,106,1,83,0,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,25,0,0,0,41,3,114,123,0,0,0,114,20, + 0,0,0,218,10,114,112,97,114,116,105,116,105,111,110,114, + 51,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,218,6,112,97,114,101,110,116,158,1,0,0,115, + 8,0,0,0,10,3,16,1,6,2,255,128,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,0,0,0,0,1,0,0,0, + 1,0,0,0,67,0,0,0,115,6,0,0,0,124,0,106, + 0,83,0,114,0,0,0,0,41,1,114,124,0,0,0,114, + 51,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,114,130,0,0,0,166,1,0,0,115,4,0,0, + 0,6,2,255,128,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,0,0,0,0,2,0,0,0,2, + 0,0,0,67,0,0,0,115,14,0,0,0,116,0,124,1, + 131,1,124,0,95,1,100,0,83,0,114,0,0,0,0,41, + 2,218,4,98,111,111,108,114,124,0,0,0,41,2,114,33, + 0,0,0,218,5,118,97,108,117,101,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,114,130,0,0,0,170,1, + 0,0,115,4,0,0,0,14,2,255,128,41,12,114,9,0, + 0,0,114,8,0,0,0,114,1,0,0,0,114,10,0,0, + 0,114,34,0,0,0,114,52,0,0,0,114,132,0,0,0, + 218,8,112,114,111,112,101,114,116,121,114,129,0,0,0,218, + 6,115,101,116,116,101,114,114,137,0,0,0,114,130,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,6,0,0,0,114,119,0,0,0,74,1,0,0,115,36, + 0,0,0,8,0,4,1,4,36,2,1,12,255,8,12,8, + 10,2,12,10,1,4,8,10,1,2,3,10,1,2,7,10, + 1,4,3,14,1,255,128,114,119,0,0,0,169,2,114,120, + 0,0,0,114,122,0,0,0,99,2,0,0,0,0,0,0, + 0,2,0,0,0,6,0,0,0,8,0,0,0,67,0,0, + 0,115,150,0,0,0,116,0,124,1,100,1,131,2,114,74, + 116,1,100,2,117,0,114,22,116,2,130,1,116,1,106,3, + 125,4,124,3,100,2,117,0,114,48,124,4,124,0,124,1, + 100,3,141,2,83,0,124,3,114,56,103,0,110,2,100,2, + 125,5,124,4,124,0,124,1,124,5,100,4,141,3,83,0, + 124,3,100,2,117,0,114,132,116,0,124,1,100,5,131,2, + 114,128,122,14,124,1,160,4,124,0,161,1,125,3,87,0, + 110,24,4,0,116,5,121,148,1,0,1,0,1,0,100,2, + 125,3,89,0,110,4,100,6,125,3,116,6,124,0,124,1, + 124,2,124,3,100,7,141,4,83,0,119,0,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,41,1,114,116,0,0,0,41,2,114,116,0, + 0,0,114,123,0,0,0,114,122,0,0,0,70,114,142,0, + 0,0,41,7,114,11,0,0,0,114,133,0,0,0,114,134, + 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,122,0,0, + 0,114,83,0,0,0,114,119,0,0,0,41,6,114,20,0, + 0,0,114,116,0,0,0,114,120,0,0,0,114,122,0,0, + 0,114,143,0,0,0,90,6,115,101,97,114,99,104,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,98,0, + 0,0,175,1,0,0,115,40,0,0,0,10,2,8,1,4, + 1,6,1,8,2,12,1,12,1,6,1,2,1,6,255,8, + 3,10,1,2,1,14,1,12,1,8,1,4,3,16,2,2, + 250,255,128,114,98,0,0,0,99,3,0,0,0,0,0,0, + 0,0,0,0,0,8,0,0,0,8,0,0,0,67,0,0, + 0,115,44,1,0,0,122,10,124,0,106,0,125,3,87,0, + 110,18,4,0,116,1,144,1,121,42,1,0,1,0,1,0, + 89,0,110,12,124,3,100,0,117,1,114,42,124,3,83,0, + 124,0,106,2,125,4,124,1,100,0,117,0,114,84,122,10, + 124,0,106,3,125,1,87,0,110,16,4,0,116,1,144,1, + 121,40,1,0,1,0,1,0,89,0,122,10,124,0,106,4, + 125,5,87,0,110,20,4,0,116,1,144,1,121,38,1,0, + 1,0,1,0,100,0,125,5,89,0,124,2,100,0,117,0, + 114,170,124,5,100,0,117,0,114,166,122,10,124,1,106,5, + 125,2,87,0,110,26,4,0,116,1,144,1,121,36,1,0, + 1,0,1,0,100,0,125,2,89,0,110,4,124,5,125,2, + 122,10,124,0,106,6,125,6,87,0,110,20,4,0,116,1, + 144,1,121,34,1,0,1,0,1,0,100,0,125,6,89,0, + 122,14,116,7,124,0,106,8,131,1,125,7,87,0,110,20, + 4,0,116,1,144,1,121,32,1,0,1,0,1,0,100,0, + 125,7,89,0,116,9,124,4,124,1,124,2,100,1,141,3, + 125,3,124,5,100,0,117,0,144,1,114,10,100,2,110,2, + 100,3,124,3,95,10,124,6,124,3,95,11,124,7,124,3, + 95,12,124,3,83,0,119,0,119,0,119,0,119,0,119,0, + 119,0,41,4,78,169,1,114,120,0,0,0,70,84,41,13, + 114,113,0,0,0,114,2,0,0,0,114,9,0,0,0,114, + 106,0,0,0,114,115,0,0,0,218,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,119, + 0,0,0,114,124,0,0,0,114,129,0,0,0,114,123,0, + 0,0,41,8,114,104,0,0,0,114,116,0,0,0,114,120, + 0,0,0,114,103,0,0,0,114,20,0,0,0,90,8,108, + 111,99,97,116,105,111,110,114,129,0,0,0,114,123,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 218,17,95,115,112,101,99,95,102,114,111,109,95,109,111,100, + 117,108,101,201,1,0,0,115,86,0,0,0,2,2,10,1, + 14,1,4,1,8,2,4,1,6,2,8,1,2,1,10,1, + 14,1,2,2,2,1,10,1,14,1,6,1,8,1,8,1, + 2,1,10,1,14,1,8,1,4,2,2,1,10,1,14,1, + 6,1,2,1,14,1,14,1,6,1,14,2,20,1,6,1, + 6,1,4,1,2,249,2,252,2,250,2,250,2,251,2,246, + 255,128,114,149,0,0,0,70,169,1,218,8,111,118,101,114, + 114,105,100,101,99,2,0,0,0,0,0,0,0,1,0,0, + 0,5,0,0,0,8,0,0,0,67,0,0,0,115,210,1, + 0,0,124,2,115,20,116,0,124,1,100,1,100,0,131,3, + 100,0,117,0,114,50,122,12,124,0,106,1,124,1,95,2, + 87,0,110,16,4,0,116,3,144,1,121,208,1,0,1,0, + 1,0,89,0,124,2,115,70,116,0,124,1,100,2,100,0, + 131,3,100,0,117,0,114,170,124,0,106,4,125,3,124,3, + 100,0,117,0,114,142,124,0,106,5,100,0,117,1,114,142, + 116,6,100,0,117,0,114,106,116,7,130,1,116,6,106,8, + 125,4,124,4,160,9,124,4,161,1,125,3,124,0,106,5, + 124,3,95,10,124,3,124,0,95,4,100,0,124,1,95,11, + 122,10,124,3,124,1,95,12,87,0,110,16,4,0,116,3, + 144,1,121,206,1,0,1,0,1,0,89,0,124,2,115,190, + 116,0,124,1,100,3,100,0,131,3,100,0,117,0,114,220, + 122,12,124,0,106,13,124,1,95,14,87,0,110,16,4,0, + 116,3,144,1,121,204,1,0,1,0,1,0,89,0,122,10, + 124,0,124,1,95,15,87,0,110,16,4,0,116,3,144,1, + 121,202,1,0,1,0,1,0,89,0,124,2,144,1,115,16, + 116,0,124,1,100,4,100,0,131,3,100,0,117,0,144,1, + 114,58,124,0,106,5,100,0,117,1,144,1,114,58,122,12, + 124,0,106,5,124,1,95,16,87,0,110,16,4,0,116,3, + 144,1,121,200,1,0,1,0,1,0,89,0,124,0,106,17, + 144,1,114,192,124,2,144,1,115,90,116,0,124,1,100,5, + 100,0,131,3,100,0,117,0,144,1,114,120,122,12,124,0, + 106,18,124,1,95,11,87,0,110,16,4,0,116,3,144,1, + 121,198,1,0,1,0,1,0,89,0,124,2,144,1,115,144, + 116,0,124,1,100,6,100,0,131,3,100,0,117,0,144,1, + 114,192,124,0,106,19,100,0,117,1,144,1,114,192,122,14, + 124,0,106,19,124,1,95,20,87,0,124,1,83,0,4,0, + 116,3,144,1,121,196,1,0,1,0,1,0,89,0,124,1, + 83,0,124,1,83,0,119,0,119,0,119,0,119,0,119,0, + 119,0,119,0,41,7,78,114,9,0,0,0,114,106,0,0, + 0,218,11,95,95,112,97,99,107,97,103,101,95,95,114,148, + 0,0,0,114,115,0,0,0,114,146,0,0,0,41,21,114, + 13,0,0,0,114,20,0,0,0,114,9,0,0,0,114,2, + 0,0,0,114,116,0,0,0,114,123,0,0,0,114,133,0, + 0,0,114,134,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,115,0,0,0,114,106, + 0,0,0,114,137,0,0,0,114,152,0,0,0,114,113,0, + 0,0,114,148,0,0,0,114,130,0,0,0,114,120,0,0, + 0,114,129,0,0,0,114,146,0,0,0,41,5,114,103,0, + 0,0,114,104,0,0,0,114,151,0,0,0,114,116,0,0, + 0,114,153,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,6,0,0,0,218,18,95,105,110,105,116,95,109,111,100, + 117,108,101,95,97,116,116,114,115,246,1,0,0,115,114,0, + 0,0,20,4,2,1,12,1,14,1,2,1,20,2,6,1, + 8,1,10,2,8,1,4,1,6,1,10,2,8,1,6,1, + 6,11,2,1,10,1,14,1,2,1,20,2,2,1,12,1, + 14,1,2,1,2,2,10,1,14,1,2,1,24,2,12,1, + 2,1,12,1,14,1,2,1,8,2,24,1,2,1,12,1, + 14,1,2,1,24,2,12,1,2,1,10,1,4,3,14,254, + 2,1,8,1,2,254,2,249,2,249,2,249,2,251,2,250, + 2,228,255,128,114,155,0,0,0,99,1,0,0,0,0,0, + 0,0,0,0,0,0,2,0,0,0,3,0,0,0,67,0, + 0,0,115,82,0,0,0,100,1,125,1,116,0,124,0,106, + 1,100,2,131,2,114,30,124,0,106,1,160,2,124,0,161, + 1,125,1,110,20,116,0,124,0,106,1,100,3,131,2,114, + 50,116,3,100,4,131,1,130,1,124,1,100,1,117,0,114, + 68,116,4,124,0,106,5,131,1,125,1,116,6,124,0,124, + 1,131,2,1,0,124,1,83,0,41,5,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,66,108,111,97,100,101,114,115,32,116, + 104,97,116,32,100,101,102,105,110,101,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,41,7,114,11,0,0,0, + 114,116,0,0,0,114,156,0,0,0,114,83,0,0,0,114, + 21,0,0,0,114,20,0,0,0,114,155,0,0,0,169,2, + 114,103,0,0,0,114,104,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,218,16,109,111,100,117,108, + 101,95,102,114,111,109,95,115,112,101,99,62,2,0,0,115, + 20,0,0,0,4,3,12,1,14,3,12,1,8,1,8,2, + 10,1,10,1,4,1,255,128,114,159,0,0,0,99,1,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,4,0, + 0,0,67,0,0,0,115,100,0,0,0,124,0,106,0,100, + 1,117,0,114,14,100,2,110,4,124,0,106,0,125,1,124, + 0,106,1,100,1,117,0,114,64,124,0,106,2,100,1,117, + 0,114,50,100,3,160,3,124,1,161,1,83,0,100,4,160, + 3,124,1,124,0,106,2,161,2,83,0,124,0,106,4,114, + 84,100,5,160,3,124,1,124,0,106,1,161,2,83,0,100, + 6,160,3,124,0,106,0,124,0,106,1,161,2,83,0,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,108,0,0,0,114, + 109,0,0,0,114,110,0,0,0,114,111,0,0,0,250,18, + 60,109,111,100,117,108,101,32,123,33,114,125,32,40,123,125, + 41,62,41,5,114,20,0,0,0,114,120,0,0,0,114,116, + 0,0,0,114,49,0,0,0,114,130,0,0,0,41,2,114, + 103,0,0,0,114,20,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,6,0,0,0,114,114,0,0,0,79,2,0, + 0,115,18,0,0,0,20,3,10,1,10,1,10,1,14,2, + 6,2,14,1,16,2,255,128,114,114,0,0,0,99,2,0, + 0,0,0,0,0,0,0,0,0,0,4,0,0,0,10,0, + 0,0,67,0,0,0,115,26,1,0,0,124,0,106,0,125, + 2,116,1,124,2,131,1,143,246,1,0,116,2,106,3,160, + 4,124,2,161,1,124,1,117,1,114,54,100,1,160,5,124, + 2,161,1,125,3,116,6,124,3,124,2,100,2,141,2,130, + 1,122,160,124,0,106,7,100,3,117,0,114,106,124,0,106, + 8,100,3,117,0,114,90,116,6,100,4,124,0,106,0,100, + 2,141,2,130,1,116,9,124,0,124,1,100,5,100,6,141, + 3,1,0,110,80,116,9,124,0,124,1,100,5,100,6,141, + 3,1,0,116,10,124,0,106,7,100,7,131,2,115,174,116, + 11,124,0,106,7,131,1,155,0,100,8,157,2,125,3,116, + 12,160,13,124,3,116,14,161,2,1,0,124,0,106,7,160, + 15,124,2,161,1,1,0,110,12,124,0,106,7,160,16,124, + 1,161,1,1,0,87,0,116,2,106,3,160,17,124,0,106, + 0,161,1,125,1,124,1,116,2,106,3,124,0,106,0,60, + 0,110,28,116,2,106,3,160,17,124,0,106,0,161,1,125, + 1,124,1,116,2,106,3,124,0,106,0,60,0,119,0,87, + 0,100,3,4,0,4,0,131,3,1,0,124,1,83,0,49, + 0,144,1,115,12,119,1,1,0,1,0,1,0,89,0,1, + 0,124,1,83,0,41,9,122,70,69,120,101,99,117,116,101, + 32,116,104,101,32,115,112,101,99,39,115,32,115,112,101,99, + 105,102,105,101,100,32,109,111,100,117,108,101,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, + 19,0,0,0,78,250,14,109,105,115,115,105,110,103,32,108, + 111,97,100,101,114,84,114,150,0,0,0,114,157,0,0,0, + 250,55,46,101,120,101,99,95,109,111,100,117,108,101,40,41, + 32,110,111,116,32,102,111,117,110,100,59,32,102,97,108,108, + 105,110,103,32,98,97,99,107,32,116,111,32,108,111,97,100, + 95,109,111,100,117,108,101,40,41,41,18,114,20,0,0,0, + 114,54,0,0,0,114,18,0,0,0,114,99,0,0,0,114, + 38,0,0,0,114,49,0,0,0,114,83,0,0,0,114,116, + 0,0,0,114,123,0,0,0,114,155,0,0,0,114,11,0, + 0,0,114,7,0,0,0,114,95,0,0,0,114,96,0,0, + 0,218,13,73,109,112,111,114,116,87,97,114,110,105,110,103, + 218,11,108,111,97,100,95,109,111,100,117,108,101,114,157,0, + 0,0,218,3,112,111,112,41,4,114,103,0,0,0,114,104, + 0,0,0,114,20,0,0,0,114,102,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,6,0,0,0,114,100,0,0, + 0,96,2,0,0,115,50,0,0,0,6,2,10,1,16,1, + 10,1,12,1,2,1,10,1,10,1,14,1,16,2,14,2, + 12,1,16,1,12,2,14,1,12,2,2,128,14,4,14,1, + 14,255,26,1,4,1,18,255,4,1,255,128,114,100,0,0, + 0,99,1,0,0,0,0,0,0,0,0,0,0,0,2,0, + 0,0,8,0,0,0,67,0,0,0,115,18,1,0,0,122, + 18,124,0,106,0,160,1,124,0,106,2,161,1,1,0,87, + 0,110,46,1,0,1,0,1,0,124,0,106,2,116,3,106, + 4,118,0,114,64,116,3,106,4,160,5,124,0,106,2,161, + 1,125,1,124,1,116,3,106,4,124,0,106,2,60,0,130, + 0,116,3,106,4,160,5,124,0,106,2,161,1,125,1,124, + 1,116,3,106,4,124,0,106,2,60,0,116,6,124,1,100, + 1,100,0,131,3,100,0,117,0,114,138,122,12,124,0,106, + 0,124,1,95,7,87,0,110,16,4,0,116,8,144,1,121, + 16,1,0,1,0,1,0,89,0,116,6,124,1,100,2,100, + 0,131,3,100,0,117,0,114,212,122,40,124,1,106,9,124, + 1,95,10,116,11,124,1,100,3,131,2,115,192,124,0,106, + 2,160,12,100,4,161,1,100,5,25,0,124,1,95,10,87, + 0,110,16,4,0,116,8,144,1,121,14,1,0,1,0,1, + 0,89,0,116,6,124,1,100,6,100,0,131,3,100,0,117, + 0,144,1,114,8,122,12,124,0,124,1,95,13,87,0,124, + 1,83,0,4,0,116,8,144,1,121,12,1,0,1,0,1, + 0,89,0,124,1,83,0,124,1,83,0,119,0,119,0,119, + 0,41,7,78,114,106,0,0,0,114,152,0,0,0,114,148, + 0,0,0,114,135,0,0,0,114,25,0,0,0,114,113,0, + 0,0,41,14,114,116,0,0,0,114,164,0,0,0,114,20, + 0,0,0,114,18,0,0,0,114,99,0,0,0,114,165,0, + 0,0,114,13,0,0,0,114,106,0,0,0,114,2,0,0, + 0,114,9,0,0,0,114,152,0,0,0,114,11,0,0,0, + 114,136,0,0,0,114,113,0,0,0,114,158,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,6,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,126,2,0,0,115,64,0, + 0,0,2,3,18,1,6,1,12,1,14,1,12,1,2,1, + 14,3,12,1,16,1,2,1,12,1,14,1,2,1,16,1, + 2,1,8,4,10,1,22,1,14,1,2,1,18,1,2,1, + 8,1,4,3,14,254,2,1,8,1,2,254,2,251,2,246, + 255,128,114,166,0,0,0,99,1,0,0,0,0,0,0,0, + 0,0,0,0,3,0,0,0,11,0,0,0,67,0,0,0, + 115,242,0,0,0,124,0,106,0,100,0,117,1,114,58,116, + 1,124,0,106,0,100,1,131,2,115,58,116,2,124,0,106, + 0,131,1,155,0,100,2,157,2,125,1,116,3,160,4,124, + 1,116,5,161,2,1,0,116,6,124,0,131,1,83,0,116, + 7,124,0,131,1,125,2,100,3,124,0,95,8,122,158,124, + 2,116,9,106,10,124,0,106,11,60,0,122,52,124,0,106, + 0,100,0,117,0,114,124,124,0,106,12,100,0,117,0,114, + 122,116,13,100,4,124,0,106,11,100,5,141,2,130,1,110, + 12,124,0,106,0,160,14,124,2,161,1,1,0,87,0,110, + 38,1,0,1,0,1,0,122,14,116,9,106,10,124,0,106, + 11,61,0,87,0,130,0,4,0,116,15,121,240,1,0,1, + 0,1,0,89,0,130,0,116,9,106,10,160,16,124,0,106, + 11,161,1,125,2,124,2,116,9,106,10,124,0,106,11,60, + 0,116,17,100,6,124,0,106,11,124,0,106,0,131,3,1, + 0,87,0,100,7,124,0,95,8,124,2,83,0,100,7,124, + 0,95,8,119,0,119,0,41,8,78,114,157,0,0,0,114, + 162,0,0,0,84,114,161,0,0,0,114,19,0,0,0,122, + 18,105,109,112,111,114,116,32,123,33,114,125,32,35,32,123, + 33,114,125,70,41,18,114,116,0,0,0,114,11,0,0,0, + 114,7,0,0,0,114,95,0,0,0,114,96,0,0,0,114, + 163,0,0,0,114,166,0,0,0,114,159,0,0,0,90,13, + 95,105,110,105,116,105,97,108,105,122,105,110,103,114,18,0, + 0,0,114,99,0,0,0,114,20,0,0,0,114,123,0,0, + 0,114,83,0,0,0,114,157,0,0,0,114,67,0,0,0, + 114,165,0,0,0,114,80,0,0,0,41,3,114,103,0,0, + 0,114,102,0,0,0,114,104,0,0,0,114,5,0,0,0, + 114,5,0,0,0,114,6,0,0,0,218,14,95,108,111,97, + 100,95,117,110,108,111,99,107,101,100,162,2,0,0,115,58, + 0,0,0,10,2,12,2,16,1,12,2,8,1,8,2,6, + 5,2,1,12,1,2,1,10,1,10,1,16,1,16,3,6, + 1,2,1,12,1,2,3,12,254,2,1,2,1,14,5,12, + 1,18,1,6,2,4,2,8,254,2,245,255,128,114,167,0, + 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,1, + 0,0,0,8,0,0,0,67,0,0,0,115,54,0,0,0, + 116,0,124,0,106,1,131,1,143,24,1,0,116,2,124,0, + 131,1,87,0,2,0,100,1,4,0,4,0,131,3,1,0, + 83,0,49,0,115,40,119,1,1,0,1,0,1,0,89,0, + 1,0,100,1,83,0,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,3,114,54,0,0, + 0,114,20,0,0,0,114,167,0,0,0,169,1,114,103,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,114,101,0,0,0,207,2,0,0,115,6,0,0,0,12, + 9,42,1,255,128,114,101,0,0,0,99,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,64, + 0,0,0,115,140,0,0,0,101,0,90,1,100,0,90,2, + 100,1,90,3,100,2,90,4,101,5,100,3,100,4,132,0, + 131,1,90,6,101,7,100,20,100,6,100,7,132,1,131,1, + 90,8,101,7,100,21,100,8,100,9,132,1,131,1,90,9, + 101,5,100,10,100,11,132,0,131,1,90,10,101,5,100,12, + 100,13,132,0,131,1,90,11,101,7,101,12,100,14,100,15, + 132,0,131,1,131,1,90,13,101,7,101,12,100,16,100,17, + 132,0,131,1,131,1,90,14,101,7,101,12,100,18,100,19, + 132,0,131,1,131,1,90,15,101,7,101,16,131,1,90,17, + 100,5,83,0,41,22,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,122,8,98,117,105,108,116, + 45,105,110,99,1,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,5,0,0,0,67,0,0,0,115,22,0,0, + 0,100,1,124,0,106,0,155,2,100,2,116,1,106,2,155, + 0,100,3,157,5,83,0,41,5,250,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,8, + 60,109,111,100,117,108,101,32,122,2,32,40,122,2,41,62, + 78,41,3,114,9,0,0,0,114,169,0,0,0,114,145,0, + 0,0,169,1,114,104,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,6,0,0,0,114,107,0,0,0,233,2,0, + 0,115,4,0,0,0,22,7,255,128,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,0,0,0,0,4,0,0,0,5,0,0,0,67,0,0, + 0,115,42,0,0,0,124,2,100,0,117,1,114,12,100,0, + 83,0,116,0,160,1,124,1,161,1,114,38,116,2,124,1, + 124,0,124,0,106,3,100,1,141,3,83,0,100,0,83,0, + 169,2,78,114,144,0,0,0,41,4,114,61,0,0,0,90, + 10,105,115,95,98,117,105,108,116,105,110,114,98,0,0,0, + 114,145,0,0,0,169,4,218,3,99,108,115,114,85,0,0, + 0,218,4,112,97,116,104,218,6,116,97,114,103,101,116,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,9, + 102,105,110,100,95,115,112,101,99,242,2,0,0,115,12,0, + 0,0,8,2,4,1,10,1,16,1,4,2,255,128,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,0,0,0,0,4,0,0,0,4,0,0,0,67,0, + 0,0,115,30,0,0,0,124,0,160,0,124,1,124,2,161, + 2,125,3,124,3,100,1,117,1,114,26,124,3,106,1,83, + 0,100,1,83,0,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,177,0,0,0, + 114,116,0,0,0,41,4,114,174,0,0,0,114,85,0,0, + 0,114,175,0,0,0,114,103,0,0,0,114,5,0,0,0, + 114,5,0,0,0,114,6,0,0,0,218,11,102,105,110,100, + 95,109,111,100,117,108,101,251,2,0,0,115,6,0,0,0, + 12,9,18,1,255,128,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,1,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,4,0,0,0,67,0,0,0,115,46,0,0, + 0,124,0,106,0,116,1,106,2,118,1,114,34,116,3,100, + 1,160,4,124,0,106,0,161,1,124,0,106,0,100,2,141, + 2,130,1,116,5,116,6,106,7,124,0,131,2,83,0,41, + 4,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,114,81,0,0,0, + 114,19,0,0,0,78,41,8,114,20,0,0,0,114,18,0, + 0,0,114,82,0,0,0,114,83,0,0,0,114,49,0,0, + 0,114,71,0,0,0,114,61,0,0,0,90,14,99,114,101, + 97,116,101,95,98,117,105,108,116,105,110,114,168,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, + 156,0,0,0,7,3,0,0,115,12,0,0,0,12,3,12, + 1,4,1,6,255,12,2,255,128,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,1,0,0,0,0,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,116,1,106,2,124,0,131,2, + 1,0,100,1,83,0,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,71,0,0,0,114,61,0,0,0,90,12,101, + 120,101,99,95,98,117,105,108,116,105,110,114,171,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, + 157,0,0,0,15,3,0,0,115,4,0,0,0,16,3,255, + 128,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,0,0,0,0,2,0,0,0,1, + 0,0,0,67,0,0,0,115,4,0,0,0,100,1,83,0, + 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,5, + 0,0,0,169,2,114,174,0,0,0,114,85,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,8, + 103,101,116,95,99,111,100,101,20,3,0,0,115,4,0,0, + 0,4,4,255,128,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,0,0,0,0,2,0,0,0, + 1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,83, + 0,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,5, + 0,0,0,114,179,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,218,10,103,101,116,95,115,111,117, + 114,99,101,26,3,0,0,115,4,0,0,0,4,4,255,128, + 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,0,0,0,0,2,0,0,0,1,0,0, + 0,67,0,0,0,115,4,0,0,0,100,1,83,0,41,3, + 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,78,114,5,0,0,0,114,179,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,114,122,0,0,0,32,3,0,0,115,4,0,0,0,4, + 4,255,128,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, + 2,78,78,41,1,78,41,18,114,9,0,0,0,114,8,0, + 0,0,114,1,0,0,0,114,10,0,0,0,114,145,0,0, + 0,218,12,115,116,97,116,105,99,109,101,116,104,111,100,114, + 107,0,0,0,218,11,99,108,97,115,115,109,101,116,104,111, + 100,114,177,0,0,0,114,178,0,0,0,114,156,0,0,0, + 114,157,0,0,0,114,90,0,0,0,114,180,0,0,0,114, + 181,0,0,0,114,122,0,0,0,114,105,0,0,0,114,164, + 0,0,0,114,5,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,114,169,0,0,0,222,2,0,0, + 115,48,0,0,0,8,0,4,2,4,7,2,2,10,1,2, + 8,12,1,2,8,12,1,2,11,10,1,2,7,10,1,2, + 4,2,1,12,1,2,4,2,1,12,1,2,4,2,1,12, + 1,12,4,255,128,114,169,0,0,0,99,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,64, + 0,0,0,115,144,0,0,0,101,0,90,1,100,0,90,2, + 100,1,90,3,100,2,90,4,101,5,100,3,100,4,132,0, + 131,1,90,6,101,7,100,22,100,6,100,7,132,1,131,1, + 90,8,101,7,100,23,100,8,100,9,132,1,131,1,90,9, + 101,5,100,10,100,11,132,0,131,1,90,10,101,5,100,12, + 100,13,132,0,131,1,90,11,101,7,100,14,100,15,132,0, + 131,1,90,12,101,7,101,13,100,16,100,17,132,0,131,1, + 131,1,90,14,101,7,101,13,100,18,100,19,132,0,131,1, + 131,1,90,15,101,7,101,13,100,20,100,21,132,0,131,1, + 131,1,90,16,100,5,83,0,41,24,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,90,6,102,114,111,122, + 101,110,99,1,0,0,0,0,0,0,0,0,0,0,0,1, + 0,0,0,4,0,0,0,67,0,0,0,115,16,0,0,0, + 100,1,160,0,124,0,106,1,116,2,106,3,161,2,83,0, + 41,3,114,170,0,0,0,114,160,0,0,0,78,41,4,114, + 49,0,0,0,114,9,0,0,0,114,184,0,0,0,114,145, + 0,0,0,41,1,218,1,109,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,114,107,0,0,0,52,3,0,0, + 115,4,0,0,0,16,7,255,128,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,0, + 0,0,0,4,0,0,0,5,0,0,0,67,0,0,0,115, + 30,0,0,0,116,0,160,1,124,1,161,1,114,26,116,2, + 124,1,124,0,124,0,106,3,100,1,141,3,83,0,100,0, + 83,0,114,172,0,0,0,41,4,114,61,0,0,0,114,92, + 0,0,0,114,98,0,0,0,114,145,0,0,0,114,173,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,114,177,0,0,0,61,3,0,0,115,8,0,0,0,10, + 2,16,1,4,2,255,128,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,0,0,0,0,3,0, + 0,0,3,0,0,0,67,0,0,0,115,18,0,0,0,116, + 0,160,1,124,1,161,1,114,14,124,0,83,0,100,1,83, + 0,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,61,0,0,0,114,92,0,0,0,41, + 3,114,174,0,0,0,114,85,0,0,0,114,175,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, + 178,0,0,0,68,3,0,0,115,4,0,0,0,18,7,255, + 128,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,0,0,0,0,1,0,0,0,1,0, + 0,0,67,0,0,0,115,4,0,0,0,100,1,83,0,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,5, + 0,0,0,114,168,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,114,156,0,0,0,77,3,0,0, + 115,4,0,0,0,4,0,255,128,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, + 0,0,0,0,3,0,0,0,4,0,0,0,67,0,0,0, + 115,64,0,0,0,124,0,106,0,106,1,125,1,116,2,160, + 3,124,1,161,1,115,36,116,4,100,1,160,5,124,1,161, + 1,124,1,100,2,141,2,130,1,116,6,116,2,106,7,124, + 1,131,2,125,2,116,8,124,2,124,0,106,9,131,2,1, + 0,100,0,83,0,114,91,0,0,0,41,10,114,113,0,0, + 0,114,20,0,0,0,114,61,0,0,0,114,92,0,0,0, + 114,83,0,0,0,114,49,0,0,0,114,71,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,14,0,0,0,41,3,114, + 104,0,0,0,114,20,0,0,0,218,4,99,111,100,101,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,114,157, + 0,0,0,81,3,0,0,115,16,0,0,0,8,2,10,1, + 10,1,2,1,6,255,12,2,16,1,255,128,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,0,0,0,0,2,0,0,0,3,0,0,0,67,0,0, + 0,115,10,0,0,0,116,0,124,0,124,1,131,2,83,0, + 41,2,122,95,76,111,97,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,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,1,114,105,0,0,0,114,179,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, + 164,0,0,0,90,3,0,0,115,4,0,0,0,10,8,255, + 128,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,0,0,0,0,2,0,0,0,3,0, + 0,0,67,0,0,0,115,10,0,0,0,116,0,160,1,124, + 1,161,1,83,0,41,2,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,78,41,2,114,61,0,0,0,114,186, + 0,0,0,114,179,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,114,180,0,0,0,100,3,0,0, + 115,4,0,0,0,10,4,255,128,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,0,0,0,0,2, + 0,0,0,1,0,0,0,67,0,0,0,115,4,0,0,0, + 100,1,83,0,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, + 5,0,0,0,114,179,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,6,0,0,0,114,181,0,0,0,106,3,0, + 0,115,4,0,0,0,4,4,255,128,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,0,0, + 0,0,2,0,0,0,3,0,0,0,67,0,0,0,115,10, + 0,0,0,116,0,160,1,124,1,161,1,83,0,41,2,122, + 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,78, + 41,2,114,61,0,0,0,90,17,105,115,95,102,114,111,122, + 101,110,95,112,97,99,107,97,103,101,114,179,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,114,122, + 0,0,0,112,3,0,0,115,4,0,0,0,10,4,255,128, + 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,2,78,78,41, + 1,78,41,17,114,9,0,0,0,114,8,0,0,0,114,1, + 0,0,0,114,10,0,0,0,114,145,0,0,0,114,182,0, + 0,0,114,107,0,0,0,114,183,0,0,0,114,177,0,0, + 0,114,178,0,0,0,114,156,0,0,0,114,157,0,0,0, + 114,164,0,0,0,114,94,0,0,0,114,180,0,0,0,114, + 181,0,0,0,114,122,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,184,0, + 0,0,41,3,0,0,115,50,0,0,0,8,0,4,2,4, + 7,2,2,10,1,2,8,12,1,2,6,12,1,2,8,10, + 1,2,3,10,1,2,8,10,1,2,9,2,1,12,1,2, + 4,2,1,12,1,2,4,2,1,16,1,255,128,114,184,0, + 0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,64,0,0,0,115,32,0,0,0, + 101,0,90,1,100,0,90,2,100,1,90,3,100,2,100,3, + 132,0,90,4,100,4,100,5,132,0,90,5,100,6,83,0, + 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,0,0,0,0,1,0,0,0,2,0,0, + 0,67,0,0,0,115,12,0,0,0,116,0,160,1,161,0, + 1,0,100,1,83,0,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,61,0,0,0,114,62,0,0,0,114, + 51,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,114,58,0,0,0,125,3,0,0,115,4,0,0, + 0,12,2,255,128,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,0,0,0,0, + 4,0,0,0,2,0,0,0,67,0,0,0,115,12,0,0, + 0,116,0,160,1,161,0,1,0,100,1,83,0,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,61,0,0,0,114,64,0,0,0,41,4,114,33,0,0, + 0,218,8,101,120,99,95,116,121,112,101,218,9,101,120,99, + 95,118,97,108,117,101,218,13,101,120,99,95,116,114,97,99, + 101,98,97,99,107,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,114,60,0,0,0,129,3,0,0,115,4,0, + 0,0,12,2,255,128,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,9,0,0,0,114,8,0,0,0, + 114,1,0,0,0,114,10,0,0,0,114,58,0,0,0,114, + 60,0,0,0,114,5,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,6,0,0,0,114,189,0,0,0,121,3,0, + 0,115,10,0,0,0,8,0,4,2,8,2,12,4,255,128, + 114,189,0,0,0,99,3,0,0,0,0,0,0,0,0,0, + 0,0,5,0,0,0,5,0,0,0,67,0,0,0,115,64, + 0,0,0,124,1,160,0,100,1,124,2,100,2,24,0,161, + 2,125,3,116,1,124,3,131,1,124,2,107,0,114,36,116, + 2,100,3,131,1,130,1,124,3,100,4,25,0,125,4,124, + 0,114,60,100,5,160,3,124,4,124,0,161,2,83,0,124, + 4,83,0,41,7,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,135,0,0,0,114,42, + 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,25,0,0,0,250,5,123,125, + 46,123,125,78,41,4,218,6,114,115,112,108,105,116,218,3, + 108,101,110,114,83,0,0,0,114,49,0,0,0,41,5,114, + 20,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,5,0,0,0,114,5,0,0,0,114,6,0,0,0,218, + 13,95,114,101,115,111,108,118,101,95,110,97,109,101,134,3, + 0,0,115,12,0,0,0,16,2,12,1,8,1,8,1,20, + 1,255,128,114,198,0,0,0,99,3,0,0,0,0,0,0, + 0,0,0,0,0,4,0,0,0,4,0,0,0,67,0,0, + 0,115,34,0,0,0,124,0,160,0,124,1,124,2,161,2, + 125,3,124,3,100,0,117,0,114,24,100,0,83,0,116,1, + 124,1,124,3,131,2,83,0,114,0,0,0,0,41,2,114, + 178,0,0,0,114,98,0,0,0,41,4,218,6,102,105,110, + 100,101,114,114,20,0,0,0,114,175,0,0,0,114,116,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,218,17,95,102,105,110,100,95,115,112,101,99,95,108,101, + 103,97,99,121,143,3,0,0,115,10,0,0,0,12,3,8, + 1,4,1,10,1,255,128,114,200,0,0,0,99,3,0,0, + 0,0,0,0,0,0,0,0,0,10,0,0,0,10,0,0, + 0,67,0,0,0,115,36,1,0,0,116,0,106,1,125,3, + 124,3,100,1,117,0,114,22,116,2,100,2,131,1,130,1, + 124,3,115,38,116,3,160,4,100,3,116,5,161,2,1,0, + 124,0,116,0,106,6,118,0,125,4,124,3,68,0,93,230, + 125,5,116,7,131,0,143,94,1,0,122,10,124,5,106,8, + 125,6,87,0,110,54,4,0,116,9,144,1,121,34,1,0, + 1,0,1,0,116,10,124,5,124,0,124,1,131,3,125,7, + 124,7,100,1,117,0,114,126,89,0,87,0,100,1,4,0, + 4,0,131,3,1,0,113,52,89,0,110,12,124,6,124,0, + 124,1,124,2,131,3,125,7,87,0,100,1,4,0,4,0, + 131,3,1,0,110,16,49,0,115,162,119,1,1,0,1,0, + 1,0,89,0,1,0,124,7,100,1,117,1,144,1,114,26, + 124,4,144,1,115,18,124,0,116,0,106,6,118,0,144,1, + 114,18,116,0,106,6,124,0,25,0,125,8,122,10,124,8, + 106,11,125,9,87,0,110,26,4,0,116,9,144,1,121,32, + 1,0,1,0,1,0,124,7,6,0,89,0,2,0,1,0, + 83,0,124,9,100,1,117,0,144,1,114,10,124,7,2,0, + 1,0,83,0,124,9,2,0,1,0,83,0,124,7,2,0, + 1,0,83,0,113,52,100,1,83,0,119,0,119,0,41,4, + 122,21,70,105,110,100,32,97,32,109,111,100,117,108,101,39, + 115,32,115,112,101,99,46,78,122,53,115,121,115,46,109,101, + 116,97,95,112,97,116,104,32,105,115,32,78,111,110,101,44, + 32,80,121,116,104,111,110,32,105,115,32,108,105,107,101,108, + 121,32,115,104,117,116,116,105,110,103,32,100,111,119,110,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,12,114,18,0,0,0,218,9, + 109,101,116,97,95,112,97,116,104,114,83,0,0,0,114,95, + 0,0,0,114,96,0,0,0,114,163,0,0,0,114,99,0, + 0,0,114,189,0,0,0,114,177,0,0,0,114,2,0,0, + 0,114,200,0,0,0,114,113,0,0,0,41,10,114,20,0, + 0,0,114,175,0,0,0,114,176,0,0,0,114,201,0,0, + 0,90,9,105,115,95,114,101,108,111,97,100,114,199,0,0, + 0,114,177,0,0,0,114,103,0,0,0,114,104,0,0,0, + 114,113,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,218,10,95,102,105,110,100,95,115,112,101,99, + 152,3,0,0,115,62,0,0,0,6,2,8,1,8,2,4, + 3,12,1,10,5,8,1,8,1,2,1,10,1,14,1,12, + 1,8,1,20,1,42,2,10,1,18,2,10,1,2,1,10, + 1,14,1,12,4,10,2,8,1,8,2,8,2,2,128,4, + 2,2,243,2,244,255,128,114,202,0,0,0,99,3,0,0, + 0,0,0,0,0,0,0,0,0,3,0,0,0,5,0,0, + 0,67,0,0,0,115,110,0,0,0,116,0,124,0,116,1, + 131,2,115,28,116,2,100,1,160,3,116,4,124,0,131,1, + 161,1,131,1,130,1,124,2,100,2,107,0,114,44,116,5, + 100,3,131,1,130,1,124,2,100,2,107,4,114,82,116,0, + 124,1,116,1,131,2,115,70,116,2,100,4,131,1,130,1, + 124,1,115,82,116,6,100,5,131,1,130,1,124,0,115,106, + 124,2,100,2,107,2,114,102,116,5,100,6,131,1,130,1, + 100,7,83,0,100,7,83,0,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,25,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,54,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,119, + 105,116,104,32,110,111,32,107,110,111,119,110,32,112,97,114, + 101,110,116,32,112,97,99,107,97,103,101,122,17,69,109,112, + 116,121,32,109,111,100,117,108,101,32,110,97,109,101,78,41, + 7,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,49,0, + 0,0,114,3,0,0,0,218,10,86,97,108,117,101,69,114, + 114,111,114,114,83,0,0,0,169,3,114,20,0,0,0,114, + 196,0,0,0,114,197,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,6,0,0,0,218,13,95,115,97,110,105,116, + 121,95,99,104,101,99,107,199,3,0,0,115,26,0,0,0, + 10,2,18,1,8,1,8,1,8,1,10,1,8,1,4,1, + 8,1,12,2,8,1,8,255,255,128,114,208,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, + 0,0,0,0,9,0,0,0,8,0,0,0,67,0,0,0, + 115,22,1,0,0,100,0,125,2,124,0,160,0,100,1,161, + 1,100,2,25,0,125,3,124,3,114,128,124,3,116,1,106, + 2,118,1,114,42,116,3,124,1,124,3,131,2,1,0,124, + 0,116,1,106,2,118,0,114,62,116,1,106,2,124,0,25, + 0,83,0,116,1,106,2,124,3,25,0,125,4,122,10,124, + 4,106,4,125,2,87,0,110,44,4,0,116,5,144,1,121, + 20,1,0,1,0,1,0,116,6,100,3,23,0,160,7,124, + 0,124,3,161,2,125,5,116,8,124,5,124,0,100,4,141, + 2,100,0,130,2,116,9,124,0,124,2,131,2,125,6,124, + 6,100,0,117,0,114,164,116,8,116,6,160,7,124,0,161, + 1,124,0,100,4,141,2,130,1,116,10,124,6,131,1,125, + 7,124,3,144,1,114,14,116,1,106,2,124,3,25,0,125, + 4,124,0,160,0,100,1,161,1,100,5,25,0,125,8,122, + 18,116,11,124,4,124,8,124,7,131,3,1,0,87,0,124, + 7,83,0,4,0,116,5,144,1,121,18,1,0,1,0,1, + 0,100,6,124,3,155,2,100,7,124,8,155,2,157,4,125, + 5,116,12,160,13,124,5,116,14,161,2,1,0,89,0,124, + 7,83,0,124,7,83,0,119,0,119,0,41,8,78,114,135, + 0,0,0,114,25,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,19,0,0,0,233,2,0,0,0,122,27,67,97,110, + 110,111,116,32,115,101,116,32,97,110,32,97,116,116,114,105, + 98,117,116,101,32,111,110,32,122,18,32,102,111,114,32,99, + 104,105,108,100,32,109,111,100,117,108,101,32,41,15,114,136, + 0,0,0,114,18,0,0,0,114,99,0,0,0,114,71,0, + 0,0,114,148,0,0,0,114,2,0,0,0,218,8,95,69, + 82,82,95,77,83,71,114,49,0,0,0,218,19,77,111,100, + 117,108,101,78,111,116,70,111,117,110,100,69,114,114,111,114, + 114,202,0,0,0,114,167,0,0,0,114,12,0,0,0,114, + 95,0,0,0,114,96,0,0,0,114,163,0,0,0,41,9, + 114,20,0,0,0,218,7,105,109,112,111,114,116,95,114,175, + 0,0,0,114,137,0,0,0,90,13,112,97,114,101,110,116, + 95,109,111,100,117,108,101,114,102,0,0,0,114,103,0,0, + 0,114,104,0,0,0,90,5,99,104,105,108,100,114,5,0, + 0,0,114,5,0,0,0,114,6,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,218,3,0,0,115,60,0,0,0,4,1, + 14,1,4,1,10,1,10,1,10,2,10,1,10,1,2,1, + 10,1,14,1,16,1,14,1,10,1,8,1,18,1,8,2, + 6,1,10,2,14,1,2,1,14,1,4,4,14,253,16,1, + 14,1,8,1,2,253,2,242,255,128,114,213,0,0,0,99, + 2,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, + 8,0,0,0,67,0,0,0,115,128,0,0,0,116,0,124, + 0,131,1,143,62,1,0,116,1,106,2,160,3,124,0,116, + 4,161,2,125,2,124,2,116,4,117,0,114,56,116,5,124, + 0,124,1,131,2,87,0,2,0,100,1,4,0,4,0,131, + 3,1,0,83,0,87,0,100,1,4,0,4,0,131,3,1, + 0,110,16,49,0,115,76,119,1,1,0,1,0,1,0,89, + 0,1,0,124,2,100,1,117,0,114,116,100,2,160,6,124, + 0,161,1,125,3,116,7,124,3,124,0,100,3,141,2,130, + 1,116,8,124,0,131,1,1,0,124,2,83,0,41,4,122, + 25,70,105,110,100,32,97,110,100,32,108,111,97,100,32,116, + 104,101,32,109,111,100,117,108,101,46,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,19,0,0,0,41,9,114,54,0,0, + 0,114,18,0,0,0,114,99,0,0,0,114,38,0,0,0, + 218,14,95,78,69,69,68,83,95,76,79,65,68,73,78,71, + 114,213,0,0,0,114,49,0,0,0,114,211,0,0,0,114, + 69,0,0,0,41,4,114,20,0,0,0,114,212,0,0,0, + 114,104,0,0,0,114,79,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,218,14,95,102,105,110,100, + 95,97,110,100,95,108,111,97,100,253,3,0,0,115,24,0, + 0,0,10,2,14,1,8,1,54,1,8,2,4,1,2,1, + 4,255,12,2,8,2,4,1,255,128,114,215,0,0,0,114, + 25,0,0,0,99,3,0,0,0,0,0,0,0,0,0,0, + 0,3,0,0,0,4,0,0,0,67,0,0,0,115,42,0, + 0,0,116,0,124,0,124,1,124,2,131,3,1,0,124,2, + 100,1,107,4,114,32,116,1,124,0,124,1,124,2,131,3, + 125,0,116,2,124,0,116,3,131,2,83,0,41,3,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,25,0,0,0,78,41,4,114,208,0, + 0,0,114,198,0,0,0,114,215,0,0,0,218,11,95,103, + 99,100,95,105,109,112,111,114,116,114,207,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,216,0, + 0,0,13,4,0,0,115,10,0,0,0,12,9,8,1,12, + 1,10,1,255,128,114,216,0,0,0,169,1,218,9,114,101, + 99,117,114,115,105,118,101,99,3,0,0,0,0,0,0,0, + 1,0,0,0,8,0,0,0,11,0,0,0,67,0,0,0, + 115,218,0,0,0,124,1,68,0,93,206,125,4,116,0,124, + 4,116,1,131,2,115,64,124,3,114,34,124,0,106,2,100, + 1,23,0,125,5,110,4,100,2,125,5,116,3,100,3,124, + 5,155,0,100,4,116,4,124,4,131,1,106,2,155,0,157, + 4,131,1,130,1,124,4,100,5,107,2,114,106,124,3,115, + 104,116,5,124,0,100,6,131,2,114,104,116,6,124,0,124, + 0,106,7,124,2,100,7,100,8,141,4,1,0,113,4,116, + 5,124,0,124,4,131,2,115,210,100,9,160,8,124,0,106, + 2,124,4,161,2,125,6,122,14,116,9,124,2,124,6,131, + 2,1,0,87,0,113,4,4,0,116,10,121,216,1,0,125, + 7,1,0,122,42,124,7,106,11,124,6,107,2,114,200,116, + 12,106,13,160,14,124,6,116,15,161,2,100,10,117,1,114, + 200,87,0,89,0,100,10,125,7,126,7,113,4,130,0,100, + 10,125,7,126,7,119,1,113,4,124,0,83,0,119,0,41, + 11,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,122,8,46,95,95,97,108,108,95,95,122,13,96,96,102, + 114,111,109,32,108,105,115,116,39,39,122,8,73,116,101,109, + 32,105,110,32,122,18,32,109,117,115,116,32,98,101,32,115, + 116,114,44,32,110,111,116,32,250,1,42,218,7,95,95,97, + 108,108,95,95,84,114,217,0,0,0,114,193,0,0,0,78, + 41,16,114,203,0,0,0,114,204,0,0,0,114,9,0,0, + 0,114,205,0,0,0,114,3,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,114,220,0,0,0,114,49,0,0,0,114,71,0,0, + 0,114,211,0,0,0,114,20,0,0,0,114,18,0,0,0, + 114,99,0,0,0,114,38,0,0,0,114,214,0,0,0,41, + 8,114,104,0,0,0,218,8,102,114,111,109,108,105,115,116, + 114,212,0,0,0,114,218,0,0,0,218,1,120,90,5,119, + 104,101,114,101,90,9,102,114,111,109,95,110,97,109,101,90, + 3,101,120,99,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,114,221,0,0,0,28,4,0,0,115,54,0,0, + 0,8,10,10,1,4,1,12,1,4,2,10,1,8,1,8, + 255,8,2,14,1,10,1,2,1,8,255,10,2,14,1,2, + 1,14,1,14,1,10,4,16,1,2,255,12,2,2,1,10, + 128,4,1,2,248,255,128,114,221,0,0,0,99,1,0,0, + 0,0,0,0,0,0,0,0,0,3,0,0,0,6,0,0, + 0,67,0,0,0,115,146,0,0,0,124,0,160,0,100,1, + 161,1,125,1,124,0,160,0,100,2,161,1,125,2,124,1, + 100,3,117,1,114,82,124,2,100,3,117,1,114,78,124,1, + 124,2,106,1,107,3,114,78,116,2,106,3,100,4,124,1, + 155,2,100,5,124,2,106,1,155,2,100,6,157,5,116,4, + 100,7,100,8,141,3,1,0,124,1,83,0,124,2,100,3, + 117,1,114,96,124,2,106,1,83,0,116,2,106,3,100,9, + 116,4,100,7,100,8,141,3,1,0,124,0,100,10,25,0, + 125,1,100,11,124,0,118,1,114,142,124,1,160,5,100,12, + 161,1,100,13,25,0,125,1,124,1,83,0,41,14,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,152,0,0,0,114,113,0,0, + 0,78,122,32,95,95,112,97,99,107,97,103,101,95,95,32, + 33,61,32,95,95,115,112,101,99,95,95,46,112,97,114,101, + 110,116,32,40,122,4,32,33,61,32,250,1,41,233,3,0, + 0,0,41,1,90,10,115,116,97,99,107,108,101,118,101,108, + 122,89,99,97,110,39,116,32,114,101,115,111,108,118,101,32, + 112,97,99,107,97,103,101,32,102,114,111,109,32,95,95,115, + 112,101,99,95,95,32,111,114,32,95,95,112,97,99,107,97, + 103,101,95,95,44,32,102,97,108,108,105,110,103,32,98,97, + 99,107,32,111,110,32,95,95,110,97,109,101,95,95,32,97, + 110,100,32,95,95,112,97,116,104,95,95,114,9,0,0,0, + 114,148,0,0,0,114,135,0,0,0,114,25,0,0,0,41, + 6,114,38,0,0,0,114,137,0,0,0,114,95,0,0,0, + 114,96,0,0,0,114,163,0,0,0,114,136,0,0,0,41, + 3,218,7,103,108,111,98,97,108,115,114,196,0,0,0,114, + 103,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,218,17,95,99,97,108,99,95,95,95,112,97,99, + 107,97,103,101,95,95,65,4,0,0,115,44,0,0,0,10, + 7,10,1,8,1,18,1,6,1,2,1,4,255,4,1,6, + 255,4,2,6,254,4,3,8,1,6,1,6,2,4,2,6, + 254,8,3,8,1,14,1,4,1,255,128,114,227,0,0,0, + 114,5,0,0,0,99,5,0,0,0,0,0,0,0,0,0, + 0,0,9,0,0,0,5,0,0,0,67,0,0,0,115,174, + 0,0,0,124,4,100,1,107,2,114,18,116,0,124,0,131, + 1,125,5,110,36,124,1,100,2,117,1,114,30,124,1,110, + 2,105,0,125,6,116,1,124,6,131,1,125,7,116,0,124, + 0,124,7,124,4,131,3,125,5,124,3,115,148,124,4,100, + 1,107,2,114,84,116,0,124,0,160,2,100,3,161,1,100, + 1,25,0,131,1,83,0,124,0,115,92,124,5,83,0,116, + 3,124,0,131,1,116,3,124,0,160,2,100,3,161,1,100, + 1,25,0,131,1,24,0,125,8,116,4,106,5,124,5,106, + 6,100,2,116,3,124,5,106,6,131,1,124,8,24,0,133, + 2,25,0,25,0,83,0,116,7,124,5,100,4,131,2,114, + 170,116,8,124,5,124,3,116,0,131,3,83,0,124,5,83, + 0,41,5,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, + 25,0,0,0,78,114,135,0,0,0,114,148,0,0,0,41, + 9,114,216,0,0,0,114,227,0,0,0,218,9,112,97,114, + 116,105,116,105,111,110,114,195,0,0,0,114,18,0,0,0, + 114,99,0,0,0,114,9,0,0,0,114,11,0,0,0,114, + 221,0,0,0,41,9,114,20,0,0,0,114,226,0,0,0, + 218,6,108,111,99,97,108,115,114,222,0,0,0,114,197,0, + 0,0,114,104,0,0,0,90,8,103,108,111,98,97,108,115, + 95,114,196,0,0,0,90,7,99,117,116,95,111,102,102,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,10, + 95,95,105,109,112,111,114,116,95,95,92,4,0,0,115,32, + 0,0,0,8,11,10,1,16,2,8,1,12,1,4,1,8, + 3,18,1,4,1,4,1,26,4,30,3,10,1,12,1,4, + 2,255,128,114,230,0,0,0,99,1,0,0,0,0,0,0, + 0,0,0,0,0,2,0,0,0,3,0,0,0,67,0,0, + 0,115,38,0,0,0,116,0,160,1,124,0,161,1,125,1, + 124,1,100,0,117,0,114,30,116,2,100,1,124,0,23,0, + 131,1,130,1,116,3,124,1,131,1,83,0,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,4,114,169,0,0, + 0,114,177,0,0,0,114,83,0,0,0,114,167,0,0,0, + 41,2,114,20,0,0,0,114,103,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,6,0,0,0,218,18,95,98,117, + 105,108,116,105,110,95,102,114,111,109,95,110,97,109,101,129, + 4,0,0,115,10,0,0,0,10,1,8,1,12,1,8,1, + 255,128,114,231,0,0,0,99,2,0,0,0,0,0,0,0, + 0,0,0,0,10,0,0,0,5,0,0,0,67,0,0,0, + 115,166,0,0,0,124,1,97,0,124,0,97,1,116,2,116, + 1,131,1,125,2,116,1,106,3,160,4,161,0,68,0,93, + 72,92,2,125,3,125,4,116,5,124,4,124,2,131,2,114, + 98,124,3,116,1,106,6,118,0,114,60,116,7,125,5,110, + 18,116,0,160,8,124,3,161,1,114,76,116,9,125,5,110, + 2,113,26,116,10,124,4,124,5,131,2,125,6,116,11,124, + 6,124,4,131,2,1,0,113,26,116,1,106,3,116,12,25, + 0,125,7,100,1,68,0,93,46,125,8,124,8,116,1,106, + 3,118,1,114,138,116,13,124,8,131,1,125,9,110,10,116, + 1,106,3,124,8,25,0,125,9,116,14,124,7,124,8,124, + 9,131,3,1,0,113,114,100,2,83,0,41,3,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,41,3,114,26,0,0,0, + 114,95,0,0,0,114,68,0,0,0,78,41,15,114,61,0, + 0,0,114,18,0,0,0,114,3,0,0,0,114,99,0,0, + 0,218,5,105,116,101,109,115,114,203,0,0,0,114,82,0, + 0,0,114,169,0,0,0,114,92,0,0,0,114,184,0,0, + 0,114,149,0,0,0,114,155,0,0,0,114,9,0,0,0, + 114,231,0,0,0,114,12,0,0,0,41,10,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,20,0,0,0,114,104,0,0,0,114,116,0,0, + 0,114,103,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,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 218,6,95,115,101,116,117,112,136,4,0,0,115,42,0,0, + 0,4,9,4,1,8,3,18,1,10,1,10,1,6,1,10, + 1,6,1,2,2,10,1,10,1,2,128,10,3,8,1,10, + 1,10,1,10,2,14,1,4,251,255,128,114,235,0,0,0, 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,3,0,0,0,67,0,0,0,115,10,0,0,0,116,0, - 160,1,124,1,161,1,83,0,41,2,122,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,78,41,2,114,58,0, - 0,0,90,17,105,115,95,102,114,111,122,101,110,95,112,97, - 99,107,97,103,101,114,172,0,0,0,114,10,0,0,0,114, - 10,0,0,0,114,11,0,0,0,114,116,0,0,0,100,3, - 0,0,115,4,0,0,0,10,4,255,128,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,2,78,78,41,1,78,41,17,114, - 1,0,0,0,114,0,0,0,0,114,2,0,0,0,114,3, - 0,0,0,114,139,0,0,0,114,175,0,0,0,114,100,0, - 0,0,114,176,0,0,0,114,170,0,0,0,114,171,0,0, - 0,114,150,0,0,0,114,151,0,0,0,114,156,0,0,0, - 114,91,0,0,0,114,173,0,0,0,114,174,0,0,0,114, - 116,0,0,0,114,10,0,0,0,114,10,0,0,0,114,10, - 0,0,0,114,11,0,0,0,114,177,0,0,0,30,3,0, - 0,115,50,0,0,0,8,0,4,2,4,7,2,2,10,1, - 2,8,12,1,2,6,12,1,2,8,10,1,2,3,10,1, - 2,8,10,1,2,8,2,1,12,1,2,4,2,1,12,1, - 2,4,2,1,16,1,255,128,114,177,0,0,0,99,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,64,0,0,0,115,32,0,0,0,101,0,90,1,100, - 0,90,2,100,1,90,3,100,2,100,3,132,0,90,4,100, - 4,100,5,132,0,90,5,100,6,83,0,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, - 0,0,0,0,1,0,0,0,2,0,0,0,67,0,0,0, - 115,12,0,0,0,116,0,160,1,161,0,1,0,100,1,83, - 0,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,58,0,0,0,114,59,0,0,0,114,48,0,0,0,114, - 10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,55, - 0,0,0,113,3,0,0,115,6,0,0,0,8,2,4,128, - 255,128,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,0,0,0,0,4,0,0, - 0,2,0,0,0,67,0,0,0,115,12,0,0,0,116,0, - 160,1,161,0,1,0,100,1,83,0,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,58,0, - 0,0,114,61,0,0,0,41,4,114,30,0,0,0,218,8, - 101,120,99,95,116,121,112,101,218,9,101,120,99,95,118,97, - 108,117,101,218,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,57,0,0,0,117,3,0,0,115,6,0,0,0,8, - 2,4,128,255,128,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,55,0,0,0,114,57, - 0,0,0,114,10,0,0,0,114,10,0,0,0,114,10,0, - 0,0,114,11,0,0,0,114,182,0,0,0,109,3,0,0, - 115,10,0,0,0,8,0,4,2,8,2,12,4,255,128,114, - 182,0,0,0,99,3,0,0,0,0,0,0,0,0,0,0, - 0,5,0,0,0,5,0,0,0,67,0,0,0,115,64,0, - 0,0,124,1,160,0,100,1,124,2,100,2,24,0,161,2, - 125,3,116,1,124,3,131,1,124,2,107,0,114,36,116,2, - 100,3,131,1,130,1,124,3,100,4,25,0,125,4,124,0, - 114,60,100,5,160,3,124,4,124,0,161,2,83,0,124,4, - 83,0,41,7,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,129,0,0,0,114,39,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,22,0,0,0,250,5,123,125,46, - 123,125,78,41,4,218,6,114,115,112,108,105,116,218,3,108, - 101,110,114,80,0,0,0,114,46,0,0,0,41,5,114,17, - 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,122,3,0, - 0,115,12,0,0,0,16,2,12,1,8,1,8,1,20,1, - 255,128,114,191,0,0,0,99,3,0,0,0,0,0,0,0, - 0,0,0,0,4,0,0,0,4,0,0,0,67,0,0,0, - 115,34,0,0,0,124,0,160,0,124,1,124,2,161,2,125, - 3,124,3,100,0,117,0,114,24,100,0,83,0,116,1,124, - 1,124,3,131,2,83,0,114,13,0,0,0,41,2,114,171, - 0,0,0,114,92,0,0,0,41,4,218,6,102,105,110,100, - 101,114,114,17,0,0,0,114,168,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,102,105,110,100,95,115,112,101,99,95,108,101,103, - 97,99,121,131,3,0,0,115,10,0,0,0,12,3,8,1, - 4,1,10,1,255,128,114,193,0,0,0,99,3,0,0,0, - 0,0,0,0,0,0,0,0,10,0,0,0,10,0,0,0, - 67,0,0,0,115,28,1,0,0,116,0,106,1,125,3,124, - 3,100,1,117,0,114,22,116,2,100,2,131,1,130,1,124, - 3,115,38,116,3,160,4,100,3,116,5,161,2,1,0,124, - 0,116,0,106,6,118,0,125,4,124,3,68,0,93,226,125, - 5,116,7,131,0,143,94,1,0,122,10,124,5,106,8,125, - 6,87,0,110,54,4,0,116,9,121,128,1,0,1,0,1, - 0,116,10,124,5,124,0,124,1,131,3,125,7,124,7,100, - 1,117,0,114,124,89,0,87,0,100,1,4,0,4,0,131, - 3,1,0,113,52,89,0,110,14,48,0,124,6,124,0,124, - 1,124,2,131,3,125,7,87,0,100,1,4,0,4,0,131, - 3,1,0,110,16,49,0,115,162,48,0,1,0,1,0,1, - 0,89,0,1,0,124,7,100,1,117,1,114,52,124,4,144, - 1,115,16,124,0,116,0,106,6,118,0,144,1,114,16,116, - 0,106,6,124,0,25,0,125,8,122,10,124,8,106,11,125, - 9,87,0,110,26,4,0,116,9,121,244,1,0,1,0,1, - 0,124,7,6,0,89,0,2,0,1,0,83,0,48,0,124, - 9,100,1,117,0,144,1,114,8,124,7,2,0,1,0,83, - 0,124,9,2,0,1,0,83,0,124,7,2,0,1,0,83, - 0,100,1,83,0,41,4,122,21,70,105,110,100,32,97,32, - 109,111,100,117,108,101,39,115,32,115,112,101,99,46,78,122, - 53,115,121,115,46,109,101,116,97,95,112,97,116,104,32,105, - 115,32,78,111,110,101,44,32,80,121,116,104,111,110,32,105, - 115,32,108,105,107,101,108,121,32,115,104,117,116,116,105,110, - 103,32,100,111,119,110,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,12, - 114,15,0,0,0,218,9,109,101,116,97,95,112,97,116,104, - 114,80,0,0,0,218,9,95,119,97,114,110,105,110,103,115, - 218,4,119,97,114,110,218,13,73,109,112,111,114,116,87,97, - 114,110,105,110,103,114,93,0,0,0,114,182,0,0,0,114, - 170,0,0,0,114,107,0,0,0,114,193,0,0,0,114,106, - 0,0,0,41,10,114,17,0,0,0,114,168,0,0,0,114, - 169,0,0,0,114,194,0,0,0,90,9,105,115,95,114,101, - 108,111,97,100,114,192,0,0,0,114,170,0,0,0,114,96, - 0,0,0,114,97,0,0,0,114,106,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,140,3,0,0,115,56,0,0, - 0,6,2,8,1,8,2,4,3,12,1,10,5,8,1,8, - 1,2,1,10,1,12,1,12,1,8,1,22,1,42,2,8, - 1,18,2,10,1,2,1,10,1,12,1,14,4,10,2,8, - 1,8,2,8,2,4,2,255,128,114,198,0,0,0,99,3, - 0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,5, - 0,0,0,67,0,0,0,115,106,0,0,0,116,0,124,0, - 116,1,131,2,115,28,116,2,100,1,160,3,116,4,124,0, - 131,1,161,1,131,1,130,1,124,2,100,2,107,0,114,44, - 116,5,100,3,131,1,130,1,124,2,100,2,107,4,114,82, - 116,0,124,1,116,1,131,2,115,70,116,2,100,4,131,1, - 130,1,124,1,115,82,116,6,100,5,131,1,130,1,124,0, - 115,102,124,2,100,2,107,2,114,102,116,5,100,6,131,1, - 130,1,100,7,83,0,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,22,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,54,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,119,105,116, - 104,32,110,111,32,107,110,111,119,110,32,112,97,114,101,110, - 116,32,112,97,99,107,97,103,101,122,17,69,109,112,116,121, - 32,109,111,100,117,108,101,32,110,97,109,101,78,41,7,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,46,0,0,0, - 114,14,0,0,0,218,10,86,97,108,117,101,69,114,114,111, - 114,114,80,0,0,0,169,3,114,17,0,0,0,114,189,0, - 0,0,114,190,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,187,3,0,0,115,26,0,0,0,10,2, - 18,1,8,1,8,1,8,1,10,1,8,1,4,1,8,1, - 12,2,8,1,4,128,255,128,114,204,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,0,0, - 0,0,9,0,0,0,8,0,0,0,67,0,0,0,115,20, - 1,0,0,100,0,125,2,124,0,160,0,100,1,161,1,100, - 2,25,0,125,3,124,3,114,128,124,3,116,1,106,2,118, - 1,114,42,116,3,124,1,124,3,131,2,1,0,124,0,116, - 1,106,2,118,0,114,62,116,1,106,2,124,0,25,0,83, - 0,116,1,106,2,124,3,25,0,125,4,122,10,124,4,106, - 4,125,2,87,0,110,44,4,0,116,5,121,126,1,0,1, - 0,1,0,116,6,100,3,23,0,160,7,124,0,124,3,161, - 2,125,5,116,8,124,5,124,0,100,4,141,2,100,0,130, - 2,48,0,116,9,124,0,124,2,131,2,125,6,124,6,100, - 0,117,0,114,164,116,8,116,6,160,7,124,0,161,1,124, - 0,100,4,141,2,130,1,116,10,124,6,131,1,125,7,124, - 3,144,1,114,16,116,1,106,2,124,3,25,0,125,4,124, - 0,160,0,100,1,161,1,100,5,25,0,125,8,122,18,116, - 11,124,4,124,8,124,7,131,3,1,0,87,0,124,7,83, - 0,4,0,116,5,144,1,121,14,1,0,1,0,1,0,100, - 6,124,3,155,2,100,7,124,8,155,2,157,4,125,5,116, - 12,160,13,124,5,116,14,161,2,1,0,89,0,124,7,83, - 0,48,0,124,7,83,0,41,8,78,114,129,0,0,0,114, - 22,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,16,0, - 0,0,233,2,0,0,0,122,27,67,97,110,110,111,116,32, - 115,101,116,32,97,110,32,97,116,116,114,105,98,117,116,101, - 32,111,110,32,122,18,32,102,111,114,32,99,104,105,108,100, - 32,109,111,100,117,108,101,32,41,15,114,130,0,0,0,114, - 15,0,0,0,114,93,0,0,0,114,68,0,0,0,114,142, - 0,0,0,114,107,0,0,0,218,8,95,69,82,82,95,77, - 83,71,114,46,0,0,0,218,19,77,111,100,117,108,101,78, - 111,116,70,111,117,110,100,69,114,114,111,114,114,198,0,0, - 0,114,160,0,0,0,114,5,0,0,0,114,195,0,0,0, - 114,196,0,0,0,114,197,0,0,0,41,9,114,17,0,0, - 0,218,7,105,109,112,111,114,116,95,114,168,0,0,0,114, - 131,0,0,0,90,13,112,97,114,101,110,116,95,109,111,100, - 117,108,101,114,158,0,0,0,114,96,0,0,0,114,97,0, - 0,0,90,5,99,104,105,108,100,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,206,3,0,0,115,60,0,0,0,4,1,14,1,4,1, - 10,1,10,1,10,2,10,1,10,1,2,1,10,1,12,1, - 16,1,16,1,10,1,8,1,18,1,8,2,6,1,10,2, - 14,1,2,1,14,1,4,4,14,253,16,1,14,1,4,1, - 2,255,4,1,255,128,114,209,0,0,0,99,2,0,0,0, - 0,0,0,0,0,0,0,0,4,0,0,0,8,0,0,0, - 67,0,0,0,115,128,0,0,0,116,0,124,0,131,1,143, - 62,1,0,116,1,106,2,160,3,124,0,116,4,161,2,125, - 2,124,2,116,4,117,0,114,56,116,5,124,0,124,1,131, - 2,87,0,2,0,100,1,4,0,4,0,131,3,1,0,83, - 0,87,0,100,1,4,0,4,0,131,3,1,0,110,16,49, - 0,115,76,48,0,1,0,1,0,1,0,89,0,1,0,124, - 2,100,1,117,0,114,116,100,2,160,6,124,0,161,1,125, - 3,116,7,124,3,124,0,100,3,141,2,130,1,116,8,124, - 0,131,1,1,0,124,2,83,0,41,4,122,25,70,105,110, - 100,32,97,110,100,32,108,111,97,100,32,116,104,101,32,109, - 111,100,117,108,101,46,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,16,0,0,0,41,9,114,51,0,0,0,114,15,0, - 0,0,114,93,0,0,0,114,35,0,0,0,218,14,95,78, - 69,69,68,83,95,76,79,65,68,73,78,71,114,209,0,0, - 0,114,46,0,0,0,114,207,0,0,0,114,66,0,0,0, - 41,4,114,17,0,0,0,114,208,0,0,0,114,97,0,0, - 0,114,76,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,241,3,0,0,115,24,0,0,0,10,2, - 14,1,8,1,54,1,8,2,4,1,2,1,4,255,12,2, - 8,2,4,1,255,128,114,211,0,0,0,114,22,0,0,0, - 99,3,0,0,0,0,0,0,0,0,0,0,0,3,0,0, - 0,4,0,0,0,67,0,0,0,115,42,0,0,0,116,0, - 124,0,124,1,124,2,131,3,1,0,124,2,100,1,107,4, - 114,32,116,1,124,0,124,1,124,2,131,3,125,0,116,2, - 124,0,116,3,131,2,83,0,41,3,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,22,0,0,0,78,41,4,114,204,0,0,0,114,191, - 0,0,0,114,211,0,0,0,218,11,95,103,99,100,95,105, - 109,112,111,114,116,114,203,0,0,0,114,10,0,0,0,114, - 10,0,0,0,114,11,0,0,0,114,212,0,0,0,1,4, - 0,0,115,10,0,0,0,12,9,8,1,12,1,10,1,255, - 128,114,212,0,0,0,169,1,218,9,114,101,99,117,114,115, - 105,118,101,99,3,0,0,0,0,0,0,0,1,0,0,0, - 8,0,0,0,11,0,0,0,67,0,0,0,115,216,0,0, - 0,124,1,68,0,93,206,125,4,116,0,124,4,116,1,131, - 2,115,64,124,3,114,34,124,0,106,2,100,1,23,0,125, - 5,110,4,100,2,125,5,116,3,100,3,124,5,155,0,100, - 4,116,4,124,4,131,1,106,2,155,0,157,4,131,1,130, - 1,124,4,100,5,107,2,114,106,124,3,115,4,116,5,124, - 0,100,6,131,2,114,4,116,6,124,0,124,0,106,7,124, - 2,100,7,100,8,141,4,1,0,113,4,116,5,124,0,124, - 4,131,2,115,4,100,9,160,8,124,0,106,2,124,4,161, - 2,125,6,122,14,116,9,124,2,124,6,131,2,1,0,87, - 0,113,4,4,0,116,10,121,210,1,0,125,7,1,0,122, - 42,124,7,106,11,124,6,107,2,114,200,116,12,106,13,160, - 14,124,6,116,15,161,2,100,10,117,1,114,200,87,0,89, - 0,100,10,125,7,126,7,113,4,130,0,100,10,125,7,126, - 7,48,0,48,0,124,0,83,0,41,11,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,122,8,46,95,95, - 97,108,108,95,95,122,13,96,96,102,114,111,109,32,108,105, - 115,116,39,39,122,8,73,116,101,109,32,105,110,32,122,18, - 32,109,117,115,116,32,98,101,32,115,116,114,44,32,110,111, - 116,32,250,1,42,218,7,95,95,97,108,108,95,95,84,114, - 213,0,0,0,114,186,0,0,0,78,41,16,114,199,0,0, - 0,114,200,0,0,0,114,1,0,0,0,114,201,0,0,0, - 114,14,0,0,0,114,4,0,0,0,218,16,95,104,97,110, - 100,108,101,95,102,114,111,109,108,105,115,116,114,216,0,0, - 0,114,46,0,0,0,114,68,0,0,0,114,207,0,0,0, - 114,17,0,0,0,114,15,0,0,0,114,93,0,0,0,114, - 35,0,0,0,114,210,0,0,0,41,8,114,97,0,0,0, - 218,8,102,114,111,109,108,105,115,116,114,208,0,0,0,114, - 214,0,0,0,218,1,120,90,5,119,104,101,114,101,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,114,217,0, - 0,0,16,4,0,0,115,52,0,0,0,8,10,10,1,4, - 1,12,1,4,2,10,1,8,1,8,255,8,2,14,1,10, - 1,2,1,8,255,10,2,14,1,2,1,14,1,14,1,10, - 4,16,1,2,255,12,2,2,1,10,128,4,1,255,128,114, - 217,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0, - 0,3,0,0,0,6,0,0,0,67,0,0,0,115,146,0, - 0,0,124,0,160,0,100,1,161,1,125,1,124,0,160,0, - 100,2,161,1,125,2,124,1,100,3,117,1,114,82,124,2, - 100,3,117,1,114,78,124,1,124,2,106,1,107,3,114,78, - 116,2,106,3,100,4,124,1,155,2,100,5,124,2,106,1, - 155,2,100,6,157,5,116,4,100,7,100,8,141,3,1,0, - 124,1,83,0,124,2,100,3,117,1,114,96,124,2,106,1, - 83,0,116,2,106,3,100,9,116,4,100,7,100,8,141,3, - 1,0,124,0,100,10,25,0,125,1,100,11,124,0,118,1, - 114,142,124,1,160,5,100,12,161,1,100,13,25,0,125,1, - 124,1,83,0,41,14,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, - 146,0,0,0,114,106,0,0,0,78,122,32,95,95,112,97, - 99,107,97,103,101,95,95,32,33,61,32,95,95,115,112,101, - 99,95,95,46,112,97,114,101,110,116,32,40,122,4,32,33, - 61,32,250,1,41,233,3,0,0,0,41,1,90,10,115,116, - 97,99,107,108,101,118,101,108,122,89,99,97,110,39,116,32, - 114,101,115,111,108,118,101,32,112,97,99,107,97,103,101,32, - 102,114,111,109,32,95,95,115,112,101,99,95,95,32,111,114, - 32,95,95,112,97,99,107,97,103,101,95,95,44,32,102,97, - 108,108,105,110,103,32,98,97,99,107,32,111,110,32,95,95, - 110,97,109,101,95,95,32,97,110,100,32,95,95,112,97,116, - 104,95,95,114,1,0,0,0,114,142,0,0,0,114,129,0, - 0,0,114,22,0,0,0,41,6,114,35,0,0,0,114,131, - 0,0,0,114,195,0,0,0,114,196,0,0,0,114,197,0, - 0,0,114,130,0,0,0,41,3,218,7,103,108,111,98,97, - 108,115,114,189,0,0,0,114,96,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,53,4, - 0,0,115,44,0,0,0,10,7,10,1,8,1,18,1,6, - 1,2,1,4,255,4,1,6,255,4,2,6,254,4,3,8, - 1,6,1,6,2,4,2,6,254,8,3,8,1,14,1,4, - 1,255,128,114,223,0,0,0,114,10,0,0,0,99,5,0, - 0,0,0,0,0,0,0,0,0,0,9,0,0,0,5,0, - 0,0,67,0,0,0,115,174,0,0,0,124,4,100,1,107, - 2,114,18,116,0,124,0,131,1,125,5,110,36,124,1,100, - 2,117,1,114,30,124,1,110,2,105,0,125,6,116,1,124, - 6,131,1,125,7,116,0,124,0,124,7,124,4,131,3,125, - 5,124,3,115,148,124,4,100,1,107,2,114,84,116,0,124, - 0,160,2,100,3,161,1,100,1,25,0,131,1,83,0,124, - 0,115,92,124,5,83,0,116,3,124,0,131,1,116,3,124, - 0,160,2,100,3,161,1,100,1,25,0,131,1,24,0,125, - 8,116,4,106,5,124,5,106,6,100,2,116,3,124,5,106, - 6,131,1,124,8,24,0,133,2,25,0,25,0,83,0,116, - 7,124,5,100,4,131,2,114,170,116,8,124,5,124,3,116, - 0,131,3,83,0,124,5,83,0,41,5,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,22,0,0,0,78,114,129,0, - 0,0,114,142,0,0,0,41,9,114,212,0,0,0,114,223, - 0,0,0,218,9,112,97,114,116,105,116,105,111,110,114,188, - 0,0,0,114,15,0,0,0,114,93,0,0,0,114,1,0, - 0,0,114,4,0,0,0,114,217,0,0,0,41,9,114,17, - 0,0,0,114,222,0,0,0,218,6,108,111,99,97,108,115, - 114,218,0,0,0,114,190,0,0,0,114,97,0,0,0,90, - 8,103,108,111,98,97,108,115,95,114,189,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,80,4,0,0,115,32,0,0,0,8,11,10,1,16, - 2,8,1,12,1,4,1,8,3,18,1,4,1,4,1,26, - 4,30,3,10,1,12,1,4,2,255,128,114,226,0,0,0, - 99,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0, 0,3,0,0,0,67,0,0,0,115,38,0,0,0,116,0, - 160,1,124,0,161,1,125,1,124,1,100,0,117,0,114,30, - 116,2,100,1,124,0,23,0,131,1,130,1,116,3,124,1, - 131,1,83,0,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,4,114,162,0,0,0,114,170,0,0,0,114,80, - 0,0,0,114,160,0,0,0,41,2,114,17,0,0,0,114, - 96,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,117,4,0,0,115,10,0,0,0, - 10,1,8,1,12,1,8,1,255,128,114,227,0,0,0,99, - 2,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0, - 5,0,0,0,67,0,0,0,115,164,0,0,0,124,1,97, - 0,124,0,97,1,116,2,116,1,131,1,125,2,116,1,106, - 3,160,4,161,0,68,0,93,70,92,2,125,3,125,4,116, - 5,124,4,124,2,131,2,114,26,124,3,116,1,106,6,118, - 0,114,60,116,7,125,5,110,16,116,0,160,8,124,3,161, - 1,114,26,116,9,125,5,110,0,116,10,124,4,124,5,131, - 2,125,6,116,11,124,6,124,4,131,2,1,0,113,26,116, - 1,106,3,116,12,25,0,125,7,100,1,68,0,93,46,125, - 8,124,8,116,1,106,3,118,1,114,136,116,13,124,8,131, - 1,125,9,110,10,116,1,106,3,124,8,25,0,125,9,116, - 14,124,7,124,8,124,9,131,3,1,0,113,112,100,2,83, - 0,41,3,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,41, - 3,114,23,0,0,0,114,195,0,0,0,114,65,0,0,0, - 78,41,15,114,58,0,0,0,114,15,0,0,0,114,14,0, - 0,0,114,93,0,0,0,218,5,105,116,101,109,115,114,199, - 0,0,0,114,79,0,0,0,114,162,0,0,0,114,89,0, - 0,0,114,177,0,0,0,114,143,0,0,0,114,149,0,0, - 0,114,1,0,0,0,114,227,0,0,0,114,5,0,0,0, - 41,10,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,17,0,0,0,114,97,0, - 0,0,114,110,0,0,0,114,96,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,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,218,6,95,115,101,116,117,112,124,4, - 0,0,115,38,0,0,0,4,9,4,1,8,3,18,1,10, - 1,10,1,6,1,10,1,6,1,10,3,12,1,10,3,8, - 1,10,1,10,1,10,2,14,1,4,128,255,128,114,231,0, - 0,0,99,2,0,0,0,0,0,0,0,0,0,0,0,2, - 0,0,0,3,0,0,0,67,0,0,0,115,38,0,0,0, - 116,0,124,0,124,1,131,2,1,0,116,1,106,2,160,3, - 116,4,161,1,1,0,116,1,106,2,160,3,116,5,161,1, - 1,0,100,1,83,0,41,2,122,48,73,110,115,116,97,108, - 108,32,105,109,112,111,114,116,101,114,115,32,102,111,114,32, - 98,117,105,108,116,105,110,32,97,110,100,32,102,114,111,122, - 101,110,32,109,111,100,117,108,101,115,78,41,6,114,231,0, - 0,0,114,15,0,0,0,114,194,0,0,0,114,120,0,0, - 0,114,162,0,0,0,114,177,0,0,0,41,2,114,229,0, - 0,0,114,230,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,218,8,95,105,110,115,116,97,108,108, - 159,4,0,0,115,10,0,0,0,10,2,12,2,12,1,4, - 128,255,128,114,232,0,0,0,99,0,0,0,0,0,0,0, - 0,0,0,0,0,1,0,0,0,4,0,0,0,67,0,0, - 0,115,32,0,0,0,100,1,100,2,108,0,125,0,124,0, - 97,1,124,0,160,2,116,3,106,4,116,5,25,0,161,1, - 1,0,100,2,83,0,41,3,122,57,73,110,115,116,97,108, - 108,32,105,109,112,111,114,116,101,114,115,32,116,104,97,116, - 32,114,101,113,117,105,114,101,32,101,120,116,101,114,110,97, - 108,32,102,105,108,101,115,121,115,116,101,109,32,97,99,99, - 101,115,115,114,22,0,0,0,78,41,6,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,127,0,0,0,114,232,0,0, - 0,114,15,0,0,0,114,93,0,0,0,114,1,0,0,0, - 41,1,114,233,0,0,0,114,10,0,0,0,114,10,0,0, - 0,114,11,0,0,0,218,27,95,105,110,115,116,97,108,108, - 95,101,120,116,101,114,110,97,108,95,105,109,112,111,114,116, - 101,114,115,167,4,0,0,115,10,0,0,0,8,3,4,1, - 16,1,4,128,255,128,114,234,0,0,0,41,2,78,78,41, - 1,78,41,2,78,114,22,0,0,0,41,4,78,78,114,10, - 0,0,0,114,22,0,0,0,41,53,114,3,0,0,0,114, - 23,0,0,0,114,195,0,0,0,114,65,0,0,0,114,127, - 0,0,0,114,12,0,0,0,114,18,0,0,0,114,60,0, - 0,0,114,34,0,0,0,114,44,0,0,0,114,19,0,0, - 0,114,20,0,0,0,114,50,0,0,0,114,51,0,0,0, - 114,54,0,0,0,114,66,0,0,0,114,68,0,0,0,114, - 77,0,0,0,114,87,0,0,0,114,91,0,0,0,114,98, - 0,0,0,114,112,0,0,0,114,113,0,0,0,114,92,0, - 0,0,114,143,0,0,0,114,149,0,0,0,114,153,0,0, - 0,114,108,0,0,0,114,94,0,0,0,114,159,0,0,0, - 114,160,0,0,0,114,95,0,0,0,114,162,0,0,0,114, - 177,0,0,0,114,182,0,0,0,114,191,0,0,0,114,193, - 0,0,0,114,198,0,0,0,114,204,0,0,0,90,15,95, - 69,82,82,95,77,83,71,95,80,82,69,70,73,88,114,206, - 0,0,0,114,209,0,0,0,218,6,111,98,106,101,99,116, - 114,210,0,0,0,114,211,0,0,0,114,212,0,0,0,114, - 217,0,0,0,114,223,0,0,0,114,226,0,0,0,114,227, - 0,0,0,114,231,0,0,0,114,232,0,0,0,114,234,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, - 1,0,0,0,115,106,0,0,0,4,0,4,25,4,1,4, - 1,4,3,8,3,8,8,4,8,4,2,16,3,14,4,14, - 77,14,21,8,16,8,37,8,17,14,11,8,8,8,11,8, - 12,8,16,14,36,16,101,10,26,14,45,8,72,8,17,8, - 17,8,30,8,37,8,42,14,15,14,75,14,79,8,13,8, - 9,10,9,8,47,4,16,8,1,8,2,6,32,8,3,10, - 16,14,15,8,37,10,27,8,37,8,7,8,35,8,8,4, - 128,255,128, + 124,0,124,1,131,2,1,0,116,1,106,2,160,3,116,4, + 161,1,1,0,116,1,106,2,160,3,116,5,161,1,1,0, + 100,1,83,0,41,2,122,48,73,110,115,116,97,108,108,32, + 105,109,112,111,114,116,101,114,115,32,102,111,114,32,98,117, + 105,108,116,105,110,32,97,110,100,32,102,114,111,122,101,110, + 32,109,111,100,117,108,101,115,78,41,6,114,235,0,0,0, + 114,18,0,0,0,114,201,0,0,0,114,126,0,0,0,114, + 169,0,0,0,114,184,0,0,0,41,2,114,233,0,0,0, + 114,234,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,218,8,95,105,110,115,116,97,108,108,171,4, + 0,0,115,8,0,0,0,10,2,12,2,16,1,255,128,114, + 236,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0, + 0,1,0,0,0,4,0,0,0,67,0,0,0,115,32,0, + 0,0,100,1,100,2,108,0,125,0,124,0,97,1,124,0, + 160,2,116,3,106,4,116,5,25,0,161,1,1,0,100,2, + 83,0,41,3,122,57,73,110,115,116,97,108,108,32,105,109, + 112,111,114,116,101,114,115,32,116,104,97,116,32,114,101,113, + 117,105,114,101,32,101,120,116,101,114,110,97,108,32,102,105, + 108,101,115,121,115,116,101,109,32,97,99,99,101,115,115,114, + 25,0,0,0,78,41,6,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,133,0,0,0,114,236,0,0,0,114,18,0, + 0,0,114,99,0,0,0,114,9,0,0,0,41,1,114,237, + 0,0,0,114,5,0,0,0,114,5,0,0,0,114,6,0, + 0,0,218,27,95,105,110,115,116,97,108,108,95,101,120,116, + 101,114,110,97,108,95,105,109,112,111,114,116,101,114,115,179, + 4,0,0,115,8,0,0,0,8,3,4,1,20,1,255,128, + 114,238,0,0,0,41,2,78,78,41,1,78,41,2,78,114, + 25,0,0,0,41,4,78,78,114,5,0,0,0,114,25,0, + 0,0,41,54,114,10,0,0,0,114,7,0,0,0,114,26, + 0,0,0,114,95,0,0,0,114,68,0,0,0,114,133,0, + 0,0,114,17,0,0,0,114,21,0,0,0,114,63,0,0, + 0,114,37,0,0,0,114,47,0,0,0,114,22,0,0,0, + 114,23,0,0,0,114,53,0,0,0,114,54,0,0,0,114, + 57,0,0,0,114,69,0,0,0,114,71,0,0,0,114,80, + 0,0,0,114,90,0,0,0,114,94,0,0,0,114,105,0, + 0,0,114,118,0,0,0,114,119,0,0,0,114,98,0,0, + 0,114,149,0,0,0,114,155,0,0,0,114,159,0,0,0, + 114,114,0,0,0,114,100,0,0,0,114,166,0,0,0,114, + 167,0,0,0,114,101,0,0,0,114,169,0,0,0,114,184, + 0,0,0,114,189,0,0,0,114,198,0,0,0,114,200,0, + 0,0,114,202,0,0,0,114,208,0,0,0,90,15,95,69, + 82,82,95,77,83,71,95,80,82,69,70,73,88,114,210,0, + 0,0,114,213,0,0,0,218,6,111,98,106,101,99,116,114, + 214,0,0,0,114,215,0,0,0,114,216,0,0,0,114,221, + 0,0,0,114,227,0,0,0,114,230,0,0,0,114,231,0, + 0,0,114,235,0,0,0,114,236,0,0,0,114,238,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,6,0,0,0,218,8,60,109,111,100,117,108,101,62,1, + 0,0,0,115,106,0,0,0,4,0,8,22,4,9,4,1, + 4,1,4,3,8,3,8,8,4,8,4,2,16,3,14,4, + 14,77,14,21,8,16,8,37,8,17,14,11,8,8,8,11, + 8,12,8,19,14,36,16,101,10,26,14,45,8,72,8,17, + 8,17,8,30,8,36,8,45,14,15,14,75,14,80,8,13, + 8,9,10,9,8,47,4,16,8,1,8,2,6,32,8,3, + 10,16,14,15,8,37,10,27,8,37,8,7,8,35,12,8, + 255,128, }; diff --git a/Python/importlib_external.h b/Python/importlib_external.h index de4db360b06..93dcfb14105 100644 --- a/Python/importlib_external.h +++ b/Python/importlib_external.h @@ -79,126 +79,126 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 169,0,114,7,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, - 9,60,103,101,110,101,120,112,114,62,46,0,0,0,115,6, - 0,0,0,22,0,4,128,255,128,114,9,0,0,0,218,0, - 99,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,4,0,0,0,67,0,0,0,115,22,0,0,0,104,0, - 124,0,93,14,125,1,100,0,124,1,155,0,157,2,146,2, - 113,4,83,0,41,1,250,1,58,114,7,0,0,0,41,2, - 114,5,0,0,0,218,1,115,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,9,60,115,101,116,99,111,109, - 112,62,49,0,0,0,115,4,0,0,0,22,0,255,128,114, - 13,0,0,0,41,1,218,3,119,105,110,41,2,90,6,99, - 121,103,119,105,110,90,6,100,97,114,119,105,110,99,0,0, - 0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0, - 0,0,3,0,0,0,115,62,0,0,0,116,0,106,1,160, - 2,116,3,161,1,114,50,116,0,106,1,160,2,116,4,161, - 1,114,30,100,1,137,0,110,4,100,2,137,0,135,0,102, - 1,100,3,100,4,132,8,125,0,124,0,83,0,100,5,100, - 4,132,0,125,0,124,0,83,0,41,6,78,90,12,80,89, - 84,72,79,78,67,65,83,69,79,75,115,12,0,0,0,80, - 89,84,72,79,78,67,65,83,69,79,75,99,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 19,0,0,0,115,20,0,0,0,116,0,106,1,106,2,12, - 0,111,18,136,0,116,3,106,4,118,0,83,0,41,2,122, - 94,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,32,97,110,100,32,105,103,110,111,114,101, - 32,101,110,118,105,114,111,110,109,101,110,116,32,102,108,97, - 103,115,32,97,114,101,32,110,111,116,32,115,101,116,46,78, - 41,5,218,3,115,121,115,218,5,102,108,97,103,115,218,18, - 105,103,110,111,114,101,95,101,110,118,105,114,111,110,109,101, - 110,116,218,3,95,111,115,90,7,101,110,118,105,114,111,110, - 114,7,0,0,0,169,1,218,3,107,101,121,114,7,0,0, - 0,114,8,0,0,0,218,11,95,114,101,108,97,120,95,99, - 97,115,101,66,0,0,0,115,4,0,0,0,20,2,255,128, - 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,0,0,0,0,1,0,0,0,83,0,0,0, - 115,4,0,0,0,100,1,83,0,41,3,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,78,114,7,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,21,0, - 0,0,70,0,0,0,115,4,0,0,0,4,2,255,128,41, - 5,114,15,0,0,0,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,218,35,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,95,83,84,82,95,75,69,89,41,1, - 114,21,0,0,0,114,7,0,0,0,114,19,0,0,0,114, - 8,0,0,0,218,16,95,109,97,107,101,95,114,101,108,97, - 120,95,99,97,115,101,59,0,0,0,115,18,0,0,0,12, - 1,12,1,6,1,4,2,12,2,4,7,8,253,4,3,255, - 128,114,26,0,0,0,99,1,0,0,0,0,0,0,0,0, - 0,0,0,1,0,0,0,4,0,0,0,67,0,0,0,115, - 20,0,0,0,116,0,124,0,131,1,100,1,64,0,160,1, - 100,2,100,3,161,2,83,0,41,5,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,236,3,0,0,0,255,127,255,127,3, - 0,233,4,0,0,0,218,6,108,105,116,116,108,101,78,41, - 2,218,3,105,110,116,218,8,116,111,95,98,121,116,101,115, - 41,1,218,1,120,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,218,12,95,112,97,99,107,95,117,105,110,116, - 51,50,78,0,0,0,115,4,0,0,0,20,2,255,128,114, - 33,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0, - 0,1,0,0,0,4,0,0,0,67,0,0,0,115,28,0, - 0,0,116,0,124,0,131,1,100,1,107,2,115,16,74,0, - 130,1,116,1,160,2,124,0,100,2,161,2,83,0,41,4, - 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,28,0,0,0,114,29,0,0,0,78,169,3,114,4, - 0,0,0,114,30,0,0,0,218,10,102,114,111,109,95,98, - 121,116,101,115,169,1,218,4,100,97,116,97,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,14,95,117,110, - 112,97,99,107,95,117,105,110,116,51,50,83,0,0,0,115, - 6,0,0,0,16,2,12,1,255,128,114,38,0,0,0,99, - 1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, - 4,0,0,0,67,0,0,0,115,28,0,0,0,116,0,124, - 0,131,1,100,1,107,2,115,16,74,0,130,1,116,1,160, - 2,124,0,100,2,161,2,83,0,41,4,122,47,67,111,110, - 118,101,114,116,32,50,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,233,2,0,0, - 0,114,29,0,0,0,78,114,34,0,0,0,114,36,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 218,14,95,117,110,112,97,99,107,95,117,105,110,116,49,54, - 88,0,0,0,115,6,0,0,0,16,2,12,1,255,128,114, - 40,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0, - 0,1,0,0,0,4,0,0,0,71,0,0,0,115,20,0, - 0,0,116,0,160,1,100,1,100,2,132,0,124,0,68,0, - 131,1,161,1,83,0,41,4,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,0,0,0,0,2,0,0,0,5,0,0,0,83,0, - 0,0,115,26,0,0,0,103,0,124,0,93,18,125,1,124, - 1,114,4,124,1,160,0,116,1,161,1,145,2,113,4,83, - 0,114,7,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,114,5,0,0,0,218,4,112,97,114,116,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,10,60, - 108,105,115,116,99,111,109,112,62,96,0,0,0,115,8,0, - 0,0,6,0,6,1,14,255,255,128,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,78,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,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,218,10,95,112,97,116, - 104,95,106,111,105,110,94,0,0,0,115,8,0,0,0,10, - 2,2,1,8,255,255,128,114,48,0,0,0,99,1,0,0, - 0,0,0,0,0,0,0,0,0,5,0,0,0,5,0,0, - 0,67,0,0,0,115,94,0,0,0,116,0,116,1,131,1, - 100,1,107,2,114,36,124,0,160,2,116,3,161,1,92,3, - 125,1,125,2,125,3,124,1,124,3,102,2,83,0,116,4, - 124,0,131,1,68,0,93,40,125,4,124,4,116,1,118,0, - 114,44,124,0,106,5,124,4,100,1,100,2,141,2,92,2, - 125,1,125,3,124,1,124,3,102,2,2,0,1,0,83,0, + 9,60,103,101,110,101,120,112,114,62,46,0,0,0,115,4, + 0,0,0,26,0,255,128,114,9,0,0,0,218,0,99,1, + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,4, + 0,0,0,67,0,0,0,115,22,0,0,0,104,0,124,0, + 93,14,125,1,100,0,124,1,155,0,157,2,146,2,113,4, + 83,0,41,1,250,1,58,114,7,0,0,0,41,2,114,5, + 0,0,0,218,1,115,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,218,9,60,115,101,116,99,111,109,112,62, + 49,0,0,0,115,4,0,0,0,22,0,255,128,114,13,0, + 0,0,41,1,218,3,119,105,110,41,2,90,6,99,121,103, + 119,105,110,90,6,100,97,114,119,105,110,99,0,0,0,0, + 0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0, + 3,0,0,0,115,62,0,0,0,116,0,106,1,160,2,116, + 3,161,1,114,50,116,0,106,1,160,2,116,4,161,1,114, + 30,100,1,137,0,110,4,100,2,137,0,135,0,102,1,100, + 3,100,4,132,8,125,0,124,0,83,0,100,5,100,4,132, + 0,125,0,124,0,83,0,41,6,78,90,12,80,89,84,72, + 79,78,67,65,83,69,79,75,115,12,0,0,0,80,89,84, + 72,79,78,67,65,83,69,79,75,99,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,19,0, + 0,0,115,20,0,0,0,116,0,106,1,106,2,12,0,111, + 18,136,0,116,3,106,4,118,0,83,0,41,2,122,94,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,32,97,110,100,32,105,103,110,111,114,101,32,101, + 110,118,105,114,111,110,109,101,110,116,32,102,108,97,103,115, + 32,97,114,101,32,110,111,116,32,115,101,116,46,78,41,5, + 218,3,115,121,115,218,5,102,108,97,103,115,218,18,105,103, + 110,111,114,101,95,101,110,118,105,114,111,110,109,101,110,116, + 218,3,95,111,115,90,7,101,110,118,105,114,111,110,114,7, + 0,0,0,169,1,218,3,107,101,121,114,7,0,0,0,114, + 8,0,0,0,218,11,95,114,101,108,97,120,95,99,97,115, + 101,66,0,0,0,115,4,0,0,0,20,2,255,128,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,0,0,0,0,1,0,0,0,83,0,0,0,115,4, + 0,0,0,100,1,83,0,41,3,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,78,114,7,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,21,0,0,0, + 70,0,0,0,115,4,0,0,0,4,2,255,128,41,5,114, + 15,0,0,0,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,218,35,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,95,83,84,82,95,75,69,89,41,1,114,21, + 0,0,0,114,7,0,0,0,114,19,0,0,0,114,8,0, + 0,0,218,16,95,109,97,107,101,95,114,101,108,97,120,95, + 99,97,115,101,59,0,0,0,115,18,0,0,0,12,1,12, + 1,6,1,4,2,12,2,4,7,8,253,4,3,255,128,114, + 26,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0, + 0,1,0,0,0,4,0,0,0,67,0,0,0,115,20,0, + 0,0,116,0,124,0,131,1,100,1,64,0,160,1,100,2, + 100,3,161,2,83,0,41,5,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,236,3,0,0,0,255,127,255,127,3,0,233, + 4,0,0,0,218,6,108,105,116,116,108,101,78,41,2,218, + 3,105,110,116,218,8,116,111,95,98,121,116,101,115,41,1, + 218,1,120,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,218,12,95,112,97,99,107,95,117,105,110,116,51,50, + 78,0,0,0,115,4,0,0,0,20,2,255,128,114,33,0, + 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,1, + 0,0,0,4,0,0,0,67,0,0,0,115,28,0,0,0, + 116,0,124,0,131,1,100,1,107,2,115,16,74,0,130,1, + 116,1,160,2,124,0,100,2,161,2,83,0,41,4,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, + 28,0,0,0,114,29,0,0,0,78,169,3,114,4,0,0, + 0,114,30,0,0,0,218,10,102,114,111,109,95,98,121,116, + 101,115,169,1,218,4,100,97,116,97,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,14,95,117,110,112,97, + 99,107,95,117,105,110,116,51,50,83,0,0,0,115,6,0, + 0,0,16,2,12,1,255,128,114,38,0,0,0,99,1,0, + 0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0, + 0,0,67,0,0,0,115,28,0,0,0,116,0,124,0,131, + 1,100,1,107,2,115,16,74,0,130,1,116,1,160,2,124, + 0,100,2,161,2,83,0,41,4,122,47,67,111,110,118,101, + 114,116,32,50,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,233,2,0,0,0,114, + 29,0,0,0,78,114,34,0,0,0,114,36,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,14, + 95,117,110,112,97,99,107,95,117,105,110,116,49,54,88,0, + 0,0,115,6,0,0,0,16,2,12,1,255,128,114,40,0, + 0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,1, + 0,0,0,4,0,0,0,71,0,0,0,115,20,0,0,0, + 116,0,160,1,100,1,100,2,132,0,124,0,68,0,131,1, + 161,1,83,0,41,4,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, + 0,0,0,0,2,0,0,0,5,0,0,0,83,0,0,0, + 115,26,0,0,0,103,0,124,0,93,18,125,1,124,1,114, + 4,124,1,160,0,116,1,161,1,145,2,113,4,83,0,114, + 7,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,114,5,0,0,0,218,4,112,97,114,116,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,10,60,108,105, + 115,116,99,111,109,112,62,96,0,0,0,115,8,0,0,0, + 6,0,6,1,14,255,255,128,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,78,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,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,218,10,95,112,97,116,104,95, + 106,111,105,110,94,0,0,0,115,8,0,0,0,10,2,2, + 1,8,255,255,128,114,48,0,0,0,99,1,0,0,0,0, + 0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,67, + 0,0,0,115,96,0,0,0,116,0,116,1,131,1,100,1, + 107,2,114,36,124,0,160,2,116,3,161,1,92,3,125,1, + 125,2,125,3,124,1,124,3,102,2,83,0,116,4,124,0, + 131,1,68,0,93,42,125,4,124,4,116,1,118,0,114,86, + 124,0,106,5,124,4,100,1,100,2,141,2,92,2,125,1, + 125,3,124,1,124,3,102,2,2,0,1,0,83,0,113,44, 100,3,124,0,102,2,83,0,41,5,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,114,3,0,0, @@ -210,1255 +210,1258 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 116,218,1,95,218,4,116,97,105,108,114,32,0,0,0,114, 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,11, 95,112,97,116,104,95,115,112,108,105,116,100,0,0,0,115, - 18,0,0,0,12,2,16,1,8,1,12,1,8,1,18,1, - 12,1,8,1,255,128,114,55,0,0,0,99,1,0,0,0, - 0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0, - 67,0,0,0,115,10,0,0,0,116,0,160,1,124,0,161, - 1,83,0,41,2,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,78,41,2,114,18,0,0,0,90,4,115, - 116,97,116,169,1,114,52,0,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,218,10,95,112,97,116,104, - 95,115,116,97,116,112,0,0,0,115,4,0,0,0,10,7, - 255,128,114,57,0,0,0,99,2,0,0,0,0,0,0,0, - 0,0,0,0,3,0,0,0,8,0,0,0,67,0,0,0, - 115,48,0,0,0,122,12,116,0,124,0,131,1,125,2,87, - 0,110,20,4,0,116,1,121,32,1,0,1,0,1,0,89, - 0,100,1,83,0,48,0,124,2,106,2,100,2,64,0,124, - 1,107,2,83,0,41,4,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, - 78,41,3,114,57,0,0,0,218,7,79,83,69,114,114,111, - 114,218,7,115,116,95,109,111,100,101,41,3,114,52,0,0, - 0,218,4,109,111,100,101,90,9,115,116,97,116,95,105,110, - 102,111,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,218,18,95,112,97,116,104,95,105,115,95,109,111,100,101, - 95,116,121,112,101,122,0,0,0,115,12,0,0,0,2,2, - 12,1,12,1,8,1,14,1,255,128,114,61,0,0,0,99, + 20,0,0,0,12,2,16,1,8,1,12,1,8,1,18,1, + 12,1,2,128,8,1,255,128,114,55,0,0,0,99,1,0, + 0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0, + 0,0,67,0,0,0,115,10,0,0,0,116,0,160,1,124, + 0,161,1,83,0,41,2,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,78,41,2,114,18,0,0,0,90, + 4,115,116,97,116,169,1,114,52,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,10,95,112,97, + 116,104,95,115,116,97,116,112,0,0,0,115,4,0,0,0, + 10,7,255,128,114,57,0,0,0,99,2,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,0,8,0,0,0,67,0, + 0,0,115,48,0,0,0,122,12,116,0,124,0,131,1,125, + 2,87,0,110,18,4,0,116,1,121,46,1,0,1,0,1, + 0,89,0,100,1,83,0,124,2,106,2,100,2,64,0,124, + 1,107,2,83,0,119,0,41,4,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,78,41,3,114,57,0,0,0,218,7,79,83,69,114, + 114,111,114,218,7,115,116,95,109,111,100,101,41,3,114,52, + 0,0,0,218,4,109,111,100,101,90,9,115,116,97,116,95, + 105,110,102,111,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,18,95,112,97,116,104,95,105,115,95,109,111, + 100,101,95,116,121,112,101,122,0,0,0,115,14,0,0,0, + 2,2,12,1,12,1,6,1,14,1,2,254,255,128,114,61, + 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,3,0,0,0,67,0,0,0,115,10,0,0, + 0,116,0,124,0,100,1,131,2,83,0,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,105,115,102,105,108,101,46,105,0, + 128,0,0,78,41,1,114,61,0,0,0,114,56,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, + 12,95,112,97,116,104,95,105,115,102,105,108,101,131,0,0, + 0,115,4,0,0,0,10,2,255,128,114,62,0,0,0,99, 1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, - 3,0,0,0,67,0,0,0,115,10,0,0,0,116,0,124, - 0,100,1,131,2,83,0,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,105,115,102,105,108,101,46,105,0,128,0,0,78, - 41,1,114,61,0,0,0,114,56,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,12,95,112,97, - 116,104,95,105,115,102,105,108,101,131,0,0,0,115,4,0, - 0,0,10,2,255,128,114,62,0,0,0,99,1,0,0,0, - 0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0, - 67,0,0,0,115,22,0,0,0,124,0,115,12,116,0,160, - 1,161,0,125,0,116,2,124,0,100,1,131,2,83,0,41, - 3,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,78,41,3,114,18,0,0,0,218,6, - 103,101,116,99,119,100,114,61,0,0,0,114,56,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 11,95,112,97,116,104,95,105,115,100,105,114,136,0,0,0, - 115,8,0,0,0,4,2,8,1,10,1,255,128,114,64,0, - 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,1, - 0,0,0,3,0,0,0,67,0,0,0,115,26,0,0,0, - 124,0,160,0,116,1,161,1,112,24,124,0,100,1,100,2, - 133,2,25,0,116,2,118,0,83,0,41,4,122,142,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,97,98,115,46,10,10,32,32, - 32,32,67,111,110,115,105,100,101,114,115,32,97,32,87,105, - 110,100,111,119,115,32,100,114,105,118,101,45,114,101,108,97, - 116,105,118,101,32,112,97,116,104,32,40,110,111,32,100,114, - 105,118,101,44,32,98,117,116,32,115,116,97,114,116,115,32, - 119,105,116,104,32,115,108,97,115,104,41,32,116,111,10,32, - 32,32,32,115,116,105,108,108,32,98,101,32,34,97,98,115, - 111,108,117,116,101,34,46,10,32,32,32,32,114,3,0,0, - 0,233,3,0,0,0,78,41,3,114,23,0,0,0,114,42, - 0,0,0,218,20,95,112,97,116,104,115,101,112,115,95,119, - 105,116,104,95,99,111,108,111,110,114,56,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,11,95, - 112,97,116,104,95,105,115,97,98,115,143,0,0,0,115,4, - 0,0,0,26,6,255,128,114,67,0,0,0,233,182,1,0, - 0,99,3,0,0,0,0,0,0,0,0,0,0,0,6,0, - 0,0,11,0,0,0,67,0,0,0,115,170,0,0,0,100, - 1,160,0,124,0,116,1,124,0,131,1,161,2,125,3,116, - 2,160,3,124,3,116,2,106,4,116,2,106,5,66,0,116, - 2,106,6,66,0,124,2,100,2,64,0,161,3,125,4,122, - 72,116,7,160,8,124,4,100,3,161,2,143,26,125,5,124, - 5,160,9,124,1,161,1,1,0,87,0,100,4,4,0,4, - 0,131,3,1,0,110,16,49,0,115,94,48,0,1,0,1, - 0,1,0,89,0,1,0,116,2,160,10,124,3,124,0,161, - 2,1,0,87,0,100,4,83,0,4,0,116,11,121,168,1, - 0,1,0,1,0,122,14,116,2,160,12,124,3,161,1,1, - 0,87,0,130,0,4,0,116,11,121,166,1,0,1,0,1, - 0,89,0,130,0,48,0,48,0,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,250, - 5,123,125,46,123,125,114,68,0,0,0,90,2,119,98,78, - 41,13,218,6,102,111,114,109,97,116,218,2,105,100,114,18, - 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,58,0,0,0,90,6,117,110,108,105,110,107,41,6, - 114,52,0,0,0,114,37,0,0,0,114,60,0,0,0,90, - 8,112,97,116,104,95,116,109,112,90,2,102,100,218,4,102, - 105,108,101,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,13,95,119,114,105,116,101,95,97,116,111,109,105, - 99,152,0,0,0,115,38,0,0,0,16,5,6,1,22,1, - 4,255,2,2,14,3,40,1,14,1,4,128,12,1,2,1, - 12,1,2,3,12,254,2,1,2,1,2,255,2,1,255,128, - 114,77,0,0,0,105,104,13,0,0,114,39,0,0,0,114, - 29,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,119,122,4,46,112,121,99,41, - 1,218,12,111,112,116,105,109,105,122,97,116,105,111,110,99, - 2,0,0,0,0,0,0,0,1,0,0,0,12,0,0,0, - 5,0,0,0,67,0,0,0,115,88,1,0,0,124,1,100, - 1,117,1,114,52,116,0,160,1,100,2,116,2,161,2,1, - 0,124,2,100,1,117,1,114,40,100,3,125,3,116,3,124, - 3,131,1,130,1,124,1,114,48,100,4,110,2,100,5,125, - 2,116,4,160,5,124,0,161,1,125,0,116,6,124,0,131, - 1,92,2,125,4,125,5,124,5,160,7,100,6,161,1,92, - 3,125,6,125,7,125,8,116,8,106,9,106,10,125,9,124, - 9,100,1,117,0,114,114,116,11,100,7,131,1,130,1,100, - 4,160,12,124,6,114,126,124,6,110,2,124,8,124,7,124, - 9,103,3,161,1,125,10,124,2,100,1,117,0,114,172,116, - 8,106,13,106,14,100,8,107,2,114,164,100,4,125,2,110, - 8,116,8,106,13,106,14,125,2,116,15,124,2,131,1,125, - 2,124,2,100,4,107,3,114,224,124,2,160,16,161,0,115, - 210,116,17,100,9,160,18,124,2,161,1,131,1,130,1,100, - 10,160,18,124,10,116,19,124,2,161,3,125,10,124,10,116, - 20,100,8,25,0,23,0,125,11,116,8,106,21,100,1,117, - 1,144,1,114,76,116,22,124,4,131,1,144,1,115,16,116, - 23,116,4,160,24,161,0,124,4,131,2,125,4,124,4,100, - 5,25,0,100,11,107,2,144,1,114,56,124,4,100,8,25, - 0,116,25,118,1,144,1,114,56,124,4,100,12,100,1,133, - 2,25,0,125,4,116,23,116,8,106,21,124,4,160,26,116, - 25,161,1,124,11,131,3,83,0,116,23,124,4,116,27,124, - 11,131,3,83,0,41,13,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,10,0,0,0,114,3,0,0, - 0,218,1,46,250,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,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,114,11,0,0,0,114,39,0,0,0,41,28,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,18, - 0,0,0,218,6,102,115,112,97,116,104,114,55,0,0,0, - 114,49,0,0,0,114,15,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,46,0,0,0,114, - 16,0,0,0,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,70,0,0,0,218,4,95, - 79,80,84,218,17,66,89,84,69,67,79,68,69,95,83,85, - 70,70,73,88,69,83,218,14,112,121,99,97,99,104,101,95, - 112,114,101,102,105,120,114,67,0,0,0,114,48,0,0,0, - 114,63,0,0,0,114,42,0,0,0,218,6,108,115,116,114, - 105,112,218,8,95,80,89,67,65,67,72,69,41,12,114,52, - 0,0,0,90,14,100,101,98,117,103,95,111,118,101,114,114, - 105,100,101,114,78,0,0,0,218,7,109,101,115,115,97,103, - 101,218,4,104,101,97,100,114,54,0,0,0,90,4,98,97, - 115,101,114,6,0,0,0,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,218,8,102,105,108,101,110,97,109,101,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,218,17,99,97, - 99,104,101,95,102,114,111,109,95,115,111,117,114,99,101,84, - 1,0,0,115,74,0,0,0,8,18,6,1,2,1,4,255, - 8,2,4,1,8,1,12,1,10,1,12,1,16,1,8,1, - 8,1,8,1,24,1,8,1,12,1,6,1,8,2,8,1, - 8,1,8,1,14,1,14,1,12,1,12,1,10,9,14,1, - 28,5,12,1,2,4,4,1,8,1,2,1,4,253,12,5, - 255,128,114,102,0,0,0,99,1,0,0,0,0,0,0,0, - 0,0,0,0,10,0,0,0,5,0,0,0,67,0,0,0, - 115,44,1,0,0,116,0,106,1,106,2,100,1,117,0,114, - 20,116,3,100,2,131,1,130,1,116,4,160,5,124,0,161, - 1,125,0,116,6,124,0,131,1,92,2,125,1,125,2,100, - 3,125,3,116,0,106,7,100,1,117,1,114,102,116,0,106, - 7,160,8,116,9,161,1,125,4,124,1,160,10,124,4,116, - 11,23,0,161,1,114,102,124,1,116,12,124,4,131,1,100, - 1,133,2,25,0,125,1,100,4,125,3,124,3,115,144,116, - 6,124,1,131,1,92,2,125,1,125,5,124,5,116,13,107, - 3,114,144,116,14,116,13,155,0,100,5,124,0,155,2,157, - 3,131,1,130,1,124,2,160,15,100,6,161,1,125,6,124, - 6,100,7,118,1,114,176,116,14,100,8,124,2,155,2,157, - 2,131,1,130,1,124,6,100,9,107,2,144,1,114,12,124, - 2,160,16,100,6,100,10,161,2,100,11,25,0,125,7,124, - 7,160,10,116,17,161,1,115,226,116,14,100,12,116,17,155, - 2,157,2,131,1,130,1,124,7,116,12,116,17,131,1,100, - 1,133,2,25,0,125,8,124,8,160,18,161,0,144,1,115, - 12,116,14,100,13,124,7,155,2,100,14,157,3,131,1,130, - 1,124,2,160,19,100,6,161,1,100,15,25,0,125,9,116, - 20,124,1,124,9,116,21,100,15,25,0,23,0,131,2,83, - 0,41,16,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,114,80,0,0,0,70,84,122,31, - 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,114, - 79,0,0,0,62,2,0,0,0,114,39,0,0,0,114,65, - 0,0,0,122,29,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,114,65,0,0,0,114,39,0,0,0,233,254,255,255, - 255,122,53,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,122,19,111,112,116,105,109,105, - 122,97,116,105,111,110,32,108,101,118,101,108,32,122,29,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,0,0,0, - 0,41,22,114,15,0,0,0,114,86,0,0,0,114,87,0, - 0,0,114,88,0,0,0,114,18,0,0,0,114,85,0,0, - 0,114,55,0,0,0,114,95,0,0,0,114,41,0,0,0, - 114,42,0,0,0,114,23,0,0,0,114,45,0,0,0,114, - 4,0,0,0,114,97,0,0,0,114,92,0,0,0,218,5, - 99,111,117,110,116,114,51,0,0,0,114,93,0,0,0,114, - 91,0,0,0,218,9,112,97,114,116,105,116,105,111,110,114, - 48,0,0,0,218,15,83,79,85,82,67,69,95,83,85,70, - 70,73,88,69,83,41,10,114,52,0,0,0,114,99,0,0, - 0,90,16,112,121,99,97,99,104,101,95,102,105,108,101,110, - 97,109,101,90,23,102,111,117,110,100,95,105,110,95,112,121, - 99,97,99,104,101,95,112,114,101,102,105,120,90,13,115,116, - 114,105,112,112,101,100,95,112,97,116,104,90,7,112,121,99, - 97,99,104,101,90,9,100,111,116,95,99,111,117,110,116,114, - 78,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,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,17,115, - 111,117,114,99,101,95,102,114,111,109,95,99,97,99,104,101, - 155,1,0,0,115,62,0,0,0,12,9,8,1,10,1,12, - 1,4,1,10,1,12,1,14,1,16,1,4,1,4,1,12, - 1,8,1,8,1,2,1,8,255,10,2,8,1,14,1,10, - 1,16,1,10,1,4,1,2,1,8,255,16,2,10,1,16, - 1,14,2,18,1,255,128,114,107,0,0,0,99,1,0,0, - 0,0,0,0,0,0,0,0,0,5,0,0,0,9,0,0, - 0,67,0,0,0,115,124,0,0,0,116,0,124,0,131,1, - 100,1,107,2,114,16,100,2,83,0,124,0,160,1,100,3, - 161,1,92,3,125,1,125,2,125,3,124,1,114,56,124,3, - 160,2,161,0,100,4,100,5,133,2,25,0,100,6,107,3, - 114,60,124,0,83,0,122,12,116,3,124,0,131,1,125,4, - 87,0,110,34,4,0,116,4,116,5,102,2,121,106,1,0, - 1,0,1,0,124,0,100,2,100,5,133,2,25,0,125,4, - 89,0,110,2,48,0,116,6,124,4,131,1,114,120,124,4, - 83,0,124,0,83,0,41,7,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,0,0,0,0,78,114,79,0,0, - 0,233,253,255,255,255,233,255,255,255,255,90,2,112,121,41, - 7,114,4,0,0,0,114,49,0,0,0,218,5,108,111,119, - 101,114,114,107,0,0,0,114,88,0,0,0,114,92,0,0, - 0,114,62,0,0,0,41,5,218,13,98,121,116,101,99,111, - 100,101,95,112,97,116,104,114,100,0,0,0,114,53,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,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,218,15,95,103,101,116,95,115, - 111,117,114,99,101,102,105,108,101,195,1,0,0,115,22,0, - 0,0,12,7,4,1,16,1,24,1,4,1,2,1,12,1, - 16,1,18,1,16,1,255,128,114,113,0,0,0,99,1,0, - 0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0, - 0,0,67,0,0,0,115,68,0,0,0,124,0,160,0,116, - 1,116,2,131,1,161,1,114,46,122,10,116,3,124,0,131, - 1,87,0,83,0,4,0,116,4,121,44,1,0,1,0,1, - 0,89,0,100,0,83,0,48,0,124,0,160,0,116,1,116, - 5,131,1,161,1,114,64,124,0,83,0,100,0,83,0,169, - 1,78,41,6,218,8,101,110,100,115,119,105,116,104,218,5, - 116,117,112,108,101,114,106,0,0,0,114,102,0,0,0,114, - 88,0,0,0,114,94,0,0,0,41,1,114,101,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 11,95,103,101,116,95,99,97,99,104,101,100,214,1,0,0, - 115,22,0,0,0,14,1,2,1,10,1,12,1,2,1,4, - 128,2,0,14,1,4,1,4,2,255,128,114,117,0,0,0, - 99,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,8,0,0,0,67,0,0,0,115,50,0,0,0,122,14, - 116,0,124,0,131,1,106,1,125,1,87,0,110,22,4,0, - 116,2,121,36,1,0,1,0,1,0,100,1,125,1,89,0, - 110,2,48,0,124,1,100,2,79,0,125,1,124,1,83,0, - 41,4,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,114,68,0,0,0,233,128,0,0, - 0,78,41,3,114,57,0,0,0,114,59,0,0,0,114,58, - 0,0,0,41,2,114,52,0,0,0,114,60,0,0,0,114, - 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,10, - 95,99,97,108,99,95,109,111,100,101,226,1,0,0,115,14, - 0,0,0,2,2,14,1,12,1,10,1,8,3,4,1,255, - 128,114,119,0,0,0,99,1,0,0,0,0,0,0,0,0, - 0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,115, - 52,0,0,0,100,6,135,0,102,1,100,2,100,3,132,9, - 125,1,116,0,100,1,117,1,114,30,116,0,106,1,125,2, - 110,8,100,4,100,5,132,0,125,2,124,2,124,1,136,0, - 131,2,1,0,124,1,83,0,41,7,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,0,0,0,0,4,0,0,0,4,0,0,0,31,0, - 0,0,115,72,0,0,0,124,1,100,0,117,0,114,16,124, - 0,106,0,125,1,110,32,124,0,106,0,124,1,107,3,114, - 48,116,1,100,1,124,0,106,0,124,1,102,2,22,0,124, - 1,100,2,141,2,130,1,136,0,124,0,124,1,103,2,124, - 2,162,1,82,0,105,0,124,3,164,1,142,1,83,0,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,169,1,218,4,110,97,109,101,41,2,114,121,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,121,0,0,0,218,4,97,114,103, - 115,218,6,107,119,97,114,103,115,169,1,218,6,109,101,116, - 104,111,100,114,7,0,0,0,114,8,0,0,0,218,19,95, - 99,104,101,99,107,95,110,97,109,101,95,119,114,97,112,112, - 101,114,246,1,0,0,115,20,0,0,0,8,1,8,1,10, - 1,4,1,8,1,2,255,2,1,6,255,24,2,255,128,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,0,0,0,0,3,0,0,0,7,0,0,0,83,0, - 0,0,115,56,0,0,0,100,1,68,0,93,32,125,2,116, - 0,124,1,124,2,131,2,114,4,116,1,124,0,124,2,116, - 2,124,1,124,2,131,2,131,3,1,0,113,4,124,0,106, - 3,160,4,124,1,106,3,161,1,1,0,100,0,83,0,41, - 2,78,41,4,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,75,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 218,5,95,119,114,97,112,3,2,0,0,115,12,0,0,0, - 8,1,10,1,20,1,14,1,4,128,255,128,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,1,78,41,2,218,10,95, - 98,111,111,116,115,116,114,97,112,114,138,0,0,0,41,3, - 114,127,0,0,0,114,128,0,0,0,114,138,0,0,0,114, - 7,0,0,0,114,126,0,0,0,114,8,0,0,0,218,11, - 95,99,104,101,99,107,95,110,97,109,101,238,1,0,0,115, - 14,0,0,0,14,8,8,10,8,1,8,2,10,6,4,1, - 255,128,114,140,0,0,0,99,2,0,0,0,0,0,0,0, - 0,0,0,0,5,0,0,0,6,0,0,0,67,0,0,0, - 115,60,0,0,0,124,0,160,0,124,1,161,1,92,2,125, - 2,125,3,124,2,100,1,117,0,114,56,116,1,124,3,131, - 1,114,56,100,2,125,4,116,2,160,3,124,4,160,4,124, - 3,100,3,25,0,161,1,116,5,161,2,1,0,124,2,83, - 0,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, - 0,0,0,0,41,6,218,11,102,105,110,100,95,108,111,97, - 100,101,114,114,4,0,0,0,114,81,0,0,0,114,82,0, - 0,0,114,70,0,0,0,218,13,73,109,112,111,114,116,87, - 97,114,110,105,110,103,41,5,114,123,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,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,17,95, - 102,105,110,100,95,109,111,100,117,108,101,95,115,104,105,109, - 13,2,0,0,115,12,0,0,0,14,10,16,1,4,1,22, - 1,4,1,255,128,114,147,0,0,0,99,3,0,0,0,0, - 0,0,0,0,0,0,0,6,0,0,0,4,0,0,0,67, - 0,0,0,115,166,0,0,0,124,0,100,1,100,2,133,2, - 25,0,125,3,124,3,116,0,107,3,114,64,100,3,124,1, - 155,2,100,4,124,3,155,2,157,4,125,4,116,1,160,2, - 100,5,124,4,161,2,1,0,116,3,124,4,102,1,105,0, - 124,2,164,1,142,1,130,1,116,4,124,0,131,1,100,6, - 107,0,114,106,100,7,124,1,155,2,157,2,125,4,116,1, - 160,2,100,5,124,4,161,2,1,0,116,5,124,4,131,1, - 130,1,116,6,124,0,100,2,100,8,133,2,25,0,131,1, - 125,5,124,5,100,9,64,0,114,162,100,10,124,5,155,2, - 100,11,124,1,155,2,157,4,125,4,116,3,124,4,102,1, - 105,0,124,2,164,1,142,1,130,1,124,5,83,0,41,12, - 97,84,2,0,0,80,101,114,102,111,114,109,32,98,97,115, - 105,99,32,118,97,108,105,100,105,116,121,32,99,104,101,99, - 107,105,110,103,32,111,102,32,97,32,112,121,99,32,104,101, - 97,100,101,114,32,97,110,100,32,114,101,116,117,114,110,32, - 116,104,101,32,102,108,97,103,115,32,102,105,101,108,100,44, - 10,32,32,32,32,119,104,105,99,104,32,100,101,116,101,114, - 109,105,110,101,115,32,104,111,119,32,116,104,101,32,112,121, - 99,32,115,104,111,117,108,100,32,98,101,32,102,117,114,116, - 104,101,114,32,118,97,108,105,100,97,116,101,100,32,97,103, - 97,105,110,115,116,32,116,104,101,32,115,111,117,114,99,101, + 3,0,0,0,67,0,0,0,115,22,0,0,0,124,0,115, + 12,116,0,160,1,161,0,125,0,116,2,124,0,100,1,131, + 2,83,0,41,3,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,78,41,3,114,18,0, + 0,0,218,6,103,101,116,99,119,100,114,61,0,0,0,114, + 56,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,11,95,112,97,116,104,95,105,115,100,105,114, + 136,0,0,0,115,8,0,0,0,4,2,8,1,10,1,255, + 128,114,64,0,0,0,99,1,0,0,0,0,0,0,0,0, + 0,0,0,1,0,0,0,3,0,0,0,67,0,0,0,115, + 26,0,0,0,124,0,160,0,116,1,161,1,112,24,124,0, + 100,1,100,2,133,2,25,0,116,2,118,0,83,0,41,4, + 122,142,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,97,98,115,46, + 10,10,32,32,32,32,67,111,110,115,105,100,101,114,115,32, + 97,32,87,105,110,100,111,119,115,32,100,114,105,118,101,45, + 114,101,108,97,116,105,118,101,32,112,97,116,104,32,40,110, + 111,32,100,114,105,118,101,44,32,98,117,116,32,115,116,97, + 114,116,115,32,119,105,116,104,32,115,108,97,115,104,41,32, + 116,111,10,32,32,32,32,115,116,105,108,108,32,98,101,32, + 34,97,98,115,111,108,117,116,101,34,46,10,32,32,32,32, + 114,3,0,0,0,233,3,0,0,0,78,41,3,114,23,0, + 0,0,114,42,0,0,0,218,20,95,112,97,116,104,115,101, + 112,115,95,119,105,116,104,95,99,111,108,111,110,114,56,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,218,11,95,112,97,116,104,95,105,115,97,98,115,143,0, + 0,0,115,4,0,0,0,26,6,255,128,114,67,0,0,0, + 233,182,1,0,0,99,3,0,0,0,0,0,0,0,0,0, + 0,0,6,0,0,0,11,0,0,0,67,0,0,0,115,174, + 0,0,0,100,1,160,0,124,0,116,1,124,0,131,1,161, + 2,125,3,116,2,160,3,124,3,116,2,106,4,116,2,106, + 5,66,0,116,2,106,6,66,0,124,2,100,2,64,0,161, + 3,125,4,122,72,116,7,160,8,124,4,100,3,161,2,143, + 26,125,5,124,5,160,9,124,1,161,1,1,0,87,0,100, + 4,4,0,4,0,131,3,1,0,110,16,49,0,115,94,119, + 1,1,0,1,0,1,0,89,0,1,0,116,2,160,10,124, + 3,124,0,161,2,1,0,87,0,100,4,83,0,4,0,116, + 11,121,172,1,0,1,0,1,0,122,14,116,2,160,12,124, + 3,161,1,1,0,87,0,130,0,4,0,116,11,121,166,1, + 0,1,0,1,0,89,0,130,0,119,0,100,4,83,0,119, + 0,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,250,5,123,125,46,123,125,114,68, + 0,0,0,90,2,119,98,78,41,13,218,6,102,111,114,109, + 97,116,218,2,105,100,114,18,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,58,0,0,0,90,6, + 117,110,108,105,110,107,41,6,114,52,0,0,0,114,37,0, + 0,0,114,60,0,0,0,90,8,112,97,116,104,95,116,109, + 112,90,2,102,100,218,4,102,105,108,101,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,218,13,95,119,114,105, + 116,101,95,97,116,111,109,105,99,152,0,0,0,115,38,0, + 0,0,16,5,6,1,22,1,4,255,2,2,14,3,40,1, + 18,1,12,1,2,1,12,1,2,3,12,254,2,1,2,1, + 2,254,4,252,2,1,255,128,114,77,0,0,0,105,105,13, + 0,0,114,39,0,0,0,114,29,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, + 119,122,4,46,112,121,99,41,1,218,12,111,112,116,105,109, + 105,122,97,116,105,111,110,99,2,0,0,0,0,0,0,0, + 1,0,0,0,12,0,0,0,5,0,0,0,67,0,0,0, + 115,88,1,0,0,124,1,100,1,117,1,114,52,116,0,160, + 1,100,2,116,2,161,2,1,0,124,2,100,1,117,1,114, + 40,100,3,125,3,116,3,124,3,131,1,130,1,124,1,114, + 48,100,4,110,2,100,5,125,2,116,4,160,5,124,0,161, + 1,125,0,116,6,124,0,131,1,92,2,125,4,125,5,124, + 5,160,7,100,6,161,1,92,3,125,6,125,7,125,8,116, + 8,106,9,106,10,125,9,124,9,100,1,117,0,114,114,116, + 11,100,7,131,1,130,1,100,4,160,12,124,6,114,126,124, + 6,110,2,124,8,124,7,124,9,103,3,161,1,125,10,124, + 2,100,1,117,0,114,172,116,8,106,13,106,14,100,8,107, + 2,114,164,100,4,125,2,110,8,116,8,106,13,106,14,125, + 2,116,15,124,2,131,1,125,2,124,2,100,4,107,3,114, + 224,124,2,160,16,161,0,115,210,116,17,100,9,160,18,124, + 2,161,1,131,1,130,1,100,10,160,18,124,10,116,19,124, + 2,161,3,125,10,124,10,116,20,100,8,25,0,23,0,125, + 11,116,8,106,21,100,1,117,1,144,1,114,76,116,22,124, + 4,131,1,144,1,115,16,116,23,116,4,160,24,161,0,124, + 4,131,2,125,4,124,4,100,5,25,0,100,11,107,2,144, + 1,114,56,124,4,100,8,25,0,116,25,118,1,144,1,114, + 56,124,4,100,12,100,1,133,2,25,0,125,4,116,23,116, + 8,106,21,124,4,160,26,116,25,161,1,124,11,131,3,83, + 0,116,23,124,4,116,27,124,11,131,3,83,0,41,13,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, + 10,0,0,0,114,3,0,0,0,218,1,46,250,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,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,114,11,0,0,0,114, + 39,0,0,0,41,28,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,18,0,0,0,218,6,102,115,112, + 97,116,104,114,55,0,0,0,114,49,0,0,0,114,15,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,46,0,0,0,114,16,0,0,0,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,70,0,0,0,218,4,95,79,80,84,218,17,66,89,84, + 69,67,79,68,69,95,83,85,70,70,73,88,69,83,218,14, + 112,121,99,97,99,104,101,95,112,114,101,102,105,120,114,67, + 0,0,0,114,48,0,0,0,114,63,0,0,0,114,42,0, + 0,0,218,6,108,115,116,114,105,112,218,8,95,80,89,67, + 65,67,72,69,41,12,114,52,0,0,0,90,14,100,101,98, + 117,103,95,111,118,101,114,114,105,100,101,114,78,0,0,0, + 218,7,109,101,115,115,97,103,101,218,4,104,101,97,100,114, + 54,0,0,0,90,4,98,97,115,101,114,6,0,0,0,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,218,8,102,105,108, + 101,110,97,109,101,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,218,17,99,97,99,104,101,95,102,114,111,109, + 95,115,111,117,114,99,101,85,1,0,0,115,74,0,0,0, + 8,18,6,1,2,1,4,255,8,2,4,1,8,1,12,1, + 10,1,12,1,16,1,8,1,8,1,8,1,24,1,8,1, + 12,1,6,1,8,2,8,1,8,1,8,1,14,1,14,1, + 12,1,12,1,10,9,14,1,28,5,12,1,2,4,4,1, + 8,1,2,1,4,253,12,5,255,128,114,102,0,0,0,99, + 1,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0, + 5,0,0,0,67,0,0,0,115,44,1,0,0,116,0,106, + 1,106,2,100,1,117,0,114,20,116,3,100,2,131,1,130, + 1,116,4,160,5,124,0,161,1,125,0,116,6,124,0,131, + 1,92,2,125,1,125,2,100,3,125,3,116,0,106,7,100, + 1,117,1,114,102,116,0,106,7,160,8,116,9,161,1,125, + 4,124,1,160,10,124,4,116,11,23,0,161,1,114,102,124, + 1,116,12,124,4,131,1,100,1,133,2,25,0,125,1,100, + 4,125,3,124,3,115,144,116,6,124,1,131,1,92,2,125, + 1,125,5,124,5,116,13,107,3,114,144,116,14,116,13,155, + 0,100,5,124,0,155,2,157,3,131,1,130,1,124,2,160, + 15,100,6,161,1,125,6,124,6,100,7,118,1,114,176,116, + 14,100,8,124,2,155,2,157,2,131,1,130,1,124,6,100, + 9,107,2,144,1,114,12,124,2,160,16,100,6,100,10,161, + 2,100,11,25,0,125,7,124,7,160,10,116,17,161,1,115, + 226,116,14,100,12,116,17,155,2,157,2,131,1,130,1,124, + 7,116,12,116,17,131,1,100,1,133,2,25,0,125,8,124, + 8,160,18,161,0,144,1,115,12,116,14,100,13,124,7,155, + 2,100,14,157,3,131,1,130,1,124,2,160,19,100,6,161, + 1,100,15,25,0,125,9,116,20,124,1,124,9,116,21,100, + 15,25,0,23,0,131,2,83,0,41,16,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,114, + 80,0,0,0,70,84,122,31,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,114,79,0,0,0,62,2,0,0, + 0,114,39,0,0,0,114,65,0,0,0,122,29,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,114,65,0,0,0,114, + 39,0,0,0,233,254,255,255,255,122,53,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, + 122,19,111,112,116,105,109,105,122,97,116,105,111,110,32,108, + 101,118,101,108,32,122,29,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,0,0,0,0,41,22,114,15,0,0,0, + 114,86,0,0,0,114,87,0,0,0,114,88,0,0,0,114, + 18,0,0,0,114,85,0,0,0,114,55,0,0,0,114,95, + 0,0,0,114,41,0,0,0,114,42,0,0,0,114,23,0, + 0,0,114,45,0,0,0,114,4,0,0,0,114,97,0,0, + 0,114,92,0,0,0,218,5,99,111,117,110,116,114,51,0, + 0,0,114,93,0,0,0,114,91,0,0,0,218,9,112,97, + 114,116,105,116,105,111,110,114,48,0,0,0,218,15,83,79, + 85,82,67,69,95,83,85,70,70,73,88,69,83,41,10,114, + 52,0,0,0,114,99,0,0,0,90,16,112,121,99,97,99, + 104,101,95,102,105,108,101,110,97,109,101,90,23,102,111,117, + 110,100,95,105,110,95,112,121,99,97,99,104,101,95,112,114, + 101,102,105,120,90,13,115,116,114,105,112,112,101,100,95,112, + 97,116,104,90,7,112,121,99,97,99,104,101,90,9,100,111, + 116,95,99,111,117,110,116,114,78,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,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,218,17,115,111,117,114,99,101,95,102,114, + 111,109,95,99,97,99,104,101,156,1,0,0,115,62,0,0, + 0,12,9,8,1,10,1,12,1,4,1,10,1,12,1,14, + 1,16,1,4,1,4,1,12,1,8,1,8,1,2,1,8, + 255,10,2,8,1,14,1,10,1,16,1,10,1,4,1,2, + 1,8,255,16,2,10,1,16,1,14,2,18,1,255,128,114, + 107,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0, + 0,5,0,0,0,9,0,0,0,67,0,0,0,115,122,0, + 0,0,116,0,124,0,131,1,100,1,107,2,114,16,100,2, + 83,0,124,0,160,1,100,3,161,1,92,3,125,1,125,2, + 125,3,124,1,114,56,124,3,160,2,161,0,100,4,100,5, + 133,2,25,0,100,6,107,3,114,60,124,0,83,0,122,12, + 116,3,124,0,131,1,125,4,87,0,110,30,4,0,116,4, + 116,5,102,2,121,120,1,0,1,0,1,0,124,0,100,2, + 100,5,133,2,25,0,125,4,89,0,116,6,124,4,131,1, + 114,116,124,4,83,0,124,0,83,0,119,0,41,7,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,0,0,0, + 0,78,114,79,0,0,0,233,253,255,255,255,233,255,255,255, + 255,90,2,112,121,41,7,114,4,0,0,0,114,49,0,0, + 0,218,5,108,111,119,101,114,114,107,0,0,0,114,88,0, + 0,0,114,92,0,0,0,114,62,0,0,0,41,5,218,13, + 98,121,116,101,99,111,100,101,95,112,97,116,104,114,100,0, + 0,0,114,53,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, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,15, + 95,103,101,116,95,115,111,117,114,99,101,102,105,108,101,196, + 1,0,0,115,24,0,0,0,12,7,4,1,16,1,24,1, + 4,1,2,1,12,1,16,1,14,1,16,1,2,254,255,128, + 114,113,0,0,0,99,1,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,8,0,0,0,67,0,0,0,115,68, + 0,0,0,124,0,160,0,116,1,116,2,131,1,161,1,114, + 44,122,10,116,3,124,0,131,1,87,0,83,0,4,0,116, + 4,121,66,1,0,1,0,1,0,89,0,100,0,83,0,124, + 0,160,0,116,1,116,5,131,1,161,1,114,62,124,0,83, + 0,100,0,83,0,119,0,169,1,78,41,6,218,8,101,110, + 100,115,119,105,116,104,218,5,116,117,112,108,101,114,106,0, + 0,0,114,102,0,0,0,114,88,0,0,0,114,94,0,0, + 0,41,1,114,101,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,218,11,95,103,101,116,95,99,97, + 99,104,101,100,215,1,0,0,115,20,0,0,0,14,1,2, + 1,10,1,12,1,6,1,14,1,4,1,4,2,2,251,255, + 128,114,117,0,0,0,99,1,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,8,0,0,0,67,0,0,0,115, + 48,0,0,0,122,14,116,0,124,0,131,1,106,1,125,1, + 87,0,110,18,4,0,116,2,121,46,1,0,1,0,1,0, + 100,1,125,1,89,0,124,1,100,2,79,0,125,1,124,1, + 83,0,119,0,41,4,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,114,68,0,0,0, + 233,128,0,0,0,78,41,3,114,57,0,0,0,114,59,0, + 0,0,114,58,0,0,0,41,2,114,52,0,0,0,114,60, + 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,218,10,95,99,97,108,99,95,109,111,100,101,227,1, + 0,0,115,16,0,0,0,2,2,14,1,12,1,6,1,8, + 3,4,1,2,251,255,128,114,119,0,0,0,99,1,0,0, + 0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0, + 0,3,0,0,0,115,52,0,0,0,100,6,135,0,102,1, + 100,2,100,3,132,9,125,1,116,0,100,1,117,1,114,30, + 116,0,106,1,125,2,110,8,100,4,100,5,132,0,125,2, + 124,2,124,1,136,0,131,2,1,0,124,1,83,0,41,7, + 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,0,0,0,0,4,0,0,0, + 4,0,0,0,31,0,0,0,115,72,0,0,0,124,1,100, + 0,117,0,114,16,124,0,106,0,125,1,110,32,124,0,106, + 0,124,1,107,3,114,48,116,1,100,1,124,0,106,0,124, + 1,102,2,22,0,124,1,100,2,141,2,130,1,136,0,124, + 0,124,1,103,2,124,2,162,1,82,0,105,0,124,3,164, + 1,142,1,83,0,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,169,1,218,4,110,97,109,101, + 41,2,114,121,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,121,0,0, + 0,218,4,97,114,103,115,218,6,107,119,97,114,103,115,169, + 1,218,6,109,101,116,104,111,100,114,7,0,0,0,114,8, + 0,0,0,218,19,95,99,104,101,99,107,95,110,97,109,101, + 95,119,114,97,112,112,101,114,247,1,0,0,115,20,0,0, + 0,8,1,8,1,10,1,4,1,8,1,2,255,2,1,6, + 255,24,2,255,128,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,0,0,0,0,3,0,0,0, + 7,0,0,0,83,0,0,0,115,56,0,0,0,100,1,68, + 0,93,32,125,2,116,0,124,1,124,2,131,2,114,36,116, + 1,124,0,124,2,116,2,124,1,124,2,131,2,131,3,1, + 0,113,4,124,0,106,3,160,4,124,1,106,3,161,1,1, + 0,100,0,83,0,41,2,78,41,4,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,75,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,218,5,95,119,114,97,112,4,2,0, + 0,115,12,0,0,0,8,1,10,1,18,1,2,128,18,1, + 255,128,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,1, + 78,41,2,218,10,95,98,111,111,116,115,116,114,97,112,114, + 138,0,0,0,41,3,114,127,0,0,0,114,128,0,0,0, + 114,138,0,0,0,114,7,0,0,0,114,126,0,0,0,114, + 8,0,0,0,218,11,95,99,104,101,99,107,95,110,97,109, + 101,239,1,0,0,115,14,0,0,0,14,8,8,10,8,1, + 8,2,10,6,4,1,255,128,114,140,0,0,0,99,2,0, + 0,0,0,0,0,0,0,0,0,0,5,0,0,0,6,0, + 0,0,67,0,0,0,115,60,0,0,0,124,0,160,0,124, + 1,161,1,92,2,125,2,125,3,124,2,100,1,117,0,114, + 56,116,1,124,3,131,1,114,56,100,2,125,4,116,2,160, + 3,124,4,160,4,124,3,100,3,25,0,161,1,116,5,161, + 2,1,0,124,2,83,0,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,0,0,0,0,41,6,218,11,102,105, + 110,100,95,108,111,97,100,101,114,114,4,0,0,0,114,81, + 0,0,0,114,82,0,0,0,114,70,0,0,0,218,13,73, + 109,112,111,114,116,87,97,114,110,105,110,103,41,5,114,123, + 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,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,17,95,102,105,110,100,95,109,111,100,117,108, + 101,95,115,104,105,109,14,2,0,0,115,12,0,0,0,14, + 10,16,1,4,1,22,1,4,1,255,128,114,147,0,0,0, + 99,3,0,0,0,0,0,0,0,0,0,0,0,6,0,0, + 0,4,0,0,0,67,0,0,0,115,166,0,0,0,124,0, + 100,1,100,2,133,2,25,0,125,3,124,3,116,0,107,3, + 114,64,100,3,124,1,155,2,100,4,124,3,155,2,157,4, + 125,4,116,1,160,2,100,5,124,4,161,2,1,0,116,3, + 124,4,102,1,105,0,124,2,164,1,142,1,130,1,116,4, + 124,0,131,1,100,6,107,0,114,106,100,7,124,1,155,2, + 157,2,125,4,116,1,160,2,100,5,124,4,161,2,1,0, + 116,5,124,4,131,1,130,1,116,6,124,0,100,2,100,8, + 133,2,25,0,131,1,125,5,124,5,100,9,64,0,114,162, + 100,10,124,5,155,2,100,11,124,1,155,2,157,4,125,4, + 116,3,124,4,102,1,105,0,124,2,164,1,142,1,130,1, + 124,5,83,0,41,12,97,84,2,0,0,80,101,114,102,111, + 114,109,32,98,97,115,105,99,32,118,97,108,105,100,105,116, + 121,32,99,104,101,99,107,105,110,103,32,111,102,32,97,32, + 112,121,99,32,104,101,97,100,101,114,32,97,110,100,32,114, + 101,116,117,114,110,32,116,104,101,32,102,108,97,103,115,32, + 102,105,101,108,100,44,10,32,32,32,32,119,104,105,99,104, + 32,100,101,116,101,114,109,105,110,101,115,32,104,111,119,32, + 116,104,101,32,112,121,99,32,115,104,111,117,108,100,32,98, + 101,32,102,117,114,116,104,101,114,32,118,97,108,105,100,97, + 116,101,100,32,97,103,97,105,110,115,116,32,116,104,101,32, + 115,111,117,114,99,101,46,10,10,32,32,32,32,42,100,97, + 116,97,42,32,105,115,32,116,104,101,32,99,111,110,116,101, + 110,116,115,32,111,102,32,116,104,101,32,112,121,99,32,102, + 105,108,101,46,32,40,79,110,108,121,32,116,104,101,32,102, + 105,114,115,116,32,49,54,32,98,121,116,101,115,32,97,114, + 101,10,32,32,32,32,114,101,113,117,105,114,101,100,44,32, + 116,104,111,117,103,104,46,41,10,10,32,32,32,32,42,110, + 97,109,101,42,32,105,115,32,116,104,101,32,110,97,109,101, + 32,111,102,32,116,104,101,32,109,111,100,117,108,101,32,98, + 101,105,110,103,32,105,109,112,111,114,116,101,100,46,32,73, + 116,32,105,115,32,117,115,101,100,32,102,111,114,32,108,111, + 103,103,105,110,103,46,10,10,32,32,32,32,42,101,120,99, + 95,100,101,116,97,105,108,115,42,32,105,115,32,97,32,100, + 105,99,116,105,111,110,97,114,121,32,112,97,115,115,101,100, + 32,116,111,32,73,109,112,111,114,116,69,114,114,111,114,32, + 105,102,32,105,116,32,114,97,105,115,101,100,32,102,111,114, + 10,32,32,32,32,105,109,112,114,111,118,101,100,32,100,101, + 98,117,103,103,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,119,104,101,110,32,116, + 104,101,32,102,108,97,103,115,10,32,32,32,32,102,105,101, + 108,100,32,105,115,32,105,110,118,97,108,105,100,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,32,116, + 114,117,110,99,97,116,101,100,46,10,10,32,32,32,32,78, + 114,28,0,0,0,122,20,98,97,100,32,109,97,103,105,99, + 32,110,117,109,98,101,114,32,105,110,32,122,2,58,32,250, + 2,123,125,233,16,0,0,0,122,40,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,112,121,99,32,104,101,97,100,101,114,32,111, + 102,32,233,8,0,0,0,233,252,255,255,255,122,14,105,110, + 118,97,108,105,100,32,102,108,97,103,115,32,122,4,32,105, + 110,32,41,7,218,12,77,65,71,73,67,95,78,85,77,66, + 69,82,114,139,0,0,0,218,16,95,118,101,114,98,111,115, + 101,95,109,101,115,115,97,103,101,114,122,0,0,0,114,4, + 0,0,0,218,8,69,79,70,69,114,114,111,114,114,38,0, + 0,0,41,6,114,37,0,0,0,114,121,0,0,0,218,11, + 101,120,99,95,100,101,116,97,105,108,115,90,5,109,97,103, + 105,99,114,98,0,0,0,114,16,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,13,95,99,108, + 97,115,115,105,102,121,95,112,121,99,31,2,0,0,115,30, + 0,0,0,12,16,8,1,16,1,12,1,16,1,12,1,10, + 1,12,1,8,1,16,1,8,2,16,1,16,1,4,1,255, + 128,114,156,0,0,0,99,5,0,0,0,0,0,0,0,0, + 0,0,0,6,0,0,0,4,0,0,0,67,0,0,0,115, + 124,0,0,0,116,0,124,0,100,1,100,2,133,2,25,0, + 131,1,124,1,100,3,64,0,107,3,114,62,100,4,124,3, + 155,2,157,2,125,5,116,1,160,2,100,5,124,5,161,2, + 1,0,116,3,124,5,102,1,105,0,124,4,164,1,142,1, + 130,1,124,2,100,6,117,1,114,120,116,0,124,0,100,2, + 100,7,133,2,25,0,131,1,124,2,100,3,64,0,107,3, + 114,116,116,3,100,4,124,3,155,2,157,2,102,1,105,0, + 124,4,164,1,142,1,130,1,100,6,83,0,100,6,83,0, + 41,8,97,7,2,0,0,86,97,108,105,100,97,116,101,32, + 97,32,112,121,99,32,97,103,97,105,110,115,116,32,116,104, + 101,32,115,111,117,114,99,101,32,108,97,115,116,45,109,111, + 100,105,102,105,101,100,32,116,105,109,101,46,10,10,32,32, + 32,32,42,100,97,116,97,42,32,105,115,32,116,104,101,32, + 99,111,110,116,101,110,116,115,32,111,102,32,116,104,101,32, + 112,121,99,32,102,105,108,101,46,32,40,79,110,108,121,32, + 116,104,101,32,102,105,114,115,116,32,49,54,32,98,121,116, + 101,115,32,97,114,101,10,32,32,32,32,114,101,113,117,105, + 114,101,100,46,41,10,10,32,32,32,32,42,115,111,117,114, + 99,101,95,109,116,105,109,101,42,32,105,115,32,116,104,101, + 32,108,97,115,116,32,109,111,100,105,102,105,101,100,32,116, + 105,109,101,115,116,97,109,112,32,111,102,32,116,104,101,32, + 115,111,117,114,99,101,32,102,105,108,101,46,10,10,32,32, + 32,32,42,115,111,117,114,99,101,95,115,105,122,101,42,32, + 105,115,32,78,111,110,101,32,111,114,32,116,104,101,32,115, + 105,122,101,32,111,102,32,116,104,101,32,115,111,117,114,99, + 101,32,102,105,108,101,32,105,110,32,98,121,116,101,115,46, + 10,10,32,32,32,32,42,110,97,109,101,42,32,105,115,32, + 116,104,101,32,110,97,109,101,32,111,102,32,116,104,101,32, + 109,111,100,117,108,101,32,98,101,105,110,103,32,105,109,112, + 111,114,116,101,100,46,32,73,116,32,105,115,32,117,115,101, + 100,32,102,111,114,32,108,111,103,103,105,110,103,46,10,10, + 32,32,32,32,42,101,120,99,95,100,101,116,97,105,108,115, + 42,32,105,115,32,97,32,100,105,99,116,105,111,110,97,114, + 121,32,112,97,115,115,101,100,32,116,111,32,73,109,112,111, + 114,116,69,114,114,111,114,32,105,102,32,105,116,32,114,97, + 105,115,101,100,32,102,111,114,10,32,32,32,32,105,109,112, + 114,111,118,101,100,32,100,101,98,117,103,103,105,110,103,46, + 10,10,32,32,32,32,65,110,32,73,109,112,111,114,116,69, + 114,114,111,114,32,105,115,32,114,97,105,115,101,100,32,105, + 102,32,116,104,101,32,98,121,116,101,99,111,100,101,32,105, + 115,32,115,116,97,108,101,46,10,10,32,32,32,32,114,150, + 0,0,0,233,12,0,0,0,114,27,0,0,0,122,22,98, + 121,116,101,99,111,100,101,32,105,115,32,115,116,97,108,101, + 32,102,111,114,32,114,148,0,0,0,78,114,149,0,0,0, + 41,4,114,38,0,0,0,114,139,0,0,0,114,153,0,0, + 0,114,122,0,0,0,41,6,114,37,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,121,0,0,0,114,155,0, + 0,0,114,98,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,218,23,95,118,97,108,105,100,97,116, + 101,95,116,105,109,101,115,116,97,109,112,95,112,121,99,64, + 2,0,0,115,20,0,0,0,24,19,10,1,12,1,16,1, + 8,1,22,1,2,255,22,2,8,254,255,128,114,160,0,0, + 0,99,4,0,0,0,0,0,0,0,0,0,0,0,4,0, + 0,0,4,0,0,0,67,0,0,0,115,42,0,0,0,124, + 0,100,1,100,2,133,2,25,0,124,1,107,3,114,38,116, + 0,100,3,124,2,155,2,157,2,102,1,105,0,124,3,164, + 1,142,1,130,1,100,4,83,0,41,5,97,243,1,0,0, + 86,97,108,105,100,97,116,101,32,97,32,104,97,115,104,45, + 98,97,115,101,100,32,112,121,99,32,98,121,32,99,104,101, + 99,107,105,110,103,32,116,104,101,32,114,101,97,108,32,115, + 111,117,114,99,101,32,104,97,115,104,32,97,103,97,105,110, + 115,116,32,116,104,101,32,111,110,101,32,105,110,10,32,32, + 32,32,116,104,101,32,112,121,99,32,104,101,97,100,101,114, 46,10,10,32,32,32,32,42,100,97,116,97,42,32,105,115, 32,116,104,101,32,99,111,110,116,101,110,116,115,32,111,102, 32,116,104,101,32,112,121,99,32,102,105,108,101,46,32,40, 79,110,108,121,32,116,104,101,32,102,105,114,115,116,32,49, 54,32,98,121,116,101,115,32,97,114,101,10,32,32,32,32, - 114,101,113,117,105,114,101,100,44,32,116,104,111,117,103,104, - 46,41,10,10,32,32,32,32,42,110,97,109,101,42,32,105, - 115,32,116,104,101,32,110,97,109,101,32,111,102,32,116,104, - 101,32,109,111,100,117,108,101,32,98,101,105,110,103,32,105, - 109,112,111,114,116,101,100,46,32,73,116,32,105,115,32,117, - 115,101,100,32,102,111,114,32,108,111,103,103,105,110,103,46, - 10,10,32,32,32,32,42,101,120,99,95,100,101,116,97,105, - 108,115,42,32,105,115,32,97,32,100,105,99,116,105,111,110, - 97,114,121,32,112,97,115,115,101,100,32,116,111,32,73,109, - 112,111,114,116,69,114,114,111,114,32,105,102,32,105,116,32, - 114,97,105,115,101,100,32,102,111,114,10,32,32,32,32,105, - 109,112,114,111,118,101,100,32,100,101,98,117,103,103,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,119,104,101,110,32,116,104,101,32,102,108,97, - 103,115,10,32,32,32,32,102,105,101,108,100,32,105,115,32, - 105,110,118,97,108,105,100,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,32,116,114,117,110,99,97,116, - 101,100,46,10,10,32,32,32,32,78,114,28,0,0,0,122, - 20,98,97,100,32,109,97,103,105,99,32,110,117,109,98,101, - 114,32,105,110,32,122,2,58,32,250,2,123,125,233,16,0, - 0,0,122,40,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,112,121, - 99,32,104,101,97,100,101,114,32,111,102,32,233,8,0,0, - 0,233,252,255,255,255,122,14,105,110,118,97,108,105,100,32, - 102,108,97,103,115,32,122,4,32,105,110,32,41,7,218,12, - 77,65,71,73,67,95,78,85,77,66,69,82,114,139,0,0, - 0,218,16,95,118,101,114,98,111,115,101,95,109,101,115,115, - 97,103,101,114,122,0,0,0,114,4,0,0,0,218,8,69, - 79,70,69,114,114,111,114,114,38,0,0,0,41,6,114,37, - 0,0,0,114,121,0,0,0,218,11,101,120,99,95,100,101, - 116,97,105,108,115,90,5,109,97,103,105,99,114,98,0,0, - 0,114,16,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,218,13,95,99,108,97,115,115,105,102,121, - 95,112,121,99,30,2,0,0,115,30,0,0,0,12,16,8, - 1,16,1,12,1,16,1,12,1,10,1,12,1,8,1,16, - 1,8,2,16,1,16,1,4,1,255,128,114,156,0,0,0, - 99,5,0,0,0,0,0,0,0,0,0,0,0,6,0,0, - 0,4,0,0,0,67,0,0,0,115,120,0,0,0,116,0, - 124,0,100,1,100,2,133,2,25,0,131,1,124,1,100,3, - 64,0,107,3,114,62,100,4,124,3,155,2,157,2,125,5, - 116,1,160,2,100,5,124,5,161,2,1,0,116,3,124,5, - 102,1,105,0,124,4,164,1,142,1,130,1,124,2,100,6, - 117,1,114,116,116,0,124,0,100,2,100,7,133,2,25,0, - 131,1,124,2,100,3,64,0,107,3,114,116,116,3,100,4, - 124,3,155,2,157,2,102,1,105,0,124,4,164,1,142,1, - 130,1,100,6,83,0,41,8,97,7,2,0,0,86,97,108, - 105,100,97,116,101,32,97,32,112,121,99,32,97,103,97,105, - 110,115,116,32,116,104,101,32,115,111,117,114,99,101,32,108, - 97,115,116,45,109,111,100,105,102,105,101,100,32,116,105,109, - 101,46,10,10,32,32,32,32,42,100,97,116,97,42,32,105, - 115,32,116,104,101,32,99,111,110,116,101,110,116,115,32,111, - 102,32,116,104,101,32,112,121,99,32,102,105,108,101,46,32, - 40,79,110,108,121,32,116,104,101,32,102,105,114,115,116,32, - 49,54,32,98,121,116,101,115,32,97,114,101,10,32,32,32, - 32,114,101,113,117,105,114,101,100,46,41,10,10,32,32,32, - 32,42,115,111,117,114,99,101,95,109,116,105,109,101,42,32, - 105,115,32,116,104,101,32,108,97,115,116,32,109,111,100,105, - 102,105,101,100,32,116,105,109,101,115,116,97,109,112,32,111, - 102,32,116,104,101,32,115,111,117,114,99,101,32,102,105,108, - 101,46,10,10,32,32,32,32,42,115,111,117,114,99,101,95, - 115,105,122,101,42,32,105,115,32,78,111,110,101,32,111,114, - 32,116,104,101,32,115,105,122,101,32,111,102,32,116,104,101, - 32,115,111,117,114,99,101,32,102,105,108,101,32,105,110,32, - 98,121,116,101,115,46,10,10,32,32,32,32,42,110,97,109, - 101,42,32,105,115,32,116,104,101,32,110,97,109,101,32,111, - 102,32,116,104,101,32,109,111,100,117,108,101,32,98,101,105, - 110,103,32,105,109,112,111,114,116,101,100,46,32,73,116,32, - 105,115,32,117,115,101,100,32,102,111,114,32,108,111,103,103, - 105,110,103,46,10,10,32,32,32,32,42,101,120,99,95,100, - 101,116,97,105,108,115,42,32,105,115,32,97,32,100,105,99, - 116,105,111,110,97,114,121,32,112,97,115,115,101,100,32,116, - 111,32,73,109,112,111,114,116,69,114,114,111,114,32,105,102, - 32,105,116,32,114,97,105,115,101,100,32,102,111,114,10,32, - 32,32,32,105,109,112,114,111,118,101,100,32,100,101,98,117, - 103,103,105,110,103,46,10,10,32,32,32,32,65,110,32,73, - 109,112,111,114,116,69,114,114,111,114,32,105,115,32,114,97, - 105,115,101,100,32,105,102,32,116,104,101,32,98,121,116,101, - 99,111,100,101,32,105,115,32,115,116,97,108,101,46,10,10, - 32,32,32,32,114,150,0,0,0,233,12,0,0,0,114,27, - 0,0,0,122,22,98,121,116,101,99,111,100,101,32,105,115, - 32,115,116,97,108,101,32,102,111,114,32,114,148,0,0,0, - 78,114,149,0,0,0,41,4,114,38,0,0,0,114,139,0, - 0,0,114,153,0,0,0,114,122,0,0,0,41,6,114,37, - 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,121, - 0,0,0,114,155,0,0,0,114,98,0,0,0,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,218,23,95,118, - 97,108,105,100,97,116,101,95,116,105,109,101,115,116,97,109, - 112,95,112,121,99,63,2,0,0,115,20,0,0,0,24,19, - 10,1,12,1,16,1,8,1,22,1,2,255,22,2,4,128, - 255,128,114,160,0,0,0,99,4,0,0,0,0,0,0,0, - 0,0,0,0,4,0,0,0,4,0,0,0,67,0,0,0, - 115,42,0,0,0,124,0,100,1,100,2,133,2,25,0,124, - 1,107,3,114,38,116,0,100,3,124,2,155,2,157,2,102, - 1,105,0,124,3,164,1,142,1,130,1,100,4,83,0,41, - 5,97,243,1,0,0,86,97,108,105,100,97,116,101,32,97, - 32,104,97,115,104,45,98,97,115,101,100,32,112,121,99,32, - 98,121,32,99,104,101,99,107,105,110,103,32,116,104,101,32, - 114,101,97,108,32,115,111,117,114,99,101,32,104,97,115,104, - 32,97,103,97,105,110,115,116,32,116,104,101,32,111,110,101, - 32,105,110,10,32,32,32,32,116,104,101,32,112,121,99,32, - 104,101,97,100,101,114,46,10,10,32,32,32,32,42,100,97, - 116,97,42,32,105,115,32,116,104,101,32,99,111,110,116,101, - 110,116,115,32,111,102,32,116,104,101,32,112,121,99,32,102, - 105,108,101,46,32,40,79,110,108,121,32,116,104,101,32,102, - 105,114,115,116,32,49,54,32,98,121,116,101,115,32,97,114, - 101,10,32,32,32,32,114,101,113,117,105,114,101,100,46,41, - 10,10,32,32,32,32,42,115,111,117,114,99,101,95,104,97, - 115,104,42,32,105,115,32,116,104,101,32,105,109,112,111,114, - 116,108,105,98,46,117,116,105,108,46,115,111,117,114,99,101, - 95,104,97,115,104,40,41,32,111,102,32,116,104,101,32,115, - 111,117,114,99,101,32,102,105,108,101,46,10,10,32,32,32, - 32,42,110,97,109,101,42,32,105,115,32,116,104,101,32,110, - 97,109,101,32,111,102,32,116,104,101,32,109,111,100,117,108, - 101,32,98,101,105,110,103,32,105,109,112,111,114,116,101,100, - 46,32,73,116,32,105,115,32,117,115,101,100,32,102,111,114, - 32,108,111,103,103,105,110,103,46,10,10,32,32,32,32,42, - 101,120,99,95,100,101,116,97,105,108,115,42,32,105,115,32, - 97,32,100,105,99,116,105,111,110,97,114,121,32,112,97,115, - 115,101,100,32,116,111,32,73,109,112,111,114,116,69,114,114, - 111,114,32,105,102,32,105,116,32,114,97,105,115,101,100,32, - 102,111,114,10,32,32,32,32,105,109,112,114,111,118,101,100, - 32,100,101,98,117,103,103,105,110,103,46,10,10,32,32,32, - 32,65,110,32,73,109,112,111,114,116,69,114,114,111,114,32, - 105,115,32,114,97,105,115,101,100,32,105,102,32,116,104,101, - 32,98,121,116,101,99,111,100,101,32,105,115,32,115,116,97, - 108,101,46,10,10,32,32,32,32,114,150,0,0,0,114,149, - 0,0,0,122,46,104,97,115,104,32,105,110,32,98,121,116, - 101,99,111,100,101,32,100,111,101,115,110,39,116,32,109,97, - 116,99,104,32,104,97,115,104,32,111,102,32,115,111,117,114, - 99,101,32,78,41,1,114,122,0,0,0,41,4,114,37,0, - 0,0,218,11,115,111,117,114,99,101,95,104,97,115,104,114, - 121,0,0,0,114,155,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,218,18,95,118,97,108,105,100, - 97,116,101,95,104,97,115,104,95,112,121,99,91,2,0,0, - 115,16,0,0,0,16,17,2,1,8,1,4,255,2,2,6, - 254,4,128,255,128,114,162,0,0,0,99,4,0,0,0,0, - 0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,67, - 0,0,0,115,76,0,0,0,116,0,160,1,124,0,161,1, - 125,4,116,2,124,4,116,3,131,2,114,56,116,4,160,5, - 100,1,124,2,161,2,1,0,124,3,100,2,117,1,114,52, - 116,6,160,7,124,4,124,3,161,2,1,0,124,4,83,0, - 116,8,100,3,160,9,124,2,161,1,124,1,124,2,100,4, - 141,3,130,1,41,5,122,35,67,111,109,112,105,108,101,32, - 98,121,116,101,99,111,100,101,32,97,115,32,102,111,117,110, - 100,32,105,110,32,97,32,112,121,99,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,169,2,114,121, - 0,0,0,114,52,0,0,0,41,10,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,139,0,0,0,114,153,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,122,0,0,0,114,70,0,0,0,41,5, - 114,37,0,0,0,114,121,0,0,0,114,111,0,0,0,114, - 112,0,0,0,218,4,99,111,100,101,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,218,17,95,99,111,109,112, - 105,108,101,95,98,121,116,101,99,111,100,101,115,2,0,0, - 115,20,0,0,0,10,2,10,1,12,1,8,1,12,1,4, - 1,10,2,4,1,6,255,255,128,114,169,0,0,0,99,3, - 0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,5, - 0,0,0,67,0,0,0,115,70,0,0,0,116,0,116,1, - 131,1,125,3,124,3,160,2,116,3,100,1,131,1,161,1, - 1,0,124,3,160,2,116,3,124,1,131,1,161,1,1,0, - 124,3,160,2,116,3,124,2,131,1,161,1,1,0,124,3, - 160,2,116,4,160,5,124,0,161,1,161,1,1,0,124,3, - 83,0,41,3,122,43,80,114,111,100,117,99,101,32,116,104, - 101,32,100,97,116,97,32,102,111,114,32,97,32,116,105,109, - 101,115,116,97,109,112,45,98,97,115,101,100,32,112,121,99, - 46,114,0,0,0,0,78,41,6,218,9,98,121,116,101,97, - 114,114,97,121,114,152,0,0,0,218,6,101,120,116,101,110, - 100,114,33,0,0,0,114,164,0,0,0,218,5,100,117,109, - 112,115,41,4,114,168,0,0,0,218,5,109,116,105,109,101, - 114,159,0,0,0,114,37,0,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,218,22,95,99,111,100,101, - 95,116,111,95,116,105,109,101,115,116,97,109,112,95,112,121, - 99,128,2,0,0,115,14,0,0,0,8,2,14,1,14,1, - 14,1,16,1,4,1,255,128,114,174,0,0,0,84,99,3, - 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,5, - 0,0,0,67,0,0,0,115,80,0,0,0,116,0,116,1, - 131,1,125,3,100,1,124,2,100,1,62,0,66,0,125,4, - 124,3,160,2,116,3,124,4,131,1,161,1,1,0,116,4, - 124,1,131,1,100,2,107,2,115,50,74,0,130,1,124,3, - 160,2,124,1,161,1,1,0,124,3,160,2,116,5,160,6, - 124,0,161,1,161,1,1,0,124,3,83,0,41,4,122,38, + 114,101,113,117,105,114,101,100,46,41,10,10,32,32,32,32, + 42,115,111,117,114,99,101,95,104,97,115,104,42,32,105,115, + 32,116,104,101,32,105,109,112,111,114,116,108,105,98,46,117, + 116,105,108,46,115,111,117,114,99,101,95,104,97,115,104,40, + 41,32,111,102,32,116,104,101,32,115,111,117,114,99,101,32, + 102,105,108,101,46,10,10,32,32,32,32,42,110,97,109,101, + 42,32,105,115,32,116,104,101,32,110,97,109,101,32,111,102, + 32,116,104,101,32,109,111,100,117,108,101,32,98,101,105,110, + 103,32,105,109,112,111,114,116,101,100,46,32,73,116,32,105, + 115,32,117,115,101,100,32,102,111,114,32,108,111,103,103,105, + 110,103,46,10,10,32,32,32,32,42,101,120,99,95,100,101, + 116,97,105,108,115,42,32,105,115,32,97,32,100,105,99,116, + 105,111,110,97,114,121,32,112,97,115,115,101,100,32,116,111, + 32,73,109,112,111,114,116,69,114,114,111,114,32,105,102,32, + 105,116,32,114,97,105,115,101,100,32,102,111,114,10,32,32, + 32,32,105,109,112,114,111,118,101,100,32,100,101,98,117,103, + 103,105,110,103,46,10,10,32,32,32,32,65,110,32,73,109, + 112,111,114,116,69,114,114,111,114,32,105,115,32,114,97,105, + 115,101,100,32,105,102,32,116,104,101,32,98,121,116,101,99, + 111,100,101,32,105,115,32,115,116,97,108,101,46,10,10,32, + 32,32,32,114,150,0,0,0,114,149,0,0,0,122,46,104, + 97,115,104,32,105,110,32,98,121,116,101,99,111,100,101,32, + 100,111,101,115,110,39,116,32,109,97,116,99,104,32,104,97, + 115,104,32,111,102,32,115,111,117,114,99,101,32,78,41,1, + 114,122,0,0,0,41,4,114,37,0,0,0,218,11,115,111, + 117,114,99,101,95,104,97,115,104,114,121,0,0,0,114,155, + 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,218,18,95,118,97,108,105,100,97,116,101,95,104,97, + 115,104,95,112,121,99,92,2,0,0,115,16,0,0,0,16, + 17,2,1,8,1,4,255,2,2,6,254,4,255,255,128,114, + 162,0,0,0,99,4,0,0,0,0,0,0,0,0,0,0, + 0,5,0,0,0,5,0,0,0,67,0,0,0,115,76,0, + 0,0,116,0,160,1,124,0,161,1,125,4,116,2,124,4, + 116,3,131,2,114,56,116,4,160,5,100,1,124,2,161,2, + 1,0,124,3,100,2,117,1,114,52,116,6,160,7,124,4, + 124,3,161,2,1,0,124,4,83,0,116,8,100,3,160,9, + 124,2,161,1,124,1,124,2,100,4,141,3,130,1,41,5, + 122,35,67,111,109,112,105,108,101,32,98,121,116,101,99,111, + 100,101,32,97,115,32,102,111,117,110,100,32,105,110,32,97, + 32,112,121,99,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,169,2,114,121,0,0,0,114,52,0, + 0,0,41,10,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,139,0,0, + 0,114,153,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,122, + 0,0,0,114,70,0,0,0,41,5,114,37,0,0,0,114, + 121,0,0,0,114,111,0,0,0,114,112,0,0,0,218,4, + 99,111,100,101,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,17,95,99,111,109,112,105,108,101,95,98,121, + 116,101,99,111,100,101,116,2,0,0,115,20,0,0,0,10, + 2,10,1,12,1,8,1,12,1,4,1,10,2,4,1,6, + 255,255,128,114,169,0,0,0,99,3,0,0,0,0,0,0, + 0,0,0,0,0,4,0,0,0,5,0,0,0,67,0,0, + 0,115,70,0,0,0,116,0,116,1,131,1,125,3,124,3, + 160,2,116,3,100,1,131,1,161,1,1,0,124,3,160,2, + 116,3,124,1,131,1,161,1,1,0,124,3,160,2,116,3, + 124,2,131,1,161,1,1,0,124,3,160,2,116,4,160,5, + 124,0,161,1,161,1,1,0,124,3,83,0,41,3,122,43, 80,114,111,100,117,99,101,32,116,104,101,32,100,97,116,97, - 32,102,111,114,32,97,32,104,97,115,104,45,98,97,115,101, - 100,32,112,121,99,46,114,3,0,0,0,114,150,0,0,0, - 78,41,7,114,170,0,0,0,114,152,0,0,0,114,171,0, - 0,0,114,33,0,0,0,114,4,0,0,0,114,164,0,0, - 0,114,172,0,0,0,41,5,114,168,0,0,0,114,161,0, - 0,0,90,7,99,104,101,99,107,101,100,114,37,0,0,0, - 114,16,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,218,17,95,99,111,100,101,95,116,111,95,104, - 97,115,104,95,112,121,99,138,2,0,0,115,16,0,0,0, - 8,2,12,1,14,1,16,1,10,1,16,1,4,1,255,128, - 114,175,0,0,0,99,1,0,0,0,0,0,0,0,0,0, - 0,0,5,0,0,0,6,0,0,0,67,0,0,0,115,62, - 0,0,0,100,1,100,2,108,0,125,1,116,1,160,2,124, - 0,161,1,106,3,125,2,124,1,160,4,124,2,161,1,125, - 3,116,1,160,5,100,2,100,3,161,2,125,4,124,4,160, - 6,124,0,160,6,124,3,100,1,25,0,161,1,161,1,83, - 0,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,0, - 0,0,0,78,84,41,7,218,8,116,111,107,101,110,105,122, - 101,114,72,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,176,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,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,218,13,100,101,99,111,100,101,95,115,111,117,114, - 99,101,149,2,0,0,115,12,0,0,0,8,5,12,1,10, - 1,12,1,20,1,255,128,114,180,0,0,0,169,2,114,144, - 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,0,0,0,0,2,0,0,0,9,0,0,0, - 8,0,0,0,67,0,0,0,115,8,1,0,0,124,1,100, - 1,117,0,114,56,100,2,125,1,116,0,124,2,100,3,131, - 2,114,66,122,14,124,2,160,1,124,0,161,1,125,1,87, - 0,110,28,4,0,116,2,121,54,1,0,1,0,1,0,89, - 0,110,12,48,0,116,3,160,4,124,1,161,1,125,1,116, - 5,106,6,124,0,124,2,124,1,100,4,141,3,125,4,100, - 5,124,4,95,7,124,2,100,1,117,0,114,148,116,8,131, - 0,68,0,93,40,92,2,125,5,125,6,124,1,160,9,116, - 10,124,6,131,1,161,1,114,102,124,5,124,0,124,1,131, - 2,125,2,124,2,124,4,95,11,1,0,113,148,100,1,83, - 0,124,3,116,12,117,0,114,212,116,0,124,2,100,6,131, - 2,114,218,122,14,124,2,160,13,124,0,161,1,125,7,87, - 0,110,18,4,0,116,2,121,198,1,0,1,0,1,0,89, - 0,110,20,48,0,124,7,114,218,103,0,124,4,95,14,110, - 6,124,3,124,4,95,14,124,4,106,14,103,0,107,2,144, - 1,114,4,124,1,144,1,114,4,116,15,124,1,131,1,100, - 7,25,0,125,8,124,4,106,14,160,16,124,8,161,1,1, - 0,124,4,83,0,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,169,1,218,6,111,114,105,103,105,110,84,218,10, - 105,115,95,112,97,99,107,97,103,101,114,0,0,0,0,41, - 17,114,133,0,0,0,114,183,0,0,0,114,122,0,0,0, - 114,18,0,0,0,114,85,0,0,0,114,139,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,115,0,0,0,114,116,0,0, - 0,114,144,0,0,0,218,9,95,80,79,80,85,76,65,84, - 69,114,186,0,0,0,114,182,0,0,0,114,55,0,0,0, - 218,6,97,112,112,101,110,100,41,9,114,121,0,0,0,90, - 8,108,111,99,97,116,105,111,110,114,144,0,0,0,114,182, - 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,186,0,0,0,90,7,100,105,114,110,97,109,101,114, - 7,0,0,0,114,7,0,0,0,114,8,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,166,2,0,0,115,64,0,0,0, - 8,12,4,4,10,1,2,2,14,1,12,1,6,1,10,2, - 16,8,6,1,8,3,14,1,14,1,10,1,6,1,4,1, - 4,2,8,3,10,2,2,1,14,1,12,1,6,1,4,2, - 8,1,6,2,12,1,6,1,12,1,12,1,4,2,255,128, - 114,194,0,0,0,99,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,4,0,0,0,64,0,0,0,115,88, - 0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,100, - 2,90,4,100,3,90,5,101,6,111,30,100,4,101,7,118, - 0,90,8,101,9,100,5,100,6,132,0,131,1,90,10,101, - 11,100,7,100,8,132,0,131,1,90,12,101,11,100,14,100, - 10,100,11,132,1,131,1,90,13,101,11,100,15,100,12,100, - 13,132,1,131,1,90,14,100,9,83,0,41,16,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,122,6,95,100,46,112,121,100,99,1,0,0, - 0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0, - 0,67,0,0,0,115,50,0,0,0,122,16,116,0,160,1, - 116,0,106,2,124,0,161,2,87,0,83,0,4,0,116,3, - 121,48,1,0,1,0,1,0,116,0,160,1,116,0,106,4, - 124,0,161,2,6,0,89,0,83,0,48,0,114,114,0,0, - 0,41,5,218,6,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,58,0,0,0,90,18,72,75, - 69,89,95,76,79,67,65,76,95,77,65,67,72,73,78,69, - 114,19,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,218,14,95,111,112,101,110,95,114,101,103,105, - 115,116,114,121,246,2,0,0,115,10,0,0,0,2,2,16, - 1,12,1,20,1,255,128,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,0,0,0,0,6,0,0,0,8,0, - 0,0,67,0,0,0,115,130,0,0,0,124,0,106,0,114, - 14,124,0,106,1,125,2,110,6,124,0,106,2,125,2,124, - 2,106,3,124,1,100,1,116,4,106,5,100,0,100,2,133, - 2,25,0,22,0,100,3,141,2,125,3,122,60,124,0,160, - 6,124,3,161,1,143,28,125,4,116,7,160,8,124,4,100, - 4,161,2,125,5,87,0,100,0,4,0,4,0,131,3,1, - 0,110,16,49,0,115,94,48,0,1,0,1,0,1,0,89, - 0,1,0,87,0,124,5,83,0,4,0,116,9,121,128,1, - 0,1,0,1,0,89,0,100,0,83,0,48,0,41,5,78, - 122,5,37,100,46,37,100,114,39,0,0,0,41,2,114,143, - 0,0,0,90,11,115,121,115,95,118,101,114,115,105,111,110, - 114,10,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,70,0,0,0,114,15,0,0,0, - 218,12,118,101,114,115,105,111,110,95,105,110,102,111,114,197, - 0,0,0,114,196,0,0,0,90,10,81,117,101,114,121,86, - 97,108,117,101,114,58,0,0,0,41,6,218,3,99,108,115, - 114,143,0,0,0,90,12,114,101,103,105,115,116,114,121,95, - 107,101,121,114,20,0,0,0,90,4,104,107,101,121,218,8, - 102,105,108,101,112,97,116,104,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,16,95,115,101,97,114,99,104, - 95,114,101,103,105,115,116,114,121,253,2,0,0,115,26,0, - 0,0,6,2,8,1,6,2,6,1,16,1,6,255,2,2, - 12,1,44,1,4,3,12,254,8,1,255,128,122,38,87,105, + 32,102,111,114,32,97,32,116,105,109,101,115,116,97,109,112, + 45,98,97,115,101,100,32,112,121,99,46,114,0,0,0,0, + 78,41,6,218,9,98,121,116,101,97,114,114,97,121,114,152, + 0,0,0,218,6,101,120,116,101,110,100,114,33,0,0,0, + 114,164,0,0,0,218,5,100,117,109,112,115,41,4,114,168, + 0,0,0,218,5,109,116,105,109,101,114,159,0,0,0,114, + 37,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,22,95,99,111,100,101,95,116,111,95,116,105, + 109,101,115,116,97,109,112,95,112,121,99,129,2,0,0,115, + 14,0,0,0,8,2,14,1,14,1,14,1,16,1,4,1, + 255,128,114,174,0,0,0,84,99,3,0,0,0,0,0,0, + 0,0,0,0,0,5,0,0,0,5,0,0,0,67,0,0, + 0,115,80,0,0,0,116,0,116,1,131,1,125,3,100,1, + 124,2,100,1,62,0,66,0,125,4,124,3,160,2,116,3, + 124,4,131,1,161,1,1,0,116,4,124,1,131,1,100,2, + 107,2,115,50,74,0,130,1,124,3,160,2,124,1,161,1, + 1,0,124,3,160,2,116,5,160,6,124,0,161,1,161,1, + 1,0,124,3,83,0,41,4,122,38,80,114,111,100,117,99, + 101,32,116,104,101,32,100,97,116,97,32,102,111,114,32,97, + 32,104,97,115,104,45,98,97,115,101,100,32,112,121,99,46, + 114,3,0,0,0,114,150,0,0,0,78,41,7,114,170,0, + 0,0,114,152,0,0,0,114,171,0,0,0,114,33,0,0, + 0,114,4,0,0,0,114,164,0,0,0,114,172,0,0,0, + 41,5,114,168,0,0,0,114,161,0,0,0,90,7,99,104, + 101,99,107,101,100,114,37,0,0,0,114,16,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,17, + 95,99,111,100,101,95,116,111,95,104,97,115,104,95,112,121, + 99,139,2,0,0,115,16,0,0,0,8,2,12,1,14,1, + 16,1,10,1,16,1,4,1,255,128,114,175,0,0,0,99, + 1,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0, + 6,0,0,0,67,0,0,0,115,62,0,0,0,100,1,100, + 2,108,0,125,1,116,1,160,2,124,0,161,1,106,3,125, + 2,124,1,160,4,124,2,161,1,125,3,116,1,160,5,100, + 2,100,3,161,2,125,4,124,4,160,6,124,0,160,6,124, + 3,100,1,25,0,161,1,161,1,83,0,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,0,0,0,0,78,84,41, + 7,218,8,116,111,107,101,110,105,122,101,114,72,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,176,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,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,218,13,100, + 101,99,111,100,101,95,115,111,117,114,99,101,150,2,0,0, + 115,12,0,0,0,8,5,12,1,10,1,12,1,20,1,255, + 128,114,180,0,0,0,169,2,114,144,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,0,0, + 0,0,2,0,0,0,9,0,0,0,8,0,0,0,67,0, + 0,0,115,16,1,0,0,124,1,100,1,117,0,114,58,100, + 2,125,1,116,0,124,2,100,3,131,2,114,56,122,14,124, + 2,160,1,124,0,161,1,125,1,87,0,110,30,4,0,116, + 2,144,1,121,14,1,0,1,0,1,0,89,0,110,12,110, + 10,116,3,160,4,124,1,161,1,125,1,116,5,106,6,124, + 0,124,2,124,1,100,4,141,3,125,4,100,5,124,4,95, + 7,124,2,100,1,117,0,114,152,116,8,131,0,68,0,93, + 42,92,2,125,5,125,6,124,1,160,9,116,10,124,6,131, + 1,161,1,114,146,124,5,124,0,124,1,131,2,125,2,124, + 2,124,4,95,11,1,0,113,152,113,104,100,1,83,0,124, + 3,116,12,117,0,114,216,116,0,124,2,100,6,131,2,114, + 214,122,14,124,2,160,13,124,0,161,1,125,7,87,0,110, + 18,4,0,116,2,144,1,121,12,1,0,1,0,1,0,89, + 0,110,18,124,7,114,214,103,0,124,4,95,14,110,6,124, + 3,124,4,95,14,124,4,106,14,103,0,107,2,144,1,114, + 8,124,1,144,1,114,8,116,15,124,1,131,1,100,7,25, + 0,125,8,124,4,106,14,160,16,124,8,161,1,1,0,124, + 4,83,0,119,0,119,0,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,169,1,218,6,111,114,105,103,105,110,84, + 218,10,105,115,95,112,97,99,107,97,103,101,114,0,0,0, + 0,41,17,114,133,0,0,0,114,183,0,0,0,114,122,0, + 0,0,114,18,0,0,0,114,85,0,0,0,114,139,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,115,0,0,0,114,116, + 0,0,0,114,144,0,0,0,218,9,95,80,79,80,85,76, + 65,84,69,114,186,0,0,0,114,182,0,0,0,114,55,0, + 0,0,218,6,97,112,112,101,110,100,41,9,114,121,0,0, + 0,90,8,108,111,99,97,116,105,111,110,114,144,0,0,0, + 114,182,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,186,0,0,0,90,7,100,105,114,110,97,109, + 101,114,7,0,0,0,114,7,0,0,0,114,8,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,167,2,0,0,115,74,0, + 0,0,8,12,4,4,10,1,2,2,14,1,14,1,4,1, + 2,128,10,2,16,8,6,1,8,3,14,1,14,1,10,1, + 6,1,4,1,2,128,4,2,8,3,10,2,2,1,14,1, + 14,1,2,1,2,3,4,255,8,1,6,2,12,1,6,1, + 12,1,12,1,4,2,2,244,2,226,255,128,114,194,0,0, + 0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,4,0,0,0,64,0,0,0,115,88,0,0,0,101, + 0,90,1,100,0,90,2,100,1,90,3,100,2,90,4,100, + 3,90,5,101,6,111,30,100,4,101,7,118,0,90,8,101, + 9,100,5,100,6,132,0,131,1,90,10,101,11,100,7,100, + 8,132,0,131,1,90,12,101,11,100,14,100,10,100,11,132, + 1,131,1,90,13,101,11,100,15,100,12,100,13,132,1,131, + 1,90,14,100,9,83,0,41,16,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, + 122,6,95,100,46,112,121,100,99,1,0,0,0,0,0,0, + 0,0,0,0,0,1,0,0,0,8,0,0,0,67,0,0, + 0,115,50,0,0,0,122,16,116,0,160,1,116,0,106,2, + 124,0,161,2,87,0,83,0,4,0,116,3,121,48,1,0, + 1,0,1,0,116,0,160,1,116,0,106,4,124,0,161,2, + 6,0,89,0,83,0,119,0,114,114,0,0,0,41,5,218, + 6,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,58,0,0,0,90,18,72,75,69,89,95,76, + 79,67,65,76,95,77,65,67,72,73,78,69,114,19,0,0, + 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 218,14,95,111,112,101,110,95,114,101,103,105,115,116,114,121, + 247,2,0,0,115,12,0,0,0,2,2,16,1,12,1,18, + 1,2,255,255,128,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,0,0,0,0,6,0,0,0,8,0,0,0, + 67,0,0,0,115,130,0,0,0,124,0,106,0,114,14,124, + 0,106,1,125,2,110,6,124,0,106,2,125,2,124,2,106, + 3,124,1,100,1,116,4,106,5,100,0,100,2,133,2,25, + 0,22,0,100,3,141,2,125,3,122,60,124,0,160,6,124, + 3,161,1,143,28,125,4,116,7,160,8,124,4,100,4,161, + 2,125,5,87,0,100,0,4,0,4,0,131,3,1,0,110, + 16,49,0,115,94,119,1,1,0,1,0,1,0,89,0,1, + 0,87,0,124,5,83,0,4,0,116,9,121,128,1,0,1, + 0,1,0,89,0,100,0,83,0,119,0,41,5,78,122,5, + 37,100,46,37,100,114,39,0,0,0,41,2,114,143,0,0, + 0,90,11,115,121,115,95,118,101,114,115,105,111,110,114,10, + 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,70,0,0,0,114,15,0,0,0,218,12, + 118,101,114,115,105,111,110,95,105,110,102,111,114,197,0,0, + 0,114,196,0,0,0,90,10,81,117,101,114,121,86,97,108, + 117,101,114,58,0,0,0,41,6,218,3,99,108,115,114,143, + 0,0,0,90,12,114,101,103,105,115,116,114,121,95,107,101, + 121,114,20,0,0,0,90,4,104,107,101,121,218,8,102,105, + 108,101,112,97,116,104,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,218,16,95,115,101,97,114,99,104,95,114, + 101,103,105,115,116,114,121,254,2,0,0,115,28,0,0,0, + 6,2,8,1,6,2,6,1,16,1,6,255,2,2,12,1, + 44,1,4,3,12,254,6,1,2,255,255,128,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,0,0, - 0,0,8,0,0,0,8,0,0,0,67,0,0,0,115,118, + 0,0,8,0,0,0,8,0,0,0,67,0,0,0,115,120, 0,0,0,124,0,160,0,124,1,161,1,125,4,124,4,100, 0,117,0,114,22,100,0,83,0,122,12,116,1,124,4,131, - 1,1,0,87,0,110,20,4,0,116,2,121,54,1,0,1, - 0,1,0,89,0,100,0,83,0,48,0,116,3,131,0,68, - 0,93,50,92,2,125,5,125,6,124,4,160,4,116,5,124, - 6,131,1,161,1,114,62,116,6,106,7,124,1,124,5,124, - 1,124,4,131,2,124,4,100,1,141,3,125,7,124,7,2, - 0,1,0,83,0,100,0,83,0,41,2,78,114,184,0,0, - 0,41,8,114,204,0,0,0,114,57,0,0,0,114,58,0, - 0,0,114,188,0,0,0,114,115,0,0,0,114,116,0,0, - 0,114,139,0,0,0,218,16,115,112,101,99,95,102,114,111, - 109,95,108,111,97,100,101,114,41,8,114,202,0,0,0,114, - 143,0,0,0,114,52,0,0,0,218,6,116,97,114,103,101, - 116,114,203,0,0,0,114,144,0,0,0,114,193,0,0,0, - 114,191,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,218,9,102,105,110,100,95,115,112,101,99,12, - 3,0,0,115,32,0,0,0,10,2,8,1,4,1,2,1, - 12,1,12,1,8,1,14,1,14,1,6,1,8,1,2,1, - 6,254,8,3,4,128,255,128,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,0,0,0,0,4,0,0,0,4,0,0,0,67,0, - 0,0,115,30,0,0,0,124,0,160,0,124,1,124,2,161, - 2,125,3,124,3,100,1,117,1,114,26,124,3,106,1,83, - 0,100,1,83,0,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,169,2,114,207,0,0,0,114,144,0, - 0,0,169,4,114,202,0,0,0,114,143,0,0,0,114,52, - 0,0,0,114,191,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,11,102,105,110,100,95,109,111, - 100,117,108,101,28,3,0,0,115,10,0,0,0,12,7,8, - 1,6,1,4,2,255,128,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,2,78,78,41,1, - 78,41,15,114,130,0,0,0,114,129,0,0,0,114,131,0, - 0,0,114,132,0,0,0,114,200,0,0,0,114,199,0,0, - 0,218,11,95,77,83,95,87,73,78,68,79,87,83,218,18, - 69,88,84,69,78,83,73,79,78,95,83,85,70,70,73,88, - 69,83,114,198,0,0,0,218,12,115,116,97,116,105,99,109, - 101,116,104,111,100,114,197,0,0,0,218,11,99,108,97,115, - 115,109,101,116,104,111,100,114,204,0,0,0,114,207,0,0, - 0,114,210,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,114,195,0,0,0,234, - 2,0,0,115,32,0,0,0,8,0,4,2,2,3,2,255, - 2,4,2,255,12,3,2,2,10,1,2,6,10,1,2,14, - 12,1,2,15,16,1,255,128,114,195,0,0,0,99,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,64,0,0,0,115,48,0,0,0,101,0,90,1,100, - 0,90,2,100,1,90,3,100,2,100,3,132,0,90,4,100, - 4,100,5,132,0,90,5,100,6,100,7,132,0,90,6,100, - 8,100,9,132,0,90,7,100,10,83,0,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,0,0,0,0,5,0, - 0,0,4,0,0,0,67,0,0,0,115,64,0,0,0,116, - 0,124,0,160,1,124,1,161,1,131,1,100,1,25,0,125, - 2,124,2,160,2,100,2,100,1,161,2,100,3,25,0,125, - 3,124,1,160,3,100,2,161,1,100,4,25,0,125,4,124, - 3,100,5,107,2,111,62,124,4,100,5,107,3,83,0,41, - 7,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,3,0,0,0,114,79,0,0,0,114,0,0,0,0,114, - 39,0,0,0,218,8,95,95,105,110,105,116,95,95,78,41, - 4,114,55,0,0,0,114,183,0,0,0,114,51,0,0,0, - 114,49,0,0,0,41,5,114,123,0,0,0,114,143,0,0, - 0,114,101,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, + 1,1,0,87,0,110,18,4,0,116,2,121,118,1,0,1, + 0,1,0,89,0,100,0,83,0,116,3,131,0,68,0,93, + 52,92,2,125,5,125,6,124,4,160,4,116,5,124,6,131, + 1,161,1,114,112,116,6,106,7,124,1,124,5,124,1,124, + 4,131,2,124,4,100,1,141,3,125,7,124,7,2,0,1, + 0,83,0,113,60,100,0,83,0,119,0,41,2,78,114,184, + 0,0,0,41,8,114,204,0,0,0,114,57,0,0,0,114, + 58,0,0,0,114,188,0,0,0,114,115,0,0,0,114,116, + 0,0,0,114,139,0,0,0,218,16,115,112,101,99,95,102, + 114,111,109,95,108,111,97,100,101,114,41,8,114,202,0,0, + 0,114,143,0,0,0,114,52,0,0,0,218,6,116,97,114, + 103,101,116,114,203,0,0,0,114,144,0,0,0,114,193,0, + 0,0,114,191,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,218,9,102,105,110,100,95,115,112,101, + 99,13,3,0,0,115,36,0,0,0,10,2,8,1,4,1, + 2,1,12,1,12,1,6,1,14,1,14,1,6,1,8,1, + 2,1,6,254,8,3,2,128,4,251,2,254,255,128,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,0,0,0,0,4,0,0,0, + 4,0,0,0,67,0,0,0,115,30,0,0,0,124,0,160, + 0,124,1,124,2,161,2,125,3,124,3,100,1,117,1,114, + 26,124,3,106,1,83,0,100,1,83,0,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,169,2,114,207, + 0,0,0,114,144,0,0,0,169,4,114,202,0,0,0,114, + 143,0,0,0,114,52,0,0,0,114,191,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,218,11,102, + 105,110,100,95,109,111,100,117,108,101,29,3,0,0,115,10, + 0,0,0,12,7,8,1,6,1,4,2,255,128,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,2,78,78,41,1,78,41,15,114,130,0,0,0,114,129, + 0,0,0,114,131,0,0,0,114,132,0,0,0,114,200,0, + 0,0,114,199,0,0,0,218,11,95,77,83,95,87,73,78, + 68,79,87,83,218,18,69,88,84,69,78,83,73,79,78,95, + 83,85,70,70,73,88,69,83,114,198,0,0,0,218,12,115, + 116,97,116,105,99,109,101,116,104,111,100,114,197,0,0,0, + 218,11,99,108,97,115,115,109,101,116,104,111,100,114,204,0, + 0,0,114,207,0,0,0,114,210,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 114,195,0,0,0,235,2,0,0,115,32,0,0,0,8,0, + 4,2,2,3,2,255,2,4,2,255,12,3,2,2,10,1, + 2,6,10,1,2,14,12,1,2,15,16,1,255,128,114,195, + 0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,2,0,0,0,64,0,0,0,115,48,0,0, + 0,101,0,90,1,100,0,90,2,100,1,90,3,100,2,100, + 3,132,0,90,4,100,4,100,5,132,0,90,5,100,6,100, + 7,132,0,90,6,100,8,100,9,132,0,90,7,100,10,83, + 0,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, + 0,0,0,0,5,0,0,0,4,0,0,0,67,0,0,0, + 115,64,0,0,0,116,0,124,0,160,1,124,1,161,1,131, + 1,100,1,25,0,125,2,124,2,160,2,100,2,100,1,161, + 2,100,3,25,0,125,3,124,1,160,3,100,2,161,1,100, + 4,25,0,125,4,124,3,100,5,107,2,111,62,124,4,100, + 5,107,3,83,0,41,7,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,3,0,0,0,114,79,0,0,0, + 114,0,0,0,0,114,39,0,0,0,218,8,95,95,105,110, + 105,116,95,95,78,41,4,114,55,0,0,0,114,183,0,0, + 0,114,51,0,0,0,114,49,0,0,0,41,5,114,123,0, + 0,0,114,143,0,0,0,114,101,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,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,186,0,0,0,48,3,0,0,115,10, + 0,0,0,18,3,16,1,14,1,16,1,255,128,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, + 0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,0, + 115,4,0,0,0,100,1,83,0,169,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,7,0,0,0,169,2,114, + 123,0,0,0,114,191,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,218,13,99,114,101,97,116,101, + 95,109,111,100,117,108,101,56,3,0,0,115,4,0,0,0, + 4,0,255,128,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,0,0,0,0,3,0, + 0,0,5,0,0,0,67,0,0,0,115,56,0,0,0,124, + 0,160,0,124,1,106,1,161,1,125,2,124,2,100,1,117, + 0,114,36,116,2,100,2,160,3,124,1,106,1,161,1,131, + 1,130,1,116,4,160,5,116,6,124,2,124,1,106,7,161, + 3,1,0,100,1,83,0,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,130,0,0,0,114,122,0,0,0,114,70,0,0,0, + 114,139,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,136,0,0,0,41,3,114,123,0, + 0,0,218,6,109,111,100,117,108,101,114,168,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,11, + 101,120,101,99,95,109,111,100,117,108,101,59,3,0,0,115, + 14,0,0,0,12,2,8,1,6,1,4,1,6,255,20,2, + 255,128,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,0,0,0,0,2,0,0,0,4,0, + 0,0,67,0,0,0,115,12,0,0,0,116,0,160,1,124, + 0,124,1,161,2,83,0,41,2,122,26,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,78,41,2,114,139,0,0,0,218,17,95, + 108,111,97,100,95,109,111,100,117,108,101,95,115,104,105,109, + 169,2,114,123,0,0,0,114,143,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,11,108,111,97, + 100,95,109,111,100,117,108,101,67,3,0,0,115,4,0,0, + 0,12,3,255,128,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,130,0,0,0,114,129,0,0,0,114,131,0, + 0,0,114,132,0,0,0,114,186,0,0,0,114,219,0,0, + 0,114,224,0,0,0,114,227,0,0,0,114,7,0,0,0, 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 186,0,0,0,47,3,0,0,115,10,0,0,0,18,3,16, - 1,14,1,16,1,255,128,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,0,0,0,0,2,0, - 0,0,1,0,0,0,67,0,0,0,115,4,0,0,0,100, - 1,83,0,169,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,7,0,0,0,169,2,114,123,0,0,0,114,191, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,13,99,114,101,97,116,101,95,109,111,100,117,108, - 101,55,3,0,0,115,4,0,0,0,4,128,255,128,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,0,0,0,0,3,0,0,0,5,0,0,0, - 67,0,0,0,115,56,0,0,0,124,0,160,0,124,1,106, - 1,161,1,125,2,124,2,100,1,117,0,114,36,116,2,100, - 2,160,3,124,1,106,1,161,1,131,1,130,1,116,4,160, - 5,116,6,124,2,124,1,106,7,161,3,1,0,100,1,83, - 0,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,130,0,0,0, - 114,122,0,0,0,114,70,0,0,0,114,139,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,136,0,0,0,41,3,114,123,0,0,0,218,6,109,111, - 100,117,108,101,114,168,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,218,11,101,120,101,99,95,109, - 111,100,117,108,101,58,3,0,0,115,16,0,0,0,12,2, - 8,1,6,1,4,1,6,255,16,2,4,128,255,128,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,0,0,0,0,2,0,0,0,4,0,0,0,67,0, - 0,0,115,12,0,0,0,116,0,160,1,124,0,124,1,161, - 2,83,0,41,2,122,26,84,104,105,115,32,109,111,100,117, - 108,101,32,105,115,32,100,101,112,114,101,99,97,116,101,100, - 46,78,41,2,114,139,0,0,0,218,17,95,108,111,97,100, - 95,109,111,100,117,108,101,95,115,104,105,109,169,2,114,123, - 0,0,0,114,143,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,11,108,111,97,100,95,109,111, - 100,117,108,101,66,3,0,0,115,4,0,0,0,12,2,255, - 128,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, - 130,0,0,0,114,129,0,0,0,114,131,0,0,0,114,132, - 0,0,0,114,186,0,0,0,114,219,0,0,0,114,224,0, - 0,0,114,227,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,215,0,0,0, - 42,3,0,0,115,14,0,0,0,8,0,4,2,8,3,8, - 8,8,3,12,8,255,128,114,215,0,0,0,99,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0, - 0,64,0,0,0,115,74,0,0,0,101,0,90,1,100,0, - 90,2,100,1,100,2,132,0,90,3,100,3,100,4,132,0, - 90,4,100,5,100,6,132,0,90,5,100,7,100,8,132,0, - 90,6,100,9,100,10,132,0,90,7,100,11,100,12,156,1, - 100,13,100,14,132,2,90,8,100,15,100,16,132,0,90,9, - 100,17,83,0,41,18,218,12,83,111,117,114,99,101,76,111, - 97,100,101,114,99,2,0,0,0,0,0,0,0,0,0,0, - 0,2,0,0,0,1,0,0,0,67,0,0,0,115,4,0, - 0,0,116,0,130,1,41,2,122,165,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,32,40,97,32,115,116,114,41,46,10,10,32, - 32,32,32,32,32,32,32,82,97,105,115,101,115,32,79,83, - 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,114,58,0,0,0,169,2,114,123,0,0,0,114,52, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,10,112,97,116,104,95,109,116,105,109,101,73,3, - 0,0,115,4,0,0,0,4,6,255,128,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,0,0,0, - 0,2,0,0,0,4,0,0,0,67,0,0,0,115,14,0, - 0,0,100,1,124,0,160,0,124,1,161,1,105,1,83,0, - 41,3,97,158,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,10,32,32,32,32,32,32,32,32,112,97,116,104,32, - 40,97,32,115,116,114,41,46,10,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,79,83,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,173,0,0,0,78,41,1,114,230,0, - 0,0,114,229,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,10,112,97,116,104,95,115,116,97, - 116,115,81,3,0,0,115,4,0,0,0,14,12,255,128,122, + 215,0,0,0,43,3,0,0,115,14,0,0,0,8,0,4, + 2,8,3,8,8,8,3,12,8,255,128,114,215,0,0,0, + 99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,3,0,0,0,64,0,0,0,115,74,0,0,0,101,0, + 90,1,100,0,90,2,100,1,100,2,132,0,90,3,100,3, + 100,4,132,0,90,4,100,5,100,6,132,0,90,5,100,7, + 100,8,132,0,90,6,100,9,100,10,132,0,90,7,100,11, + 100,12,156,1,100,13,100,14,132,2,90,8,100,15,100,16, + 132,0,90,9,100,17,83,0,41,18,218,12,83,111,117,114, + 99,101,76,111,97,100,101,114,99,2,0,0,0,0,0,0, + 0,0,0,0,0,2,0,0,0,1,0,0,0,67,0,0, + 0,115,4,0,0,0,116,0,130,1,41,2,122,165,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,32,40,97,32,115,116,114,41, + 46,10,10,32,32,32,32,32,32,32,32,82,97,105,115,101, + 115,32,79,83,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,114,58,0,0,0,169,2,114,123,0, + 0,0,114,52,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,218,10,112,97,116,104,95,109,116,105, + 109,101,75,3,0,0,115,4,0,0,0,4,6,255,128,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,0,0,0,0,4,0,0,0,4,0,0,0,67,0,0, - 0,115,12,0,0,0,124,0,160,0,124,2,124,3,161,2, - 83,0,41,2,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,78,41,1,218,8,115, - 101,116,95,100,97,116,97,41,4,114,123,0,0,0,114,112, - 0,0,0,90,10,99,97,99,104,101,95,112,97,116,104,114, - 37,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,218,15,95,99,97,99,104,101,95,98,121,116,101, - 99,111,100,101,95,3,0,0,115,4,0,0,0,12,8,255, - 128,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,0,0,0,0,3,0,0,0, - 1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,83, - 0,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,7,0,0, - 0,41,3,114,123,0,0,0,114,52,0,0,0,114,37,0, - 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,114,232,0,0,0,105,3,0,0,115,4,0,0,0,4, - 128,255,128,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,0,0,0,0,5,0,0,0,10,0,0,0,67, - 0,0,0,115,70,0,0,0,124,0,160,0,124,1,161,1, - 125,2,122,20,124,0,160,1,124,2,161,1,125,3,87,0, - 116,4,124,3,131,1,83,0,4,0,116,2,121,68,1,0, - 125,4,1,0,122,14,116,3,100,1,124,1,100,2,141,2, - 124,4,130,2,100,3,125,4,126,4,48,0,48,0,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, - 120,0,0,0,78,41,5,114,183,0,0,0,218,8,103,101, - 116,95,100,97,116,97,114,58,0,0,0,114,122,0,0,0, - 114,180,0,0,0,41,5,114,123,0,0,0,114,143,0,0, - 0,114,52,0,0,0,114,178,0,0,0,218,3,101,120,99, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 10,103,101,116,95,115,111,117,114,99,101,112,3,0,0,115, - 24,0,0,0,10,2,2,1,12,1,8,4,14,253,4,1, - 2,1,4,255,2,1,2,255,10,128,255,128,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,114,109,0,0,0,41,1,218,9,95,111, - 112,116,105,109,105,122,101,99,3,0,0,0,0,0,0,0, - 1,0,0,0,4,0,0,0,8,0,0,0,67,0,0,0, - 115,22,0,0,0,116,0,106,1,116,2,124,1,124,2,100, - 1,100,2,124,3,100,3,141,6,83,0,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,222,0,0,0,84,41,2,218,12,100,111,110,116,95, - 105,110,104,101,114,105,116,114,89,0,0,0,78,41,3,114, - 139,0,0,0,114,221,0,0,0,218,7,99,111,109,112,105, - 108,101,41,4,114,123,0,0,0,114,37,0,0,0,114,52, - 0,0,0,114,237,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,14,115,111,117,114,99,101,95, - 116,111,95,99,111,100,101,122,3,0,0,115,8,0,0,0, - 12,5,4,1,6,255,255,128,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,0,0, - 0,0,15,0,0,0,9,0,0,0,67,0,0,0,115,28, - 2,0,0,124,0,160,0,124,1,161,1,125,2,100,1,125, - 3,100,1,125,4,100,1,125,5,100,2,125,6,100,3,125, - 7,122,12,116,1,124,2,131,1,125,8,87,0,110,24,4, - 0,116,2,121,66,1,0,1,0,1,0,100,1,125,8,89, - 0,144,1,110,42,48,0,122,14,124,0,160,3,124,2,161, - 1,125,9,87,0,110,20,4,0,116,4,121,102,1,0,1, - 0,1,0,89,0,144,1,110,6,48,0,116,5,124,9,100, - 4,25,0,131,1,125,3,122,14,124,0,160,6,124,8,161, - 1,125,10,87,0,110,18,4,0,116,4,121,148,1,0,1, - 0,1,0,89,0,110,216,48,0,124,1,124,8,100,5,156, - 2,125,11,122,148,116,7,124,10,124,1,124,11,131,3,125, - 12,116,8,124,10,131,1,100,6,100,1,133,2,25,0,125, - 13,124,12,100,7,64,0,100,8,107,3,125,6,124,6,144, - 1,114,30,124,12,100,9,64,0,100,8,107,3,125,7,116, - 9,106,10,100,10,107,3,144,1,114,50,124,7,115,248,116, - 9,106,10,100,11,107,2,144,1,114,50,124,0,160,6,124, - 2,161,1,125,4,116,9,160,11,116,12,124,4,161,2,125, - 5,116,13,124,10,124,5,124,1,124,11,131,4,1,0,110, - 20,116,14,124,10,124,3,124,9,100,12,25,0,124,1,124, - 11,131,5,1,0,87,0,110,24,4,0,116,15,116,16,102, - 2,144,1,121,76,1,0,1,0,1,0,89,0,110,32,48, - 0,116,17,160,18,100,13,124,8,124,2,161,3,1,0,116, - 19,124,13,124,1,124,8,124,2,100,14,141,4,83,0,124, - 4,100,1,117,0,144,1,114,128,124,0,160,6,124,2,161, - 1,125,4,124,0,160,20,124,4,124,2,161,2,125,14,116, - 17,160,18,100,15,124,2,161,2,1,0,116,21,106,22,144, - 2,115,24,124,8,100,1,117,1,144,2,114,24,124,3,100, - 1,117,1,144,2,114,24,124,6,144,1,114,220,124,5,100, - 1,117,0,144,1,114,206,116,9,160,11,124,4,161,1,125, - 5,116,23,124,14,124,5,124,7,131,3,125,10,110,16,116, - 24,124,14,124,3,116,25,124,4,131,1,131,3,125,10,122, - 20,124,0,160,26,124,2,124,8,124,10,161,3,1,0,87, - 0,124,14,83,0,4,0,116,2,144,2,121,22,1,0,1, - 0,1,0,89,0,124,14,83,0,48,0,124,14,83,0,41, - 16,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,70,84,114,173,0,0,0,114,163,0,0,0,114,149, - 0,0,0,114,3,0,0,0,114,0,0,0,0,114,39,0, - 0,0,90,5,110,101,118,101,114,90,6,97,108,119,97,121, - 115,218,4,115,105,122,101,122,13,123,125,32,109,97,116,99, - 104,101,115,32,123,125,41,3,114,121,0,0,0,114,111,0, - 0,0,114,112,0,0,0,122,19,99,111,100,101,32,111,98, - 106,101,99,116,32,102,114,111,109,32,123,125,41,27,114,183, - 0,0,0,114,102,0,0,0,114,88,0,0,0,114,231,0, - 0,0,114,58,0,0,0,114,30,0,0,0,114,234,0,0, - 0,114,156,0,0,0,218,10,109,101,109,111,114,121,118,105, - 101,119,114,167,0,0,0,90,21,99,104,101,99,107,95,104, - 97,115,104,95,98,97,115,101,100,95,112,121,99,115,114,161, - 0,0,0,218,17,95,82,65,87,95,77,65,71,73,67,95, - 78,85,77,66,69,82,114,162,0,0,0,114,160,0,0,0, - 114,122,0,0,0,114,154,0,0,0,114,139,0,0,0,114, - 153,0,0,0,114,169,0,0,0,114,240,0,0,0,114,15, - 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,175,0,0,0,114,174,0, - 0,0,114,4,0,0,0,114,233,0,0,0,41,15,114,123, - 0,0,0,114,143,0,0,0,114,112,0,0,0,114,158,0, - 0,0,114,178,0,0,0,114,161,0,0,0,90,10,104,97, - 115,104,95,98,97,115,101,100,90,12,99,104,101,99,107,95, - 115,111,117,114,99,101,114,111,0,0,0,218,2,115,116,114, - 37,0,0,0,114,155,0,0,0,114,16,0,0,0,90,10, - 98,121,116,101,115,95,100,97,116,97,90,11,99,111,100,101, - 95,111,98,106,101,99,116,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,114,220,0,0,0,130,3,0,0,115, - 160,0,0,0,10,7,4,1,4,1,4,1,4,1,4,1, - 2,1,12,1,12,1,12,1,2,2,14,1,12,1,8,1, - 12,2,2,1,14,1,12,1,6,1,2,3,2,1,6,254, - 2,4,12,1,16,1,12,1,6,1,12,1,12,1,2,1, - 2,255,8,2,4,254,10,3,4,1,2,1,2,1,4,254, - 8,4,2,1,6,255,2,3,2,1,2,1,6,1,2,1, - 2,1,8,251,18,7,6,1,8,2,2,1,4,255,6,2, - 2,1,2,1,6,254,10,3,10,1,12,1,12,1,18,1, - 6,1,4,255,6,2,10,1,10,1,14,1,6,2,6,1, - 4,255,2,2,16,1,4,3,14,254,2,1,4,1,2,255, - 4,1,255,128,122,21,83,111,117,114,99,101,76,111,97,100, - 101,114,46,103,101,116,95,99,111,100,101,78,41,10,114,130, - 0,0,0,114,129,0,0,0,114,131,0,0,0,114,230,0, - 0,0,114,231,0,0,0,114,233,0,0,0,114,232,0,0, - 0,114,236,0,0,0,114,240,0,0,0,114,220,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,228,0,0,0,71,3,0,0,115,18,0, - 0,0,8,0,8,2,8,8,8,14,8,10,8,7,14,10, - 12,8,255,128,114,228,0,0,0,99,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0, - 0,0,115,92,0,0,0,101,0,90,1,100,0,90,2,100, - 1,90,3,100,2,100,3,132,0,90,4,100,4,100,5,132, - 0,90,5,100,6,100,7,132,0,90,6,101,7,135,0,102, - 1,100,8,100,9,132,8,131,1,90,8,101,7,100,10,100, - 11,132,0,131,1,90,9,100,12,100,13,132,0,90,10,101, - 7,100,14,100,15,132,0,131,1,90,11,135,0,4,0,90, - 12,83,0,41,16,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,0,0,0,0,3,0,0,0,2,0,0,0,67, - 0,0,0,115,16,0,0,0,124,1,124,0,95,0,124,2, - 124,0,95,1,100,1,83,0,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,114,163,0,0,0,41,3,114, - 123,0,0,0,114,143,0,0,0,114,52,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,216,0, - 0,0,220,3,0,0,115,8,0,0,0,6,3,6,1,4, - 128,255,128,122,19,70,105,108,101,76,111,97,100,101,114,46, + 116,104,95,109,116,105,109,101,99,2,0,0,0,0,0,0, + 0,0,0,0,0,2,0,0,0,4,0,0,0,67,0,0, + 0,115,14,0,0,0,100,1,124,0,160,0,124,1,161,1, + 105,1,83,0,41,3,97,158,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,10,32,32,32,32,32,32,32,32,112, + 97,116,104,32,40,97,32,115,116,114,41,46,10,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,79,83,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,173,0,0,0,78,41, + 1,114,230,0,0,0,114,229,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,218,10,112,97,116,104, + 95,115,116,97,116,115,83,3,0,0,115,4,0,0,0,14, + 12,255,128,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,0,0,0,0,4,0,0,0,4,0,0, + 0,67,0,0,0,115,12,0,0,0,124,0,160,0,124,2, + 124,3,161,2,83,0,41,2,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,78,41, + 1,218,8,115,101,116,95,100,97,116,97,41,4,114,123,0, + 0,0,114,112,0,0,0,90,10,99,97,99,104,101,95,112, + 97,116,104,114,37,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,218,15,95,99,97,99,104,101,95, + 98,121,116,101,99,111,100,101,97,3,0,0,115,4,0,0, + 0,12,8,255,128,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,0,0,0,0, + 3,0,0,0,1,0,0,0,67,0,0,0,115,4,0,0, + 0,100,1,83,0,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,7,0,0,0,41,3,114,123,0,0,0,114,52,0,0, + 0,114,37,0,0,0,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,232,0,0,0,107,3,0,0,115,4, + 0,0,0,4,0,255,128,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,0,0,0,0,5,0,0,0,10, + 0,0,0,67,0,0,0,115,70,0,0,0,124,0,160,0, + 124,1,161,1,125,2,122,20,124,0,160,1,124,2,161,1, + 125,3,87,0,116,4,124,3,131,1,83,0,4,0,116,2, + 121,68,1,0,125,4,1,0,122,14,116,3,100,1,124,1, + 100,2,141,2,124,4,130,2,100,3,125,4,126,4,119,1, + 119,0,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,120,0,0,0,78,41,5,114,183,0,0,0, + 218,8,103,101,116,95,100,97,116,97,114,58,0,0,0,114, + 122,0,0,0,114,180,0,0,0,41,5,114,123,0,0,0, + 114,143,0,0,0,114,52,0,0,0,114,178,0,0,0,218, + 3,101,120,99,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,10,103,101,116,95,115,111,117,114,99,101,114, + 3,0,0,115,26,0,0,0,10,2,2,1,12,1,8,4, + 14,253,4,1,2,1,4,255,2,1,2,255,8,128,2,255, + 255,128,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,114,109,0,0,0, + 41,1,218,9,95,111,112,116,105,109,105,122,101,99,3,0, + 0,0,0,0,0,0,1,0,0,0,4,0,0,0,8,0, + 0,0,67,0,0,0,115,22,0,0,0,116,0,106,1,116, + 2,124,1,124,2,100,1,100,2,124,3,100,3,141,6,83, + 0,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,222,0,0,0,84,41,2,218, + 12,100,111,110,116,95,105,110,104,101,114,105,116,114,89,0, + 0,0,78,41,3,114,139,0,0,0,114,221,0,0,0,218, + 7,99,111,109,112,105,108,101,41,4,114,123,0,0,0,114, + 37,0,0,0,114,52,0,0,0,114,237,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,218,14,115, + 111,117,114,99,101,95,116,111,95,99,111,100,101,124,3,0, + 0,115,8,0,0,0,12,5,4,1,6,255,255,128,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,0,0,0,0,15,0,0,0,9,0,0,0, + 67,0,0,0,115,34,2,0,0,124,0,160,0,124,1,161, + 1,125,2,100,1,125,3,100,1,125,4,100,1,125,5,100, + 2,125,6,100,3,125,7,122,12,116,1,124,2,131,1,125, + 8,87,0,110,24,4,0,116,2,144,2,121,32,1,0,1, + 0,1,0,100,1,125,8,89,0,144,1,110,38,122,14,124, + 0,160,3,124,2,161,1,125,9,87,0,110,20,4,0,116, + 4,144,2,121,30,1,0,1,0,1,0,89,0,144,1,110, + 2,116,5,124,9,100,4,25,0,131,1,125,3,122,14,124, + 0,160,6,124,8,161,1,125,10,87,0,110,18,4,0,116, + 4,144,2,121,28,1,0,1,0,1,0,89,0,110,212,124, + 1,124,8,100,5,156,2,125,11,122,148,116,7,124,10,124, + 1,124,11,131,3,125,12,116,8,124,10,131,1,100,6,100, + 1,133,2,25,0,125,13,124,12,100,7,64,0,100,8,107, + 3,125,6,124,6,144,1,114,30,124,12,100,9,64,0,100, + 8,107,3,125,7,116,9,106,10,100,10,107,3,144,1,114, + 28,124,7,115,248,116,9,106,10,100,11,107,2,144,1,114, + 28,124,0,160,6,124,2,161,1,125,4,116,9,160,11,116, + 12,124,4,161,2,125,5,116,13,124,10,124,5,124,1,124, + 11,131,4,1,0,110,20,116,14,124,10,124,3,124,9,100, + 12,25,0,124,1,124,11,131,5,1,0,87,0,110,22,4, + 0,116,15,116,16,102,2,144,2,121,26,1,0,1,0,1, + 0,89,0,110,30,116,17,160,18,100,13,124,8,124,2,161, + 3,1,0,116,19,124,13,124,1,124,8,124,2,100,14,141, + 4,83,0,124,4,100,1,117,0,144,1,114,126,124,0,160, + 6,124,2,161,1,125,4,124,0,160,20,124,4,124,2,161, + 2,125,14,116,17,160,18,100,15,124,2,161,2,1,0,116, + 21,106,22,144,2,115,20,124,8,100,1,117,1,144,2,114, + 20,124,3,100,1,117,1,144,2,114,20,124,6,144,1,114, + 218,124,5,100,1,117,0,144,1,114,204,116,9,160,11,124, + 4,161,1,125,5,116,23,124,14,124,5,124,7,131,3,125, + 10,110,16,116,24,124,14,124,3,116,25,124,4,131,1,131, + 3,125,10,122,20,124,0,160,26,124,2,124,8,124,10,161, + 3,1,0,87,0,124,14,83,0,4,0,116,2,144,2,121, + 24,1,0,1,0,1,0,89,0,124,14,83,0,124,14,83, + 0,119,0,119,0,119,0,119,0,119,0,41,16,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,70,84, + 114,173,0,0,0,114,163,0,0,0,114,149,0,0,0,114, + 3,0,0,0,114,0,0,0,0,114,39,0,0,0,90,5, + 110,101,118,101,114,90,6,97,108,119,97,121,115,218,4,115, + 105,122,101,122,13,123,125,32,109,97,116,99,104,101,115,32, + 123,125,41,3,114,121,0,0,0,114,111,0,0,0,114,112, + 0,0,0,122,19,99,111,100,101,32,111,98,106,101,99,116, + 32,102,114,111,109,32,123,125,41,27,114,183,0,0,0,114, + 102,0,0,0,114,88,0,0,0,114,231,0,0,0,114,58, + 0,0,0,114,30,0,0,0,114,234,0,0,0,114,156,0, + 0,0,218,10,109,101,109,111,114,121,118,105,101,119,114,167, + 0,0,0,90,21,99,104,101,99,107,95,104,97,115,104,95, + 98,97,115,101,100,95,112,121,99,115,114,161,0,0,0,218, + 17,95,82,65,87,95,77,65,71,73,67,95,78,85,77,66, + 69,82,114,162,0,0,0,114,160,0,0,0,114,122,0,0, + 0,114,154,0,0,0,114,139,0,0,0,114,153,0,0,0, + 114,169,0,0,0,114,240,0,0,0,114,15,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,175,0,0,0,114,174,0,0,0,114,4, + 0,0,0,114,233,0,0,0,41,15,114,123,0,0,0,114, + 143,0,0,0,114,112,0,0,0,114,158,0,0,0,114,178, + 0,0,0,114,161,0,0,0,90,10,104,97,115,104,95,98, + 97,115,101,100,90,12,99,104,101,99,107,95,115,111,117,114, + 99,101,114,111,0,0,0,218,2,115,116,114,37,0,0,0, + 114,155,0,0,0,114,16,0,0,0,90,10,98,121,116,101, + 115,95,100,97,116,97,90,11,99,111,100,101,95,111,98,106, + 101,99,116,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,114,220,0,0,0,132,3,0,0,115,166,0,0,0, + 10,7,4,1,4,1,4,1,4,1,4,1,2,1,12,1, + 14,1,10,1,2,2,14,1,14,1,6,1,12,2,2,1, + 14,1,14,1,4,1,2,3,2,1,6,254,2,4,12,1, + 16,1,12,1,6,1,12,1,12,1,2,1,2,255,8,2, + 4,254,10,3,4,1,2,1,2,1,4,254,8,4,2,1, + 6,255,2,3,2,1,2,1,6,1,2,1,2,1,8,251, + 18,7,4,1,8,2,2,1,4,255,6,2,2,1,2,1, + 6,254,10,3,10,1,12,1,12,1,18,1,6,1,4,255, + 6,2,10,1,10,1,14,1,6,2,6,1,4,255,2,2, + 16,1,4,3,14,254,2,1,8,1,2,254,2,233,2,225, + 2,250,2,251,255,128,122,21,83,111,117,114,99,101,76,111, + 97,100,101,114,46,103,101,116,95,99,111,100,101,78,41,10, + 114,130,0,0,0,114,129,0,0,0,114,131,0,0,0,114, + 230,0,0,0,114,231,0,0,0,114,233,0,0,0,114,232, + 0,0,0,114,236,0,0,0,114,240,0,0,0,114,220,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,228,0,0,0,73,3,0,0,115, + 18,0,0,0,8,0,8,2,8,8,8,14,8,10,8,7, + 14,10,12,8,255,128,114,228,0,0,0,99,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, + 0,0,0,0,115,92,0,0,0,101,0,90,1,100,0,90, + 2,100,1,90,3,100,2,100,3,132,0,90,4,100,4,100, + 5,132,0,90,5,100,6,100,7,132,0,90,6,101,7,135, + 0,102,1,100,8,100,9,132,8,131,1,90,8,101,7,100, + 10,100,11,132,0,131,1,90,9,100,12,100,13,132,0,90, + 10,101,7,100,14,100,15,132,0,131,1,90,11,135,0,4, + 0,90,12,83,0,41,16,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,0,0,0,0,3,0,0,0,2,0,0, + 0,67,0,0,0,115,16,0,0,0,124,1,124,0,95,0, + 124,2,124,0,95,1,100,1,83,0,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,114,163,0,0,0,41, + 3,114,123,0,0,0,114,143,0,0,0,114,52,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, + 216,0,0,0,222,3,0,0,115,6,0,0,0,6,3,10, + 1,255,128,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,0,0,0,0,2,0,0,0,2,0,0,0,67,0,0, 0,115,24,0,0,0,124,0,106,0,124,1,106,0,107,2, @@ -1466,7 +1469,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 0,0,0,169,2,218,9,95,95,99,108,97,115,115,95,95, 114,136,0,0,0,169,2,114,123,0,0,0,90,5,111,116, 104,101,114,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,6,95,95,101,113,95,95,226,3,0,0,115,8, + 0,0,218,6,95,95,101,113,95,95,228,3,0,0,115,8, 0,0,0,12,1,10,1,2,255,255,128,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,0,0,0,0,1,0,0,0,3, @@ -1475,7 +1478,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 114,114,0,0,0,169,3,218,4,104,97,115,104,114,121,0, 0,0,114,52,0,0,0,169,1,114,123,0,0,0,114,7, 0,0,0,114,7,0,0,0,114,8,0,0,0,218,8,95, - 95,104,97,115,104,95,95,230,3,0,0,115,4,0,0,0, + 95,104,97,115,104,95,95,232,3,0,0,115,4,0,0,0, 20,1,255,128,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,0,0,0,0,2,0,0,0,3,0,0,0,3,0, @@ -1489,7 +1492,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 116,101,97,100,46,10,10,32,32,32,32,32,32,32,32,78, 41,3,218,5,115,117,112,101,114,114,246,0,0,0,114,227, 0,0,0,114,226,0,0,0,169,1,114,248,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,227,0,0,0,233,3, + 7,0,0,0,114,8,0,0,0,114,227,0,0,0,235,3, 0,0,115,4,0,0,0,16,10,255,128,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,0,0,0,0, @@ -1500,7 +1503,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 32,102,111,117,110,100,32,98,121,32,116,104,101,32,102,105, 110,100,101,114,46,78,114,56,0,0,0,114,226,0,0,0, 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 183,0,0,0,245,3,0,0,115,4,0,0,0,6,3,255, + 183,0,0,0,247,3,0,0,115,4,0,0,0,6,3,255, 128,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,0,0,0,0,3,0,0,0,8,0,0,0,67, @@ -1508,10 +1511,10 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 102,2,131,2,114,72,116,3,160,4,116,5,124,1,131,1, 161,1,143,24,125,2,124,2,160,6,161,0,87,0,2,0, 100,1,4,0,4,0,131,3,1,0,83,0,49,0,115,58, - 48,0,1,0,1,0,1,0,89,0,1,0,100,1,83,0, + 119,1,1,0,1,0,1,0,89,0,1,0,100,1,83,0, 116,3,160,7,124,1,100,2,161,2,143,24,125,2,124,2, 160,6,161,0,87,0,2,0,100,1,4,0,4,0,131,3, - 1,0,83,0,49,0,115,114,48,0,1,0,1,0,1,0, + 1,0,83,0,49,0,115,114,119,1,1,0,1,0,1,0, 89,0,1,0,100,1,83,0,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, @@ -1521,220 +1524,221 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 112,101,110,95,99,111,100,101,114,90,0,0,0,90,4,114, 101,97,100,114,73,0,0,0,41,3,114,123,0,0,0,114, 52,0,0,0,114,76,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,234,0,0,0,250,3,0, - 0,115,16,0,0,0,14,2,16,1,38,1,4,128,14,2, - 38,1,4,128,255,128,122,19,70,105,108,101,76,111,97,100, - 101,114,46,103,101,116,95,100,97,116,97,99,2,0,0,0, - 0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0, - 67,0,0,0,115,20,0,0,0,100,1,100,2,108,0,109, - 1,125,2,1,0,124,2,124,0,131,1,83,0,41,3,78, - 114,0,0,0,0,41,1,218,10,70,105,108,101,82,101,97, - 100,101,114,41,2,90,17,105,109,112,111,114,116,108,105,98, - 46,114,101,97,100,101,114,115,114,4,1,0,0,41,3,114, - 123,0,0,0,114,223,0,0,0,114,4,1,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,19,103, - 101,116,95,114,101,115,111,117,114,99,101,95,114,101,97,100, - 101,114,3,4,0,0,115,6,0,0,0,12,2,8,1,255, - 128,122,30,70,105,108,101,76,111,97,100,101,114,46,103,101, - 116,95,114,101,115,111,117,114,99,101,95,114,101,97,100,101, - 114,41,13,114,130,0,0,0,114,129,0,0,0,114,131,0, - 0,0,114,132,0,0,0,114,216,0,0,0,114,250,0,0, - 0,114,254,0,0,0,114,140,0,0,0,114,227,0,0,0, - 114,183,0,0,0,114,234,0,0,0,114,5,1,0,0,90, - 13,95,95,99,108,97,115,115,99,101,108,108,95,95,114,7, - 0,0,0,114,7,0,0,0,114,0,1,0,0,114,8,0, - 0,0,114,246,0,0,0,215,3,0,0,115,26,0,0,0, - 8,0,4,2,8,3,8,6,8,4,2,3,14,1,2,11, - 10,1,8,4,2,9,18,1,255,128,114,246,0,0,0,99, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 3,0,0,0,64,0,0,0,115,46,0,0,0,101,0,90, - 1,100,0,90,2,100,1,90,3,100,2,100,3,132,0,90, - 4,100,4,100,5,132,0,90,5,100,6,100,7,156,1,100, - 8,100,9,132,2,90,6,100,10,83,0,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,0,0,0,0,3,0,0,0, - 3,0,0,0,67,0,0,0,115,22,0,0,0,116,0,124, - 1,131,1,125,2,124,2,106,1,124,2,106,2,100,1,156, - 2,83,0,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,41,2,114,173,0,0,0,114, - 241,0,0,0,78,41,3,114,57,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,123,0,0,0,114,52,0,0,0,114,245,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 231,0,0,0,13,4,0,0,115,6,0,0,0,8,2,14, - 1,255,128,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,0,0,0,0,5,0,0, - 0,5,0,0,0,67,0,0,0,115,24,0,0,0,116,0, - 124,1,131,1,125,4,124,0,106,1,124,2,124,3,124,4, - 100,1,141,3,83,0,41,2,78,169,1,218,5,95,109,111, - 100,101,41,2,114,119,0,0,0,114,232,0,0,0,41,5, - 114,123,0,0,0,114,112,0,0,0,114,111,0,0,0,114, - 37,0,0,0,114,60,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,233,0,0,0,18,4,0, - 0,115,6,0,0,0,8,2,16,1,255,128,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,68, - 0,0,0,114,8,1,0,0,99,3,0,0,0,0,0,0, - 0,1,0,0,0,9,0,0,0,11,0,0,0,67,0,0, - 0,115,244,0,0,0,116,0,124,1,131,1,92,2,125,4, - 125,5,103,0,125,6,124,4,114,52,116,1,124,4,131,1, - 115,52,116,0,124,4,131,1,92,2,125,4,125,7,124,6, - 160,2,124,7,161,1,1,0,113,16,116,3,124,6,131,1, - 68,0,93,98,125,7,116,4,124,4,124,7,131,2,125,4, - 122,14,116,5,160,6,124,4,161,1,1,0,87,0,113,60, - 4,0,116,7,121,106,1,0,1,0,1,0,89,0,113,60, - 4,0,116,8,121,158,1,0,125,8,1,0,122,30,116,9, - 160,10,100,1,124,4,124,8,161,3,1,0,87,0,89,0, - 100,2,125,8,126,8,1,0,100,2,83,0,100,2,125,8, - 126,8,48,0,48,0,122,30,116,11,124,1,124,2,124,3, - 131,3,1,0,116,9,160,10,100,3,124,1,161,2,1,0, - 87,0,100,2,83,0,4,0,116,8,121,242,1,0,125,8, - 1,0,122,28,116,9,160,10,100,1,124,1,124,8,161,3, - 1,0,87,0,89,0,100,2,125,8,126,8,100,2,83,0, - 100,2,125,8,126,8,48,0,48,0,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,12,114,55,0,0,0,114,64,0,0, - 0,114,190,0,0,0,114,50,0,0,0,114,48,0,0,0, - 114,18,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,58,0, - 0,0,114,139,0,0,0,114,153,0,0,0,114,77,0,0, - 0,41,9,114,123,0,0,0,114,52,0,0,0,114,37,0, - 0,0,114,9,1,0,0,218,6,112,97,114,101,110,116,114, - 101,0,0,0,114,47,0,0,0,114,43,0,0,0,114,235, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,232,0,0,0,23,4,0,0,115,54,0,0,0, - 12,2,4,1,12,2,12,1,12,1,12,2,10,1,2,1, - 14,1,12,1,4,2,14,1,6,3,4,1,4,255,16,2, - 10,128,2,1,12,1,14,1,4,128,14,1,8,2,2,1, - 8,255,20,128,255,128,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,130,0,0,0,114,129,0,0,0,114,131, - 0,0,0,114,132,0,0,0,114,231,0,0,0,114,233,0, - 0,0,114,232,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,6,1,0,0, - 9,4,0,0,115,12,0,0,0,8,0,4,2,8,2,8, - 5,18,5,255,128,114,6,1,0,0,99,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,64, - 0,0,0,115,32,0,0,0,101,0,90,1,100,0,90,2, - 100,1,90,3,100,2,100,3,132,0,90,4,100,4,100,5, - 132,0,90,5,100,6,83,0,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,0,0,0,0,5,0,0,0, - 5,0,0,0,67,0,0,0,115,68,0,0,0,124,0,160, - 0,124,1,161,1,125,2,124,0,160,1,124,2,161,1,125, - 3,124,1,124,2,100,1,156,2,125,4,116,2,124,3,124, - 1,124,4,131,3,1,0,116,3,116,4,124,3,131,1,100, - 2,100,0,133,2,25,0,124,1,124,2,100,3,141,3,83, - 0,41,4,78,114,163,0,0,0,114,149,0,0,0,41,2, - 114,121,0,0,0,114,111,0,0,0,41,5,114,183,0,0, - 0,114,234,0,0,0,114,156,0,0,0,114,169,0,0,0, - 114,242,0,0,0,41,5,114,123,0,0,0,114,143,0,0, - 0,114,52,0,0,0,114,37,0,0,0,114,155,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 220,0,0,0,58,4,0,0,115,24,0,0,0,10,1,10, - 1,2,4,2,1,6,254,12,4,2,1,14,1,2,1,2, - 1,6,253,255,128,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,0,0,0, - 0,2,0,0,0,1,0,0,0,67,0,0,0,115,4,0, - 0,0,100,1,83,0,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,7,0,0,0,114,226,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,236,0,0,0, - 74,4,0,0,115,4,0,0,0,4,2,255,128,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,130,0,0,0,114,129,0,0,0,114,131,0,0,0, - 114,132,0,0,0,114,220,0,0,0,114,236,0,0,0,114, - 7,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,114,12,1,0,0,54,4,0,0,115,10,0,0, - 0,8,0,4,2,8,2,12,16,255,128,114,12,1,0,0, - 99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,3,0,0,0,64,0,0,0,115,92,0,0,0,101,0, - 90,1,100,0,90,2,100,1,90,3,100,2,100,3,132,0, - 90,4,100,4,100,5,132,0,90,5,100,6,100,7,132,0, - 90,6,100,8,100,9,132,0,90,7,100,10,100,11,132,0, - 90,8,100,12,100,13,132,0,90,9,100,14,100,15,132,0, - 90,10,100,16,100,17,132,0,90,11,101,12,100,18,100,19, - 132,0,131,1,90,13,100,20,83,0,41,21,114,3,1,0, - 0,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,0,0,0,0,3,0,0, - 0,2,0,0,0,67,0,0,0,115,16,0,0,0,124,1, - 124,0,95,0,124,2,124,0,95,1,100,0,83,0,114,114, - 0,0,0,114,163,0,0,0,41,3,114,123,0,0,0,114, - 121,0,0,0,114,52,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,216,0,0,0,87,4,0, - 0,115,8,0,0,0,6,1,6,1,4,128,255,128,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,0,0,0,0,2,0,0,0,2,0,0, - 0,67,0,0,0,115,24,0,0,0,124,0,106,0,124,1, - 106,0,107,2,111,22,124,0,106,1,124,1,106,1,107,2, - 83,0,114,114,0,0,0,114,247,0,0,0,114,249,0,0, + 0,0,0,114,8,0,0,0,114,234,0,0,0,252,3,0, + 0,115,14,0,0,0,14,2,16,1,42,1,14,2,38,1, + 4,128,255,128,122,19,70,105,108,101,76,111,97,100,101,114, + 46,103,101,116,95,100,97,116,97,99,2,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,0,2,0,0,0,67,0, + 0,0,115,20,0,0,0,100,1,100,2,108,0,109,1,125, + 2,1,0,124,2,124,0,131,1,83,0,41,3,78,114,0, + 0,0,0,41,1,218,10,70,105,108,101,82,101,97,100,101, + 114,41,2,90,17,105,109,112,111,114,116,108,105,98,46,114, + 101,97,100,101,114,115,114,4,1,0,0,41,3,114,123,0, + 0,0,114,223,0,0,0,114,4,1,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,19,103,101,116, + 95,114,101,115,111,117,114,99,101,95,114,101,97,100,101,114, + 5,4,0,0,115,6,0,0,0,12,2,8,1,255,128,122, + 30,70,105,108,101,76,111,97,100,101,114,46,103,101,116,95, + 114,101,115,111,117,114,99,101,95,114,101,97,100,101,114,41, + 13,114,130,0,0,0,114,129,0,0,0,114,131,0,0,0, + 114,132,0,0,0,114,216,0,0,0,114,250,0,0,0,114, + 254,0,0,0,114,140,0,0,0,114,227,0,0,0,114,183, + 0,0,0,114,234,0,0,0,114,5,1,0,0,90,13,95, + 95,99,108,97,115,115,99,101,108,108,95,95,114,7,0,0, + 0,114,7,0,0,0,114,0,1,0,0,114,8,0,0,0, + 114,246,0,0,0,217,3,0,0,115,26,0,0,0,8,0, + 4,2,8,3,8,6,8,4,2,3,14,1,2,11,10,1, + 8,4,2,9,18,1,255,128,114,246,0,0,0,99,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,64,0,0,0,115,46,0,0,0,101,0,90,1,100, + 0,90,2,100,1,90,3,100,2,100,3,132,0,90,4,100, + 4,100,5,132,0,90,5,100,6,100,7,156,1,100,8,100, + 9,132,2,90,6,100,10,83,0,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,0,0,0,0,3,0,0,0,3,0, + 0,0,67,0,0,0,115,22,0,0,0,116,0,124,1,131, + 1,125,2,124,2,106,1,124,2,106,2,100,1,156,2,83, + 0,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,41,2,114,173,0,0,0,114,241,0, + 0,0,78,41,3,114,57,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, + 123,0,0,0,114,52,0,0,0,114,245,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,231,0, + 0,0,15,4,0,0,115,6,0,0,0,8,2,14,1,255, + 128,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,0,0,0,0,5,0,0,0,5, + 0,0,0,67,0,0,0,115,24,0,0,0,116,0,124,1, + 131,1,125,4,124,0,106,1,124,2,124,3,124,4,100,1, + 141,3,83,0,41,2,78,169,1,218,5,95,109,111,100,101, + 41,2,114,119,0,0,0,114,232,0,0,0,41,5,114,123, + 0,0,0,114,112,0,0,0,114,111,0,0,0,114,37,0, + 0,0,114,60,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,233,0,0,0,20,4,0,0,115, + 6,0,0,0,8,2,16,1,255,128,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,68,0,0, + 0,114,8,1,0,0,99,3,0,0,0,0,0,0,0,1, + 0,0,0,9,0,0,0,11,0,0,0,67,0,0,0,115, + 4,1,0,0,116,0,124,1,131,1,92,2,125,4,125,5, + 103,0,125,6,124,4,114,62,116,1,124,4,131,1,115,62, + 116,0,124,4,131,1,92,2,125,4,125,7,124,6,160,2, + 124,7,161,1,1,0,124,4,114,62,116,1,124,4,131,1, + 114,28,116,3,124,6,131,1,68,0,93,98,125,7,116,4, + 124,4,124,7,131,2,125,4,122,14,116,5,160,6,124,4, + 161,1,1,0,87,0,113,70,4,0,116,7,121,116,1,0, + 1,0,1,0,89,0,113,70,4,0,116,8,144,1,121,2, + 1,0,125,8,1,0,122,30,116,9,160,10,100,1,124,4, + 124,8,161,3,1,0,87,0,89,0,100,2,125,8,126,8, + 1,0,100,2,83,0,100,2,125,8,126,8,119,1,122,30, + 116,11,124,1,124,2,124,3,131,3,1,0,116,9,160,10, + 100,3,124,1,161,2,1,0,87,0,100,2,83,0,4,0, + 116,8,121,252,1,0,125,8,1,0,122,28,116,9,160,10, + 100,1,124,1,124,8,161,3,1,0,87,0,89,0,100,2, + 125,8,126,8,100,2,83,0,100,2,125,8,126,8,119,1, + 119,0,100,2,83,0,119,0,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,12,114,55,0,0,0,114,64,0,0,0,114, + 190,0,0,0,114,50,0,0,0,114,48,0,0,0,114,18, + 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,58,0,0,0, + 114,139,0,0,0,114,153,0,0,0,114,77,0,0,0,41, + 9,114,123,0,0,0,114,52,0,0,0,114,37,0,0,0, + 114,9,1,0,0,218,6,112,97,114,101,110,116,114,101,0, + 0,0,114,47,0,0,0,114,43,0,0,0,114,235,0,0, 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,250,0,0,0,91,4,0,0,115,8,0,0,0,12,1, - 10,1,2,255,255,128,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,0,0,0,0,1, - 0,0,0,3,0,0,0,67,0,0,0,115,20,0,0,0, - 116,0,124,0,106,1,131,1,116,0,124,0,106,2,131,1, - 65,0,83,0,114,114,0,0,0,114,251,0,0,0,114,253, + 114,232,0,0,0,25,4,0,0,115,60,0,0,0,12,2, + 4,1,12,2,12,1,10,1,12,254,12,4,10,1,2,1, + 14,1,12,1,4,2,16,1,6,3,4,1,4,255,16,2, + 8,128,2,1,12,1,18,1,14,1,8,2,2,1,18,255, + 8,128,2,254,4,255,2,248,255,128,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,130,0,0,0,114,129,0, + 0,0,114,131,0,0,0,114,132,0,0,0,114,231,0,0, + 0,114,233,0,0,0,114,232,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, + 6,1,0,0,11,4,0,0,115,12,0,0,0,8,0,4, + 2,8,2,8,5,18,5,255,128,114,6,1,0,0,99,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2, + 0,0,0,64,0,0,0,115,32,0,0,0,101,0,90,1, + 100,0,90,2,100,1,90,3,100,2,100,3,132,0,90,4, + 100,4,100,5,132,0,90,5,100,6,83,0,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,0,0,0,0, + 5,0,0,0,5,0,0,0,67,0,0,0,115,68,0,0, + 0,124,0,160,0,124,1,161,1,125,2,124,0,160,1,124, + 2,161,1,125,3,124,1,124,2,100,1,156,2,125,4,116, + 2,124,3,124,1,124,4,131,3,1,0,116,3,116,4,124, + 3,131,1,100,2,100,0,133,2,25,0,124,1,124,2,100, + 3,141,3,83,0,41,4,78,114,163,0,0,0,114,149,0, + 0,0,41,2,114,121,0,0,0,114,111,0,0,0,41,5, + 114,183,0,0,0,114,234,0,0,0,114,156,0,0,0,114, + 169,0,0,0,114,242,0,0,0,41,5,114,123,0,0,0, + 114,143,0,0,0,114,52,0,0,0,114,37,0,0,0,114, + 155,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,114,220,0,0,0,60,4,0,0,115,24,0,0, + 0,10,1,10,1,2,4,2,1,6,254,12,4,2,1,14, + 1,2,1,2,1,6,253,255,128,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,0,0,0,0,2,0,0,0,1,0,0,0,67,0,0, + 0,115,4,0,0,0,100,1,83,0,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,7,0,0,0,114,226,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, + 236,0,0,0,76,4,0,0,115,4,0,0,0,4,2,255, + 128,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,130,0,0,0,114,129,0,0,0,114, + 131,0,0,0,114,132,0,0,0,114,220,0,0,0,114,236, + 0,0,0,114,7,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,12,1,0,0,56,4,0,0, + 115,10,0,0,0,8,0,4,2,8,2,12,16,255,128,114, + 12,1,0,0,99,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,3,0,0,0,64,0,0,0,115,92,0, + 0,0,101,0,90,1,100,0,90,2,100,1,90,3,100,2, + 100,3,132,0,90,4,100,4,100,5,132,0,90,5,100,6, + 100,7,132,0,90,6,100,8,100,9,132,0,90,7,100,10, + 100,11,132,0,90,8,100,12,100,13,132,0,90,9,100,14, + 100,15,132,0,90,10,100,16,100,17,132,0,90,11,101,12, + 100,18,100,19,132,0,131,1,90,13,100,20,83,0,41,21, + 114,3,1,0,0,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,0,0,0, + 0,3,0,0,0,2,0,0,0,67,0,0,0,115,16,0, + 0,0,124,1,124,0,95,0,124,2,124,0,95,1,100,0, + 83,0,114,114,0,0,0,114,163,0,0,0,41,3,114,123, + 0,0,0,114,121,0,0,0,114,52,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,114,216,0,0, + 0,89,4,0,0,115,6,0,0,0,6,1,10,1,255,128, + 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,0,0,0,0,2,0,0,0,2, + 0,0,0,67,0,0,0,115,24,0,0,0,124,0,106,0, + 124,1,106,0,107,2,111,22,124,0,106,1,124,1,106,1, + 107,2,83,0,114,114,0,0,0,114,247,0,0,0,114,249, 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,254,0,0,0,95,4,0,0,115,4,0,0,0, - 20,1,255,128,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,0,0,0,0,3, - 0,0,0,5,0,0,0,67,0,0,0,115,36,0,0,0, - 116,0,160,1,116,2,106,3,124,1,161,2,125,2,116,0, - 160,4,100,1,124,1,106,5,124,0,106,6,161,3,1,0, - 124,2,83,0,41,3,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, + 0,0,114,250,0,0,0,93,4,0,0,115,8,0,0,0, + 12,1,10,1,2,255,255,128,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,0,0,0, + 0,1,0,0,0,3,0,0,0,67,0,0,0,115,20,0, + 0,0,116,0,124,0,106,1,131,1,116,0,124,0,106,2, + 131,1,65,0,83,0,114,114,0,0,0,114,251,0,0,0, + 114,253,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,114,254,0,0,0,97,4,0,0,115,4,0, + 0,0,20,1,255,128,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,0,0,0, + 0,3,0,0,0,5,0,0,0,67,0,0,0,115,36,0, + 0,0,116,0,160,1,116,2,106,3,124,1,161,2,125,2, + 116,0,160,4,100,1,124,1,106,5,124,0,106,6,161,3, + 1,0,124,2,83,0,41,3,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, - 32,123,33,114,125,32,108,111,97,100,101,100,32,102,114,111, - 109,32,123,33,114,125,78,41,7,114,139,0,0,0,114,221, - 0,0,0,114,167,0,0,0,90,14,99,114,101,97,116,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,78,41,7,114,139,0,0,0, + 114,221,0,0,0,114,167,0,0,0,90,14,99,114,101,97, + 116,101,95,100,121,110,97,109,105,99,114,153,0,0,0,114, + 121,0,0,0,114,52,0,0,0,41,3,114,123,0,0,0, + 114,191,0,0,0,114,223,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,114,219,0,0,0,100,4, + 0,0,115,16,0,0,0,4,2,6,1,4,255,6,2,8, + 1,4,255,4,2,255,128,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,0,0,0,0,2,0,0,0,5,0,0,0,67, + 0,0,0,115,36,0,0,0,116,0,160,1,116,2,106,3, + 124,1,161,2,1,0,116,0,160,4,100,1,124,0,106,5, + 124,0,106,6,161,3,1,0,100,2,83,0,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,139,0,0,0, + 114,221,0,0,0,114,167,0,0,0,90,12,101,120,101,99, 95,100,121,110,97,109,105,99,114,153,0,0,0,114,121,0, - 0,0,114,52,0,0,0,41,3,114,123,0,0,0,114,191, - 0,0,0,114,223,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,219,0,0,0,98,4,0,0, - 115,16,0,0,0,4,2,6,1,4,255,6,2,8,1,4, - 255,4,2,255,128,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,0,0,0,0,2,0,0,0,5,0,0,0,67,0,0, - 0,115,36,0,0,0,116,0,160,1,116,2,106,3,124,1, - 161,2,1,0,116,0,160,4,100,1,124,0,106,5,124,0, - 106,6,161,3,1,0,100,2,83,0,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,139,0,0,0,114,221, - 0,0,0,114,167,0,0,0,90,12,101,120,101,99,95,100, - 121,110,97,109,105,99,114,153,0,0,0,114,121,0,0,0, - 114,52,0,0,0,169,2,114,123,0,0,0,114,223,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,224,0,0,0,106,4,0,0,115,12,0,0,0,14,2, - 6,1,8,1,4,255,4,128,255,128,122,31,69,120,116,101, + 0,0,114,52,0,0,0,169,2,114,123,0,0,0,114,223, + 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,114,224,0,0,0,108,4,0,0,115,10,0,0,0, + 14,2,6,1,8,1,8,255,255,128,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,0,0,0,0,2,0,0,0,4,0,0,0, @@ -1751,920 +1755,920 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 2,114,216,0,0,0,78,114,7,0,0,0,169,2,114,5, 0,0,0,218,6,115,117,102,102,105,120,169,1,90,9,102, 105,108,101,95,110,97,109,101,114,7,0,0,0,114,8,0, - 0,0,114,9,0,0,0,115,4,0,0,115,10,0,0,0, - 4,0,2,1,16,255,4,128,255,128,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,78,41,4, - 114,55,0,0,0,114,52,0,0,0,218,3,97,110,121,114, - 212,0,0,0,114,226,0,0,0,114,7,0,0,0,114,16, - 1,0,0,114,8,0,0,0,114,186,0,0,0,112,4,0, - 0,115,10,0,0,0,14,2,12,1,2,1,8,255,255,128, - 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,0,0,0,0,2,0,0, - 0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,1, - 83,0,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,7,0,0,0,114,226,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 220,0,0,0,118,4,0,0,115,4,0,0,0,4,2,255, - 128,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,0,0,0,0,2,0,0,0, - 1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,83, - 0,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,7,0,0,0, - 114,226,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,236,0,0,0,122,4,0,0,115,4,0, - 0,0,4,2,255,128,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,0, - 0,0,0,2,0,0,0,1,0,0,0,67,0,0,0,115, - 6,0,0,0,124,0,106,0,83,0,114,1,1,0,0,114, - 56,0,0,0,114,226,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,183,0,0,0,126,4,0, - 0,115,4,0,0,0,6,3,255,128,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, - 130,0,0,0,114,129,0,0,0,114,131,0,0,0,114,132, - 0,0,0,114,216,0,0,0,114,250,0,0,0,114,254,0, - 0,0,114,219,0,0,0,114,224,0,0,0,114,186,0,0, - 0,114,220,0,0,0,114,236,0,0,0,114,140,0,0,0, - 114,183,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,3,1,0,0,79,4, - 0,0,115,26,0,0,0,8,0,4,2,8,6,8,4,8, - 4,8,3,8,8,8,6,8,6,8,4,2,4,14,1,255, - 128,114,3,1,0,0,99,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,115, - 104,0,0,0,101,0,90,1,100,0,90,2,100,1,90,3, - 100,2,100,3,132,0,90,4,100,4,100,5,132,0,90,5, - 100,6,100,7,132,0,90,6,100,8,100,9,132,0,90,7, - 100,10,100,11,132,0,90,8,100,12,100,13,132,0,90,9, - 100,14,100,15,132,0,90,10,100,16,100,17,132,0,90,11, - 100,18,100,19,132,0,90,12,100,20,100,21,132,0,90,13, - 100,22,100,23,132,0,90,14,100,24,83,0,41,25,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,0,0,0,0,4,0,0,0,3,0,0,0,67,0, - 0,0,115,36,0,0,0,124,1,124,0,95,0,124,2,124, - 0,95,1,116,2,124,0,160,3,161,0,131,1,124,0,95, - 4,124,3,124,0,95,5,100,0,83,0,114,114,0,0,0, - 41,6,218,5,95,110,97,109,101,218,5,95,112,97,116,104, - 114,116,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,169,4,114,123,0,0,0,114, - 121,0,0,0,114,52,0,0,0,90,11,112,97,116,104,95, - 102,105,110,100,101,114,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,216,0,0,0,139,4,0,0,115,12, - 0,0,0,6,1,6,1,14,1,6,1,4,128,255,128,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,0,0,0,0,4,0,0,0,3,0,0,0,67,0,0, - 0,115,38,0,0,0,124,0,106,0,160,1,100,1,161,1, - 92,3,125,1,125,2,125,3,124,2,100,2,107,2,114,30, - 100,3,83,0,124,1,100,4,102,2,83,0,41,6,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,79, - 0,0,0,114,10,0,0,0,41,2,114,15,0,0,0,114, - 52,0,0,0,90,8,95,95,112,97,116,104,95,95,78,41, - 2,114,19,1,0,0,114,49,0,0,0,41,4,114,123,0, - 0,0,114,11,1,0,0,218,3,100,111,116,90,2,109,101, - 114,7,0,0,0,114,7,0,0,0,114,8,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,145,4,0,0,115,10,0,0, - 0,18,2,8,1,4,2,8,3,255,128,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,0,0,0,0, - 3,0,0,0,3,0,0,0,67,0,0,0,115,28,0,0, - 0,124,0,160,0,161,0,92,2,125,1,125,2,116,1,116, - 2,106,3,124,1,25,0,124,2,131,2,83,0,114,114,0, - 0,0,41,4,114,26,1,0,0,114,135,0,0,0,114,15, - 0,0,0,218,7,109,111,100,117,108,101,115,41,3,114,123, - 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,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,114,21,1,0,0,155,4,0,0,115, - 6,0,0,0,12,1,16,1,255,128,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,0,0,0,0,3,0,0,0,4,0,0,0, - 67,0,0,0,115,80,0,0,0,116,0,124,0,160,1,161, - 0,131,1,125,1,124,1,124,0,106,2,107,3,114,74,124, - 0,160,3,124,0,106,4,124,1,161,2,125,2,124,2,100, - 0,117,1,114,68,124,2,106,5,100,0,117,0,114,68,124, - 2,106,6,114,68,124,2,106,6,124,0,95,7,124,1,124, - 0,95,2,124,0,106,7,83,0,114,114,0,0,0,41,8, - 114,116,0,0,0,114,21,1,0,0,114,22,1,0,0,114, - 23,1,0,0,114,19,1,0,0,114,144,0,0,0,114,182, - 0,0,0,114,20,1,0,0,41,3,114,123,0,0,0,90, - 11,112,97,114,101,110,116,95,112,97,116,104,114,191,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 218,12,95,114,101,99,97,108,99,117,108,97,116,101,159,4, - 0,0,115,18,0,0,0,12,2,10,1,14,1,18,3,6, - 1,8,1,6,1,6,1,255,128,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,0, - 0,0,0,1,0,0,0,3,0,0,0,67,0,0,0,115, - 12,0,0,0,116,0,124,0,160,1,161,0,131,1,83,0, - 114,114,0,0,0,41,2,218,4,105,116,101,114,114,28,1, - 0,0,114,253,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,8,95,95,105,116,101,114,95,95, - 172,4,0,0,115,4,0,0,0,12,1,255,128,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,2,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,2,0,0,0,67,0,0,0,115, - 12,0,0,0,124,0,160,0,161,0,124,1,25,0,83,0, - 114,114,0,0,0,169,1,114,28,1,0,0,41,2,114,123, - 0,0,0,218,5,105,110,100,101,120,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,218,11,95,95,103,101,116, - 105,116,101,109,95,95,175,4,0,0,115,4,0,0,0,12, - 1,255,128,122,26,95,78,97,109,101,115,112,97,99,101,80, - 97,116,104,46,95,95,103,101,116,105,116,101,109,95,95,99, - 3,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, - 3,0,0,0,67,0,0,0,115,14,0,0,0,124,2,124, - 0,106,0,124,1,60,0,100,0,83,0,114,114,0,0,0, - 41,1,114,20,1,0,0,41,3,114,123,0,0,0,114,32, - 1,0,0,114,52,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,11,95,95,115,101,116,105,116, - 101,109,95,95,178,4,0,0,115,6,0,0,0,10,1,4, - 128,255,128,122,26,95,78,97,109,101,115,112,97,99,101,80, - 97,116,104,46,95,95,115,101,116,105,116,101,109,95,95,99, - 1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, - 3,0,0,0,67,0,0,0,115,12,0,0,0,116,0,124, - 0,160,1,161,0,131,1,83,0,114,114,0,0,0,41,2, - 114,4,0,0,0,114,28,1,0,0,114,253,0,0,0,114, - 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,7, - 95,95,108,101,110,95,95,181,4,0,0,115,4,0,0,0, - 12,1,255,128,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,0,0,0,0,1,0,0,0,3,0,0, - 0,67,0,0,0,115,12,0,0,0,100,1,160,0,124,0, - 106,1,161,1,83,0,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,70,0,0,0,114,20,1,0,0,114,253,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 8,95,95,114,101,112,114,95,95,184,4,0,0,115,4,0, - 0,0,12,1,255,128,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,0,0,0,0,2,0,0,0, - 3,0,0,0,67,0,0,0,115,12,0,0,0,124,1,124, - 0,160,0,161,0,118,0,83,0,114,114,0,0,0,114,31, - 1,0,0,169,2,114,123,0,0,0,218,4,105,116,101,109, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 12,95,95,99,111,110,116,97,105,110,115,95,95,187,4,0, - 0,115,4,0,0,0,12,1,255,128,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, - 0,0,0,0,2,0,0,0,3,0,0,0,67,0,0,0, - 115,16,0,0,0,124,0,106,0,160,1,124,1,161,1,1, - 0,100,0,83,0,114,114,0,0,0,41,2,114,20,1,0, - 0,114,190,0,0,0,114,37,1,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,114,190,0,0,0,190, - 4,0,0,115,6,0,0,0,12,1,4,128,255,128,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,15,114,130,0,0,0,114,129,0, - 0,0,114,131,0,0,0,114,132,0,0,0,114,216,0,0, - 0,114,26,1,0,0,114,21,1,0,0,114,28,1,0,0, - 114,30,1,0,0,114,33,1,0,0,114,34,1,0,0,114, - 35,1,0,0,114,36,1,0,0,114,39,1,0,0,114,190, + 0,0,114,9,0,0,0,117,4,0,0,115,8,0,0,0, + 4,0,2,1,20,255,255,128,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,78,41,4,114,55, + 0,0,0,114,52,0,0,0,218,3,97,110,121,114,212,0, + 0,0,114,226,0,0,0,114,7,0,0,0,114,16,1,0, + 0,114,8,0,0,0,114,186,0,0,0,114,4,0,0,115, + 10,0,0,0,14,2,12,1,2,1,8,255,255,128,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,0,0,0,0,2,0,0,0,1, + 0,0,0,67,0,0,0,115,4,0,0,0,100,1,83,0, + 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,7,0,0,0,114,226,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,220,0, + 0,0,120,4,0,0,115,4,0,0,0,4,2,255,128,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,0,0,0,0,2,0,0,0,1,0, + 0,0,67,0,0,0,115,4,0,0,0,100,1,83,0,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,7,0,0,0,114,226, + 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,114,236,0,0,0,124,4,0,0,115,4,0,0,0, + 4,2,255,128,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,0,0,0, + 0,2,0,0,0,1,0,0,0,67,0,0,0,115,6,0, + 0,0,124,0,106,0,83,0,114,1,1,0,0,114,56,0, + 0,0,114,226,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,183,0,0,0,128,4,0,0,115, + 4,0,0,0,6,3,255,128,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,130,0, + 0,0,114,129,0,0,0,114,131,0,0,0,114,132,0,0, + 0,114,216,0,0,0,114,250,0,0,0,114,254,0,0,0, + 114,219,0,0,0,114,224,0,0,0,114,186,0,0,0,114, + 220,0,0,0,114,236,0,0,0,114,140,0,0,0,114,183, 0,0,0,114,7,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,18,1,0,0,132,4,0,0, - 115,28,0,0,0,8,0,4,1,8,6,8,6,8,10,8, - 4,8,13,8,3,8,3,8,3,8,3,8,3,12,3,255, - 128,114,18,1,0,0,99,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,3,0,0,0,64,0,0,0,115, - 80,0,0,0,101,0,90,1,100,0,90,2,100,1,100,2, - 132,0,90,3,101,4,100,3,100,4,132,0,131,1,90,5, - 100,5,100,6,132,0,90,6,100,7,100,8,132,0,90,7, - 100,9,100,10,132,0,90,8,100,11,100,12,132,0,90,9, - 100,13,100,14,132,0,90,10,100,15,100,16,132,0,90,11, - 100,17,83,0,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,0,0,0,0,4,0,0,0,4,0,0,0,67,0,0, - 0,115,18,0,0,0,116,0,124,1,124,2,124,3,131,3, - 124,0,95,1,100,0,83,0,114,114,0,0,0,41,2,114, - 18,1,0,0,114,20,1,0,0,114,24,1,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,216,0, - 0,0,196,4,0,0,115,6,0,0,0,14,1,4,128,255, - 128,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,1,0,0, - 0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0, - 0,67,0,0,0,115,12,0,0,0,100,1,160,0,124,0, - 106,1,161,1,83,0,41,3,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,78,41,2,114,70,0,0,0, - 114,130,0,0,0,41,1,114,223,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,11,109,111,100, - 117,108,101,95,114,101,112,114,199,4,0,0,115,4,0,0, - 0,12,7,255,128,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,0,0,0,0, - 2,0,0,0,1,0,0,0,67,0,0,0,115,4,0,0, - 0,100,1,83,0,41,2,78,84,114,7,0,0,0,114,226, + 0,0,114,8,0,0,0,114,3,1,0,0,81,4,0,0, + 115,26,0,0,0,8,0,4,2,8,6,8,4,8,4,8, + 3,8,8,8,6,8,6,8,4,2,4,14,1,255,128,114, + 3,1,0,0,99,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,2,0,0,0,64,0,0,0,115,104,0, + 0,0,101,0,90,1,100,0,90,2,100,1,90,3,100,2, + 100,3,132,0,90,4,100,4,100,5,132,0,90,5,100,6, + 100,7,132,0,90,6,100,8,100,9,132,0,90,7,100,10, + 100,11,132,0,90,8,100,12,100,13,132,0,90,9,100,14, + 100,15,132,0,90,10,100,16,100,17,132,0,90,11,100,18, + 100,19,132,0,90,12,100,20,100,21,132,0,90,13,100,22, + 100,23,132,0,90,14,100,24,83,0,41,25,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, + 0,0,0,0,4,0,0,0,3,0,0,0,67,0,0,0, + 115,36,0,0,0,124,1,124,0,95,0,124,2,124,0,95, + 1,116,2,124,0,160,3,161,0,131,1,124,0,95,4,124, + 3,124,0,95,5,100,0,83,0,114,114,0,0,0,41,6, + 218,5,95,110,97,109,101,218,5,95,112,97,116,104,114,116, + 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,169,4,114,123,0,0,0,114,121,0, + 0,0,114,52,0,0,0,90,11,112,97,116,104,95,102,105, + 110,100,101,114,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,114,216,0,0,0,141,4,0,0,115,10,0,0, + 0,6,1,6,1,14,1,10,1,255,128,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,0,0,0, + 0,4,0,0,0,3,0,0,0,67,0,0,0,115,38,0, + 0,0,124,0,106,0,160,1,100,1,161,1,92,3,125,1, + 125,2,125,3,124,2,100,2,107,2,114,30,100,3,83,0, + 124,1,100,4,102,2,83,0,41,6,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,79,0,0,0,114, + 10,0,0,0,41,2,114,15,0,0,0,114,52,0,0,0, + 90,8,95,95,112,97,116,104,95,95,78,41,2,114,19,1, + 0,0,114,49,0,0,0,41,4,114,123,0,0,0,114,11, + 1,0,0,218,3,100,111,116,90,2,109,101,114,7,0,0, + 0,114,7,0,0,0,114,8,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,147,4,0,0,115,10,0,0,0,18,2,8, + 1,4,2,8,3,255,128,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,0,0,0,0,3,0,0,0, + 3,0,0,0,67,0,0,0,115,28,0,0,0,124,0,160, + 0,161,0,92,2,125,1,125,2,116,1,116,2,106,3,124, + 1,25,0,124,2,131,2,83,0,114,114,0,0,0,41,4, + 114,26,1,0,0,114,135,0,0,0,114,15,0,0,0,218, + 7,109,111,100,117,108,101,115,41,3,114,123,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,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,114,21,1,0,0,157,4,0,0,115,6,0,0,0, + 12,1,16,1,255,128,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, + 0,0,0,0,3,0,0,0,4,0,0,0,67,0,0,0, + 115,80,0,0,0,116,0,124,0,160,1,161,0,131,1,125, + 1,124,1,124,0,106,2,107,3,114,74,124,0,160,3,124, + 0,106,4,124,1,161,2,125,2,124,2,100,0,117,1,114, + 68,124,2,106,5,100,0,117,0,114,68,124,2,106,6,114, + 68,124,2,106,6,124,0,95,7,124,1,124,0,95,2,124, + 0,106,7,83,0,114,114,0,0,0,41,8,114,116,0,0, + 0,114,21,1,0,0,114,22,1,0,0,114,23,1,0,0, + 114,19,1,0,0,114,144,0,0,0,114,182,0,0,0,114, + 20,1,0,0,41,3,114,123,0,0,0,90,11,112,97,114, + 101,110,116,95,112,97,116,104,114,191,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,218,12,95,114, + 101,99,97,108,99,117,108,97,116,101,161,4,0,0,115,18, + 0,0,0,12,2,10,1,14,1,18,3,6,1,8,1,6, + 1,6,1,255,128,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,0,0,0,0,1, + 0,0,0,3,0,0,0,67,0,0,0,115,12,0,0,0, + 116,0,124,0,160,1,161,0,131,1,83,0,114,114,0,0, + 0,41,2,218,4,105,116,101,114,114,28,1,0,0,114,253, 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,186,0,0,0,208,4,0,0,115,4,0,0,0, - 4,1,255,128,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,0,0,0,0,2,0, - 0,0,1,0,0,0,67,0,0,0,115,4,0,0,0,100, - 1,83,0,41,2,78,114,10,0,0,0,114,7,0,0,0, - 114,226,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,236,0,0,0,211,4,0,0,115,4,0, - 0,0,4,1,255,128,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,0,0,0,0, - 2,0,0,0,6,0,0,0,67,0,0,0,115,16,0,0, - 0,116,0,100,1,100,2,100,3,100,4,100,5,141,4,83, - 0,41,6,78,114,10,0,0,0,122,8,60,115,116,114,105, - 110,103,62,114,222,0,0,0,84,41,1,114,238,0,0,0, - 41,1,114,239,0,0,0,114,226,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,220,0,0,0, - 214,4,0,0,115,4,0,0,0,16,1,255,128,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,0,0,0,0,2,0,0,0,1,0,0,0,67,0,0, - 0,115,4,0,0,0,100,1,83,0,114,217,0,0,0,114, - 7,0,0,0,114,218,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,219,0,0,0,217,4,0, - 0,115,4,0,0,0,4,128,255,128,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,0,0,0,0,2,0,0,0,1,0,0,0,67, - 0,0,0,115,4,0,0,0,100,0,83,0,114,114,0,0, - 0,114,7,0,0,0,114,13,1,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,114,224,0,0,0,220, - 4,0,0,115,6,0,0,0,2,1,2,128,255,128,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,0,0,0,0,2,0,0,0,4,0,0, - 0,67,0,0,0,115,26,0,0,0,116,0,160,1,100,1, - 124,0,106,2,161,2,1,0,116,0,160,3,124,0,124,1, - 161,2,83,0,41,3,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,78,41,4,114,139,0,0,0,114,153,0,0,0,114, - 20,1,0,0,114,225,0,0,0,114,226,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,227,0, - 0,0,223,4,0,0,115,10,0,0,0,6,7,4,1,4, - 255,12,2,255,128,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,130,0,0,0,114,129,0,0,0, - 114,131,0,0,0,114,216,0,0,0,114,213,0,0,0,114, - 41,1,0,0,114,186,0,0,0,114,236,0,0,0,114,220, - 0,0,0,114,219,0,0,0,114,224,0,0,0,114,227,0, - 0,0,114,7,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,114,40,1,0,0,195,4,0,0,115, - 22,0,0,0,8,0,8,1,2,3,10,1,8,8,8,3, - 8,3,8,3,8,3,12,3,255,128,114,40,1,0,0,99, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 4,0,0,0,64,0,0,0,115,118,0,0,0,101,0,90, - 1,100,0,90,2,100,1,90,3,101,4,100,2,100,3,132, - 0,131,1,90,5,101,4,100,4,100,5,132,0,131,1,90, - 6,101,7,100,6,100,7,132,0,131,1,90,8,101,7,100, - 8,100,9,132,0,131,1,90,9,101,7,100,19,100,11,100, - 12,132,1,131,1,90,10,101,7,100,20,100,13,100,14,132, - 1,131,1,90,11,101,7,100,21,100,15,100,16,132,1,131, - 1,90,12,101,4,100,17,100,18,132,0,131,1,90,13,100, - 10,83,0,41,22,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,0,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,4,0,0,0,67,0,0,0,115,64,0,0,0,116, - 0,116,1,106,2,160,3,161,0,131,1,68,0,93,44,92, - 2,125,0,125,1,124,1,100,1,117,0,114,40,116,1,106, - 2,124,0,61,0,113,14,116,4,124,1,100,2,131,2,114, - 14,124,1,160,5,161,0,1,0,113,14,100,1,83,0,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, - 78,218,17,105,110,118,97,108,105,100,97,116,101,95,99,97, - 99,104,101,115,41,6,218,4,108,105,115,116,114,15,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,5,105,116,101,109,115,114,133,0, - 0,0,114,43,1,0,0,41,2,114,121,0,0,0,218,6, - 102,105,110,100,101,114,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,43,1,0,0,241,4,0,0,115,14, - 0,0,0,22,4,8,1,10,1,10,1,10,1,4,128,255, - 128,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, - 1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 9,0,0,0,67,0,0,0,115,76,0,0,0,116,0,106, - 1,100,1,117,1,114,28,116,0,106,1,115,28,116,2,160, - 3,100,2,116,4,161,2,1,0,116,0,106,1,68,0,93, - 36,125,1,122,14,124,1,124,0,131,1,87,0,2,0,1, - 0,83,0,4,0,116,5,121,70,1,0,1,0,1,0,89, - 0,113,34,48,0,100,1,83,0,41,3,122,46,83,101,97, - 114,99,104,32,115,121,115,46,112,97,116,104,95,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,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,15,0,0,0,218,10,112,97, - 116,104,95,104,111,111,107,115,114,81,0,0,0,114,82,0, - 0,0,114,142,0,0,0,114,122,0,0,0,41,2,114,52, - 0,0,0,90,4,104,111,111,107,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,218,11,95,112,97,116,104,95, - 104,111,111,107,115,251,4,0,0,115,18,0,0,0,16,3, - 12,1,10,1,2,1,14,1,12,1,6,1,4,2,255,128, - 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,0,0,0,0,3,0,0,0,8,0,0,0,67,0,0, - 0,115,100,0,0,0,124,1,100,1,107,2,114,42,122,12, - 116,0,160,1,161,0,125,1,87,0,110,20,4,0,116,2, - 121,40,1,0,1,0,1,0,89,0,100,2,83,0,48,0, - 122,16,116,3,106,4,124,1,25,0,125,2,87,0,124,2, - 83,0,4,0,116,5,121,98,1,0,1,0,1,0,124,0, - 160,6,124,1,161,1,125,2,124,2,116,3,106,4,124,1, - 60,0,89,0,124,2,83,0,48,0,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,10,0,0,0,78,41,7,114,18,0,0,0,114,63,0, - 0,0,218,17,70,105,108,101,78,111,116,70,111,117,110,100, - 69,114,114,111,114,114,15,0,0,0,114,45,1,0,0,218, - 8,75,101,121,69,114,114,111,114,114,49,1,0,0,41,3, - 114,202,0,0,0,114,52,0,0,0,114,47,1,0,0,114, - 7,0,0,0,114,7,0,0,0,114,8,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,8,5,0,0,115,28,0,0,0,8,8,2, - 1,12,1,12,1,8,3,2,1,12,1,4,4,12,253,10, - 1,12,1,4,1,2,255,255,128,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,0,0,0,0,6,0,0,0,4,0,0,0,67, - 0,0,0,115,82,0,0,0,116,0,124,2,100,1,131,2, - 114,26,124,2,160,1,124,1,161,1,92,2,125,3,125,4, - 110,14,124,2,160,2,124,1,161,1,125,3,103,0,125,4, - 124,3,100,0,117,1,114,60,116,3,160,4,124,1,124,3, - 161,2,83,0,116,3,160,5,124,1,100,0,161,2,125,5, - 124,4,124,5,95,6,124,5,83,0,41,2,78,114,141,0, - 0,0,41,7,114,133,0,0,0,114,141,0,0,0,114,210, - 0,0,0,114,139,0,0,0,114,205,0,0,0,114,187,0, - 0,0,114,182,0,0,0,41,6,114,202,0,0,0,114,143, - 0,0,0,114,47,1,0,0,114,144,0,0,0,114,145,0, - 0,0,114,191,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,16,95,108,101,103,97,99,121,95, - 103,101,116,95,115,112,101,99,30,5,0,0,115,20,0,0, - 0,10,4,16,1,10,2,4,1,8,1,12,1,12,1,6, - 1,4,1,255,128,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,0,0,0,0, - 9,0,0,0,5,0,0,0,67,0,0,0,115,166,0,0, - 0,103,0,125,4,124,2,68,0,93,134,125,5,116,0,124, - 5,116,1,116,2,102,2,131,2,115,28,113,8,124,0,160, - 3,124,5,161,1,125,6,124,6,100,1,117,1,114,8,116, - 4,124,6,100,2,131,2,114,70,124,6,160,5,124,1,124, - 3,161,2,125,7,110,12,124,0,160,6,124,1,124,6,161, - 2,125,7,124,7,100,1,117,0,114,92,113,8,124,7,106, - 7,100,1,117,1,114,110,124,7,2,0,1,0,83,0,124, - 7,106,8,125,8,124,8,100,1,117,0,114,132,116,9,100, - 3,131,1,130,1,124,4,160,10,124,8,161,1,1,0,113, - 8,116,11,160,12,124,1,100,1,161,2,125,7,124,4,124, - 7,95,8,124,7,83,0,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,207,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,165,0,0,0,114,90,0,0, - 0,218,5,98,121,116,101,115,114,52,1,0,0,114,133,0, - 0,0,114,207,0,0,0,114,53,1,0,0,114,144,0,0, - 0,114,182,0,0,0,114,122,0,0,0,114,171,0,0,0, - 114,139,0,0,0,114,187,0,0,0,41,9,114,202,0,0, - 0,114,143,0,0,0,114,52,0,0,0,114,206,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,47,1,0,0,114,191,0,0, - 0,114,145,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,218,9,95,103,101,116,95,115,112,101,99, - 45,5,0,0,115,42,0,0,0,4,5,8,1,14,1,2, - 1,10,1,8,1,10,1,14,1,12,2,8,1,2,1,10, - 1,8,1,6,1,8,1,8,1,12,5,12,2,6,1,4, - 1,255,128,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,0,0,0,0,6,0,0,0,5,0,0,0,67,0, - 0,0,115,94,0,0,0,124,2,100,1,117,0,114,14,116, - 0,106,1,125,2,124,0,160,2,124,1,124,2,124,3,161, - 3,125,4,124,4,100,1,117,0,114,40,100,1,83,0,124, - 4,106,3,100,1,117,0,114,90,124,4,106,4,125,5,124, - 5,114,86,100,1,124,4,95,5,116,6,124,1,124,5,124, - 0,106,2,131,3,124,4,95,4,124,4,83,0,100,1,83, - 0,124,4,83,0,41,2,122,141,84,114,121,32,116,111,32, - 102,105,110,100,32,97,32,115,112,101,99,32,102,111,114,32, - 39,102,117,108,108,110,97,109,101,39,32,111,110,32,115,121, - 115,46,112,97,116,104,32,111,114,32,39,112,97,116,104,39, - 46,10,10,32,32,32,32,32,32,32,32,84,104,101,32,115, - 101,97,114,99,104,32,105,115,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,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,32,32, - 32,32,32,32,32,32,78,41,7,114,15,0,0,0,114,52, - 0,0,0,114,56,1,0,0,114,144,0,0,0,114,182,0, - 0,0,114,185,0,0,0,114,18,1,0,0,41,6,114,202, - 0,0,0,114,143,0,0,0,114,52,0,0,0,114,206,0, - 0,0,114,191,0,0,0,114,55,1,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,207,0,0,0, - 77,5,0,0,115,28,0,0,0,8,6,6,1,14,1,8, - 1,4,1,10,1,6,1,4,1,6,3,16,1,4,1,4, - 2,4,2,255,128,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,0,0,0,0,4,0,0,0,4,0,0,0, - 67,0,0,0,115,30,0,0,0,124,0,160,0,124,1,124, - 2,161,2,125,3,124,3,100,1,117,0,114,24,100,1,83, - 0,124,3,106,1,83,0,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,114,208,0,0,0,114,209,0,0,0, + 0,0,218,8,95,95,105,116,101,114,95,95,174,4,0,0, + 115,4,0,0,0,12,1,255,128,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,2,0,0,0,0,0,0,0,0,0,0,0,2, + 0,0,0,2,0,0,0,67,0,0,0,115,12,0,0,0, + 124,0,160,0,161,0,124,1,25,0,83,0,114,114,0,0, + 0,169,1,114,28,1,0,0,41,2,114,123,0,0,0,218, + 5,105,110,100,101,120,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,218,11,95,95,103,101,116,105,116,101,109, + 95,95,177,4,0,0,115,4,0,0,0,12,1,255,128,122, + 26,95,78,97,109,101,115,112,97,99,101,80,97,116,104,46, + 95,95,103,101,116,105,116,101,109,95,95,99,3,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0, + 67,0,0,0,115,14,0,0,0,124,2,124,0,106,0,124, + 1,60,0,100,0,83,0,114,114,0,0,0,41,1,114,20, + 1,0,0,41,3,114,123,0,0,0,114,32,1,0,0,114, + 52,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,11,95,95,115,101,116,105,116,101,109,95,95, + 180,4,0,0,115,4,0,0,0,14,1,255,128,122,26,95, + 78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,95, + 115,101,116,105,116,101,109,95,95,99,1,0,0,0,0,0, + 0,0,0,0,0,0,1,0,0,0,3,0,0,0,67,0, + 0,0,115,12,0,0,0,116,0,124,0,160,1,161,0,131, + 1,83,0,114,114,0,0,0,41,2,114,4,0,0,0,114, + 28,1,0,0,114,253,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,218,7,95,95,108,101,110,95, + 95,183,4,0,0,115,4,0,0,0,12,1,255,128,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,0, + 0,0,0,1,0,0,0,3,0,0,0,67,0,0,0,115, + 12,0,0,0,100,1,160,0,124,0,106,1,161,1,83,0, + 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,70,0,0,0, + 114,20,1,0,0,114,253,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,8,95,95,114,101,112, + 114,95,95,186,4,0,0,115,4,0,0,0,12,1,255,128, + 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,0,0,0,0,2,0,0,0,3,0,0,0,67,0, + 0,0,115,12,0,0,0,124,1,124,0,160,0,161,0,118, + 0,83,0,114,114,0,0,0,114,31,1,0,0,169,2,114, + 123,0,0,0,218,4,105,116,101,109,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,12,95,95,99,111,110, + 116,97,105,110,115,95,95,189,4,0,0,115,4,0,0,0, + 12,1,255,128,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,0,0,0,0,2,0, + 0,0,3,0,0,0,67,0,0,0,115,16,0,0,0,124, + 0,106,0,160,1,124,1,161,1,1,0,100,0,83,0,114, + 114,0,0,0,41,2,114,20,1,0,0,114,190,0,0,0, + 114,37,1,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,114,190,0,0,0,192,4,0,0,115,4,0, + 0,0,16,1,255,128,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,15, + 114,130,0,0,0,114,129,0,0,0,114,131,0,0,0,114, + 132,0,0,0,114,216,0,0,0,114,26,1,0,0,114,21, + 1,0,0,114,28,1,0,0,114,30,1,0,0,114,33,1, + 0,0,114,34,1,0,0,114,35,1,0,0,114,36,1,0, + 0,114,39,1,0,0,114,190,0,0,0,114,7,0,0,0, 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 210,0,0,0,101,5,0,0,115,10,0,0,0,12,8,8, - 1,4,1,6,1,255,128,122,22,80,97,116,104,70,105,110, - 100,101,114,46,102,105,110,100,95,109,111,100,117,108,101,99, - 0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, - 4,0,0,0,79,0,0,0,115,28,0,0,0,100,1,100, - 2,108,0,109,1,125,2,1,0,124,2,106,2,124,0,105, - 0,124,1,164,1,142,1,83,0,41,4,97,32,1,0,0, - 10,32,32,32,32,32,32,32,32,70,105,110,100,32,100,105, - 115,116,114,105,98,117,116,105,111,110,115,46,10,10,32,32, - 32,32,32,32,32,32,82,101,116,117,114,110,32,97,110,32, - 105,116,101,114,97,98,108,101,32,111,102,32,97,108,108,32, - 68,105,115,116,114,105,98,117,116,105,111,110,32,105,110,115, - 116,97,110,99,101,115,32,99,97,112,97,98,108,101,32,111, - 102,10,32,32,32,32,32,32,32,32,108,111,97,100,105,110, - 103,32,116,104,101,32,109,101,116,97,100,97,116,97,32,102, - 111,114,32,112,97,99,107,97,103,101,115,32,109,97,116,99, - 104,105,110,103,32,96,96,99,111,110,116,101,120,116,46,110, - 97,109,101,96,96,10,32,32,32,32,32,32,32,32,40,111, - 114,32,97,108,108,32,110,97,109,101,115,32,105,102,32,96, - 96,78,111,110,101,96,96,32,105,110,100,105,99,97,116,101, - 100,41,32,97,108,111,110,103,32,116,104,101,32,112,97,116, - 104,115,32,105,110,32,116,104,101,32,108,105,115,116,10,32, - 32,32,32,32,32,32,32,111,102,32,100,105,114,101,99,116, - 111,114,105,101,115,32,96,96,99,111,110,116,101,120,116,46, - 112,97,116,104,96,96,46,10,32,32,32,32,32,32,32,32, - 114,0,0,0,0,41,1,218,18,77,101,116,97,100,97,116, - 97,80,97,116,104,70,105,110,100,101,114,78,41,3,90,18, - 105,109,112,111,114,116,108,105,98,46,109,101,116,97,100,97, - 116,97,114,57,1,0,0,218,18,102,105,110,100,95,100,105, - 115,116,114,105,98,117,116,105,111,110,115,41,3,114,124,0, - 0,0,114,125,0,0,0,114,57,1,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,58,1,0,0, - 114,5,0,0,115,6,0,0,0,12,10,16,1,255,128,122, - 29,80,97,116,104,70,105,110,100,101,114,46,102,105,110,100, - 95,100,105,115,116,114,105,98,117,116,105,111,110,115,41,1, - 78,41,2,78,78,41,1,78,41,14,114,130,0,0,0,114, - 129,0,0,0,114,131,0,0,0,114,132,0,0,0,114,213, - 0,0,0,114,43,1,0,0,114,49,1,0,0,114,214,0, - 0,0,114,52,1,0,0,114,53,1,0,0,114,56,1,0, - 0,114,207,0,0,0,114,210,0,0,0,114,58,1,0,0, - 114,7,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,42,1,0,0,237,4,0,0,115,38,0, - 0,0,8,0,4,2,2,2,10,1,2,9,10,1,2,12, - 10,1,2,21,10,1,2,14,12,1,2,31,12,1,2,23, - 12,1,2,12,14,1,255,128,114,42,1,0,0,99,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0, - 0,0,64,0,0,0,115,90,0,0,0,101,0,90,1,100, - 0,90,2,100,1,90,3,100,2,100,3,132,0,90,4,100, - 4,100,5,132,0,90,5,101,6,90,7,100,6,100,7,132, - 0,90,8,100,8,100,9,132,0,90,9,100,19,100,11,100, - 12,132,1,90,10,100,13,100,14,132,0,90,11,101,12,100, - 15,100,16,132,0,131,1,90,13,100,17,100,18,132,0,90, - 14,100,10,83,0,41,20,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,0,0,0,0,5,0, - 0,0,6,0,0,0,7,0,0,0,115,84,0,0,0,103, - 0,125,3,124,2,68,0,93,32,92,2,137,0,125,4,124, - 3,160,0,135,0,102,1,100,1,100,2,132,8,124,4,68, - 0,131,1,161,1,1,0,113,8,124,3,124,0,95,1,124, - 1,112,54,100,3,124,0,95,2,100,4,124,0,95,3,116, - 4,131,0,124,0,95,5,116,4,131,0,124,0,95,6,100, - 5,83,0,41,6,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,0,0,0,0,2,0, - 0,0,3,0,0,0,51,0,0,0,115,22,0,0,0,124, - 0,93,14,125,1,124,1,136,0,102,2,86,0,1,0,113, - 2,100,0,83,0,114,114,0,0,0,114,7,0,0,0,114, - 14,1,0,0,169,1,114,144,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,9,0,0,0,143,5,0,0,115,6, - 0,0,0,18,0,4,128,255,128,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,79,0,0,0,114,109,0,0,0,78,41,7,114,171, - 0,0,0,218,8,95,108,111,97,100,101,114,115,114,52,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,123,0,0,0,114,52,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,193,0,0,0, - 114,7,0,0,0,114,60,1,0,0,114,8,0,0,0,114, - 216,0,0,0,137,5,0,0,115,20,0,0,0,4,4,12, - 1,26,1,6,1,10,2,6,1,8,1,8,1,4,128,255, - 128,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,0, - 0,0,0,1,0,0,0,2,0,0,0,67,0,0,0,115, - 10,0,0,0,100,1,124,0,95,0,100,2,83,0,41,3, - 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,109,0,0,0,78,41,1,114,62,1,0,0,114,253, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,43,1,0,0,151,5,0,0,115,6,0,0,0, - 6,2,4,128,255,128,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,0,0,0, - 0,3,0,0,0,3,0,0,0,67,0,0,0,115,42,0, - 0,0,124,0,160,0,124,1,161,1,125,2,124,2,100,1, - 117,0,114,26,100,1,103,0,102,2,83,0,124,2,106,1, - 124,2,106,2,112,38,103,0,102,2,83,0,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,207,0,0,0,114,144,0, - 0,0,114,182,0,0,0,41,3,114,123,0,0,0,114,143, - 0,0,0,114,191,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,141,0,0,0,157,5,0,0, - 115,10,0,0,0,10,7,8,1,8,1,16,1,255,128,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, - 0,0,0,0,7,0,0,0,6,0,0,0,67,0,0,0, - 115,26,0,0,0,124,1,124,2,124,3,131,2,125,6,116, - 0,124,2,124,3,124,6,124,4,100,1,141,4,83,0,41, - 2,78,114,181,0,0,0,41,1,114,194,0,0,0,41,7, - 114,123,0,0,0,114,192,0,0,0,114,143,0,0,0,114, - 52,0,0,0,90,4,115,109,115,108,114,206,0,0,0,114, - 144,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,114,56,1,0,0,169,5,0,0,115,10,0,0, - 0,10,1,8,1,2,1,6,255,255,128,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,0,0,0,0,14, - 0,0,0,8,0,0,0,67,0,0,0,115,92,1,0,0, - 100,1,125,3,124,1,160,0,100,2,161,1,100,3,25,0, - 125,4,122,24,116,1,124,0,106,2,112,34,116,3,160,4, - 161,0,131,1,106,5,125,5,87,0,110,22,4,0,116,6, - 121,64,1,0,1,0,1,0,100,4,125,5,89,0,110,2, - 48,0,124,5,124,0,106,7,107,3,114,90,124,0,160,8, - 161,0,1,0,124,5,124,0,95,7,116,9,131,0,114,112, - 124,0,106,10,125,6,124,4,160,11,161,0,125,7,110,10, - 124,0,106,12,125,6,124,4,125,7,124,7,124,6,118,0, - 114,214,116,13,124,0,106,2,124,4,131,2,125,8,124,0, - 106,14,68,0,93,56,92,2,125,9,125,10,100,5,124,9, - 23,0,125,11,116,13,124,8,124,11,131,2,125,12,116,15, - 124,12,131,1,114,148,124,0,160,16,124,10,124,1,124,12, - 124,8,103,1,124,2,161,5,2,0,1,0,83,0,116,17, - 124,8,131,1,125,3,124,0,106,14,68,0,93,80,92,2, - 125,9,125,10,116,13,124,0,106,2,124,4,124,9,23,0, - 131,2,125,12,116,18,106,19,100,6,124,12,100,3,100,7, - 141,3,1,0,124,7,124,9,23,0,124,6,118,0,114,220, - 116,15,124,12,131,1,114,220,124,0,160,16,124,10,124,1, - 124,12,100,8,124,2,161,5,2,0,1,0,83,0,124,3, - 144,1,114,88,116,18,160,19,100,9,124,8,161,2,1,0, - 116,18,160,20,124,1,100,8,161,2,125,13,124,8,103,1, - 124,13,95,21,124,13,83,0,100,8,83,0,41,10,122,111, - 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,10,10,32,32, - 32,32,32,32,32,32,82,101,116,117,114,110,115,32,116,104, - 101,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,10,32,32,32,32,32,32,32,32,70, - 114,79,0,0,0,114,39,0,0,0,114,109,0,0,0,114, - 216,0,0,0,122,9,116,114,121,105,110,103,32,123,125,41, - 1,90,9,118,101,114,98,111,115,105,116,121,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,41,22,114,49,0,0,0,114, - 57,0,0,0,114,52,0,0,0,114,18,0,0,0,114,63, - 0,0,0,114,7,1,0,0,114,58,0,0,0,114,62,1, - 0,0,218,11,95,102,105,108,108,95,99,97,99,104,101,114, - 21,0,0,0,114,65,1,0,0,114,110,0,0,0,114,64, - 1,0,0,114,48,0,0,0,114,61,1,0,0,114,62,0, - 0,0,114,56,1,0,0,114,64,0,0,0,114,139,0,0, - 0,114,153,0,0,0,114,187,0,0,0,114,182,0,0,0, - 41,14,114,123,0,0,0,114,143,0,0,0,114,206,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,173,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,15,1,0,0,114,192,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,191,0,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,207,0,0,0,174,5, - 0,0,115,74,0,0,0,4,5,14,1,2,1,24,1,12, - 1,10,1,10,1,8,1,6,1,6,2,6,1,10,1,6, - 2,4,1,8,2,12,1,14,1,8,1,10,1,8,1,24, - 1,8,4,14,2,16,1,16,1,12,1,8,1,10,1,4, - 1,8,255,6,2,12,1,12,1,8,1,4,1,4,1,255, - 128,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, - 0,0,0,0,9,0,0,0,10,0,0,0,67,0,0,0, - 115,188,0,0,0,124,0,106,0,125,1,122,22,116,1,160, - 2,124,1,112,22,116,1,160,3,161,0,161,1,125,2,87, - 0,110,28,4,0,116,4,116,5,116,6,102,3,121,56,1, - 0,1,0,1,0,103,0,125,2,89,0,110,2,48,0,116, - 7,106,8,160,9,100,1,161,1,115,82,116,10,124,2,131, + 18,1,0,0,134,4,0,0,115,28,0,0,0,8,0,4, + 1,8,6,8,6,8,10,8,4,8,13,8,3,8,3,8, + 3,8,3,8,3,12,3,255,128,114,18,1,0,0,99,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, + 0,0,0,64,0,0,0,115,80,0,0,0,101,0,90,1, + 100,0,90,2,100,1,100,2,132,0,90,3,101,4,100,3, + 100,4,132,0,131,1,90,5,100,5,100,6,132,0,90,6, + 100,7,100,8,132,0,90,7,100,9,100,10,132,0,90,8, + 100,11,100,12,132,0,90,9,100,13,100,14,132,0,90,10, + 100,15,100,16,132,0,90,11,100,17,83,0,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,0,0,0,0,4,0,0, + 0,4,0,0,0,67,0,0,0,115,18,0,0,0,116,0, + 124,1,124,2,124,3,131,3,124,0,95,1,100,0,83,0, + 114,114,0,0,0,41,2,114,18,1,0,0,114,20,1,0, + 0,114,24,1,0,0,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,216,0,0,0,198,4,0,0,115,4, + 0,0,0,18,1,255,128,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,1,0,0,0,0,0,0,0,0,0,0,0,1, + 0,0,0,3,0,0,0,67,0,0,0,115,12,0,0,0, + 100,1,160,0,124,0,106,1,161,1,83,0,41,3,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,78,41, + 2,114,70,0,0,0,114,130,0,0,0,41,1,114,223,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,218,11,109,111,100,117,108,101,95,114,101,112,114,201,4, + 0,0,115,4,0,0,0,12,7,255,128,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,0,0,0,0,2,0,0,0,1,0,0,0,67,0, + 0,0,115,4,0,0,0,100,1,83,0,41,2,78,84,114, + 7,0,0,0,114,226,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,186,0,0,0,210,4,0, + 0,115,4,0,0,0,4,1,255,128,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, + 0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,0, + 115,4,0,0,0,100,1,83,0,41,2,78,114,10,0,0, + 0,114,7,0,0,0,114,226,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,236,0,0,0,213, + 4,0,0,115,4,0,0,0,4,1,255,128,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,0,0,0,0,2,0,0,0,6,0,0,0,67,0, + 0,0,115,16,0,0,0,116,0,100,1,100,2,100,3,100, + 4,100,5,141,4,83,0,41,6,78,114,10,0,0,0,122, + 8,60,115,116,114,105,110,103,62,114,222,0,0,0,84,41, + 1,114,238,0,0,0,41,1,114,239,0,0,0,114,226,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,114,220,0,0,0,216,4,0,0,115,4,0,0,0,16, + 1,255,128,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,0,0,0,0,2,0,0,0,1, + 0,0,0,67,0,0,0,115,4,0,0,0,100,1,83,0, + 114,217,0,0,0,114,7,0,0,0,114,218,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,219, + 0,0,0,219,4,0,0,115,4,0,0,0,4,0,255,128, + 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,0,0,0,0,2,0,0, + 0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,0, + 83,0,114,114,0,0,0,114,7,0,0,0,114,13,1,0, + 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 114,224,0,0,0,222,4,0,0,115,4,0,0,0,4,1, + 255,128,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,0,0,0,0,2,0,0, + 0,4,0,0,0,67,0,0,0,115,26,0,0,0,116,0, + 160,1,100,1,124,0,106,2,161,2,1,0,116,0,160,3, + 124,0,124,1,161,2,83,0,41,3,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,78,41,4,114,139,0,0,0,114,153, + 0,0,0,114,20,1,0,0,114,225,0,0,0,114,226,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,114,227,0,0,0,225,4,0,0,115,10,0,0,0,6, + 7,4,1,4,255,12,3,255,128,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,130,0,0,0,114, + 129,0,0,0,114,131,0,0,0,114,216,0,0,0,114,213, + 0,0,0,114,41,1,0,0,114,186,0,0,0,114,236,0, + 0,0,114,220,0,0,0,114,219,0,0,0,114,224,0,0, + 0,114,227,0,0,0,114,7,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,40,1,0,0,197, + 4,0,0,115,22,0,0,0,8,0,8,1,2,3,10,1, + 8,8,8,3,8,3,8,3,8,3,12,3,255,128,114,40, + 1,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,4,0,0,0,64,0,0,0,115,118,0,0, + 0,101,0,90,1,100,0,90,2,100,1,90,3,101,4,100, + 2,100,3,132,0,131,1,90,5,101,4,100,4,100,5,132, + 0,131,1,90,6,101,7,100,6,100,7,132,0,131,1,90, + 8,101,7,100,8,100,9,132,0,131,1,90,9,101,7,100, + 19,100,11,100,12,132,1,131,1,90,10,101,7,100,20,100, + 13,100,14,132,1,131,1,90,11,101,7,100,21,100,15,100, + 16,132,1,131,1,90,12,101,4,100,17,100,18,132,0,131, + 1,90,13,100,10,83,0,41,22,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,0,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,4,0,0,0,67,0,0,0,115,64, + 0,0,0,116,0,116,1,106,2,160,3,161,0,131,1,68, + 0,93,44,92,2,125,0,125,1,124,1,100,1,117,0,114, + 40,116,1,106,2,124,0,61,0,113,14,116,4,124,1,100, + 2,131,2,114,58,124,1,160,5,161,0,1,0,113,14,100, + 1,83,0,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,78,218,17,105,110,118,97,108,105,100,97,116, + 101,95,99,97,99,104,101,115,41,6,218,4,108,105,115,116, + 114,15,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,5,105,116,101,109, + 115,114,133,0,0,0,114,43,1,0,0,41,2,114,121,0, + 0,0,218,6,102,105,110,100,101,114,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,114,43,1,0,0,244,4, + 0,0,115,16,0,0,0,22,4,8,1,10,1,10,1,8, + 1,2,128,4,252,255,128,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,1,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,9,0,0,0,67,0,0,0,115,76, + 0,0,0,116,0,106,1,100,1,117,1,114,28,116,0,106, + 1,115,28,116,2,160,3,100,2,116,4,161,2,1,0,116, + 0,106,1,68,0,93,34,125,1,122,14,124,1,124,0,131, + 1,87,0,2,0,1,0,83,0,4,0,116,5,121,74,1, + 0,1,0,1,0,89,0,113,34,100,1,83,0,119,0,41, + 3,122,46,83,101,97,114,99,104,32,115,121,115,46,112,97, + 116,104,95,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,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,15,0, + 0,0,218,10,112,97,116,104,95,104,111,111,107,115,114,81, + 0,0,0,114,82,0,0,0,114,142,0,0,0,114,122,0, + 0,0,41,2,114,52,0,0,0,90,4,104,111,111,107,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,11, + 95,112,97,116,104,95,104,111,111,107,115,254,4,0,0,115, + 20,0,0,0,16,3,12,1,10,1,2,1,14,1,12,1, + 4,1,4,2,2,253,255,128,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,0,0,0,0,3,0,0, + 0,8,0,0,0,67,0,0,0,115,100,0,0,0,124,1, + 100,1,107,2,114,40,122,12,116,0,160,1,161,0,125,1, + 87,0,110,18,4,0,116,2,121,98,1,0,1,0,1,0, + 89,0,100,2,83,0,122,16,116,3,106,4,124,1,25,0, + 125,2,87,0,124,2,83,0,4,0,116,5,121,96,1,0, + 1,0,1,0,124,0,160,6,124,1,161,1,125,2,124,2, + 116,3,106,4,124,1,60,0,89,0,124,2,83,0,119,0, + 119,0,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,10,0,0,0,78,41,7, + 114,18,0,0,0,114,63,0,0,0,218,17,70,105,108,101, + 78,111,116,70,111,117,110,100,69,114,114,111,114,114,15,0, + 0,0,114,45,1,0,0,218,8,75,101,121,69,114,114,111, + 114,114,49,1,0,0,41,3,114,202,0,0,0,114,52,0, + 0,0,114,47,1,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,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,11,5,0,0, + 115,30,0,0,0,8,8,2,1,12,1,12,1,6,3,2, + 1,12,1,4,4,12,253,10,1,12,1,4,1,2,253,2, + 250,255,128,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,0,0,0, + 0,6,0,0,0,4,0,0,0,67,0,0,0,115,82,0, + 0,0,116,0,124,2,100,1,131,2,114,26,124,2,160,1, + 124,1,161,1,92,2,125,3,125,4,110,14,124,2,160,2, + 124,1,161,1,125,3,103,0,125,4,124,3,100,0,117,1, + 114,60,116,3,160,4,124,1,124,3,161,2,83,0,116,3, + 160,5,124,1,100,0,161,2,125,5,124,4,124,5,95,6, + 124,5,83,0,41,2,78,114,141,0,0,0,41,7,114,133, + 0,0,0,114,141,0,0,0,114,210,0,0,0,114,139,0, + 0,0,114,205,0,0,0,114,187,0,0,0,114,182,0,0, + 0,41,6,114,202,0,0,0,114,143,0,0,0,114,47,1, + 0,0,114,144,0,0,0,114,145,0,0,0,114,191,0,0, + 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 218,16,95,108,101,103,97,99,121,95,103,101,116,95,115,112, + 101,99,33,5,0,0,115,20,0,0,0,10,4,16,1,10, + 2,4,1,8,1,12,1,12,1,6,1,4,1,255,128,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,0,0,0,0,9,0,0,0,5,0, + 0,0,67,0,0,0,115,166,0,0,0,103,0,125,4,124, + 2,68,0,93,134,125,5,116,0,124,5,116,1,116,2,102, + 2,131,2,115,28,113,8,124,0,160,3,124,5,161,1,125, + 6,124,6,100,1,117,1,114,142,116,4,124,6,100,2,131, + 2,114,70,124,6,160,5,124,1,124,3,161,2,125,7,110, + 12,124,0,160,6,124,1,124,6,161,2,125,7,124,7,100, + 1,117,0,114,92,113,8,124,7,106,7,100,1,117,1,114, + 110,124,7,2,0,1,0,83,0,124,7,106,8,125,8,124, + 8,100,1,117,0,114,132,116,9,100,3,131,1,130,1,124, + 4,160,10,124,8,161,1,1,0,113,8,116,11,160,12,124, + 1,100,1,161,2,125,7,124,4,124,7,95,8,124,7,83, + 0,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,207,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,165,0,0,0,114,90,0,0,0,218,5,98,121,116, + 101,115,114,52,1,0,0,114,133,0,0,0,114,207,0,0, + 0,114,53,1,0,0,114,144,0,0,0,114,182,0,0,0, + 114,122,0,0,0,114,171,0,0,0,114,139,0,0,0,114, + 187,0,0,0,41,9,114,202,0,0,0,114,143,0,0,0, + 114,52,0,0,0,114,206,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,47,1,0,0,114,191,0,0,0,114,145,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, + 9,95,103,101,116,95,115,112,101,99,48,5,0,0,115,44, + 0,0,0,4,5,8,1,14,1,2,1,10,1,8,1,10, + 1,14,1,12,2,8,1,2,1,10,1,8,1,6,1,8, + 1,8,1,10,5,2,128,12,2,6,1,4,1,255,128,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,0,0, + 0,0,6,0,0,0,5,0,0,0,67,0,0,0,115,94, + 0,0,0,124,2,100,1,117,0,114,14,116,0,106,1,125, + 2,124,0,160,2,124,1,124,2,124,3,161,3,125,4,124, + 4,100,1,117,0,114,40,100,1,83,0,124,4,106,3,100, + 1,117,0,114,90,124,4,106,4,125,5,124,5,114,86,100, + 1,124,4,95,5,116,6,124,1,124,5,124,0,106,2,131, + 3,124,4,95,4,124,4,83,0,100,1,83,0,124,4,83, + 0,41,2,122,141,84,114,121,32,116,111,32,102,105,110,100, + 32,97,32,115,112,101,99,32,102,111,114,32,39,102,117,108, + 108,110,97,109,101,39,32,111,110,32,115,121,115,46,112,97, + 116,104,32,111,114,32,39,112,97,116,104,39,46,10,10,32, + 32,32,32,32,32,32,32,84,104,101,32,115,101,97,114,99, + 104,32,105,115,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, + 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,32,32,32,32,32,32, + 32,32,78,41,7,114,15,0,0,0,114,52,0,0,0,114, + 56,1,0,0,114,144,0,0,0,114,182,0,0,0,114,185, + 0,0,0,114,18,1,0,0,41,6,114,202,0,0,0,114, + 143,0,0,0,114,52,0,0,0,114,206,0,0,0,114,191, + 0,0,0,114,55,1,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,207,0,0,0,80,5,0,0, + 115,28,0,0,0,8,6,6,1,14,1,8,1,4,1,10, + 1,6,1,4,1,6,3,16,1,4,1,4,2,4,2,255, + 128,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, + 0,0,0,0,4,0,0,0,4,0,0,0,67,0,0,0, + 115,30,0,0,0,124,0,160,0,124,1,124,2,161,2,125, + 3,124,3,100,1,117,0,114,24,100,1,83,0,124,3,106, + 1,83,0,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,114,208,0,0,0,114,209,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,210,0,0,0, + 104,5,0,0,115,10,0,0,0,12,8,8,1,4,1,6, + 1,255,128,122,22,80,97,116,104,70,105,110,100,101,114,46, + 102,105,110,100,95,109,111,100,117,108,101,99,0,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0, + 79,0,0,0,115,28,0,0,0,100,1,100,2,108,0,109, + 1,125,2,1,0,124,2,106,2,124,0,105,0,124,1,164, + 1,142,1,83,0,41,4,97,32,1,0,0,10,32,32,32, + 32,32,32,32,32,70,105,110,100,32,100,105,115,116,114,105, + 98,117,116,105,111,110,115,46,10,10,32,32,32,32,32,32, + 32,32,82,101,116,117,114,110,32,97,110,32,105,116,101,114, + 97,98,108,101,32,111,102,32,97,108,108,32,68,105,115,116, + 114,105,98,117,116,105,111,110,32,105,110,115,116,97,110,99, + 101,115,32,99,97,112,97,98,108,101,32,111,102,10,32,32, + 32,32,32,32,32,32,108,111,97,100,105,110,103,32,116,104, + 101,32,109,101,116,97,100,97,116,97,32,102,111,114,32,112, + 97,99,107,97,103,101,115,32,109,97,116,99,104,105,110,103, + 32,96,96,99,111,110,116,101,120,116,46,110,97,109,101,96, + 96,10,32,32,32,32,32,32,32,32,40,111,114,32,97,108, + 108,32,110,97,109,101,115,32,105,102,32,96,96,78,111,110, + 101,96,96,32,105,110,100,105,99,97,116,101,100,41,32,97, + 108,111,110,103,32,116,104,101,32,112,97,116,104,115,32,105, + 110,32,116,104,101,32,108,105,115,116,10,32,32,32,32,32, + 32,32,32,111,102,32,100,105,114,101,99,116,111,114,105,101, + 115,32,96,96,99,111,110,116,101,120,116,46,112,97,116,104, + 96,96,46,10,32,32,32,32,32,32,32,32,114,0,0,0, + 0,41,1,218,18,77,101,116,97,100,97,116,97,80,97,116, + 104,70,105,110,100,101,114,78,41,3,90,18,105,109,112,111, + 114,116,108,105,98,46,109,101,116,97,100,97,116,97,114,57, + 1,0,0,218,18,102,105,110,100,95,100,105,115,116,114,105, + 98,117,116,105,111,110,115,41,3,114,124,0,0,0,114,125, + 0,0,0,114,57,1,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,58,1,0,0,117,5,0,0, + 115,6,0,0,0,12,10,16,1,255,128,122,29,80,97,116, + 104,70,105,110,100,101,114,46,102,105,110,100,95,100,105,115, + 116,114,105,98,117,116,105,111,110,115,41,1,78,41,2,78, + 78,41,1,78,41,14,114,130,0,0,0,114,129,0,0,0, + 114,131,0,0,0,114,132,0,0,0,114,213,0,0,0,114, + 43,1,0,0,114,49,1,0,0,114,214,0,0,0,114,52, + 1,0,0,114,53,1,0,0,114,56,1,0,0,114,207,0, + 0,0,114,210,0,0,0,114,58,1,0,0,114,7,0,0, + 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 114,42,1,0,0,240,4,0,0,115,38,0,0,0,8,0, + 4,2,2,2,10,1,2,9,10,1,2,12,10,1,2,21, + 10,1,2,14,12,1,2,31,12,1,2,23,12,1,2,12, + 14,1,255,128,114,42,1,0,0,99,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,3,0,0,0,64,0, + 0,0,115,90,0,0,0,101,0,90,1,100,0,90,2,100, + 1,90,3,100,2,100,3,132,0,90,4,100,4,100,5,132, + 0,90,5,101,6,90,7,100,6,100,7,132,0,90,8,100, + 8,100,9,132,0,90,9,100,19,100,11,100,12,132,1,90, + 10,100,13,100,14,132,0,90,11,101,12,100,15,100,16,132, + 0,131,1,90,13,100,17,100,18,132,0,90,14,100,10,83, + 0,41,20,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,0,0,0,0,5,0,0,0,6,0, + 0,0,7,0,0,0,115,84,0,0,0,103,0,125,3,124, + 2,68,0,93,32,92,2,137,0,125,4,124,3,160,0,135, + 0,102,1,100,1,100,2,132,8,124,4,68,0,131,1,161, + 1,1,0,113,8,124,3,124,0,95,1,124,1,112,54,100, + 3,124,0,95,2,100,4,124,0,95,3,116,4,131,0,124, + 0,95,5,116,4,131,0,124,0,95,6,100,5,83,0,41, + 6,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,0,0,0,0,2,0,0,0,3,0, + 0,0,51,0,0,0,115,22,0,0,0,124,0,93,14,125, + 1,124,1,136,0,102,2,86,0,1,0,113,2,100,0,83, + 0,114,114,0,0,0,114,7,0,0,0,114,14,1,0,0, + 169,1,114,144,0,0,0,114,7,0,0,0,114,8,0,0, + 0,114,9,0,0,0,146,5,0,0,115,4,0,0,0,22, + 0,255,128,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,79,0,0,0, + 114,109,0,0,0,78,41,7,114,171,0,0,0,218,8,95, + 108,111,97,100,101,114,115,114,52,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,123,0,0,0,114,52,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,193,0,0,0,114,7,0,0,0,114, + 60,1,0,0,114,8,0,0,0,114,216,0,0,0,140,5, + 0,0,115,18,0,0,0,4,4,12,1,26,1,6,1,10, + 2,6,1,8,1,12,1,255,128,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,0,0,0,0,1,0,0,0,2, + 0,0,0,67,0,0,0,115,10,0,0,0,100,1,124,0, + 95,0,100,2,83,0,41,3,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,109,0,0,0,78,41, + 1,114,62,1,0,0,114,253,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,43,1,0,0,154, + 5,0,0,115,4,0,0,0,10,2,255,128,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,0,0,0,0,3,0,0,0,3,0,0,0,67, + 0,0,0,115,42,0,0,0,124,0,160,0,124,1,161,1, + 125,2,124,2,100,1,117,0,114,26,100,1,103,0,102,2, + 83,0,124,2,106,1,124,2,106,2,112,38,103,0,102,2, + 83,0,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,207, + 0,0,0,114,144,0,0,0,114,182,0,0,0,41,3,114, + 123,0,0,0,114,143,0,0,0,114,191,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,141,0, + 0,0,160,5,0,0,115,10,0,0,0,10,7,8,1,8, + 1,16,1,255,128,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,0,0,0,0,7,0,0,0,6,0, + 0,0,67,0,0,0,115,26,0,0,0,124,1,124,2,124, + 3,131,2,125,6,116,0,124,2,124,3,124,6,124,4,100, + 1,141,4,83,0,41,2,78,114,181,0,0,0,41,1,114, + 194,0,0,0,41,7,114,123,0,0,0,114,192,0,0,0, + 114,143,0,0,0,114,52,0,0,0,90,4,115,109,115,108, + 114,206,0,0,0,114,144,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,114,56,1,0,0,172,5, + 0,0,115,10,0,0,0,10,1,8,1,2,1,6,255,255, + 128,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,0,0,0,0,14,0,0,0,8,0,0,0,67,0,0, + 0,115,100,1,0,0,100,1,125,3,124,1,160,0,100,2, + 161,1,100,3,25,0,125,4,122,24,116,1,124,0,106,2, + 112,34,116,3,160,4,161,0,131,1,106,5,125,5,87,0, + 110,20,4,0,116,6,144,1,121,98,1,0,1,0,1,0, + 100,4,125,5,89,0,124,5,124,0,106,7,107,3,114,88, + 124,0,160,8,161,0,1,0,124,5,124,0,95,7,116,9, + 131,0,114,110,124,0,106,10,125,6,124,4,160,11,161,0, + 125,7,110,10,124,0,106,12,125,6,124,4,125,7,124,7, + 124,6,118,0,114,214,116,13,124,0,106,2,124,4,131,2, + 125,8,124,0,106,14,68,0,93,58,92,2,125,9,125,10, + 100,5,124,9,23,0,125,11,116,13,124,8,124,11,131,2, + 125,12,116,15,124,12,131,1,114,204,124,0,160,16,124,10, + 124,1,124,12,124,8,103,1,124,2,161,5,2,0,1,0, + 83,0,113,146,116,17,124,8,131,1,125,3,124,0,106,14, + 68,0,93,86,92,2,125,9,125,10,116,13,124,0,106,2, + 124,4,124,9,23,0,131,2,125,12,116,18,106,19,100,6, + 124,12,100,3,100,7,141,3,1,0,124,7,124,9,23,0, + 124,6,118,0,144,1,114,50,116,15,124,12,131,1,144,1, + 114,50,124,0,160,16,124,10,124,1,124,12,100,8,124,2, + 161,5,2,0,1,0,83,0,113,220,124,3,144,1,114,94, + 116,18,160,19,100,9,124,8,161,2,1,0,116,18,160,20, + 124,1,100,8,161,2,125,13,124,8,103,1,124,13,95,21, + 124,13,83,0,100,8,83,0,119,0,41,10,122,111,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,10,10,32,32,32,32, + 32,32,32,32,82,101,116,117,114,110,115,32,116,104,101,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,10,32,32,32,32,32,32,32,32,70,114,79, + 0,0,0,114,39,0,0,0,114,109,0,0,0,114,216,0, + 0,0,122,9,116,114,121,105,110,103,32,123,125,41,1,90, + 9,118,101,114,98,111,115,105,116,121,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,41,22,114,49,0,0,0,114,57,0, + 0,0,114,52,0,0,0,114,18,0,0,0,114,63,0,0, + 0,114,7,1,0,0,114,58,0,0,0,114,62,1,0,0, + 218,11,95,102,105,108,108,95,99,97,99,104,101,114,21,0, + 0,0,114,65,1,0,0,114,110,0,0,0,114,64,1,0, + 0,114,48,0,0,0,114,61,1,0,0,114,62,0,0,0, + 114,56,1,0,0,114,64,0,0,0,114,139,0,0,0,114, + 153,0,0,0,114,187,0,0,0,114,182,0,0,0,41,14, + 114,123,0,0,0,114,143,0,0,0,114,206,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,173,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, + 15,1,0,0,114,192,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,191,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,207,0,0,0,177,5,0,0, + 115,80,0,0,0,4,5,14,1,2,1,24,1,14,1,6, + 1,10,1,8,1,6,1,6,2,6,1,10,1,6,2,4, + 1,8,2,12,1,14,1,8,1,10,1,8,1,24,1,2, + 128,8,4,14,2,16,1,16,1,14,1,10,1,10,1,4, + 1,8,255,2,128,6,2,12,1,12,1,8,1,4,1,4, + 1,2,219,255,128,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,0,0,0,0,9,0,0,0,10,0,0,0, + 67,0,0,0,115,190,0,0,0,124,0,106,0,125,1,122, + 22,116,1,160,2,124,1,112,22,116,1,160,3,161,0,161, + 1,125,2,87,0,110,24,4,0,116,4,116,5,116,6,102, + 3,121,188,1,0,1,0,1,0,103,0,125,2,89,0,116, + 7,106,8,160,9,100,1,161,1,115,78,116,10,124,2,131, 1,124,0,95,11,110,74,116,10,131,0,125,3,124,2,68, 0,93,56,125,4,124,4,160,12,100,2,161,1,92,3,125, - 5,125,6,125,7,124,6,114,134,100,3,160,13,124,5,124, + 5,125,6,125,7,124,6,114,130,100,3,160,13,124,5,124, 7,160,14,161,0,161,2,125,8,110,4,124,5,125,8,124, - 3,160,15,124,8,161,1,1,0,113,92,124,3,124,0,95, + 3,160,15,124,8,161,1,1,0,113,88,124,3,124,0,95, 11,116,7,106,8,160,9,116,16,161,1,114,184,100,4,100, 5,132,0,124,2,68,0,131,1,124,0,95,17,100,6,83, - 0,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,14,0,0,0,114,79, - 0,0,0,114,69,0,0,0,99,1,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,4,0,0,0,83,0,0, - 0,115,20,0,0,0,104,0,124,0,93,12,125,1,124,1, - 160,0,161,0,146,2,113,4,83,0,114,7,0,0,0,41, - 1,114,110,0,0,0,41,2,114,5,0,0,0,90,2,102, - 110,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,13,0,0,0,251,5,0,0,115,4,0,0,0,20,0, - 255,128,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,52,0,0,0,114,18,0,0,0,90,7,108,105,115,116, - 100,105,114,114,63,0,0,0,114,50,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,15,0,0,0,114,22,0,0,0,114,23,0,0, - 0,114,63,1,0,0,114,64,1,0,0,114,105,0,0,0, - 114,70,0,0,0,114,110,0,0,0,218,3,97,100,100,114, - 24,0,0,0,114,65,1,0,0,41,9,114,123,0,0,0, - 114,52,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,38,1,0,0,114,121,0,0,0, - 114,25,1,0,0,114,15,1,0,0,90,8,110,101,119,95, - 110,97,109,101,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,114,67,1,0,0,222,5,0,0,115,38,0,0, - 0,6,2,2,1,22,1,18,1,10,3,12,3,12,1,6, - 7,8,1,16,1,4,1,18,1,4,2,12,1,6,1,12, - 1,16,1,4,128,255,128,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,0,0,0,0,3,0,0,0, - 3,0,0,0,7,0,0,0,115,18,0,0,0,135,0,135, - 1,102,2,100,1,100,2,132,8,125,2,124,2,83,0,41, - 4,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,0,0,0,0,1,0,0,0,4,0,0,0,19, - 0,0,0,115,36,0,0,0,116,0,124,0,131,1,115,20, - 116,1,100,1,124,0,100,2,141,2,130,1,136,0,124,0, - 103,1,136,1,162,1,82,0,142,0,83,0,41,4,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,56,0, - 0,0,78,41,2,114,64,0,0,0,114,122,0,0,0,114, - 56,0,0,0,169,2,114,202,0,0,0,114,66,1,0,0, - 114,7,0,0,0,114,8,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,7,6,0,0,115,8,0,0,0,8,2,12, - 1,16,1,255,128,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,78,114,7, - 0,0,0,41,3,114,202,0,0,0,114,66,1,0,0,114, - 72,1,0,0,114,7,0,0,0,114,71,1,0,0,114,8, - 0,0,0,218,9,112,97,116,104,95,104,111,111,107,253,5, - 0,0,115,6,0,0,0,14,10,4,6,255,128,122,20,70, + 0,100,6,83,0,119,0,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, + 14,0,0,0,114,79,0,0,0,114,69,0,0,0,99,1, + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,4, + 0,0,0,83,0,0,0,115,20,0,0,0,104,0,124,0, + 93,12,125,1,124,1,160,0,161,0,146,2,113,4,83,0, + 114,7,0,0,0,41,1,114,110,0,0,0,41,2,114,5, + 0,0,0,90,2,102,110,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,13,0,0,0,254,5,0,0,115, + 4,0,0,0,20,0,255,128,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,52,0,0,0,114,18,0,0,0, + 90,7,108,105,115,116,100,105,114,114,63,0,0,0,114,50, + 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,15,0,0,0,114,22,0, + 0,0,114,23,0,0,0,114,63,1,0,0,114,64,1,0, + 0,114,105,0,0,0,114,70,0,0,0,114,110,0,0,0, + 218,3,97,100,100,114,24,0,0,0,114,65,1,0,0,41, + 9,114,123,0,0,0,114,52,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,38,1,0, + 0,114,121,0,0,0,114,25,1,0,0,114,15,1,0,0, + 90,8,110,101,119,95,110,97,109,101,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,114,67,1,0,0,225,5, + 0,0,115,40,0,0,0,6,2,2,1,22,1,18,1,6, + 3,12,3,12,1,6,7,8,1,16,1,4,1,18,1,4, + 2,12,1,6,1,12,1,20,1,4,255,2,233,255,128,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, + 0,0,0,0,3,0,0,0,3,0,0,0,7,0,0,0, + 115,18,0,0,0,135,0,135,1,102,2,100,1,100,2,132, + 8,125,2,124,2,83,0,41,4,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,0,0,0,0,1, + 0,0,0,4,0,0,0,19,0,0,0,115,36,0,0,0, + 116,0,124,0,131,1,115,20,116,1,100,1,124,0,100,2, + 141,2,130,1,136,0,124,0,103,1,136,1,162,1,82,0, + 142,0,83,0,41,4,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,56,0,0,0,78,41,2,114,64,0, + 0,0,114,122,0,0,0,114,56,0,0,0,169,2,114,202, + 0,0,0,114,66,1,0,0,114,7,0,0,0,114,8,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,10,6,0,0, + 115,8,0,0,0,8,2,12,1,16,1,255,128,122,54,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,0,0,0,0, - 1,0,0,0,3,0,0,0,67,0,0,0,115,12,0,0, - 0,100,1,160,0,124,0,106,1,161,1,83,0,41,2,78, - 122,16,70,105,108,101,70,105,110,100,101,114,40,123,33,114, - 125,41,41,2,114,70,0,0,0,114,52,0,0,0,114,253, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,36,1,0,0,15,6,0,0,115,4,0,0,0, - 12,1,255,128,122,19,70,105,108,101,70,105,110,100,101,114, - 46,95,95,114,101,112,114,95,95,41,1,78,41,15,114,130, - 0,0,0,114,129,0,0,0,114,131,0,0,0,114,132,0, - 0,0,114,216,0,0,0,114,43,1,0,0,114,147,0,0, - 0,114,210,0,0,0,114,141,0,0,0,114,56,1,0,0, - 114,207,0,0,0,114,67,1,0,0,114,214,0,0,0,114, - 73,1,0,0,114,36,1,0,0,114,7,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,59,1, - 0,0,128,5,0,0,115,26,0,0,0,8,0,4,2,8, - 7,8,14,4,4,8,2,8,12,10,5,8,48,2,31,10, - 1,12,17,255,128,114,59,1,0,0,99,4,0,0,0,0, - 0,0,0,0,0,0,0,6,0,0,0,8,0,0,0,67, - 0,0,0,115,144,0,0,0,124,0,160,0,100,1,161,1, - 125,4,124,0,160,0,100,2,161,1,125,5,124,4,115,66, - 124,5,114,36,124,5,106,1,125,4,110,30,124,2,124,3, - 107,2,114,56,116,2,124,1,124,2,131,2,125,4,110,10, - 116,3,124,1,124,2,131,2,125,4,124,5,115,84,116,4, - 124,1,124,2,124,4,100,3,141,3,125,5,122,38,124,5, - 124,0,100,2,60,0,124,4,124,0,100,1,60,0,124,2, - 124,0,100,4,60,0,124,3,124,0,100,5,60,0,87,0, - 100,0,83,0,4,0,116,5,121,142,1,0,1,0,1,0, - 89,0,100,0,83,0,48,0,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,60,1,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,144,0,0,0,114,12,1,0,0,114,6,1, - 0,0,114,194,0,0,0,218,9,69,120,99,101,112,116,105, - 111,110,41,6,90,2,110,115,114,121,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,144,0,0,0,114,191,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,14,95,102,105, - 120,95,117,112,95,109,111,100,117,108,101,21,6,0,0,115, - 42,0,0,0,10,2,10,1,4,1,4,1,8,1,8,1, - 12,1,10,2,4,1,14,1,2,1,8,1,8,1,8,1, - 10,1,4,128,12,1,2,2,4,128,2,0,255,128,114,78, - 1,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0, - 3,0,0,0,3,0,0,0,67,0,0,0,115,38,0,0, - 0,116,0,116,1,160,2,161,0,102,2,125,0,116,3,116, - 4,102,2,125,1,116,5,116,6,102,2,125,2,124,0,124, - 1,124,2,103,3,83,0,41,2,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,78,41,7,114,3,1, - 0,0,114,167,0,0,0,218,18,101,120,116,101,110,115,105, - 111,110,95,115,117,102,102,105,120,101,115,114,6,1,0,0, - 114,106,0,0,0,114,12,1,0,0,114,94,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, - 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,188, - 0,0,0,44,6,0,0,115,10,0,0,0,12,5,8,1, - 8,1,10,1,255,128,114,188,0,0,0,99,1,0,0,0, - 0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0, - 67,0,0,0,115,8,0,0,0,124,0,97,0,100,0,83, - 0,114,114,0,0,0,41,1,114,139,0,0,0,41,1,218, - 17,95,98,111,111,116,115,116,114,97,112,95,109,111,100,117, - 108,101,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,218,21,95,115,101,116,95,98,111,111,116,115,116,114,97, - 112,95,109,111,100,117,108,101,55,6,0,0,115,6,0,0, - 0,4,2,4,128,255,128,114,81,1,0,0,99,1,0,0, - 0,0,0,0,0,0,0,0,0,2,0,0,0,4,0,0, - 0,67,0,0,0,115,50,0,0,0,116,0,124,0,131,1, - 1,0,116,1,131,0,125,1,116,2,106,3,160,4,116,5, - 106,6,124,1,142,0,103,1,161,1,1,0,116,2,106,7, - 160,8,116,9,161,1,1,0,100,1,83,0,41,2,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,78,41,10,114,81,1,0, - 0,114,188,0,0,0,114,15,0,0,0,114,48,1,0,0, - 114,171,0,0,0,114,59,1,0,0,114,73,1,0,0,218, - 9,109,101,116,97,95,112,97,116,104,114,190,0,0,0,114, - 42,1,0,0,41,2,114,80,1,0,0,90,17,115,117,112, - 112,111,114,116,101,100,95,108,111,97,100,101,114,115,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,8,95, - 105,110,115,116,97,108,108,60,6,0,0,115,12,0,0,0, - 8,2,6,1,20,1,12,1,4,128,255,128,114,83,1,0, - 0,41,1,114,68,0,0,0,41,1,78,41,3,78,78,78, - 41,2,114,0,0,0,0,114,0,0,0,0,41,1,84,41, - 1,78,41,1,78,41,83,114,132,0,0,0,114,139,0,0, - 0,114,167,0,0,0,114,72,0,0,0,114,15,0,0,0, - 114,81,0,0,0,114,164,0,0,0,114,22,0,0,0,114, - 211,0,0,0,90,2,110,116,114,18,0,0,0,114,196,0, - 0,0,90,5,112,111,115,105,120,114,42,0,0,0,218,3, - 97,108,108,114,45,0,0,0,114,46,0,0,0,114,66,0, - 0,0,114,25,0,0,0,90,37,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,95,66,89,84,69,83,95,75,69,89,114,24, - 0,0,0,114,26,0,0,0,114,21,0,0,0,114,33,0, - 0,0,114,38,0,0,0,114,40,0,0,0,114,48,0,0, - 0,114,55,0,0,0,114,57,0,0,0,114,61,0,0,0, - 114,62,0,0,0,114,64,0,0,0,114,67,0,0,0,114, - 77,0,0,0,218,4,116,121,112,101,218,8,95,95,99,111, - 100,101,95,95,114,166,0,0,0,114,31,0,0,0,114,152, - 0,0,0,114,30,0,0,0,114,35,0,0,0,114,243,0, - 0,0,114,97,0,0,0,114,93,0,0,0,114,106,0,0, - 0,114,190,0,0,0,114,79,1,0,0,114,212,0,0,0, - 114,94,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,102,0,0,0, - 114,107,0,0,0,114,113,0,0,0,114,117,0,0,0,114, - 119,0,0,0,114,140,0,0,0,114,147,0,0,0,114,156, - 0,0,0,114,160,0,0,0,114,162,0,0,0,114,169,0, - 0,0,114,174,0,0,0,114,175,0,0,0,114,180,0,0, - 0,218,6,111,98,106,101,99,116,114,189,0,0,0,114,194, - 0,0,0,114,195,0,0,0,114,215,0,0,0,114,228,0, - 0,0,114,246,0,0,0,114,6,1,0,0,114,12,1,0, - 0,114,3,1,0,0,114,18,1,0,0,114,40,1,0,0, - 114,42,1,0,0,114,59,1,0,0,114,78,1,0,0,114, - 188,0,0,0,114,81,1,0,0,114,83,1,0,0,114,7, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,8,60,109,111,100,117,108,101,62,1,0,0,0, - 115,174,0,0,0,4,0,4,22,8,3,8,1,8,1,8, - 1,8,1,10,3,4,1,8,1,10,1,8,2,4,3,10, - 1,6,2,22,2,8,1,10,1,14,1,4,4,4,1,2, - 1,2,1,4,255,8,4,6,16,8,3,8,5,8,5,8, - 6,8,6,8,12,8,10,8,9,8,5,8,7,10,9,10, - 22,0,127,16,23,12,1,4,2,4,1,6,2,6,1,10, - 1,8,2,6,2,8,2,16,2,8,71,8,40,8,19,8, - 12,8,12,8,31,8,17,8,33,8,28,10,24,10,13,10, - 10,8,11,6,14,4,3,2,1,12,255,14,68,14,64,16, - 29,0,127,14,17,18,50,18,45,18,25,14,53,14,63,14, - 42,0,127,14,20,0,127,10,22,8,23,8,11,8,5,4, - 128,255,128, + 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,78,114,7,0,0,0,41,3,114,202,0, + 0,0,114,66,1,0,0,114,72,1,0,0,114,7,0,0, + 0,114,71,1,0,0,114,8,0,0,0,218,9,112,97,116, + 104,95,104,111,111,107,0,6,0,0,115,6,0,0,0,14, + 10,4,6,255,128,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,0,0,0,0,1,0,0,0,3,0,0,0, + 67,0,0,0,115,12,0,0,0,100,1,160,0,124,0,106, + 1,161,1,83,0,41,2,78,122,16,70,105,108,101,70,105, + 110,100,101,114,40,123,33,114,125,41,41,2,114,70,0,0, + 0,114,52,0,0,0,114,253,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,36,1,0,0,18, + 6,0,0,115,4,0,0,0,12,1,255,128,122,19,70,105, + 108,101,70,105,110,100,101,114,46,95,95,114,101,112,114,95, + 95,41,1,78,41,15,114,130,0,0,0,114,129,0,0,0, + 114,131,0,0,0,114,132,0,0,0,114,216,0,0,0,114, + 43,1,0,0,114,147,0,0,0,114,210,0,0,0,114,141, + 0,0,0,114,56,1,0,0,114,207,0,0,0,114,67,1, + 0,0,114,214,0,0,0,114,73,1,0,0,114,36,1,0, + 0,114,7,0,0,0,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,59,1,0,0,131,5,0,0,115,26, + 0,0,0,8,0,4,2,8,7,8,14,4,4,8,2,8, + 12,10,5,8,48,2,31,10,1,12,17,255,128,114,59,1, + 0,0,99,4,0,0,0,0,0,0,0,0,0,0,0,6, + 0,0,0,8,0,0,0,67,0,0,0,115,148,0,0,0, + 124,0,160,0,100,1,161,1,125,4,124,0,160,0,100,2, + 161,1,125,5,124,4,115,66,124,5,114,36,124,5,106,1, + 125,4,110,30,124,2,124,3,107,2,114,56,116,2,124,1, + 124,2,131,2,125,4,110,10,116,3,124,1,124,2,131,2, + 125,4,124,5,115,84,116,4,124,1,124,2,124,4,100,3, + 141,3,125,5,122,38,124,5,124,0,100,2,60,0,124,4, + 124,0,100,1,60,0,124,2,124,0,100,4,60,0,124,3, + 124,0,100,5,60,0,87,0,100,0,83,0,4,0,116,5, + 121,142,1,0,1,0,1,0,89,0,100,0,83,0,119,0, + 100,0,83,0,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,60,1, + 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, + 144,0,0,0,114,12,1,0,0,114,6,1,0,0,114,194, + 0,0,0,218,9,69,120,99,101,112,116,105,111,110,41,6, + 90,2,110,115,114,121,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,144, + 0,0,0,114,191,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,218,14,95,102,105,120,95,117,112, + 95,109,111,100,117,108,101,24,6,0,0,115,40,0,0,0, + 10,2,10,1,4,1,4,1,8,1,8,1,12,1,10,2, + 4,1,14,1,2,1,8,1,8,1,8,1,14,1,12,1, + 6,2,2,254,4,255,255,128,114,78,1,0,0,99,0,0, + 0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0, + 0,0,67,0,0,0,115,38,0,0,0,116,0,116,1,160, + 2,161,0,102,2,125,0,116,3,116,4,102,2,125,1,116, + 5,116,6,102,2,125,2,124,0,124,1,124,2,103,3,83, + 0,41,2,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,78,41,7,114,3,1,0,0,114,167,0,0, + 0,218,18,101,120,116,101,110,115,105,111,110,95,115,117,102, + 102,105,120,101,115,114,6,1,0,0,114,106,0,0,0,114, + 12,1,0,0,114,94,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,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,188,0,0,0,47,6,0, + 0,115,10,0,0,0,12,5,8,1,8,1,10,1,255,128, + 114,188,0,0,0,99,1,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,1,0,0,0,67,0,0,0,115,8, + 0,0,0,124,0,97,0,100,0,83,0,114,114,0,0,0, + 41,1,114,139,0,0,0,41,1,218,17,95,98,111,111,116, + 115,116,114,97,112,95,109,111,100,117,108,101,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,21,95,115,101, + 116,95,98,111,111,116,115,116,114,97,112,95,109,111,100,117, + 108,101,58,6,0,0,115,4,0,0,0,8,2,255,128,114, + 81,1,0,0,99,1,0,0,0,0,0,0,0,0,0,0, + 0,2,0,0,0,4,0,0,0,67,0,0,0,115,50,0, + 0,0,116,0,124,0,131,1,1,0,116,1,131,0,125,1, + 116,2,106,3,160,4,116,5,106,6,124,1,142,0,103,1, + 161,1,1,0,116,2,106,7,160,8,116,9,161,1,1,0, + 100,1,83,0,41,2,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,78,41,10,114,81,1,0,0,114,188,0,0,0,114,15, + 0,0,0,114,48,1,0,0,114,171,0,0,0,114,59,1, + 0,0,114,73,1,0,0,218,9,109,101,116,97,95,112,97, + 116,104,114,190,0,0,0,114,42,1,0,0,41,2,114,80, + 1,0,0,90,17,115,117,112,112,111,114,116,101,100,95,108, + 111,97,100,101,114,115,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,218,8,95,105,110,115,116,97,108,108,63, + 6,0,0,115,10,0,0,0,8,2,6,1,20,1,16,1, + 255,128,114,83,1,0,0,41,1,114,68,0,0,0,41,1, + 78,41,3,78,78,78,41,2,114,0,0,0,0,114,0,0, + 0,0,41,1,84,41,1,78,41,1,78,41,83,114,132,0, + 0,0,114,139,0,0,0,114,167,0,0,0,114,72,0,0, + 0,114,15,0,0,0,114,81,0,0,0,114,164,0,0,0, + 114,22,0,0,0,114,211,0,0,0,90,2,110,116,114,18, + 0,0,0,114,196,0,0,0,90,5,112,111,115,105,120,114, + 42,0,0,0,218,3,97,108,108,114,45,0,0,0,114,46, + 0,0,0,114,66,0,0,0,114,25,0,0,0,90,37,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,95,66,89,84,69,83, + 95,75,69,89,114,24,0,0,0,114,26,0,0,0,114,21, + 0,0,0,114,33,0,0,0,114,38,0,0,0,114,40,0, + 0,0,114,48,0,0,0,114,55,0,0,0,114,57,0,0, + 0,114,61,0,0,0,114,62,0,0,0,114,64,0,0,0, + 114,67,0,0,0,114,77,0,0,0,218,4,116,121,112,101, + 218,8,95,95,99,111,100,101,95,95,114,166,0,0,0,114, + 31,0,0,0,114,152,0,0,0,114,30,0,0,0,114,35, + 0,0,0,114,243,0,0,0,114,97,0,0,0,114,93,0, + 0,0,114,106,0,0,0,114,190,0,0,0,114,79,1,0, + 0,114,212,0,0,0,114,94,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,102,0,0,0,114,107,0,0,0,114,113,0,0,0, + 114,117,0,0,0,114,119,0,0,0,114,140,0,0,0,114, + 147,0,0,0,114,156,0,0,0,114,160,0,0,0,114,162, + 0,0,0,114,169,0,0,0,114,174,0,0,0,114,175,0, + 0,0,114,180,0,0,0,218,6,111,98,106,101,99,116,114, + 189,0,0,0,114,194,0,0,0,114,195,0,0,0,114,215, + 0,0,0,114,228,0,0,0,114,246,0,0,0,114,6,1, + 0,0,114,12,1,0,0,114,3,1,0,0,114,18,1,0, + 0,114,40,1,0,0,114,42,1,0,0,114,59,1,0,0, + 114,78,1,0,0,114,188,0,0,0,114,81,1,0,0,114, + 83,1,0,0,114,7,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,218,8,60,109,111,100,117,108, + 101,62,1,0,0,0,115,172,0,0,0,4,0,4,22,8, + 3,8,1,8,1,8,1,8,1,10,3,4,1,8,1,10, + 1,8,2,4,3,10,1,6,2,22,2,8,1,10,1,14, + 1,4,4,4,1,2,1,2,1,4,255,8,4,6,16,8, + 3,8,5,8,5,8,6,8,6,8,12,8,10,8,9,8, + 5,8,7,10,9,10,22,0,127,16,24,12,1,4,2,4, + 1,6,2,6,1,10,1,8,2,6,2,8,2,16,2,8, + 71,8,40,8,19,8,12,8,12,8,31,8,17,8,33,8, + 28,10,24,10,13,10,10,8,11,6,14,4,3,2,1,12, + 255,14,68,14,64,16,30,0,127,14,17,18,50,18,45,18, + 25,14,53,14,63,14,43,0,127,14,20,0,127,10,22,8, + 23,8,11,12,5,255,128, }; diff --git a/Python/importlib_zipimport.h b/Python/importlib_zipimport.h index 87f787c84a4..79296d495b5 100644 --- a/Python/importlib_zipimport.h +++ b/Python/importlib_zipimport.h @@ -1,512 +1,530 @@ /* Auto-generated by Programs/_freeze_importlib.c */ const unsigned char _Py_M__zipimport[] = { 99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,4,0,0,0,64,0,0,0,115,72,1,0,0,100,0, + 0,4,0,0,0,64,0,0,0,115,80,1,0,0,100,0, 90,0,100,1,100,2,108,1,90,2,100,1,100,3,108,1, 109,3,90,3,109,4,90,4,1,0,100,1,100,2,108,5, 90,6,100,1,100,2,108,7,90,7,100,1,100,2,108,8, 90,8,100,1,100,2,108,9,90,9,100,1,100,2,108,10, - 90,10,100,1,100,2,108,11,90,11,100,4,100,5,103,2, - 90,12,101,2,106,13,90,13,101,2,106,14,100,6,100,2, - 133,2,25,0,90,15,71,0,100,7,100,4,132,0,100,4, - 101,16,131,3,90,17,105,0,90,18,101,19,101,10,131,1, - 90,20,100,8,90,21,100,9,90,22,100,10,90,23,71,0, - 100,11,100,5,132,0,100,5,101,2,106,24,131,3,90,25, - 101,13,100,12,23,0,100,13,100,13,102,3,101,13,100,14, - 23,0,100,15,100,13,102,3,100,16,100,17,102,4,90,26, - 100,18,100,19,132,0,90,27,100,20,100,21,132,0,90,28, - 100,22,100,23,132,0,90,29,100,24,100,25,132,0,90,30, - 100,26,90,31,100,15,97,32,100,27,100,28,132,0,90,33, - 100,29,100,30,132,0,90,34,100,31,100,32,132,0,90,35, - 100,33,100,34,132,0,90,36,101,19,101,36,106,37,131,1, - 90,38,100,35,100,36,132,0,90,39,100,37,100,38,132,0, - 90,40,100,39,100,40,132,0,90,41,100,41,100,42,132,0, - 90,42,100,43,100,44,132,0,90,43,100,45,100,46,132,0, - 90,44,100,2,83,0,41,47,97,80,2,0,0,122,105,112, - 105,109,112,111,114,116,32,112,114,111,118,105,100,101,115,32, - 115,117,112,112,111,114,116,32,102,111,114,32,105,109,112,111, - 114,116,105,110,103,32,80,121,116,104,111,110,32,109,111,100, - 117,108,101,115,32,102,114,111,109,32,90,105,112,32,97,114, - 99,104,105,118,101,115,46,10,10,84,104,105,115,32,109,111, - 100,117,108,101,32,101,120,112,111,114,116,115,32,116,104,114, - 101,101,32,111,98,106,101,99,116,115,58,10,45,32,122,105, - 112,105,109,112,111,114,116,101,114,58,32,97,32,99,108,97, - 115,115,59,32,105,116,115,32,99,111,110,115,116,114,117,99, - 116,111,114,32,116,97,107,101,115,32,97,32,112,97,116,104, - 32,116,111,32,97,32,90,105,112,32,97,114,99,104,105,118, - 101,46,10,45,32,90,105,112,73,109,112,111,114,116,69,114, - 114,111,114,58,32,101,120,99,101,112,116,105,111,110,32,114, - 97,105,115,101,100,32,98,121,32,122,105,112,105,109,112,111, - 114,116,101,114,32,111,98,106,101,99,116,115,46,32,73,116, - 39,115,32,97,10,32,32,115,117,98,99,108,97,115,115,32, - 111,102,32,73,109,112,111,114,116,69,114,114,111,114,44,32, - 115,111,32,105,116,32,99,97,110,32,98,101,32,99,97,117, - 103,104,116,32,97,115,32,73,109,112,111,114,116,69,114,114, - 111,114,44,32,116,111,111,46,10,45,32,95,122,105,112,95, - 100,105,114,101,99,116,111,114,121,95,99,97,99,104,101,58, - 32,97,32,100,105,99,116,44,32,109,97,112,112,105,110,103, - 32,97,114,99,104,105,118,101,32,112,97,116,104,115,32,116, - 111,32,122,105,112,32,100,105,114,101,99,116,111,114,121,10, - 32,32,105,110,102,111,32,100,105,99,116,115,44,32,97,115, - 32,117,115,101,100,32,105,110,32,122,105,112,105,109,112,111, - 114,116,101,114,46,95,102,105,108,101,115,46,10,10,73,116, - 32,105,115,32,117,115,117,97,108,108,121,32,110,111,116,32, - 110,101,101,100,101,100,32,116,111,32,117,115,101,32,116,104, - 101,32,122,105,112,105,109,112,111,114,116,32,109,111,100,117, - 108,101,32,101,120,112,108,105,99,105,116,108,121,59,32,105, - 116,32,105,115,10,117,115,101,100,32,98,121,32,116,104,101, - 32,98,117,105,108,116,105,110,32,105,109,112,111,114,116,32, - 109,101,99,104,97,110,105,115,109,32,102,111,114,32,115,121, - 115,46,112,97,116,104,32,105,116,101,109,115,32,116,104,97, - 116,32,97,114,101,32,112,97,116,104,115,10,116,111,32,90, - 105,112,32,97,114,99,104,105,118,101,115,46,10,233,0,0, - 0,0,78,41,2,218,14,95,117,110,112,97,99,107,95,117, - 105,110,116,49,54,218,14,95,117,110,112,97,99,107,95,117, - 105,110,116,51,50,218,14,90,105,112,73,109,112,111,114,116, - 69,114,114,111,114,218,11,122,105,112,105,109,112,111,114,116, - 101,114,233,1,0,0,0,99,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,1,0,0,0,64,0,0,0, - 115,12,0,0,0,101,0,90,1,100,0,90,2,100,1,83, - 0,41,2,114,3,0,0,0,78,41,3,218,8,95,95,110, - 97,109,101,95,95,218,10,95,95,109,111,100,117,108,101,95, - 95,218,12,95,95,113,117,97,108,110,97,109,101,95,95,169, - 0,114,9,0,0,0,114,9,0,0,0,250,18,60,102,114, - 111,122,101,110,32,122,105,112,105,109,112,111,114,116,62,114, - 3,0,0,0,33,0,0,0,115,6,0,0,0,8,0,4, - 1,255,128,233,22,0,0,0,115,4,0,0,0,80,75,5, - 6,105,255,255,0,0,99,0,0,0,0,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,90,1,100,0,90,2,100,1,90,3, - 100,2,100,3,132,0,90,4,100,27,100,5,100,6,132,1, - 90,5,100,28,100,7,100,8,132,1,90,6,100,29,100,9, - 100,10,132,1,90,7,100,11,100,12,132,0,90,8,100,13, - 100,14,132,0,90,9,100,15,100,16,132,0,90,10,100,17, - 100,18,132,0,90,11,100,19,100,20,132,0,90,12,100,21, - 100,22,132,0,90,13,100,23,100,24,132,0,90,14,100,25, - 100,26,132,0,90,15,100,4,83,0,41,30,114,4,0,0, - 0,97,255,1,0,0,122,105,112,105,109,112,111,114,116,101, - 114,40,97,114,99,104,105,118,101,112,97,116,104,41,32,45, - 62,32,122,105,112,105,109,112,111,114,116,101,114,32,111,98, - 106,101,99,116,10,10,32,32,32,32,67,114,101,97,116,101, - 32,97,32,110,101,119,32,122,105,112,105,109,112,111,114,116, - 101,114,32,105,110,115,116,97,110,99,101,46,32,39,97,114, - 99,104,105,118,101,112,97,116,104,39,32,109,117,115,116,32, - 98,101,32,97,32,112,97,116,104,32,116,111,10,32,32,32, - 32,97,32,122,105,112,102,105,108,101,44,32,111,114,32,116, - 111,32,97,32,115,112,101,99,105,102,105,99,32,112,97,116, - 104,32,105,110,115,105,100,101,32,97,32,122,105,112,102,105, - 108,101,46,32,70,111,114,32,101,120,97,109,112,108,101,44, - 32,105,116,32,99,97,110,32,98,101,10,32,32,32,32,39, + 90,10,100,1,100,2,108,11,90,11,100,1,100,2,108,12, + 90,12,100,4,100,5,103,2,90,13,101,2,106,14,90,14, + 101,2,106,15,100,6,100,2,133,2,25,0,90,16,71,0, + 100,7,100,4,132,0,100,4,101,17,131,3,90,18,105,0, + 90,19,101,20,101,10,131,1,90,21,100,8,90,22,100,9, + 90,23,100,10,90,24,71,0,100,11,100,5,132,0,100,5, + 101,2,106,25,131,3,90,26,101,14,100,12,23,0,100,13, + 100,13,102,3,101,14,100,14,23,0,100,15,100,13,102,3, + 100,16,100,17,102,4,90,27,100,18,100,19,132,0,90,28, + 100,20,100,21,132,0,90,29,100,22,100,23,132,0,90,30, + 100,24,100,25,132,0,90,31,100,26,90,32,100,15,97,33, + 100,27,100,28,132,0,90,34,100,29,100,30,132,0,90,35, + 100,31,100,32,132,0,90,36,100,33,100,34,132,0,90,37, + 101,20,101,37,106,38,131,1,90,39,100,35,100,36,132,0, + 90,40,100,37,100,38,132,0,90,41,100,39,100,40,132,0, + 90,42,100,41,100,42,132,0,90,43,100,43,100,44,132,0, + 90,44,100,45,100,46,132,0,90,45,100,2,83,0,41,47, + 97,80,2,0,0,122,105,112,105,109,112,111,114,116,32,112, + 114,111,118,105,100,101,115,32,115,117,112,112,111,114,116,32, + 102,111,114,32,105,109,112,111,114,116,105,110,103,32,80,121, + 116,104,111,110,32,109,111,100,117,108,101,115,32,102,114,111, + 109,32,90,105,112,32,97,114,99,104,105,118,101,115,46,10, + 10,84,104,105,115,32,109,111,100,117,108,101,32,101,120,112, + 111,114,116,115,32,116,104,114,101,101,32,111,98,106,101,99, + 116,115,58,10,45,32,122,105,112,105,109,112,111,114,116,101, + 114,58,32,97,32,99,108,97,115,115,59,32,105,116,115,32, + 99,111,110,115,116,114,117,99,116,111,114,32,116,97,107,101, + 115,32,97,32,112,97,116,104,32,116,111,32,97,32,90,105, + 112,32,97,114,99,104,105,118,101,46,10,45,32,90,105,112, + 73,109,112,111,114,116,69,114,114,111,114,58,32,101,120,99, + 101,112,116,105,111,110,32,114,97,105,115,101,100,32,98,121, + 32,122,105,112,105,109,112,111,114,116,101,114,32,111,98,106, + 101,99,116,115,46,32,73,116,39,115,32,97,10,32,32,115, + 117,98,99,108,97,115,115,32,111,102,32,73,109,112,111,114, + 116,69,114,114,111,114,44,32,115,111,32,105,116,32,99,97, + 110,32,98,101,32,99,97,117,103,104,116,32,97,115,32,73, + 109,112,111,114,116,69,114,114,111,114,44,32,116,111,111,46, + 10,45,32,95,122,105,112,95,100,105,114,101,99,116,111,114, + 121,95,99,97,99,104,101,58,32,97,32,100,105,99,116,44, + 32,109,97,112,112,105,110,103,32,97,114,99,104,105,118,101, + 32,112,97,116,104,115,32,116,111,32,122,105,112,32,100,105, + 114,101,99,116,111,114,121,10,32,32,105,110,102,111,32,100, + 105,99,116,115,44,32,97,115,32,117,115,101,100,32,105,110, + 32,122,105,112,105,109,112,111,114,116,101,114,46,95,102,105, + 108,101,115,46,10,10,73,116,32,105,115,32,117,115,117,97, + 108,108,121,32,110,111,116,32,110,101,101,100,101,100,32,116, + 111,32,117,115,101,32,116,104,101,32,122,105,112,105,109,112, + 111,114,116,32,109,111,100,117,108,101,32,101,120,112,108,105, + 99,105,116,108,121,59,32,105,116,32,105,115,10,117,115,101, + 100,32,98,121,32,116,104,101,32,98,117,105,108,116,105,110, + 32,105,109,112,111,114,116,32,109,101,99,104,97,110,105,115, + 109,32,102,111,114,32,115,121,115,46,112,97,116,104,32,105, + 116,101,109,115,32,116,104,97,116,32,97,114,101,32,112,97, + 116,104,115,10,116,111,32,90,105,112,32,97,114,99,104,105, + 118,101,115,46,10,233,0,0,0,0,78,41,2,218,14,95, + 117,110,112,97,99,107,95,117,105,110,116,49,54,218,14,95, + 117,110,112,97,99,107,95,117,105,110,116,51,50,218,14,90, + 105,112,73,109,112,111,114,116,69,114,114,111,114,218,11,122, + 105,112,105,109,112,111,114,116,101,114,233,1,0,0,0,99, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,64,0,0,0,115,12,0,0,0,101,0,90, + 1,100,0,90,2,100,1,83,0,41,2,114,3,0,0,0, + 78,41,3,218,8,95,95,110,97,109,101,95,95,218,10,95, + 95,109,111,100,117,108,101,95,95,218,12,95,95,113,117,97, + 108,110,97,109,101,95,95,169,0,114,9,0,0,0,114,9, + 0,0,0,250,18,60,102,114,111,122,101,110,32,122,105,112, + 105,109,112,111,114,116,62,114,3,0,0,0,34,0,0,0, + 115,6,0,0,0,8,0,4,1,255,128,233,22,0,0,0, + 115,4,0,0,0,80,75,5,6,105,255,255,0,0,99,0, + 0,0,0,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,90,1, + 100,0,90,2,100,1,90,3,100,2,100,3,132,0,90,4, + 100,27,100,5,100,6,132,1,90,5,100,28,100,7,100,8, + 132,1,90,6,100,29,100,9,100,10,132,1,90,7,100,11, + 100,12,132,0,90,8,100,13,100,14,132,0,90,9,100,15, + 100,16,132,0,90,10,100,17,100,18,132,0,90,11,100,19, + 100,20,132,0,90,12,100,21,100,22,132,0,90,13,100,23, + 100,24,132,0,90,14,100,25,100,26,132,0,90,15,100,4, + 83,0,41,30,114,4,0,0,0,97,255,1,0,0,122,105, + 112,105,109,112,111,114,116,101,114,40,97,114,99,104,105,118, + 101,112,97,116,104,41,32,45,62,32,122,105,112,105,109,112, + 111,114,116,101,114,32,111,98,106,101,99,116,10,10,32,32, + 32,32,67,114,101,97,116,101,32,97,32,110,101,119,32,122, + 105,112,105,109,112,111,114,116,101,114,32,105,110,115,116,97, + 110,99,101,46,32,39,97,114,99,104,105,118,101,112,97,116, + 104,39,32,109,117,115,116,32,98,101,32,97,32,112,97,116, + 104,32,116,111,10,32,32,32,32,97,32,122,105,112,102,105, + 108,101,44,32,111,114,32,116,111,32,97,32,115,112,101,99, + 105,102,105,99,32,112,97,116,104,32,105,110,115,105,100,101, + 32,97,32,122,105,112,102,105,108,101,46,32,70,111,114,32, + 101,120,97,109,112,108,101,44,32,105,116,32,99,97,110,32, + 98,101,10,32,32,32,32,39,47,116,109,112,47,109,121,105, + 109,112,111,114,116,46,122,105,112,39,44,32,111,114,32,39, 47,116,109,112,47,109,121,105,109,112,111,114,116,46,122,105, - 112,39,44,32,111,114,32,39,47,116,109,112,47,109,121,105, - 109,112,111,114,116,46,122,105,112,47,109,121,100,105,114,101, - 99,116,111,114,121,39,44,32,105,102,32,109,121,100,105,114, - 101,99,116,111,114,121,32,105,115,32,97,10,32,32,32,32, - 118,97,108,105,100,32,100,105,114,101,99,116,111,114,121,32, - 105,110,115,105,100,101,32,116,104,101,32,97,114,99,104,105, - 118,101,46,10,10,32,32,32,32,39,90,105,112,73,109,112, - 111,114,116,69,114,114,111,114,32,105,115,32,114,97,105,115, - 101,100,32,105,102,32,39,97,114,99,104,105,118,101,112,97, - 116,104,39,32,100,111,101,115,110,39,116,32,112,111,105,110, - 116,32,116,111,32,97,32,118,97,108,105,100,32,90,105,112, - 10,32,32,32,32,97,114,99,104,105,118,101,46,10,10,32, - 32,32,32,84,104,101,32,39,97,114,99,104,105,118,101,39, - 32,97,116,116,114,105,98,117,116,101,32,111,102,32,122,105, - 112,105,109,112,111,114,116,101,114,32,111,98,106,101,99,116, - 115,32,99,111,110,116,97,105,110,115,32,116,104,101,32,110, - 97,109,101,32,111,102,32,116,104,101,10,32,32,32,32,122, - 105,112,102,105,108,101,32,116,97,114,103,101,116,101,100,46, - 10,32,32,32,32,99,2,0,0,0,0,0,0,0,0,0, - 0,0,8,0,0,0,9,0,0,0,67,0,0,0,115,28, - 1,0,0,116,0,124,1,116,1,131,2,115,28,100,1,100, - 0,108,2,125,2,124,2,160,3,124,1,161,1,125,1,124, - 1,115,44,116,4,100,2,124,1,100,3,141,2,130,1,116, - 5,114,60,124,1,160,6,116,5,116,7,161,2,125,1,103, - 0,125,3,122,14,116,8,160,9,124,1,161,1,125,4,87, - 0,110,70,4,0,116,10,116,11,102,2,121,148,1,0,1, - 0,1,0,116,8,160,12,124,1,161,1,92,2,125,5,125, - 6,124,5,124,1,107,2,114,130,116,4,100,4,124,1,100, - 3,141,2,130,1,124,5,125,1,124,3,160,13,124,6,161, - 1,1,0,89,0,113,64,48,0,124,4,106,14,100,5,64, - 0,100,6,107,3,114,176,116,4,100,4,124,1,100,3,141, - 2,130,1,122,12,116,15,124,1,25,0,125,7,87,0,110, - 34,4,0,116,16,121,222,1,0,1,0,1,0,116,17,124, - 1,131,1,125,7,124,7,116,15,124,1,60,0,89,0,110, - 2,48,0,124,7,124,0,95,18,124,1,124,0,95,19,116, - 8,106,20,124,3,100,0,100,0,100,7,133,3,25,0,142, - 0,124,0,95,21,124,0,106,21,144,1,114,24,124,0,4, - 0,106,21,116,7,55,0,2,0,95,21,100,0,83,0,41, - 8,78,114,0,0,0,0,122,21,97,114,99,104,105,118,101, - 32,112,97,116,104,32,105,115,32,101,109,112,116,121,169,1, - 218,4,112,97,116,104,122,14,110,111,116,32,97,32,90,105, - 112,32,102,105,108,101,105,0,240,0,0,105,0,128,0,0, - 233,255,255,255,255,41,22,218,10,105,115,105,110,115,116,97, - 110,99,101,218,3,115,116,114,218,2,111,115,90,8,102,115, - 100,101,99,111,100,101,114,3,0,0,0,218,12,97,108,116, - 95,112,97,116,104,95,115,101,112,218,7,114,101,112,108,97, - 99,101,218,8,112,97,116,104,95,115,101,112,218,19,95,98, - 111,111,116,115,116,114,97,112,95,101,120,116,101,114,110,97, - 108,90,10,95,112,97,116,104,95,115,116,97,116,218,7,79, - 83,69,114,114,111,114,218,10,86,97,108,117,101,69,114,114, - 111,114,90,11,95,112,97,116,104,95,115,112,108,105,116,218, - 6,97,112,112,101,110,100,90,7,115,116,95,109,111,100,101, - 218,20,95,122,105,112,95,100,105,114,101,99,116,111,114,121, - 95,99,97,99,104,101,218,8,75,101,121,69,114,114,111,114, - 218,15,95,114,101,97,100,95,100,105,114,101,99,116,111,114, - 121,218,6,95,102,105,108,101,115,218,7,97,114,99,104,105, - 118,101,218,10,95,112,97,116,104,95,106,111,105,110,218,6, - 112,114,101,102,105,120,41,8,218,4,115,101,108,102,114,13, - 0,0,0,114,17,0,0,0,114,31,0,0,0,90,2,115, - 116,90,7,100,105,114,110,97,109,101,90,8,98,97,115,101, - 110,97,109,101,218,5,102,105,108,101,115,114,9,0,0,0, - 114,9,0,0,0,114,10,0,0,0,218,8,95,95,105,110, - 105,116,95,95,63,0,0,0,115,60,0,0,0,10,1,8, - 1,10,1,4,1,12,1,4,1,12,1,4,2,2,2,14, - 1,16,1,14,3,8,1,12,1,4,1,16,1,14,3,12, - 2,2,3,12,1,12,1,8,1,14,1,6,1,6,1,22, - 2,8,1,14,1,4,128,255,128,122,20,122,105,112,105,109, - 112,111,114,116,101,114,46,95,95,105,110,105,116,95,95,78, - 99,3,0,0,0,0,0,0,0,0,0,0,0,5,0,0, - 0,4,0,0,0,67,0,0,0,115,78,0,0,0,116,0, - 124,0,124,1,131,2,125,3,124,3,100,1,117,1,114,26, - 124,0,103,0,102,2,83,0,116,1,124,0,124,1,131,2, - 125,4,116,2,124,0,124,4,131,2,114,70,100,1,124,0, - 106,3,155,0,116,4,155,0,124,4,155,0,157,3,103,1, - 102,2,83,0,100,1,103,0,102,2,83,0,41,2,97,47, - 2,0,0,102,105,110,100,95,108,111,97,100,101,114,40,102, - 117,108,108,110,97,109,101,44,32,112,97,116,104,61,78,111, - 110,101,41,32,45,62,32,115,101,108,102,44,32,115,116,114, - 32,111,114,32,78,111,110,101,46,10,10,32,32,32,32,32, - 32,32,32,83,101,97,114,99,104,32,102,111,114,32,97,32, - 109,111,100,117,108,101,32,115,112,101,99,105,102,105,101,100, - 32,98,121,32,39,102,117,108,108,110,97,109,101,39,46,32, - 39,102,117,108,108,110,97,109,101,39,32,109,117,115,116,32, - 98,101,32,116,104,101,10,32,32,32,32,32,32,32,32,102, - 117,108,108,121,32,113,117,97,108,105,102,105,101,100,32,40, - 100,111,116,116,101,100,41,32,109,111,100,117,108,101,32,110, - 97,109,101,46,32,73,116,32,114,101,116,117,114,110,115,32, - 116,104,101,32,122,105,112,105,109,112,111,114,116,101,114,10, - 32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101, - 32,105,116,115,101,108,102,32,105,102,32,116,104,101,32,109, - 111,100,117,108,101,32,119,97,115,32,102,111,117,110,100,44, - 32,97,32,115,116,114,105,110,103,32,99,111,110,116,97,105, - 110,105,110,103,32,116,104,101,10,32,32,32,32,32,32,32, - 32,102,117,108,108,32,112,97,116,104,32,110,97,109,101,32, - 105,102,32,105,116,39,115,32,112,111,115,115,105,98,108,121, - 32,97,32,112,111,114,116,105,111,110,32,111,102,32,97,32, - 110,97,109,101,115,112,97,99,101,32,112,97,99,107,97,103, - 101,44,10,32,32,32,32,32,32,32,32,111,114,32,78,111, - 110,101,32,111,116,104,101,114,119,105,115,101,46,32,84,104, - 101,32,111,112,116,105,111,110,97,108,32,39,112,97,116,104, - 39,32,97,114,103,117,109,101,110,116,32,105,115,32,105,103, - 110,111,114,101,100,32,45,45,32,105,116,39,115,10,32,32, - 32,32,32,32,32,32,116,104,101,114,101,32,102,111,114,32, - 99,111,109,112,97,116,105,98,105,108,105,116,121,32,119,105, - 116,104,32,116,104,101,32,105,109,112,111,114,116,101,114,32, - 112,114,111,116,111,99,111,108,46,10,10,32,32,32,32,32, - 32,32,32,68,101,112,114,101,99,97,116,101,100,32,115,105, - 110,99,101,32,80,121,116,104,111,110,32,51,46,49,48,46, - 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,32,32,32,32,32,32, - 32,32,78,41,5,218,16,95,103,101,116,95,109,111,100,117, - 108,101,95,105,110,102,111,218,16,95,103,101,116,95,109,111, - 100,117,108,101,95,112,97,116,104,218,7,95,105,115,95,100, - 105,114,114,29,0,0,0,114,20,0,0,0,41,5,114,32, - 0,0,0,218,8,102,117,108,108,110,97,109,101,114,13,0, - 0,0,218,2,109,105,218,7,109,111,100,112,97,116,104,114, - 9,0,0,0,114,9,0,0,0,114,10,0,0,0,218,11, - 102,105,110,100,95,108,111,97,100,101,114,109,0,0,0,115, - 16,0,0,0,10,12,8,1,8,2,10,7,10,1,24,4, - 8,2,255,128,122,23,122,105,112,105,109,112,111,114,116,101, - 114,46,102,105,110,100,95,108,111,97,100,101,114,99,3,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,4,0, - 0,0,67,0,0,0,115,16,0,0,0,124,0,160,0,124, - 1,124,2,161,2,100,1,25,0,83,0,41,3,97,203,1, - 0,0,102,105,110,100,95,109,111,100,117,108,101,40,102,117, + 112,47,109,121,100,105,114,101,99,116,111,114,121,39,44,32, + 105,102,32,109,121,100,105,114,101,99,116,111,114,121,32,105, + 115,32,97,10,32,32,32,32,118,97,108,105,100,32,100,105, + 114,101,99,116,111,114,121,32,105,110,115,105,100,101,32,116, + 104,101,32,97,114,99,104,105,118,101,46,10,10,32,32,32, + 32,39,90,105,112,73,109,112,111,114,116,69,114,114,111,114, + 32,105,115,32,114,97,105,115,101,100,32,105,102,32,39,97, + 114,99,104,105,118,101,112,97,116,104,39,32,100,111,101,115, + 110,39,116,32,112,111,105,110,116,32,116,111,32,97,32,118, + 97,108,105,100,32,90,105,112,10,32,32,32,32,97,114,99, + 104,105,118,101,46,10,10,32,32,32,32,84,104,101,32,39, + 97,114,99,104,105,118,101,39,32,97,116,116,114,105,98,117, + 116,101,32,111,102,32,122,105,112,105,109,112,111,114,116,101, + 114,32,111,98,106,101,99,116,115,32,99,111,110,116,97,105, + 110,115,32,116,104,101,32,110,97,109,101,32,111,102,32,116, + 104,101,10,32,32,32,32,122,105,112,102,105,108,101,32,116, + 97,114,103,101,116,101,100,46,10,32,32,32,32,99,2,0, + 0,0,0,0,0,0,0,0,0,0,8,0,0,0,9,0, + 0,0,67,0,0,0,115,40,1,0,0,116,0,124,1,116, + 1,131,2,115,28,100,1,100,0,108,2,125,2,124,2,160, + 3,124,1,161,1,125,1,124,1,115,44,116,4,100,2,124, + 1,100,3,141,2,130,1,116,5,114,60,124,1,160,6,116, + 5,116,7,161,2,125,1,103,0,125,3,9,0,122,14,116, + 8,160,9,124,1,161,1,125,4,87,0,110,70,4,0,116, + 10,116,11,102,2,144,1,121,38,1,0,1,0,1,0,116, + 8,160,12,124,1,161,1,92,2,125,5,125,6,124,5,124, + 1,107,2,114,134,116,4,100,5,124,1,100,3,141,2,130, + 1,124,5,125,1,124,3,160,13,124,6,161,1,1,0,89, + 0,110,28,124,4,106,14,100,6,64,0,100,7,107,3,114, + 178,116,4,100,5,124,1,100,3,141,2,130,1,113,182,113, + 66,122,12,116,15,124,1,25,0,125,7,87,0,110,32,4, + 0,116,16,144,1,121,36,1,0,1,0,1,0,116,17,124, + 1,131,1,125,7,124,7,116,15,124,1,60,0,89,0,124, + 7,124,0,95,18,124,1,124,0,95,19,116,8,106,20,124, + 3,100,0,100,0,100,8,133,3,25,0,142,0,124,0,95, + 21,124,0,106,21,144,1,114,32,124,0,4,0,106,21,116, + 7,55,0,2,0,95,21,100,0,83,0,100,0,83,0,119, + 0,119,0,41,9,78,114,0,0,0,0,122,21,97,114,99, + 104,105,118,101,32,112,97,116,104,32,105,115,32,101,109,112, + 116,121,169,1,218,4,112,97,116,104,84,122,14,110,111,116, + 32,97,32,90,105,112,32,102,105,108,101,105,0,240,0,0, + 105,0,128,0,0,233,255,255,255,255,41,22,218,10,105,115, + 105,110,115,116,97,110,99,101,218,3,115,116,114,218,2,111, + 115,90,8,102,115,100,101,99,111,100,101,114,3,0,0,0, + 218,12,97,108,116,95,112,97,116,104,95,115,101,112,218,7, + 114,101,112,108,97,99,101,218,8,112,97,116,104,95,115,101, + 112,218,19,95,98,111,111,116,115,116,114,97,112,95,101,120, + 116,101,114,110,97,108,90,10,95,112,97,116,104,95,115,116, + 97,116,218,7,79,83,69,114,114,111,114,218,10,86,97,108, + 117,101,69,114,114,111,114,90,11,95,112,97,116,104,95,115, + 112,108,105,116,218,6,97,112,112,101,110,100,90,7,115,116, + 95,109,111,100,101,218,20,95,122,105,112,95,100,105,114,101, + 99,116,111,114,121,95,99,97,99,104,101,218,8,75,101,121, + 69,114,114,111,114,218,15,95,114,101,97,100,95,100,105,114, + 101,99,116,111,114,121,218,6,95,102,105,108,101,115,218,7, + 97,114,99,104,105,118,101,218,10,95,112,97,116,104,95,106, + 111,105,110,218,6,112,114,101,102,105,120,41,8,218,4,115, + 101,108,102,114,13,0,0,0,114,17,0,0,0,114,31,0, + 0,0,90,2,115,116,90,7,100,105,114,110,97,109,101,90, + 8,98,97,115,101,110,97,109,101,218,5,102,105,108,101,115, + 114,9,0,0,0,114,9,0,0,0,114,10,0,0,0,218, + 8,95,95,105,110,105,116,95,95,64,0,0,0,115,70,0, + 0,0,10,1,8,1,10,1,4,1,12,1,4,1,12,1, + 4,2,2,1,2,1,14,1,18,1,14,3,8,1,12,1, + 4,1,14,1,14,3,12,2,2,1,2,240,2,18,12,1, + 14,1,8,1,10,1,6,1,6,1,22,2,8,1,18,1, + 4,255,2,249,2,239,255,128,122,20,122,105,112,105,109,112, + 111,114,116,101,114,46,95,95,105,110,105,116,95,95,78,99, + 3,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0, + 4,0,0,0,67,0,0,0,115,78,0,0,0,116,0,124, + 0,124,1,131,2,125,3,124,3,100,1,117,1,114,26,124, + 0,103,0,102,2,83,0,116,1,124,0,124,1,131,2,125, + 4,116,2,124,0,124,4,131,2,114,70,100,1,124,0,106, + 3,155,0,116,4,155,0,124,4,155,0,157,3,103,1,102, + 2,83,0,100,1,103,0,102,2,83,0,41,2,97,47,2, + 0,0,102,105,110,100,95,108,111,97,100,101,114,40,102,117, 108,108,110,97,109,101,44,32,112,97,116,104,61,78,111,110, - 101,41,32,45,62,32,115,101,108,102,32,111,114,32,78,111, - 110,101,46,10,10,32,32,32,32,32,32,32,32,83,101,97, - 114,99,104,32,102,111,114,32,97,32,109,111,100,117,108,101, - 32,115,112,101,99,105,102,105,101,100,32,98,121,32,39,102, - 117,108,108,110,97,109,101,39,46,32,39,102,117,108,108,110, - 97,109,101,39,32,109,117,115,116,32,98,101,32,116,104,101, - 10,32,32,32,32,32,32,32,32,102,117,108,108,121,32,113, - 117,97,108,105,102,105,101,100,32,40,100,111,116,116,101,100, - 41,32,109,111,100,117,108,101,32,110,97,109,101,46,32,73, - 116,32,114,101,116,117,114,110,115,32,116,104,101,32,122,105, - 112,105,109,112,111,114,116,101,114,10,32,32,32,32,32,32, - 32,32,105,110,115,116,97,110,99,101,32,105,116,115,101,108, - 102,32,105,102,32,116,104,101,32,109,111,100,117,108,101,32, - 119,97,115,32,102,111,117,110,100,44,32,111,114,32,78,111, - 110,101,32,105,102,32,105,116,32,119,97,115,110,39,116,46, - 10,32,32,32,32,32,32,32,32,84,104,101,32,111,112,116, - 105,111,110,97,108,32,39,112,97,116,104,39,32,97,114,103, - 117,109,101,110,116,32,105,115,32,105,103,110,111,114,101,100, - 32,45,45,32,105,116,39,115,32,116,104,101,114,101,32,102, - 111,114,32,99,111,109,112,97,116,105,98,105,108,105,116,121, - 10,32,32,32,32,32,32,32,32,119,105,116,104,32,116,104, - 101,32,105,109,112,111,114,116,101,114,32,112,114,111,116,111, - 99,111,108,46,10,10,32,32,32,32,32,32,32,32,68,101, - 112,114,101,99,97,116,101,100,32,115,105,110,99,101,32,80, - 121,116,104,111,110,32,51,46,49,48,46,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,32,32,32,32,32,32,32,32,114,0,0, - 0,0,78,41,1,114,41,0,0,0,41,3,114,32,0,0, - 0,114,38,0,0,0,114,13,0,0,0,114,9,0,0,0, - 114,9,0,0,0,114,10,0,0,0,218,11,102,105,110,100, - 95,109,111,100,117,108,101,143,0,0,0,115,4,0,0,0, - 16,11,255,128,122,23,122,105,112,105,109,112,111,114,116,101, - 114,46,102,105,110,100,95,109,111,100,117,108,101,99,3,0, - 0,0,0,0,0,0,0,0,0,0,7,0,0,0,5,0, - 0,0,67,0,0,0,115,108,0,0,0,116,0,124,0,124, - 1,131,2,125,3,124,3,100,1,117,1,114,34,116,1,106, - 2,124,1,124,0,124,3,100,2,141,3,83,0,116,3,124, - 0,124,1,131,2,125,4,116,4,124,0,124,4,131,2,114, - 104,124,0,106,5,155,0,116,6,155,0,124,4,155,0,157, - 3,125,5,116,1,106,7,124,1,100,1,100,3,100,4,141, - 3,125,6,124,6,106,8,160,9,124,5,161,1,1,0,124, - 6,83,0,100,1,83,0,41,5,122,107,67,114,101,97,116, - 101,32,97,32,77,111,100,117,108,101,83,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,10,10,32,32,32,32,32,32, - 32,32,82,101,116,117,114,110,115,32,78,111,110,101,32,105, - 102,32,116,104,101,32,109,111,100,117,108,101,32,99,97,110, - 110,111,116,32,98,101,32,102,111,117,110,100,46,10,32,32, - 32,32,32,32,32,32,78,41,1,218,10,105,115,95,112,97, - 99,107,97,103,101,84,41,3,218,4,110,97,109,101,90,6, - 108,111,97,100,101,114,114,43,0,0,0,41,10,114,35,0, - 0,0,218,10,95,98,111,111,116,115,116,114,97,112,90,16, - 115,112,101,99,95,102,114,111,109,95,108,111,97,100,101,114, - 114,36,0,0,0,114,37,0,0,0,114,29,0,0,0,114, - 20,0,0,0,90,10,77,111,100,117,108,101,83,112,101,99, - 90,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,114,24,0,0, - 0,41,7,114,32,0,0,0,114,38,0,0,0,90,6,116, - 97,114,103,101,116,90,11,109,111,100,117,108,101,95,105,110, - 102,111,114,40,0,0,0,114,13,0,0,0,90,4,115,112, - 101,99,114,9,0,0,0,114,9,0,0,0,114,10,0,0, - 0,218,9,102,105,110,100,95,115,112,101,99,156,0,0,0, - 115,26,0,0,0,10,5,8,1,16,1,10,7,10,1,18, - 4,8,1,2,1,6,255,12,2,4,1,4,2,255,128,122, - 21,122,105,112,105,109,112,111,114,116,101,114,46,102,105,110, - 100,95,115,112,101,99,99,2,0,0,0,0,0,0,0,0, - 0,0,0,5,0,0,0,3,0,0,0,67,0,0,0,115, - 20,0,0,0,116,0,124,0,124,1,131,2,92,3,125,2, - 125,3,125,4,124,2,83,0,41,2,122,163,103,101,116,95, - 99,111,100,101,40,102,117,108,108,110,97,109,101,41,32,45, - 62,32,99,111,100,101,32,111,98,106,101,99,116,46,10,10, + 101,41,32,45,62,32,115,101,108,102,44,32,115,116,114,32, + 111,114,32,78,111,110,101,46,10,10,32,32,32,32,32,32, + 32,32,83,101,97,114,99,104,32,102,111,114,32,97,32,109, + 111,100,117,108,101,32,115,112,101,99,105,102,105,101,100,32, + 98,121,32,39,102,117,108,108,110,97,109,101,39,46,32,39, + 102,117,108,108,110,97,109,101,39,32,109,117,115,116,32,98, + 101,32,116,104,101,10,32,32,32,32,32,32,32,32,102,117, + 108,108,121,32,113,117,97,108,105,102,105,101,100,32,40,100, + 111,116,116,101,100,41,32,109,111,100,117,108,101,32,110,97, + 109,101,46,32,73,116,32,114,101,116,117,114,110,115,32,116, + 104,101,32,122,105,112,105,109,112,111,114,116,101,114,10,32, + 32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,32, + 105,116,115,101,108,102,32,105,102,32,116,104,101,32,109,111, + 100,117,108,101,32,119,97,115,32,102,111,117,110,100,44,32, + 97,32,115,116,114,105,110,103,32,99,111,110,116,97,105,110, + 105,110,103,32,116,104,101,10,32,32,32,32,32,32,32,32, + 102,117,108,108,32,112,97,116,104,32,110,97,109,101,32,105, + 102,32,105,116,39,115,32,112,111,115,115,105,98,108,121,32, + 97,32,112,111,114,116,105,111,110,32,111,102,32,97,32,110, + 97,109,101,115,112,97,99,101,32,112,97,99,107,97,103,101, + 44,10,32,32,32,32,32,32,32,32,111,114,32,78,111,110, + 101,32,111,116,104,101,114,119,105,115,101,46,32,84,104,101, + 32,111,112,116,105,111,110,97,108,32,39,112,97,116,104,39, + 32,97,114,103,117,109,101,110,116,32,105,115,32,105,103,110, + 111,114,101,100,32,45,45,32,105,116,39,115,10,32,32,32, + 32,32,32,32,32,116,104,101,114,101,32,102,111,114,32,99, + 111,109,112,97,116,105,98,105,108,105,116,121,32,119,105,116, + 104,32,116,104,101,32,105,109,112,111,114,116,101,114,32,112, + 114,111,116,111,99,111,108,46,10,10,32,32,32,32,32,32, + 32,32,68,101,112,114,101,99,97,116,101,100,32,115,105,110, + 99,101,32,80,121,116,104,111,110,32,51,46,49,48,46,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,32,32,32,32,32,32,32, + 32,78,41,5,218,16,95,103,101,116,95,109,111,100,117,108, + 101,95,105,110,102,111,218,16,95,103,101,116,95,109,111,100, + 117,108,101,95,112,97,116,104,218,7,95,105,115,95,100,105, + 114,114,29,0,0,0,114,20,0,0,0,41,5,114,32,0, + 0,0,218,8,102,117,108,108,110,97,109,101,114,13,0,0, + 0,218,2,109,105,218,7,109,111,100,112,97,116,104,114,9, + 0,0,0,114,9,0,0,0,114,10,0,0,0,218,11,102, + 105,110,100,95,108,111,97,100,101,114,110,0,0,0,115,16, + 0,0,0,10,12,8,1,8,2,10,7,10,1,24,4,8, + 2,255,128,122,23,122,105,112,105,109,112,111,114,116,101,114, + 46,102,105,110,100,95,108,111,97,100,101,114,99,3,0,0, + 0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0, + 0,67,0,0,0,115,16,0,0,0,124,0,160,0,124,1, + 124,2,161,2,100,1,25,0,83,0,41,3,97,203,1,0, + 0,102,105,110,100,95,109,111,100,117,108,101,40,102,117,108, + 108,110,97,109,101,44,32,112,97,116,104,61,78,111,110,101, + 41,32,45,62,32,115,101,108,102,32,111,114,32,78,111,110, + 101,46,10,10,32,32,32,32,32,32,32,32,83,101,97,114, + 99,104,32,102,111,114,32,97,32,109,111,100,117,108,101,32, + 115,112,101,99,105,102,105,101,100,32,98,121,32,39,102,117, + 108,108,110,97,109,101,39,46,32,39,102,117,108,108,110,97, + 109,101,39,32,109,117,115,116,32,98,101,32,116,104,101,10, + 32,32,32,32,32,32,32,32,102,117,108,108,121,32,113,117, + 97,108,105,102,105,101,100,32,40,100,111,116,116,101,100,41, + 32,109,111,100,117,108,101,32,110,97,109,101,46,32,73,116, + 32,114,101,116,117,114,110,115,32,116,104,101,32,122,105,112, + 105,109,112,111,114,116,101,114,10,32,32,32,32,32,32,32, + 32,105,110,115,116,97,110,99,101,32,105,116,115,101,108,102, + 32,105,102,32,116,104,101,32,109,111,100,117,108,101,32,119, + 97,115,32,102,111,117,110,100,44,32,111,114,32,78,111,110, + 101,32,105,102,32,105,116,32,119,97,115,110,39,116,46,10, + 32,32,32,32,32,32,32,32,84,104,101,32,111,112,116,105, + 111,110,97,108,32,39,112,97,116,104,39,32,97,114,103,117, + 109,101,110,116,32,105,115,32,105,103,110,111,114,101,100,32, + 45,45,32,105,116,39,115,32,116,104,101,114,101,32,102,111, + 114,32,99,111,109,112,97,116,105,98,105,108,105,116,121,10, + 32,32,32,32,32,32,32,32,119,105,116,104,32,116,104,101, + 32,105,109,112,111,114,116,101,114,32,112,114,111,116,111,99, + 111,108,46,10,10,32,32,32,32,32,32,32,32,68,101,112, + 114,101,99,97,116,101,100,32,115,105,110,99,101,32,80,121, + 116,104,111,110,32,51,46,49,48,46,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,32,32,32,32,32,32,32,32,114,0,0,0, + 0,78,41,1,114,41,0,0,0,41,3,114,32,0,0,0, + 114,38,0,0,0,114,13,0,0,0,114,9,0,0,0,114, + 9,0,0,0,114,10,0,0,0,218,11,102,105,110,100,95, + 109,111,100,117,108,101,144,0,0,0,115,4,0,0,0,16, + 11,255,128,122,23,122,105,112,105,109,112,111,114,116,101,114, + 46,102,105,110,100,95,109,111,100,117,108,101,99,3,0,0, + 0,0,0,0,0,0,0,0,0,7,0,0,0,5,0,0, + 0,67,0,0,0,115,108,0,0,0,116,0,124,0,124,1, + 131,2,125,3,124,3,100,1,117,1,114,34,116,1,106,2, + 124,1,124,0,124,3,100,2,141,3,83,0,116,3,124,0, + 124,1,131,2,125,4,116,4,124,0,124,4,131,2,114,104, + 124,0,106,5,155,0,116,6,155,0,124,4,155,0,157,3, + 125,5,116,1,106,7,124,1,100,1,100,3,100,4,141,3, + 125,6,124,6,106,8,160,9,124,5,161,1,1,0,124,6, + 83,0,100,1,83,0,41,5,122,107,67,114,101,97,116,101, + 32,97,32,77,111,100,117,108,101,83,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,10,10,32,32,32,32,32,32,32, + 32,82,101,116,117,114,110,115,32,78,111,110,101,32,105,102, + 32,116,104,101,32,109,111,100,117,108,101,32,99,97,110,110, + 111,116,32,98,101,32,102,111,117,110,100,46,10,32,32,32, + 32,32,32,32,32,78,41,1,218,10,105,115,95,112,97,99, + 107,97,103,101,84,41,3,218,4,110,97,109,101,90,6,108, + 111,97,100,101,114,114,43,0,0,0,41,10,114,35,0,0, + 0,218,10,95,98,111,111,116,115,116,114,97,112,90,16,115, + 112,101,99,95,102,114,111,109,95,108,111,97,100,101,114,114, + 36,0,0,0,114,37,0,0,0,114,29,0,0,0,114,20, + 0,0,0,90,10,77,111,100,117,108,101,83,112,101,99,90, + 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,114,24,0,0,0, + 41,7,114,32,0,0,0,114,38,0,0,0,90,6,116,97, + 114,103,101,116,90,11,109,111,100,117,108,101,95,105,110,102, + 111,114,40,0,0,0,114,13,0,0,0,90,4,115,112,101, + 99,114,9,0,0,0,114,9,0,0,0,114,10,0,0,0, + 218,9,102,105,110,100,95,115,112,101,99,157,0,0,0,115, + 26,0,0,0,10,5,8,1,16,1,10,7,10,1,18,4, + 8,1,2,1,6,255,12,2,4,1,4,2,255,128,122,21, + 122,105,112,105,109,112,111,114,116,101,114,46,102,105,110,100, + 95,115,112,101,99,99,2,0,0,0,0,0,0,0,0,0, + 0,0,5,0,0,0,3,0,0,0,67,0,0,0,115,20, + 0,0,0,116,0,124,0,124,1,131,2,92,3,125,2,125, + 3,125,4,124,2,83,0,41,2,122,166,103,101,116,95,99, + 111,100,101,40,102,117,108,108,110,97,109,101,41,32,45,62, + 32,99,111,100,101,32,111,98,106,101,99,116,46,10,10,32, + 32,32,32,32,32,32,32,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,115,112,101,99,105,102,105,101,100,32, + 109,111,100,117,108,101,46,32,82,97,105,115,101,32,90,105, + 112,73,109,112,111,114,116,69,114,114,111,114,10,32,32,32, + 32,32,32,32,32,105,102,32,116,104,101,32,109,111,100,117, + 108,101,32,99,111,117,108,100,110,39,116,32,98,101,32,105, + 109,112,111,114,116,101,100,46,10,32,32,32,32,32,32,32, + 32,78,169,1,218,16,95,103,101,116,95,109,111,100,117,108, + 101,95,99,111,100,101,169,5,114,32,0,0,0,114,38,0, + 0,0,218,4,99,111,100,101,218,9,105,115,112,97,99,107, + 97,103,101,114,40,0,0,0,114,9,0,0,0,114,9,0, + 0,0,114,10,0,0,0,218,8,103,101,116,95,99,111,100, + 101,184,0,0,0,115,6,0,0,0,16,6,4,1,255,128, + 122,20,122,105,112,105,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,0, + 0,0,0,4,0,0,0,8,0,0,0,67,0,0,0,115, + 112,0,0,0,116,0,114,16,124,1,160,1,116,0,116,2, + 161,2,125,1,124,1,125,2,124,1,160,3,124,0,106,4, + 116,2,23,0,161,1,114,58,124,1,116,5,124,0,106,4, + 116,2,23,0,131,1,100,1,133,2,25,0,125,2,122,14, + 124,0,106,6,124,2,25,0,125,3,87,0,110,24,4,0, + 116,7,121,110,1,0,1,0,1,0,116,8,100,2,100,3, + 124,2,131,3,130,1,116,9,124,0,106,4,124,3,131,2, + 83,0,119,0,41,4,122,154,103,101,116,95,100,97,116,97, + 40,112,97,116,104,110,97,109,101,41,32,45,62,32,115,116, + 114,105,110,103,32,119,105,116,104,32,102,105,108,101,32,100, + 97,116,97,46,10,10,32,32,32,32,32,32,32,32,82,101, + 116,117,114,110,32,116,104,101,32,100,97,116,97,32,97,115, + 115,111,99,105,97,116,101,100,32,119,105,116,104,32,39,112, + 97,116,104,110,97,109,101,39,46,32,82,97,105,115,101,32, + 79,83,69,114,114,111,114,32,105,102,10,32,32,32,32,32, + 32,32,32,116,104,101,32,102,105,108,101,32,119,97,115,110, + 39,116,32,102,111,117,110,100,46,10,32,32,32,32,32,32, + 32,32,78,114,0,0,0,0,218,0,41,10,114,18,0,0, + 0,114,19,0,0,0,114,20,0,0,0,218,10,115,116,97, + 114,116,115,119,105,116,104,114,29,0,0,0,218,3,108,101, + 110,114,28,0,0,0,114,26,0,0,0,114,22,0,0,0, + 218,9,95,103,101,116,95,100,97,116,97,41,4,114,32,0, + 0,0,218,8,112,97,116,104,110,97,109,101,90,3,107,101, + 121,218,9,116,111,99,95,101,110,116,114,121,114,9,0,0, + 0,114,9,0,0,0,114,10,0,0,0,218,8,103,101,116, + 95,100,97,116,97,194,0,0,0,115,24,0,0,0,4,6, + 12,1,4,2,16,1,22,1,2,2,14,1,12,1,12,1, + 12,1,2,254,255,128,122,20,122,105,112,105,109,112,111,114, + 116,101,114,46,103,101,116,95,100,97,116,97,99,2,0,0, + 0,0,0,0,0,0,0,0,0,5,0,0,0,3,0,0, + 0,67,0,0,0,115,20,0,0,0,116,0,124,0,124,1, + 131,2,92,3,125,2,125,3,125,4,124,4,83,0,41,2, + 122,165,103,101,116,95,102,105,108,101,110,97,109,101,40,102, + 117,108,108,110,97,109,101,41,32,45,62,32,102,105,108,101, + 110,97,109,101,32,115,116,114,105,110,103,46,10,10,32,32, + 32,32,32,32,32,32,82,101,116,117,114,110,32,116,104,101, + 32,102,105,108,101,110,97,109,101,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,111,114,32,114,97,105,115,101,32,90,105,112,73, + 109,112,111,114,116,69,114,114,111,114,10,32,32,32,32,32, + 32,32,32,105,102,32,105,116,32,99,111,117,108,100,110,39, + 116,32,98,101,32,105,109,112,111,114,116,101,100,46,10,32, + 32,32,32,32,32,32,32,78,114,47,0,0,0,114,49,0, + 0,0,114,9,0,0,0,114,9,0,0,0,114,10,0,0, + 0,218,12,103,101,116,95,102,105,108,101,110,97,109,101,215, + 0,0,0,115,6,0,0,0,16,8,4,1,255,128,122,24, + 122,105,112,105,109,112,111,114,116,101,114,46,103,101,116,95, + 102,105,108,101,110,97,109,101,99,2,0,0,0,0,0,0, + 0,0,0,0,0,6,0,0,0,8,0,0,0,67,0,0, + 0,115,126,0,0,0,116,0,124,0,124,1,131,2,125,2, + 124,2,100,1,117,0,114,36,116,1,100,2,124,1,155,2, + 157,2,124,1,100,3,141,2,130,1,116,2,124,0,124,1, + 131,2,125,3,124,2,114,64,116,3,160,4,124,3,100,4, + 161,2,125,4,110,10,124,3,155,0,100,5,157,2,125,4, + 122,14,124,0,106,5,124,4,25,0,125,5,87,0,110,18, + 4,0,116,6,121,124,1,0,1,0,1,0,89,0,100,1, + 83,0,116,7,124,0,106,8,124,5,131,2,160,9,161,0, + 83,0,119,0,41,6,122,253,103,101,116,95,115,111,117,114, + 99,101,40,102,117,108,108,110,97,109,101,41,32,45,62,32, + 115,111,117,114,99,101,32,115,116,114,105,110,103,46,10,10, 32,32,32,32,32,32,32,32,82,101,116,117,114,110,32,116, - 104,101,32,99,111,100,101,32,111,98,106,101,99,116,32,102, + 104,101,32,115,111,117,114,99,101,32,99,111,100,101,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,82,97,105,115,101,32,90, 105,112,73,109,112,111,114,116,69,114,114,111,114,10,32,32, 32,32,32,32,32,32,105,102,32,116,104,101,32,109,111,100, 117,108,101,32,99,111,117,108,100,110,39,116,32,98,101,32, - 102,111,117,110,100,46,10,32,32,32,32,32,32,32,32,78, - 169,1,218,16,95,103,101,116,95,109,111,100,117,108,101,95, - 99,111,100,101,169,5,114,32,0,0,0,114,38,0,0,0, - 218,4,99,111,100,101,218,9,105,115,112,97,99,107,97,103, - 101,114,40,0,0,0,114,9,0,0,0,114,9,0,0,0, - 114,10,0,0,0,218,8,103,101,116,95,99,111,100,101,183, - 0,0,0,115,6,0,0,0,16,6,4,1,255,128,122,20, - 122,105,112,105,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,0,0,0, - 0,4,0,0,0,8,0,0,0,67,0,0,0,115,112,0, - 0,0,116,0,114,16,124,1,160,1,116,0,116,2,161,2, - 125,1,124,1,125,2,124,1,160,3,124,0,106,4,116,2, - 23,0,161,1,114,58,124,1,116,5,124,0,106,4,116,2, - 23,0,131,1,100,1,133,2,25,0,125,2,122,14,124,0, - 106,6,124,2,25,0,125,3,87,0,110,26,4,0,116,7, - 121,98,1,0,1,0,1,0,116,8,100,2,100,3,124,2, - 131,3,130,1,48,0,116,9,124,0,106,4,124,3,131,2, - 83,0,41,4,122,154,103,101,116,95,100,97,116,97,40,112, - 97,116,104,110,97,109,101,41,32,45,62,32,115,116,114,105, - 110,103,32,119,105,116,104,32,102,105,108,101,32,100,97,116, - 97,46,10,10,32,32,32,32,32,32,32,32,82,101,116,117, - 114,110,32,116,104,101,32,100,97,116,97,32,97,115,115,111, - 99,105,97,116,101,100,32,119,105,116,104,32,39,112,97,116, - 104,110,97,109,101,39,46,32,82,97,105,115,101,32,79,83, - 69,114,114,111,114,32,105,102,10,32,32,32,32,32,32,32, - 32,116,104,101,32,102,105,108,101,32,119,97,115,110,39,116, - 32,102,111,117,110,100,46,10,32,32,32,32,32,32,32,32, - 78,114,0,0,0,0,218,0,41,10,114,18,0,0,0,114, - 19,0,0,0,114,20,0,0,0,218,10,115,116,97,114,116, - 115,119,105,116,104,114,29,0,0,0,218,3,108,101,110,114, - 28,0,0,0,114,26,0,0,0,114,22,0,0,0,218,9, - 95,103,101,116,95,100,97,116,97,41,4,114,32,0,0,0, - 218,8,112,97,116,104,110,97,109,101,90,3,107,101,121,218, - 9,116,111,99,95,101,110,116,114,121,114,9,0,0,0,114, - 9,0,0,0,114,10,0,0,0,218,8,103,101,116,95,100, - 97,116,97,193,0,0,0,115,22,0,0,0,4,6,12,1, - 4,2,16,1,22,1,2,2,14,1,12,1,14,1,12,1, - 255,128,122,20,122,105,112,105,109,112,111,114,116,101,114,46, - 103,101,116,95,100,97,116,97,99,2,0,0,0,0,0,0, - 0,0,0,0,0,5,0,0,0,3,0,0,0,67,0,0, - 0,115,20,0,0,0,116,0,124,0,124,1,131,2,92,3, - 125,2,125,3,125,4,124,4,83,0,41,2,122,106,103,101, - 116,95,102,105,108,101,110,97,109,101,40,102,117,108,108,110, - 97,109,101,41,32,45,62,32,102,105,108,101,110,97,109,101, - 32,115,116,114,105,110,103,46,10,10,32,32,32,32,32,32, - 32,32,82,101,116,117,114,110,32,116,104,101,32,102,105,108, - 101,110,97,109,101,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,10, - 32,32,32,32,32,32,32,32,78,114,47,0,0,0,114,49, - 0,0,0,114,9,0,0,0,114,9,0,0,0,114,10,0, - 0,0,218,12,103,101,116,95,102,105,108,101,110,97,109,101, - 214,0,0,0,115,6,0,0,0,16,7,4,1,255,128,122, - 24,122,105,112,105,109,112,111,114,116,101,114,46,103,101,116, - 95,102,105,108,101,110,97,109,101,99,2,0,0,0,0,0, - 0,0,0,0,0,0,6,0,0,0,8,0,0,0,67,0, - 0,0,115,126,0,0,0,116,0,124,0,124,1,131,2,125, - 2,124,2,100,1,117,0,114,36,116,1,100,2,124,1,155, - 2,157,2,124,1,100,3,141,2,130,1,116,2,124,0,124, - 1,131,2,125,3,124,2,114,64,116,3,160,4,124,3,100, - 4,161,2,125,4,110,10,124,3,155,0,100,5,157,2,125, - 4,122,14,124,0,106,5,124,4,25,0,125,5,87,0,110, - 20,4,0,116,6,121,108,1,0,1,0,1,0,89,0,100, - 1,83,0,48,0,116,7,124,0,106,8,124,5,131,2,160, - 9,161,0,83,0,41,6,122,253,103,101,116,95,115,111,117, - 114,99,101,40,102,117,108,108,110,97,109,101,41,32,45,62, - 32,115,111,117,114,99,101,32,115,116,114,105,110,103,46,10, - 10,32,32,32,32,32,32,32,32,82,101,116,117,114,110,32, - 116,104,101,32,115,111,117,114,99,101,32,99,111,100,101,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,82,97,105,115,101,32, - 90,105,112,73,109,112,111,114,116,69,114,114,111,114,10,32, - 32,32,32,32,32,32,32,105,102,32,116,104,101,32,109,111, - 100,117,108,101,32,99,111,117,108,100,110,39,116,32,98,101, - 32,102,111,117,110,100,44,32,114,101,116,117,114,110,32,78, - 111,110,101,32,105,102,32,116,104,101,32,97,114,99,104,105, - 118,101,32,100,111,101,115,10,32,32,32,32,32,32,32,32, - 99,111,110,116,97,105,110,32,116,104,101,32,109,111,100,117, - 108,101,44,32,98,117,116,32,104,97,115,32,110,111,32,115, - 111,117,114,99,101,32,102,111,114,32,105,116,46,10,32,32, - 32,32,32,32,32,32,78,250,18,99,97,110,39,116,32,102, - 105,110,100,32,109,111,100,117,108,101,32,169,1,114,44,0, - 0,0,250,11,95,95,105,110,105,116,95,95,46,112,121,250, - 3,46,112,121,41,10,114,35,0,0,0,114,3,0,0,0, + 102,111,117,110,100,44,32,114,101,116,117,114,110,32,78,111, + 110,101,32,105,102,32,116,104,101,32,97,114,99,104,105,118, + 101,32,100,111,101,115,10,32,32,32,32,32,32,32,32,99, + 111,110,116,97,105,110,32,116,104,101,32,109,111,100,117,108, + 101,44,32,98,117,116,32,104,97,115,32,110,111,32,115,111, + 117,114,99,101,32,102,111,114,32,105,116,46,10,32,32,32, + 32,32,32,32,32,78,250,18,99,97,110,39,116,32,102,105, + 110,100,32,109,111,100,117,108,101,32,169,1,114,44,0,0, + 0,250,11,95,95,105,110,105,116,95,95,46,112,121,250,3, + 46,112,121,41,10,114,35,0,0,0,114,3,0,0,0,114, + 36,0,0,0,114,21,0,0,0,114,30,0,0,0,114,28, + 0,0,0,114,26,0,0,0,114,56,0,0,0,114,29,0, + 0,0,218,6,100,101,99,111,100,101,41,6,114,32,0,0, + 0,114,38,0,0,0,114,39,0,0,0,114,13,0,0,0, + 218,8,102,117,108,108,112,97,116,104,114,58,0,0,0,114, + 9,0,0,0,114,9,0,0,0,114,10,0,0,0,218,10, + 103,101,116,95,115,111,117,114,99,101,227,0,0,0,115,28, + 0,0,0,10,7,8,1,18,1,10,2,4,1,14,1,10, + 2,2,2,14,1,12,1,6,2,16,1,2,253,255,128,122, + 22,122,105,112,105,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, + 0,0,0,0,3,0,0,0,4,0,0,0,67,0,0,0, + 115,40,0,0,0,116,0,124,0,124,1,131,2,125,2,124, + 2,100,1,117,0,114,36,116,1,100,2,124,1,155,2,157, + 2,124,1,100,3,141,2,130,1,124,2,83,0,41,4,122, + 171,105,115,95,112,97,99,107,97,103,101,40,102,117,108,108, + 110,97,109,101,41,32,45,62,32,98,111,111,108,46,10,10, + 32,32,32,32,32,32,32,32,82,101,116,117,114,110,32,84, + 114,117,101,32,105,102,32,116,104,101,32,109,111,100,117,108, + 101,32,115,112,101,99,105,102,105,101,100,32,98,121,32,102, + 117,108,108,110,97,109,101,32,105,115,32,97,32,112,97,99, + 107,97,103,101,46,10,32,32,32,32,32,32,32,32,82,97, + 105,115,101,32,90,105,112,73,109,112,111,114,116,69,114,114, + 111,114,32,105,102,32,116,104,101,32,109,111,100,117,108,101, + 32,99,111,117,108,100,110,39,116,32,98,101,32,102,111,117, + 110,100,46,10,32,32,32,32,32,32,32,32,78,114,61,0, + 0,0,114,62,0,0,0,41,2,114,35,0,0,0,114,3, + 0,0,0,41,3,114,32,0,0,0,114,38,0,0,0,114, + 39,0,0,0,114,9,0,0,0,114,9,0,0,0,114,10, + 0,0,0,114,43,0,0,0,253,0,0,0,115,10,0,0, + 0,10,6,8,1,18,1,4,1,255,128,122,22,122,105,112, + 105,109,112,111,114,116,101,114,46,105,115,95,112,97,99,107, + 97,103,101,99,2,0,0,0,0,0,0,0,0,0,0,0, + 9,0,0,0,8,0,0,0,67,0,0,0,115,252,0,0, + 0,100,1,125,2,116,0,160,1,124,2,116,2,161,2,1, + 0,116,3,124,0,124,1,131,2,92,3,125,3,125,4,125, + 5,116,4,106,5,160,6,124,1,161,1,125,6,124,6,100, + 2,117,0,115,62,116,7,124,6,116,8,131,2,115,80,116, + 8,124,1,131,1,125,6,124,6,116,4,106,5,124,1,60, + 0,124,0,124,6,95,9,122,84,124,4,114,124,116,10,124, + 0,124,1,131,2,125,7,116,11,160,12,124,0,106,13,124, + 7,161,2,125,8,124,8,103,1,124,6,95,14,116,15,124, + 6,100,3,131,2,115,140,116,16,124,6,95,16,116,11,160, + 17,124,6,106,18,124,1,124,5,161,3,1,0,116,19,124, + 3,124,6,106,18,131,2,1,0,87,0,110,16,1,0,1, + 0,1,0,116,4,106,5,124,1,61,0,130,0,122,14,116, + 4,106,5,124,1,25,0,125,6,87,0,110,28,4,0,116, + 20,121,250,1,0,1,0,1,0,116,21,100,4,124,1,155, + 2,100,5,157,3,131,1,130,1,116,22,160,23,100,6,124, + 1,124,5,161,3,1,0,124,6,83,0,119,0,41,7,97, + 64,1,0,0,108,111,97,100,95,109,111,100,117,108,101,40, + 102,117,108,108,110,97,109,101,41,32,45,62,32,109,111,100, + 117,108,101,46,10,10,32,32,32,32,32,32,32,32,76,111, + 97,100,32,116,104,101,32,109,111,100,117,108,101,32,115,112, + 101,99,105,102,105,101,100,32,98,121,32,39,102,117,108,108, + 110,97,109,101,39,46,32,39,102,117,108,108,110,97,109,101, + 39,32,109,117,115,116,32,98,101,32,116,104,101,10,32,32, + 32,32,32,32,32,32,102,117,108,108,121,32,113,117,97,108, + 105,102,105,101,100,32,40,100,111,116,116,101,100,41,32,109, + 111,100,117,108,101,32,110,97,109,101,46,32,73,116,32,114, + 101,116,117,114,110,115,32,116,104,101,32,105,109,112,111,114, + 116,101,100,10,32,32,32,32,32,32,32,32,109,111,100,117, + 108,101,44,32,111,114,32,114,97,105,115,101,115,32,90,105, + 112,73,109,112,111,114,116,69,114,114,111,114,32,105,102,32, + 105,116,32,99,111,117,108,100,32,110,111,116,32,98,101,32, + 105,109,112,111,114,116,101,100,46,10,10,32,32,32,32,32, + 32,32,32,68,101,112,114,101,99,97,116,101,100,32,115,105, + 110,99,101,32,80,121,116,104,111,110,32,51,46,49,48,46, + 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,32,32,32,32, + 32,32,32,32,122,114,122,105,112,105,109,112,111,114,116,46, + 122,105,112,105,109,112,111,114,116,101,114,46,108,111,97,100, + 95,109,111,100,117,108,101,40,41,32,105,115,32,100,101,112, + 114,101,99,97,116,101,100,32,97,110,100,32,115,108,97,116, + 101,100,32,102,111,114,32,114,101,109,111,118,97,108,32,105, + 110,32,80,121,116,104,111,110,32,51,46,49,50,59,32,117, + 115,101,32,101,120,101,99,95,109,111,100,117,108,101,40,41, + 32,105,110,115,116,101,97,100,78,218,12,95,95,98,117,105, + 108,116,105,110,115,95,95,122,14,76,111,97,100,101,100,32, + 109,111,100,117,108,101,32,122,25,32,110,111,116,32,102,111, + 117,110,100,32,105,110,32,115,121,115,46,109,111,100,117,108, + 101,115,122,30,105,109,112,111,114,116,32,123,125,32,35,32, + 108,111,97,100,101,100,32,102,114,111,109,32,90,105,112,32, + 123,125,41,24,218,9,95,119,97,114,110,105,110,103,115,90, + 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,48,0,0,0,218,3, + 115,121,115,218,7,109,111,100,117,108,101,115,218,3,103,101, + 116,114,15,0,0,0,218,12,95,109,111,100,117,108,101,95, + 116,121,112,101,218,10,95,95,108,111,97,100,101,114,95,95, 114,36,0,0,0,114,21,0,0,0,114,30,0,0,0,114, - 28,0,0,0,114,26,0,0,0,114,56,0,0,0,114,29, - 0,0,0,218,6,100,101,99,111,100,101,41,6,114,32,0, - 0,0,114,38,0,0,0,114,39,0,0,0,114,13,0,0, - 0,218,8,102,117,108,108,112,97,116,104,114,58,0,0,0, + 29,0,0,0,90,8,95,95,112,97,116,104,95,95,218,7, + 104,97,115,97,116,116,114,114,68,0,0,0,90,14,95,102, + 105,120,95,117,112,95,109,111,100,117,108,101,218,8,95,95, + 100,105,99,116,95,95,218,4,101,120,101,99,114,26,0,0, + 0,218,11,73,109,112,111,114,116,69,114,114,111,114,114,45, + 0,0,0,218,16,95,118,101,114,98,111,115,101,95,109,101, + 115,115,97,103,101,41,9,114,32,0,0,0,114,38,0,0, + 0,218,3,109,115,103,114,50,0,0,0,114,51,0,0,0, + 114,40,0,0,0,90,3,109,111,100,114,13,0,0,0,114, + 66,0,0,0,114,9,0,0,0,114,9,0,0,0,114,10, + 0,0,0,218,11,108,111,97,100,95,109,111,100,117,108,101, + 10,1,0,0,115,56,0,0,0,4,9,12,2,16,1,12, + 1,18,1,8,1,10,1,6,1,2,2,4,1,10,3,14, + 1,8,1,10,2,6,1,16,1,16,1,6,1,8,1,2, + 1,2,2,14,1,12,1,16,1,14,1,4,1,2,253,255, + 128,122,23,122,105,112,105,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,0,0,0,0,3,0,0,0,8,0,0,0,67, + 0,0,0,115,64,0,0,0,122,20,124,0,160,0,124,1, + 161,1,115,18,87,0,100,1,83,0,87,0,110,18,4,0, + 116,1,121,62,1,0,1,0,1,0,89,0,100,1,83,0, + 100,2,100,3,108,2,109,3,125,2,1,0,124,2,124,0, + 124,1,131,2,83,0,119,0,41,4,122,204,82,101,116,117, + 114,110,32,116,104,101,32,82,101,115,111,117,114,99,101,82, + 101,97,100,101,114,32,102,111,114,32,97,32,112,97,99,107, + 97,103,101,32,105,110,32,97,32,122,105,112,32,102,105,108, + 101,46,10,10,32,32,32,32,32,32,32,32,73,102,32,39, + 102,117,108,108,110,97,109,101,39,32,105,115,32,97,32,112, + 97,99,107,97,103,101,32,119,105,116,104,105,110,32,116,104, + 101,32,122,105,112,32,102,105,108,101,44,32,114,101,116,117, + 114,110,32,116,104,101,10,32,32,32,32,32,32,32,32,39, + 82,101,115,111,117,114,99,101,82,101,97,100,101,114,39,32, + 111,98,106,101,99,116,32,102,111,114,32,116,104,101,32,112, + 97,99,107,97,103,101,46,32,32,79,116,104,101,114,119,105, + 115,101,32,114,101,116,117,114,110,32,78,111,110,101,46,10, + 32,32,32,32,32,32,32,32,78,114,0,0,0,0,41,1, + 218,9,90,105,112,82,101,97,100,101,114,41,4,114,43,0, + 0,0,114,3,0,0,0,90,17,105,109,112,111,114,116,108, + 105,98,46,114,101,97,100,101,114,115,114,83,0,0,0,41, + 3,114,32,0,0,0,114,38,0,0,0,114,83,0,0,0, 114,9,0,0,0,114,9,0,0,0,114,10,0,0,0,218, - 10,103,101,116,95,115,111,117,114,99,101,225,0,0,0,115, - 26,0,0,0,10,7,8,1,18,1,10,2,4,1,14,1, - 10,2,2,2,14,1,12,1,8,2,16,1,255,128,122,22, - 122,105,112,105,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,0, - 0,0,0,3,0,0,0,4,0,0,0,67,0,0,0,115, - 40,0,0,0,116,0,124,0,124,1,131,2,125,2,124,2, - 100,1,117,0,114,36,116,1,100,2,124,1,155,2,157,2, - 124,1,100,3,141,2,130,1,124,2,83,0,41,4,122,171, - 105,115,95,112,97,99,107,97,103,101,40,102,117,108,108,110, - 97,109,101,41,32,45,62,32,98,111,111,108,46,10,10,32, - 32,32,32,32,32,32,32,82,101,116,117,114,110,32,84,114, - 117,101,32,105,102,32,116,104,101,32,109,111,100,117,108,101, - 32,115,112,101,99,105,102,105,101,100,32,98,121,32,102,117, - 108,108,110,97,109,101,32,105,115,32,97,32,112,97,99,107, - 97,103,101,46,10,32,32,32,32,32,32,32,32,82,97,105, - 115,101,32,90,105,112,73,109,112,111,114,116,69,114,114,111, - 114,32,105,102,32,116,104,101,32,109,111,100,117,108,101,32, - 99,111,117,108,100,110,39,116,32,98,101,32,102,111,117,110, - 100,46,10,32,32,32,32,32,32,32,32,78,114,61,0,0, - 0,114,62,0,0,0,41,2,114,35,0,0,0,114,3,0, - 0,0,41,3,114,32,0,0,0,114,38,0,0,0,114,39, - 0,0,0,114,9,0,0,0,114,9,0,0,0,114,10,0, - 0,0,114,43,0,0,0,251,0,0,0,115,10,0,0,0, - 10,6,8,1,18,1,4,1,255,128,122,22,122,105,112,105, - 109,112,111,114,116,101,114,46,105,115,95,112,97,99,107,97, - 103,101,99,2,0,0,0,0,0,0,0,0,0,0,0,8, - 0,0,0,8,0,0,0,67,0,0,0,115,236,0,0,0, - 116,0,124,0,124,1,131,2,92,3,125,2,125,3,125,4, - 116,1,106,2,160,3,124,1,161,1,125,5,124,5,100,1, - 117,0,115,46,116,4,124,5,116,5,131,2,115,64,116,5, - 124,1,131,1,125,5,124,5,116,1,106,2,124,1,60,0, - 124,0,124,5,95,6,122,84,124,3,114,108,116,7,124,0, - 124,1,131,2,125,6,116,8,160,9,124,0,106,10,124,6, - 161,2,125,7,124,7,103,1,124,5,95,11,116,12,124,5, - 100,2,131,2,115,124,116,13,124,5,95,13,116,8,160,14, - 124,5,106,15,124,1,124,4,161,3,1,0,116,16,124,2, - 124,5,106,15,131,2,1,0,87,0,110,16,1,0,1,0, - 1,0,116,1,106,2,124,1,61,0,130,0,122,14,116,1, - 106,2,124,1,25,0,125,5,87,0,110,30,4,0,116,17, - 121,216,1,0,1,0,1,0,116,18,100,3,124,1,155,2, - 100,4,157,3,131,1,130,1,48,0,116,19,160,20,100,5, - 124,1,124,4,161,3,1,0,124,5,83,0,41,6,97,55, - 1,0,0,108,111,97,100,95,109,111,100,117,108,101,40,102, - 117,108,108,110,97,109,101,41,32,45,62,32,109,111,100,117, - 108,101,46,10,10,32,32,32,32,32,32,32,32,76,111,97, - 100,32,116,104,101,32,109,111,100,117,108,101,32,115,112,101, - 99,105,102,105,101,100,32,98,121,32,39,102,117,108,108,110, - 97,109,101,39,46,32,39,102,117,108,108,110,97,109,101,39, - 32,109,117,115,116,32,98,101,32,116,104,101,10,32,32,32, - 32,32,32,32,32,102,117,108,108,121,32,113,117,97,108,105, - 102,105,101,100,32,40,100,111,116,116,101,100,41,32,109,111, - 100,117,108,101,32,110,97,109,101,46,32,73,116,32,114,101, - 116,117,114,110,115,32,116,104,101,32,105,109,112,111,114,116, - 101,100,10,32,32,32,32,32,32,32,32,109,111,100,117,108, - 101,44,32,111,114,32,114,97,105,115,101,115,32,90,105,112, - 73,109,112,111,114,116,69,114,114,111,114,32,105,102,32,105, - 116,32,119,97,115,110,39,116,32,102,111,117,110,100,46,10, - 10,32,32,32,32,32,32,32,32,68,101,112,114,101,99,97, - 116,101,100,32,115,105,110,99,101,32,80,121,116,104,111,110, - 32,51,46,49,48,46,32,117,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,32,32,32,32,32,32,32,32,78,218,12,95,95,98, - 117,105,108,116,105,110,115,95,95,122,14,76,111,97,100,101, - 100,32,109,111,100,117,108,101,32,122,25,32,110,111,116,32, - 102,111,117,110,100,32,105,110,32,115,121,115,46,109,111,100, - 117,108,101,115,122,30,105,109,112,111,114,116,32,123,125,32, - 35,32,108,111,97,100,101,100,32,102,114,111,109,32,90,105, - 112,32,123,125,41,21,114,48,0,0,0,218,3,115,121,115, - 218,7,109,111,100,117,108,101,115,218,3,103,101,116,114,15, - 0,0,0,218,12,95,109,111,100,117,108,101,95,116,121,112, - 101,218,10,95,95,108,111,97,100,101,114,95,95,114,36,0, - 0,0,114,21,0,0,0,114,30,0,0,0,114,29,0,0, - 0,90,8,95,95,112,97,116,104,95,95,218,7,104,97,115, - 97,116,116,114,114,68,0,0,0,90,14,95,102,105,120,95, - 117,112,95,109,111,100,117,108,101,218,8,95,95,100,105,99, - 116,95,95,218,4,101,120,101,99,114,26,0,0,0,218,11, - 73,109,112,111,114,116,69,114,114,111,114,114,45,0,0,0, - 218,16,95,118,101,114,98,111,115,101,95,109,101,115,115,97, - 103,101,41,8,114,32,0,0,0,114,38,0,0,0,114,50, - 0,0,0,114,51,0,0,0,114,40,0,0,0,90,3,109, - 111,100,114,13,0,0,0,114,66,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,218,11,108,111,97, - 100,95,109,111,100,117,108,101,8,1,0,0,115,50,0,0, - 0,16,9,12,1,18,1,8,1,10,1,6,1,2,2,4, - 1,10,3,14,1,8,1,10,2,6,1,16,1,16,1,6, - 1,8,1,2,1,2,2,14,1,12,1,18,1,14,1,4, - 1,255,128,122,23,122,105,112,105,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,0,0,0,0,3,0,0,0,8,0,0, - 0,67,0,0,0,115,64,0,0,0,122,20,124,0,160,0, - 124,1,161,1,115,18,87,0,100,1,83,0,87,0,110,20, - 4,0,116,1,121,40,1,0,1,0,1,0,89,0,100,1, - 83,0,48,0,100,2,100,3,108,2,109,3,125,2,1,0, - 124,2,124,0,124,1,131,2,83,0,41,4,122,204,82,101, - 116,117,114,110,32,116,104,101,32,82,101,115,111,117,114,99, - 101,82,101,97,100,101,114,32,102,111,114,32,97,32,112,97, - 99,107,97,103,101,32,105,110,32,97,32,122,105,112,32,102, - 105,108,101,46,10,10,32,32,32,32,32,32,32,32,73,102, - 32,39,102,117,108,108,110,97,109,101,39,32,105,115,32,97, - 32,112,97,99,107,97,103,101,32,119,105,116,104,105,110,32, - 116,104,101,32,122,105,112,32,102,105,108,101,44,32,114,101, - 116,117,114,110,32,116,104,101,10,32,32,32,32,32,32,32, - 32,39,82,101,115,111,117,114,99,101,82,101,97,100,101,114, - 39,32,111,98,106,101,99,116,32,102,111,114,32,116,104,101, - 32,112,97,99,107,97,103,101,46,32,32,79,116,104,101,114, - 119,105,115,101,32,114,101,116,117,114,110,32,78,111,110,101, - 46,10,32,32,32,32,32,32,32,32,78,114,0,0,0,0, - 41,1,218,9,90,105,112,82,101,97,100,101,114,41,4,114, - 43,0,0,0,114,3,0,0,0,90,17,105,109,112,111,114, - 116,108,105,98,46,114,101,97,100,101,114,115,114,80,0,0, - 0,41,3,114,32,0,0,0,114,38,0,0,0,114,80,0, - 0,0,114,9,0,0,0,114,9,0,0,0,114,10,0,0, - 0,218,19,103,101,116,95,114,101,115,111,117,114,99,101,95, - 114,101,97,100,101,114,48,1,0,0,115,16,0,0,0,2, - 6,10,1,10,1,12,1,8,1,12,1,10,1,255,128,122, + 19,103,101,116,95,114,101,115,111,117,114,99,101,95,114,101, + 97,100,101,114,53,1,0,0,115,18,0,0,0,2,6,10, + 1,10,1,12,1,6,1,12,1,10,1,2,253,255,128,122, 31,122,105,112,105,109,112,111,114,116,101,114,46,103,101,116, 95,114,101,115,111,117,114,99,101,95,114,101,97,100,101,114, 99,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, @@ -517,19 +535,19 @@ const unsigned char _Py_M__zipimport[] = { 122,2,34,62,41,3,114,29,0,0,0,114,20,0,0,0, 114,31,0,0,0,41,1,114,32,0,0,0,114,9,0,0, 0,114,9,0,0,0,114,10,0,0,0,218,8,95,95,114, - 101,112,114,95,95,63,1,0,0,115,4,0,0,0,24,1, + 101,112,114,95,95,68,1,0,0,115,4,0,0,0,24,1, 255,128,122,20,122,105,112,105,109,112,111,114,116,101,114,46, 95,95,114,101,112,114,95,95,41,1,78,41,1,78,41,1, 78,41,16,114,6,0,0,0,114,7,0,0,0,114,8,0, 0,0,218,7,95,95,100,111,99,95,95,114,34,0,0,0, 114,41,0,0,0,114,42,0,0,0,114,46,0,0,0,114, 52,0,0,0,114,59,0,0,0,114,60,0,0,0,114,67, - 0,0,0,114,43,0,0,0,114,79,0,0,0,114,81,0, - 0,0,114,82,0,0,0,114,9,0,0,0,114,9,0,0, + 0,0,0,114,43,0,0,0,114,82,0,0,0,114,84,0, + 0,0,114,85,0,0,0,114,9,0,0,0,114,9,0,0, 0,114,9,0,0,0,114,10,0,0,0,114,4,0,0,0, - 45,0,0,0,115,30,0,0,0,8,0,4,1,8,17,10, - 46,10,34,10,13,8,27,8,10,8,21,8,11,8,26,8, - 13,8,40,12,15,255,128,122,12,95,95,105,110,105,116,95, + 46,0,0,0,115,30,0,0,0,8,0,4,1,8,17,10, + 46,10,34,10,13,8,27,8,10,8,21,8,12,8,26,8, + 13,8,43,12,15,255,128,122,12,95,95,105,110,105,116,95, 95,46,112,121,99,84,114,63,0,0,0,70,41,3,122,4, 46,112,121,99,84,70,41,3,114,64,0,0,0,70,70,99, 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, @@ -538,7 +556,7 @@ const unsigned char _Py_M__zipimport[] = { 0,41,3,78,218,1,46,233,2,0,0,0,41,2,114,31, 0,0,0,218,10,114,112,97,114,116,105,116,105,111,110,41, 2,114,32,0,0,0,114,38,0,0,0,114,9,0,0,0, - 114,9,0,0,0,114,10,0,0,0,114,36,0,0,0,81, + 114,9,0,0,0,114,10,0,0,0,114,36,0,0,0,86, 1,0,0,115,4,0,0,0,20,1,255,128,114,36,0,0, 0,99,2,0,0,0,0,0,0,0,0,0,0,0,3,0, 0,0,2,0,0,0,67,0,0,0,115,18,0,0,0,124, @@ -546,462 +564,470 @@ const unsigned char _Py_M__zipimport[] = { 0,169,1,78,41,2,114,20,0,0,0,114,28,0,0,0, 41,3,114,32,0,0,0,114,13,0,0,0,90,7,100,105, 114,112,97,116,104,114,9,0,0,0,114,9,0,0,0,114, - 10,0,0,0,114,37,0,0,0,85,1,0,0,115,6,0, + 10,0,0,0,114,37,0,0,0,90,1,0,0,115,6,0, 0,0,8,4,10,2,255,128,114,37,0,0,0,99,2,0, 0,0,0,0,0,0,0,0,0,0,7,0,0,0,4,0, - 0,0,67,0,0,0,115,54,0,0,0,116,0,124,0,124, - 1,131,2,125,2,116,1,68,0,93,34,92,3,125,3,125, + 0,0,67,0,0,0,115,56,0,0,0,116,0,124,0,124, + 1,131,2,125,2,116,1,68,0,93,36,92,3,125,3,125, 4,125,5,124,2,124,3,23,0,125,6,124,6,124,0,106, - 2,118,0,114,14,124,5,2,0,1,0,83,0,100,0,83, - 0,114,87,0,0,0,41,3,114,36,0,0,0,218,16,95, - 122,105,112,95,115,101,97,114,99,104,111,114,100,101,114,114, - 28,0,0,0,41,7,114,32,0,0,0,114,38,0,0,0, - 114,13,0,0,0,218,6,115,117,102,102,105,120,218,10,105, - 115,98,121,116,101,99,111,100,101,114,51,0,0,0,114,66, - 0,0,0,114,9,0,0,0,114,9,0,0,0,114,10,0, - 0,0,114,35,0,0,0,94,1,0,0,115,14,0,0,0, - 10,1,14,1,8,1,10,1,8,1,4,1,255,128,114,35, - 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, - 26,0,0,0,9,0,0,0,67,0,0,0,115,230,4,0, - 0,122,14,116,0,160,1,124,0,161,1,125,1,87,0,110, - 32,4,0,116,2,121,46,1,0,1,0,1,0,116,3,100, - 1,124,0,155,2,157,2,124,0,100,2,141,2,130,1,48, - 0,124,1,144,4,143,140,1,0,122,36,124,1,160,4,116, - 5,11,0,100,3,161,2,1,0,124,1,160,6,161,0,125, - 2,124,1,160,7,116,5,161,1,125,3,87,0,110,32,4, - 0,116,2,121,124,1,0,1,0,1,0,116,3,100,4,124, - 0,155,2,157,2,124,0,100,2,141,2,130,1,48,0,116, - 8,124,3,131,1,116,5,107,3,114,156,116,3,100,4,124, - 0,155,2,157,2,124,0,100,2,141,2,130,1,124,3,100, - 0,100,5,133,2,25,0,116,9,107,3,144,1,114,154,122, - 24,124,1,160,4,100,6,100,3,161,2,1,0,124,1,160, - 6,161,0,125,4,87,0,110,32,4,0,116,2,121,230,1, - 0,1,0,1,0,116,3,100,4,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,48,0,116,10,124,4,116,11,24, - 0,116,5,24,0,100,6,131,2,125,5,122,22,124,1,160, - 4,124,5,161,1,1,0,124,1,160,7,161,0,125,6,87, - 0,110,34,4,0,116,2,144,1,121,50,1,0,1,0,1, + 2,118,0,114,50,124,5,2,0,1,0,83,0,113,14,100, + 0,83,0,114,90,0,0,0,41,3,114,36,0,0,0,218, + 16,95,122,105,112,95,115,101,97,114,99,104,111,114,100,101, + 114,114,28,0,0,0,41,7,114,32,0,0,0,114,38,0, + 0,0,114,13,0,0,0,218,6,115,117,102,102,105,120,218, + 10,105,115,98,121,116,101,99,111,100,101,114,51,0,0,0, + 114,66,0,0,0,114,9,0,0,0,114,9,0,0,0,114, + 10,0,0,0,114,35,0,0,0,99,1,0,0,115,16,0, + 0,0,10,1,14,1,8,1,10,1,8,1,2,128,4,1, + 255,128,114,35,0,0,0,99,1,0,0,0,0,0,0,0, + 0,0,0,0,26,0,0,0,9,0,0,0,67,0,0,0, + 115,236,4,0,0,122,14,116,0,160,1,124,0,161,1,125, + 1,87,0,110,32,4,0,116,2,144,4,121,234,1,0,1, + 0,1,0,116,3,100,1,124,0,155,2,157,2,124,0,100, + 2,141,2,130,1,124,1,144,4,143,130,1,0,122,36,124, + 1,160,4,116,5,11,0,100,3,161,2,1,0,124,1,160, + 6,161,0,125,2,124,1,160,7,116,5,161,1,125,3,87, + 0,110,32,4,0,116,2,144,4,121,232,1,0,1,0,1, 0,116,3,100,4,124,0,155,2,157,2,124,0,100,2,141, - 2,130,1,48,0,124,6,160,12,116,9,161,1,125,7,124, - 7,100,6,107,0,144,1,114,90,116,3,100,7,124,0,155, - 2,157,2,124,0,100,2,141,2,130,1,124,6,124,7,124, - 7,116,5,23,0,133,2,25,0,125,3,116,8,124,3,131, - 1,116,5,107,3,144,1,114,138,116,3,100,8,124,0,155, - 2,157,2,124,0,100,2,141,2,130,1,124,4,116,8,124, - 6,131,1,24,0,124,7,23,0,125,2,116,13,124,3,100, - 9,100,10,133,2,25,0,131,1,125,8,116,13,124,3,100, - 10,100,11,133,2,25,0,131,1,125,9,124,2,124,8,107, - 0,144,1,114,214,116,3,100,12,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,124,2,124,9,107,0,144,1,114, - 242,116,3,100,13,124,0,155,2,157,2,124,0,100,2,141, - 2,130,1,124,2,124,8,56,0,125,2,124,2,124,9,24, - 0,125,10,124,10,100,6,107,0,144,2,114,30,116,3,100, - 14,124,0,155,2,157,2,124,0,100,2,141,2,130,1,105, - 0,125,11,100,6,125,12,122,14,124,1,160,4,124,2,161, - 1,1,0,87,0,110,34,4,0,116,2,144,2,121,86,1, + 2,130,1,116,8,124,3,131,1,116,5,107,3,114,156,116, + 3,100,4,124,0,155,2,157,2,124,0,100,2,141,2,130, + 1,124,3,100,0,100,5,133,2,25,0,116,9,107,3,144, + 1,114,152,122,24,124,1,160,4,100,6,100,3,161,2,1, + 0,124,1,160,6,161,0,125,4,87,0,110,32,4,0,116, + 2,144,4,121,230,1,0,1,0,1,0,116,3,100,4,124, + 0,155,2,157,2,124,0,100,2,141,2,130,1,116,10,124, + 4,116,11,24,0,116,5,24,0,100,6,131,2,125,5,122, + 22,124,1,160,4,124,5,161,1,1,0,124,1,160,7,161, + 0,125,6,87,0,110,32,4,0,116,2,144,4,121,228,1, 0,1,0,1,0,116,3,100,4,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,48,0,124,1,160,7,100,15,161, - 1,125,3,116,8,124,3,131,1,100,5,107,0,144,2,114, - 120,116,14,100,16,131,1,130,1,124,3,100,0,100,5,133, - 2,25,0,100,17,107,3,144,2,114,142,144,4,113,180,116, - 8,124,3,131,1,100,15,107,3,144,2,114,164,116,14,100, - 16,131,1,130,1,116,15,124,3,100,18,100,19,133,2,25, - 0,131,1,125,13,116,15,124,3,100,19,100,9,133,2,25, - 0,131,1,125,14,116,15,124,3,100,9,100,20,133,2,25, - 0,131,1,125,15,116,15,124,3,100,20,100,10,133,2,25, - 0,131,1,125,16,116,13,124,3,100,10,100,11,133,2,25, - 0,131,1,125,17,116,13,124,3,100,11,100,21,133,2,25, - 0,131,1,125,18,116,13,124,3,100,21,100,22,133,2,25, - 0,131,1,125,4,116,15,124,3,100,22,100,23,133,2,25, - 0,131,1,125,19,116,15,124,3,100,23,100,24,133,2,25, - 0,131,1,125,20,116,15,124,3,100,24,100,25,133,2,25, - 0,131,1,125,21,116,13,124,3,100,26,100,15,133,2,25, - 0,131,1,125,22,124,19,124,20,23,0,124,21,23,0,125, - 8,124,22,124,9,107,4,144,3,114,124,116,3,100,27,124, - 0,155,2,157,2,124,0,100,2,141,2,130,1,124,22,124, - 10,55,0,125,22,122,14,124,1,160,7,124,19,161,1,125, - 23,87,0,110,34,4,0,116,2,144,3,121,180,1,0,1, - 0,1,0,116,3,100,4,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,48,0,116,8,124,23,131,1,124,19,107, - 3,144,3,114,214,116,3,100,4,124,0,155,2,157,2,124, + 0,100,2,141,2,130,1,124,6,160,12,116,9,161,1,125, + 7,124,7,100,6,107,0,144,1,114,88,116,3,100,7,124, + 0,155,2,157,2,124,0,100,2,141,2,130,1,124,6,124, + 7,124,7,116,5,23,0,133,2,25,0,125,3,116,8,124, + 3,131,1,116,5,107,3,144,1,114,136,116,3,100,8,124, + 0,155,2,157,2,124,0,100,2,141,2,130,1,124,4,116, + 8,124,6,131,1,24,0,124,7,23,0,125,2,116,13,124, + 3,100,9,100,10,133,2,25,0,131,1,125,8,116,13,124, + 3,100,10,100,11,133,2,25,0,131,1,125,9,124,2,124, + 8,107,0,144,1,114,212,116,3,100,12,124,0,155,2,157, + 2,124,0,100,2,141,2,130,1,124,2,124,9,107,0,144, + 1,114,240,116,3,100,13,124,0,155,2,157,2,124,0,100, + 2,141,2,130,1,124,2,124,8,56,0,125,2,124,2,124, + 9,24,0,125,10,124,10,100,6,107,0,144,2,114,28,116, + 3,100,14,124,0,155,2,157,2,124,0,100,2,141,2,130, + 1,105,0,125,11,100,6,125,12,122,14,124,1,160,4,124, + 2,161,1,1,0,87,0,110,32,4,0,116,2,144,4,121, + 226,1,0,1,0,1,0,116,3,100,4,124,0,155,2,157, + 2,124,0,100,2,141,2,130,1,9,0,124,1,160,7,100, + 16,161,1,125,3,116,8,124,3,131,1,100,5,107,0,144, + 2,114,118,116,14,100,17,131,1,130,1,124,3,100,0,100, + 5,133,2,25,0,100,18,107,3,144,2,114,140,144,4,113, + 170,116,8,124,3,131,1,100,16,107,3,144,2,114,162,116, + 14,100,17,131,1,130,1,116,15,124,3,100,19,100,20,133, + 2,25,0,131,1,125,13,116,15,124,3,100,20,100,9,133, + 2,25,0,131,1,125,14,116,15,124,3,100,9,100,21,133, + 2,25,0,131,1,125,15,116,15,124,3,100,21,100,10,133, + 2,25,0,131,1,125,16,116,13,124,3,100,10,100,11,133, + 2,25,0,131,1,125,17,116,13,124,3,100,11,100,22,133, + 2,25,0,131,1,125,18,116,13,124,3,100,22,100,23,133, + 2,25,0,131,1,125,4,116,15,124,3,100,23,100,24,133, + 2,25,0,131,1,125,19,116,15,124,3,100,24,100,25,133, + 2,25,0,131,1,125,20,116,15,124,3,100,25,100,26,133, + 2,25,0,131,1,125,21,116,13,124,3,100,27,100,16,133, + 2,25,0,131,1,125,22,124,19,124,20,23,0,124,21,23, + 0,125,8,124,22,124,9,107,4,144,3,114,122,116,3,100, + 28,124,0,155,2,157,2,124,0,100,2,141,2,130,1,124, + 22,124,10,55,0,125,22,122,14,124,1,160,7,124,19,161, + 1,125,23,87,0,110,32,4,0,116,2,144,4,121,224,1, + 0,1,0,1,0,116,3,100,4,124,0,155,2,157,2,124, + 0,100,2,141,2,130,1,116,8,124,23,131,1,124,19,107, + 3,144,3,114,210,116,3,100,4,124,0,155,2,157,2,124, 0,100,2,141,2,130,1,122,50,116,8,124,1,160,7,124, 8,124,19,24,0,161,1,131,1,124,8,124,19,24,0,107, - 3,144,4,114,6,116,3,100,4,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,87,0,110,34,4,0,116,2,144, - 4,121,42,1,0,1,0,1,0,116,3,100,4,124,0,155, - 2,157,2,124,0,100,2,141,2,130,1,48,0,124,13,100, - 28,64,0,144,4,114,64,124,23,160,16,161,0,125,23,110, - 52,122,14,124,23,160,16,100,29,161,1,125,23,87,0,110, - 36,4,0,116,17,144,4,121,114,1,0,1,0,1,0,124, - 23,160,16,100,30,161,1,160,18,116,19,161,1,125,23,89, - 0,110,2,48,0,124,23,160,20,100,31,116,21,161,2,125, - 23,116,22,160,23,124,0,124,23,161,2,125,24,124,24,124, - 14,124,18,124,4,124,22,124,15,124,16,124,17,102,8,125, - 25,124,25,124,11,124,23,60,0,124,12,100,32,55,0,125, - 12,144,2,113,88,87,0,100,0,4,0,4,0,131,3,1, - 0,110,18,49,0,144,4,115,202,48,0,1,0,1,0,1, - 0,89,0,1,0,116,24,160,25,100,33,124,12,124,0,161, - 3,1,0,124,11,83,0,41,34,78,122,21,99,97,110,39, - 116,32,111,112,101,110,32,90,105,112,32,102,105,108,101,58, - 32,114,12,0,0,0,114,85,0,0,0,250,21,99,97,110, - 39,116,32,114,101,97,100,32,90,105,112,32,102,105,108,101, - 58,32,233,4,0,0,0,114,0,0,0,0,122,16,110,111, - 116,32,97,32,90,105,112,32,102,105,108,101,58,32,122,18, - 99,111,114,114,117,112,116,32,90,105,112,32,102,105,108,101, - 58,32,233,12,0,0,0,233,16,0,0,0,233,20,0,0, - 0,122,28,98,97,100,32,99,101,110,116,114,97,108,32,100, - 105,114,101,99,116,111,114,121,32,115,105,122,101,58,32,122, - 30,98,97,100,32,99,101,110,116,114,97,108,32,100,105,114, - 101,99,116,111,114,121,32,111,102,102,115,101,116,58,32,122, - 38,98,97,100,32,99,101,110,116,114,97,108,32,100,105,114, - 101,99,116,111,114,121,32,115,105,122,101,32,111,114,32,111, - 102,102,115,101,116,58,32,233,46,0,0,0,250,27,69,79, - 70,32,114,101,97,100,32,119,104,101,114,101,32,110,111,116, - 32,101,120,112,101,99,116,101,100,115,4,0,0,0,80,75, - 1,2,233,8,0,0,0,233,10,0,0,0,233,14,0,0, - 0,233,24,0,0,0,233,28,0,0,0,233,30,0,0,0, - 233,32,0,0,0,233,34,0,0,0,233,42,0,0,0,122, - 25,98,97,100,32,108,111,99,97,108,32,104,101,97,100,101, - 114,32,111,102,102,115,101,116,58,32,105,0,8,0,0,218, - 5,97,115,99,105,105,90,6,108,97,116,105,110,49,250,1, - 47,114,5,0,0,0,122,33,122,105,112,105,109,112,111,114, - 116,58,32,102,111,117,110,100,32,123,125,32,110,97,109,101, - 115,32,105,110,32,123,33,114,125,41,26,218,3,95,105,111, - 218,9,111,112,101,110,95,99,111,100,101,114,22,0,0,0, - 114,3,0,0,0,218,4,115,101,101,107,218,20,69,78,68, - 95,67,69,78,84,82,65,76,95,68,73,82,95,83,73,90, - 69,90,4,116,101,108,108,218,4,114,101,97,100,114,55,0, - 0,0,218,18,83,84,82,73,78,71,95,69,78,68,95,65, - 82,67,72,73,86,69,218,3,109,97,120,218,15,77,65,88, - 95,67,79,77,77,69,78,84,95,76,69,78,218,5,114,102, - 105,110,100,114,2,0,0,0,218,8,69,79,70,69,114,114, - 111,114,114,1,0,0,0,114,65,0,0,0,218,18,85,110, - 105,99,111,100,101,68,101,99,111,100,101,69,114,114,111,114, - 218,9,116,114,97,110,115,108,97,116,101,218,11,99,112,52, - 51,55,95,116,97,98,108,101,114,19,0,0,0,114,20,0, - 0,0,114,21,0,0,0,114,30,0,0,0,114,45,0,0, - 0,114,78,0,0,0,41,26,114,29,0,0,0,218,2,102, - 112,90,15,104,101,97,100,101,114,95,112,111,115,105,116,105, - 111,110,218,6,98,117,102,102,101,114,218,9,102,105,108,101, - 95,115,105,122,101,90,17,109,97,120,95,99,111,109,109,101, - 110,116,95,115,116,97,114,116,218,4,100,97,116,97,90,3, - 112,111,115,218,11,104,101,97,100,101,114,95,115,105,122,101, - 90,13,104,101,97,100,101,114,95,111,102,102,115,101,116,90, - 10,97,114,99,95,111,102,102,115,101,116,114,33,0,0,0, - 218,5,99,111,117,110,116,218,5,102,108,97,103,115,218,8, - 99,111,109,112,114,101,115,115,218,4,116,105,109,101,218,4, - 100,97,116,101,218,3,99,114,99,218,9,100,97,116,97,95, - 115,105,122,101,218,9,110,97,109,101,95,115,105,122,101,218, - 10,101,120,116,114,97,95,115,105,122,101,90,12,99,111,109, - 109,101,110,116,95,115,105,122,101,218,11,102,105,108,101,95, - 111,102,102,115,101,116,114,44,0,0,0,114,13,0,0,0, - 218,1,116,114,9,0,0,0,114,9,0,0,0,114,10,0, - 0,0,114,27,0,0,0,125,1,0,0,115,214,0,0,0, - 2,1,14,1,12,1,20,1,8,2,2,1,14,1,8,1, - 14,1,12,1,20,1,12,1,18,1,18,1,2,3,12,1, - 12,1,12,1,10,1,2,1,8,255,8,2,2,1,2,255, - 2,1,4,255,2,2,10,1,12,1,14,1,10,1,2,1, - 8,255,10,2,10,1,10,1,2,1,6,255,16,2,14,1, - 10,1,2,1,6,255,16,2,16,2,16,1,10,1,18,1, - 10,1,18,1,8,1,8,1,10,1,18,1,4,2,4,2, - 2,1,14,1,14,1,20,1,10,2,14,1,8,1,18,2, - 4,1,14,1,8,1,16,1,16,1,16,1,16,1,16,1, - 16,1,16,1,16,1,16,1,16,1,16,1,12,1,10,1, - 18,1,8,1,2,2,14,1,14,1,20,1,14,1,18,1, - 2,4,28,1,22,1,14,1,20,1,10,2,10,2,2,3, - 14,1,14,1,22,1,12,2,12,1,20,1,8,1,44,1, - 14,1,4,1,255,128,114,27,0,0,0,117,190,1,0,0, - 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,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127, - 195,135,195,188,195,169,195,162,195,164,195,160,195,165,195,167, - 195,170,195,171,195,168,195,175,195,174,195,172,195,132,195,133, - 195,137,195,166,195,134,195,180,195,182,195,178,195,187,195,185, - 195,191,195,150,195,156,194,162,194,163,194,165,226,130,167,198, - 146,195,161,195,173,195,179,195,186,195,177,195,145,194,170,194, - 186,194,191,226,140,144,194,172,194,189,194,188,194,161,194,171, - 194,187,226,150,145,226,150,146,226,150,147,226,148,130,226,148, - 164,226,149,161,226,149,162,226,149,150,226,149,149,226,149,163, - 226,149,145,226,149,151,226,149,157,226,149,156,226,149,155,226, - 148,144,226,148,148,226,148,180,226,148,172,226,148,156,226,148, - 128,226,148,188,226,149,158,226,149,159,226,149,154,226,149,148, - 226,149,169,226,149,166,226,149,160,226,149,144,226,149,172,226, - 149,167,226,149,168,226,149,164,226,149,165,226,149,153,226,149, - 152,226,149,146,226,149,147,226,149,171,226,149,170,226,148,152, - 226,148,140,226,150,136,226,150,132,226,150,140,226,150,144,226, - 150,128,206,177,195,159,206,147,207,128,206,163,207,131,194,181, - 207,132,206,166,206,152,206,169,206,180,226,136,158,207,134,206, - 181,226,136,169,226,137,161,194,177,226,137,165,226,137,164,226, - 140,160,226,140,161,195,183,226,137,136,194,176,226,136,153,194, - 183,226,136,154,226,129,191,194,178,226,150,160,194,160,99,0, - 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8, - 0,0,0,67,0,0,0,115,106,0,0,0,116,0,114,22, - 116,1,160,2,100,1,161,1,1,0,116,3,100,2,131,1, - 130,1,100,3,97,0,122,58,122,16,100,4,100,5,108,4, - 109,5,125,0,1,0,87,0,110,32,4,0,116,6,121,76, - 1,0,1,0,1,0,116,1,160,2,100,1,161,1,1,0, - 116,3,100,2,131,1,130,1,48,0,87,0,100,6,97,0, - 110,6,100,6,97,0,48,0,116,1,160,2,100,7,161,1, - 1,0,124,0,83,0,41,8,78,122,27,122,105,112,105,109, - 112,111,114,116,58,32,122,108,105,98,32,85,78,65,86,65, - 73,76,65,66,76,69,250,41,99,97,110,39,116,32,100,101, - 99,111,109,112,114,101,115,115,32,100,97,116,97,59,32,122, - 108,105,98,32,110,111,116,32,97,118,97,105,108,97,98,108, - 101,84,114,0,0,0,0,169,1,218,10,100,101,99,111,109, - 112,114,101,115,115,70,122,25,122,105,112,105,109,112,111,114, - 116,58,32,122,108,105,98,32,97,118,97,105,108,97,98,108, - 101,41,7,218,15,95,105,109,112,111,114,116,105,110,103,95, - 122,108,105,98,114,45,0,0,0,114,78,0,0,0,114,3, - 0,0,0,90,4,122,108,105,98,114,140,0,0,0,218,9, - 69,120,99,101,112,116,105,111,110,114,139,0,0,0,114,9, - 0,0,0,114,9,0,0,0,114,10,0,0,0,218,20,95, - 103,101,116,95,100,101,99,111,109,112,114,101,115,115,95,102, - 117,110,99,27,2,0,0,115,26,0,0,0,4,2,10,3, - 8,1,4,2,4,1,16,1,12,1,10,1,12,1,12,2, - 10,2,4,1,255,128,114,143,0,0,0,99,2,0,0,0, - 0,0,0,0,0,0,0,0,17,0,0,0,9,0,0,0, - 67,0,0,0,115,132,1,0,0,124,1,92,8,125,2,125, - 3,125,4,125,5,125,6,125,7,125,8,125,9,124,4,100, - 1,107,0,114,36,116,0,100,2,131,1,130,1,116,1,160, - 2,124,0,161,1,144,1,143,6,125,10,122,14,124,10,160, - 3,124,6,161,1,1,0,87,0,110,32,4,0,116,4,121, - 96,1,0,1,0,1,0,116,0,100,3,124,0,155,2,157, - 2,124,0,100,4,141,2,130,1,48,0,124,10,160,5,100, - 5,161,1,125,11,116,6,124,11,131,1,100,5,107,3,114, - 128,116,7,100,6,131,1,130,1,124,11,100,0,100,7,133, - 2,25,0,100,8,107,3,114,162,116,0,100,9,124,0,155, - 2,157,2,124,0,100,4,141,2,130,1,116,8,124,11,100, - 10,100,11,133,2,25,0,131,1,125,12,116,8,124,11,100, - 11,100,5,133,2,25,0,131,1,125,13,100,5,124,12,23, - 0,124,13,23,0,125,14,124,6,124,14,55,0,125,6,122, - 14,124,10,160,3,124,6,161,1,1,0,87,0,110,34,4, - 0,116,4,144,1,121,6,1,0,1,0,1,0,116,0,100, - 3,124,0,155,2,157,2,124,0,100,4,141,2,130,1,48, - 0,124,10,160,5,124,4,161,1,125,15,116,6,124,15,131, - 1,124,4,107,3,144,1,114,40,116,4,100,12,131,1,130, - 1,87,0,100,0,4,0,4,0,131,3,1,0,110,18,49, - 0,144,1,115,62,48,0,1,0,1,0,1,0,89,0,1, - 0,124,3,100,1,107,2,144,1,114,86,124,15,83,0,122, - 10,116,9,131,0,125,16,87,0,110,24,4,0,116,10,144, - 1,121,120,1,0,1,0,1,0,116,0,100,13,131,1,130, - 1,48,0,124,16,124,15,100,14,131,2,83,0,41,15,78, - 114,0,0,0,0,122,18,110,101,103,97,116,105,118,101,32, - 100,97,116,97,32,115,105,122,101,114,91,0,0,0,114,12, - 0,0,0,114,103,0,0,0,114,97,0,0,0,114,92,0, - 0,0,115,4,0,0,0,80,75,3,4,122,23,98,97,100, - 32,108,111,99,97,108,32,102,105,108,101,32,104,101,97,100, - 101,114,58,32,233,26,0,0,0,114,102,0,0,0,122,26, - 122,105,112,105,109,112,111,114,116,58,32,99,97,110,39,116, - 32,114,101,97,100,32,100,97,116,97,114,138,0,0,0,105, - 241,255,255,255,41,11,114,3,0,0,0,114,109,0,0,0, - 114,110,0,0,0,114,111,0,0,0,114,22,0,0,0,114, - 113,0,0,0,114,55,0,0,0,114,118,0,0,0,114,1, - 0,0,0,114,143,0,0,0,114,142,0,0,0,41,17,114, - 29,0,0,0,114,58,0,0,0,90,8,100,97,116,97,112, - 97,116,104,114,129,0,0,0,114,133,0,0,0,114,124,0, - 0,0,114,136,0,0,0,114,130,0,0,0,114,131,0,0, - 0,114,132,0,0,0,114,122,0,0,0,114,123,0,0,0, - 114,134,0,0,0,114,135,0,0,0,114,126,0,0,0,90, - 8,114,97,119,95,100,97,116,97,114,140,0,0,0,114,9, - 0,0,0,114,9,0,0,0,114,10,0,0,0,114,56,0, - 0,0,48,2,0,0,115,64,0,0,0,20,1,8,1,8, - 1,14,2,2,2,14,1,12,1,20,1,10,1,12,1,8, - 1,16,2,18,2,16,2,16,1,12,1,8,1,2,1,14, - 1,14,1,20,1,10,1,14,1,40,1,10,2,4,2,2, - 3,10,1,14,1,10,1,10,1,255,128,114,56,0,0,0, - 99,2,0,0,0,0,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, - 124,0,124,1,24,0,131,1,100,1,107,1,83,0,41,2, - 78,114,5,0,0,0,41,1,218,3,97,98,115,41,2,90, - 2,116,49,90,2,116,50,114,9,0,0,0,114,9,0,0, - 0,114,10,0,0,0,218,9,95,101,113,95,109,116,105,109, - 101,94,2,0,0,115,4,0,0,0,16,2,255,128,114,146, - 0,0,0,99,5,0,0,0,0,0,0,0,0,0,0,0, - 14,0,0,0,8,0,0,0,67,0,0,0,115,60,1,0, - 0,124,3,124,2,100,1,156,2,125,5,122,18,116,0,160, - 1,124,4,124,3,124,5,161,3,125,6,87,0,110,20,4, - 0,116,2,121,48,1,0,1,0,1,0,89,0,100,0,83, - 0,48,0,124,6,100,2,64,0,100,3,107,3,125,7,124, - 7,114,182,124,6,100,4,64,0,100,3,107,3,125,8,116, - 3,106,4,100,5,107,3,144,1,114,10,124,8,115,106,116, - 3,106,4,100,6,107,2,144,1,114,10,116,5,124,0,124, - 2,131,2,125,9,124,9,100,0,117,1,144,1,114,10,116, - 3,160,6,116,0,106,7,124,9,161,2,125,10,122,20,116, - 0,160,8,124,4,124,10,124,3,124,5,161,4,1,0,87, - 0,110,104,4,0,116,2,121,180,1,0,1,0,1,0,89, - 0,100,0,83,0,48,0,116,9,124,0,124,2,131,2,92, - 2,125,11,125,12,124,11,144,1,114,10,116,10,116,11,124, - 4,100,7,100,8,133,2,25,0,131,1,124,11,131,2,114, - 246,116,11,124,4,100,8,100,9,133,2,25,0,131,1,124, - 12,107,3,144,1,114,10,116,12,160,13,100,10,124,3,155, - 2,157,2,161,1,1,0,100,0,83,0,116,14,160,15,124, - 4,100,9,100,0,133,2,25,0,161,1,125,13,116,16,124, - 13,116,17,131,2,144,1,115,56,116,18,100,11,124,1,155, - 2,100,12,157,3,131,1,130,1,124,13,83,0,41,13,78, - 41,2,114,44,0,0,0,114,13,0,0,0,114,5,0,0, - 0,114,0,0,0,0,114,85,0,0,0,90,5,110,101,118, - 101,114,90,6,97,108,119,97,121,115,114,98,0,0,0,114, - 93,0,0,0,114,94,0,0,0,122,22,98,121,116,101,99, - 111,100,101,32,105,115,32,115,116,97,108,101,32,102,111,114, - 32,122,16,99,111,109,112,105,108,101,100,32,109,111,100,117, - 108,101,32,122,21,32,105,115,32,110,111,116,32,97,32,99, - 111,100,101,32,111,98,106,101,99,116,41,19,114,21,0,0, - 0,90,13,95,99,108,97,115,115,105,102,121,95,112,121,99, - 114,77,0,0,0,218,4,95,105,109,112,90,21,99,104,101, - 99,107,95,104,97,115,104,95,98,97,115,101,100,95,112,121, - 99,115,218,15,95,103,101,116,95,112,121,99,95,115,111,117, - 114,99,101,218,11,115,111,117,114,99,101,95,104,97,115,104, - 90,17,95,82,65,87,95,77,65,71,73,67,95,78,85,77, - 66,69,82,90,18,95,118,97,108,105,100,97,116,101,95,104, - 97,115,104,95,112,121,99,218,29,95,103,101,116,95,109,116, - 105,109,101,95,97,110,100,95,115,105,122,101,95,111,102,95, - 115,111,117,114,99,101,114,146,0,0,0,114,2,0,0,0, - 114,45,0,0,0,114,78,0,0,0,218,7,109,97,114,115, - 104,97,108,90,5,108,111,97,100,115,114,15,0,0,0,218, - 10,95,99,111,100,101,95,116,121,112,101,218,9,84,121,112, - 101,69,114,114,111,114,41,14,114,32,0,0,0,114,57,0, - 0,0,114,66,0,0,0,114,38,0,0,0,114,125,0,0, - 0,90,11,101,120,99,95,100,101,116,97,105,108,115,114,128, - 0,0,0,90,10,104,97,115,104,95,98,97,115,101,100,90, - 12,99,104,101,99,107,95,115,111,117,114,99,101,90,12,115, - 111,117,114,99,101,95,98,121,116,101,115,114,149,0,0,0, - 90,12,115,111,117,114,99,101,95,109,116,105,109,101,90,11, - 115,111,117,114,99,101,95,115,105,122,101,114,50,0,0,0, - 114,9,0,0,0,114,9,0,0,0,114,10,0,0,0,218, - 15,95,117,110,109,97,114,115,104,97,108,95,99,111,100,101, - 104,2,0,0,115,84,0,0,0,2,2,2,1,6,254,2, - 5,18,1,12,1,8,1,12,2,4,1,12,1,12,1,2, - 1,2,255,8,1,4,255,10,2,10,1,4,1,4,1,2, - 1,4,254,2,5,4,1,8,1,8,255,12,2,8,1,8, - 3,6,255,6,3,22,3,18,1,4,255,4,2,8,1,4, - 255,4,2,18,2,12,1,16,1,4,1,255,128,114,154,0, - 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,1, - 0,0,0,4,0,0,0,67,0,0,0,115,28,0,0,0, - 124,0,160,0,100,1,100,2,161,2,125,0,124,0,160,0, - 100,3,100,2,161,2,125,0,124,0,83,0,41,4,78,115, - 2,0,0,0,13,10,243,1,0,0,0,10,243,1,0,0, - 0,13,41,1,114,19,0,0,0,41,1,218,6,115,111,117, - 114,99,101,114,9,0,0,0,114,9,0,0,0,114,10,0, - 0,0,218,23,95,110,111,114,109,97,108,105,122,101,95,108, - 105,110,101,95,101,110,100,105,110,103,115,155,2,0,0,115, - 8,0,0,0,12,1,12,1,4,1,255,128,114,158,0,0, - 0,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,6,0,0,0,67,0,0,0,115,24,0,0,0,116, - 0,124,1,131,1,125,1,116,1,124,1,124,0,100,1,100, - 2,100,3,141,4,83,0,41,4,78,114,76,0,0,0,84, - 41,1,90,12,100,111,110,116,95,105,110,104,101,114,105,116, - 41,2,114,158,0,0,0,218,7,99,111,109,112,105,108,101, - 41,2,114,57,0,0,0,114,157,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,218,15,95,99,111, - 109,112,105,108,101,95,115,111,117,114,99,101,162,2,0,0, - 115,6,0,0,0,8,1,16,1,255,128,114,160,0,0,0, - 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,11,0,0,0,67,0,0,0,115,68,0,0,0,116,0, - 160,1,124,0,100,1,63,0,100,2,23,0,124,0,100,3, - 63,0,100,4,64,0,124,0,100,5,64,0,124,1,100,6, - 63,0,124,1,100,3,63,0,100,7,64,0,124,1,100,5, - 64,0,100,8,20,0,100,9,100,9,100,9,102,9,161,1, - 83,0,41,10,78,233,9,0,0,0,105,188,7,0,0,233, - 5,0,0,0,233,15,0,0,0,233,31,0,0,0,233,11, - 0,0,0,233,63,0,0,0,114,85,0,0,0,114,14,0, - 0,0,41,2,114,130,0,0,0,90,6,109,107,116,105,109, - 101,41,2,218,1,100,114,137,0,0,0,114,9,0,0,0, - 114,9,0,0,0,114,10,0,0,0,218,14,95,112,97,114, - 115,101,95,100,111,115,116,105,109,101,168,2,0,0,115,20, - 0,0,0,4,1,10,1,10,1,6,1,6,1,10,1,10, - 1,6,1,6,249,255,128,114,168,0,0,0,99,2,0,0, - 0,0,0,0,0,0,0,0,0,6,0,0,0,10,0,0, - 0,67,0,0,0,115,110,0,0,0,122,82,124,1,100,1, - 100,0,133,2,25,0,100,2,118,0,115,22,74,0,130,1, - 124,1,100,0,100,1,133,2,25,0,125,1,124,0,106,0, - 124,1,25,0,125,2,124,2,100,3,25,0,125,3,124,2, - 100,4,25,0,125,4,124,2,100,5,25,0,125,5,116,1, - 124,4,124,3,131,2,124,5,102,2,87,0,83,0,4,0, - 116,2,116,3,116,4,102,3,121,108,1,0,1,0,1,0, - 89,0,100,6,83,0,48,0,41,7,78,114,14,0,0,0, - 169,2,218,1,99,218,1,111,114,162,0,0,0,233,6,0, - 0,0,233,3,0,0,0,41,2,114,0,0,0,0,114,0, - 0,0,0,41,5,114,28,0,0,0,114,168,0,0,0,114, - 26,0,0,0,218,10,73,110,100,101,120,69,114,114,111,114, - 114,153,0,0,0,41,6,114,32,0,0,0,114,13,0,0, - 0,114,58,0,0,0,114,130,0,0,0,114,131,0,0,0, - 90,17,117,110,99,111,109,112,114,101,115,115,101,100,95,115, - 105,122,101,114,9,0,0,0,114,9,0,0,0,114,10,0, - 0,0,114,150,0,0,0,181,2,0,0,115,22,0,0,0, - 2,1,20,2,12,1,10,1,8,3,8,1,8,1,16,1, - 18,1,8,1,255,128,114,150,0,0,0,99,2,0,0,0, - 0,0,0,0,0,0,0,0,3,0,0,0,8,0,0,0, - 67,0,0,0,115,80,0,0,0,124,1,100,1,100,0,133, - 2,25,0,100,2,118,0,115,20,74,0,130,1,124,1,100, - 0,100,1,133,2,25,0,125,1,122,14,124,0,106,0,124, - 1,25,0,125,2,87,0,110,20,4,0,116,1,121,66,1, - 0,1,0,1,0,89,0,100,0,83,0,48,0,116,2,124, - 0,106,3,124,2,131,2,83,0,41,3,78,114,14,0,0, - 0,114,169,0,0,0,41,4,114,28,0,0,0,114,26,0, - 0,0,114,56,0,0,0,114,29,0,0,0,41,3,114,32, - 0,0,0,114,13,0,0,0,114,58,0,0,0,114,9,0, - 0,0,114,9,0,0,0,114,10,0,0,0,114,148,0,0, - 0,200,2,0,0,115,16,0,0,0,20,2,12,1,2,2, - 14,1,12,1,8,1,12,2,255,128,114,148,0,0,0,99, - 2,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0, - 9,0,0,0,67,0,0,0,115,190,0,0,0,116,0,124, - 0,124,1,131,2,125,2,116,1,68,0,93,156,92,3,125, - 3,125,4,125,5,124,2,124,3,23,0,125,6,116,2,106, - 3,100,1,124,0,106,4,116,5,124,6,100,2,100,3,141, - 5,1,0,122,14,124,0,106,6,124,6,25,0,125,7,87, - 0,110,18,4,0,116,7,121,86,1,0,1,0,1,0,89, - 0,113,14,48,0,124,7,100,4,25,0,125,8,116,8,124, - 0,106,4,124,7,131,2,125,9,124,4,114,130,116,9,124, - 0,124,8,124,6,124,1,124,9,131,5,125,10,110,10,116, - 10,124,8,124,9,131,2,125,10,124,10,100,0,117,0,114, - 150,113,14,124,7,100,4,25,0,125,8,124,10,124,5,124, - 8,102,3,2,0,1,0,83,0,116,11,100,5,124,1,155, - 2,157,2,124,1,100,6,141,2,130,1,41,7,78,122,13, - 116,114,121,105,110,103,32,123,125,123,125,123,125,114,85,0, - 0,0,41,1,90,9,118,101,114,98,111,115,105,116,121,114, - 0,0,0,0,114,61,0,0,0,114,62,0,0,0,41,12, - 114,36,0,0,0,114,88,0,0,0,114,45,0,0,0,114, - 78,0,0,0,114,29,0,0,0,114,20,0,0,0,114,28, - 0,0,0,114,26,0,0,0,114,56,0,0,0,114,154,0, - 0,0,114,160,0,0,0,114,3,0,0,0,41,11,114,32, - 0,0,0,114,38,0,0,0,114,13,0,0,0,114,89,0, - 0,0,114,90,0,0,0,114,51,0,0,0,114,66,0,0, - 0,114,58,0,0,0,114,40,0,0,0,114,125,0,0,0, - 114,50,0,0,0,114,9,0,0,0,114,9,0,0,0,114, - 10,0,0,0,114,48,0,0,0,215,2,0,0,115,38,0, - 0,0,10,1,14,1,8,1,22,1,2,1,14,1,12,1, - 6,1,8,2,12,1,4,1,18,1,10,2,8,1,2,3, - 8,1,14,1,18,2,255,128,114,48,0,0,0,41,45,114, - 83,0,0,0,90,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,21,0,0,0,114,1,0,0,0,114,2,0,0,0,90, - 17,95,102,114,111,122,101,110,95,105,109,112,111,114,116,108, - 105,98,114,45,0,0,0,114,147,0,0,0,114,109,0,0, - 0,114,151,0,0,0,114,69,0,0,0,114,130,0,0,0, - 90,7,95,95,97,108,108,95,95,114,20,0,0,0,90,15, - 112,97,116,104,95,115,101,112,97,114,97,116,111,114,115,114, - 18,0,0,0,114,77,0,0,0,114,3,0,0,0,114,25, - 0,0,0,218,4,116,121,112,101,114,72,0,0,0,114,112, - 0,0,0,114,114,0,0,0,114,116,0,0,0,90,13,95, - 76,111,97,100,101,114,66,97,115,105,99,115,114,4,0,0, - 0,114,88,0,0,0,114,36,0,0,0,114,37,0,0,0, - 114,35,0,0,0,114,27,0,0,0,114,121,0,0,0,114, - 141,0,0,0,114,143,0,0,0,114,56,0,0,0,114,146, - 0,0,0,114,154,0,0,0,218,8,95,95,99,111,100,101, - 95,95,114,152,0,0,0,114,158,0,0,0,114,160,0,0, - 0,114,168,0,0,0,114,150,0,0,0,114,148,0,0,0, - 114,48,0,0,0,114,9,0,0,0,114,9,0,0,0,114, - 9,0,0,0,114,10,0,0,0,218,8,60,109,111,100,117, - 108,101,62,1,0,0,0,115,92,0,0,0,4,0,8,16, - 16,1,8,1,8,1,8,1,8,1,8,1,8,1,8,2, - 6,3,14,1,16,3,4,4,8,2,4,2,4,1,4,1, - 18,2,0,127,0,127,12,30,12,1,2,1,2,1,4,252, - 8,9,8,4,8,9,8,31,2,126,2,254,4,29,8,5, - 8,21,8,46,8,10,10,46,8,5,8,7,8,6,8,13, - 8,19,8,15,4,128,255,128, + 3,144,4,114,2,116,3,100,4,124,0,155,2,157,2,124, + 0,100,2,141,2,130,1,87,0,110,32,4,0,116,2,144, + 4,121,222,1,0,1,0,1,0,116,3,100,4,124,0,155, + 2,157,2,124,0,100,2,141,2,130,1,124,13,100,29,64, + 0,144,4,114,58,124,23,160,16,161,0,125,23,110,48,122, + 14,124,23,160,16,100,30,161,1,125,23,87,0,110,32,4, + 0,116,17,144,4,121,220,1,0,1,0,1,0,124,23,160, + 16,100,31,161,1,160,18,116,19,161,1,125,23,89,0,124, + 23,160,20,100,32,116,21,161,2,125,23,116,22,160,23,124, + 0,124,23,161,2,125,24,124,24,124,14,124,18,124,4,124, + 22,124,15,124,16,124,17,102,8,125,25,124,25,124,11,124, + 23,60,0,124,12,100,33,55,0,125,12,144,2,113,86,87, + 0,100,0,4,0,4,0,131,3,1,0,110,18,49,0,144, + 4,115,192,119,1,1,0,1,0,1,0,89,0,1,0,116, + 24,160,25,100,34,124,12,124,0,161,3,1,0,124,11,83, + 0,119,0,119,0,119,0,119,0,119,0,119,0,119,0,119, + 0,41,35,78,122,21,99,97,110,39,116,32,111,112,101,110, + 32,90,105,112,32,102,105,108,101,58,32,114,12,0,0,0, + 114,88,0,0,0,250,21,99,97,110,39,116,32,114,101,97, + 100,32,90,105,112,32,102,105,108,101,58,32,233,4,0,0, + 0,114,0,0,0,0,122,16,110,111,116,32,97,32,90,105, + 112,32,102,105,108,101,58,32,122,18,99,111,114,114,117,112, + 116,32,90,105,112,32,102,105,108,101,58,32,233,12,0,0, + 0,233,16,0,0,0,233,20,0,0,0,122,28,98,97,100, + 32,99,101,110,116,114,97,108,32,100,105,114,101,99,116,111, + 114,121,32,115,105,122,101,58,32,122,30,98,97,100,32,99, + 101,110,116,114,97,108,32,100,105,114,101,99,116,111,114,121, + 32,111,102,102,115,101,116,58,32,122,38,98,97,100,32,99, + 101,110,116,114,97,108,32,100,105,114,101,99,116,111,114,121, + 32,115,105,122,101,32,111,114,32,111,102,102,115,101,116,58, + 32,84,233,46,0,0,0,250,27,69,79,70,32,114,101,97, + 100,32,119,104,101,114,101,32,110,111,116,32,101,120,112,101, + 99,116,101,100,115,4,0,0,0,80,75,1,2,233,8,0, + 0,0,233,10,0,0,0,233,14,0,0,0,233,24,0,0, + 0,233,28,0,0,0,233,30,0,0,0,233,32,0,0,0, + 233,34,0,0,0,233,42,0,0,0,122,25,98,97,100,32, + 108,111,99,97,108,32,104,101,97,100,101,114,32,111,102,102, + 115,101,116,58,32,105,0,8,0,0,218,5,97,115,99,105, + 105,90,6,108,97,116,105,110,49,250,1,47,114,5,0,0, + 0,122,33,122,105,112,105,109,112,111,114,116,58,32,102,111, + 117,110,100,32,123,125,32,110,97,109,101,115,32,105,110,32, + 123,33,114,125,41,26,218,3,95,105,111,218,9,111,112,101, + 110,95,99,111,100,101,114,22,0,0,0,114,3,0,0,0, + 218,4,115,101,101,107,218,20,69,78,68,95,67,69,78,84, + 82,65,76,95,68,73,82,95,83,73,90,69,90,4,116,101, + 108,108,218,4,114,101,97,100,114,55,0,0,0,218,18,83, + 84,82,73,78,71,95,69,78,68,95,65,82,67,72,73,86, + 69,218,3,109,97,120,218,15,77,65,88,95,67,79,77,77, + 69,78,84,95,76,69,78,218,5,114,102,105,110,100,114,2, + 0,0,0,218,8,69,79,70,69,114,114,111,114,114,1,0, + 0,0,114,65,0,0,0,218,18,85,110,105,99,111,100,101, + 68,101,99,111,100,101,69,114,114,111,114,218,9,116,114,97, + 110,115,108,97,116,101,218,11,99,112,52,51,55,95,116,97, + 98,108,101,114,19,0,0,0,114,20,0,0,0,114,21,0, + 0,0,114,30,0,0,0,114,45,0,0,0,114,80,0,0, + 0,41,26,114,29,0,0,0,218,2,102,112,90,15,104,101, + 97,100,101,114,95,112,111,115,105,116,105,111,110,218,6,98, + 117,102,102,101,114,218,9,102,105,108,101,95,115,105,122,101, + 90,17,109,97,120,95,99,111,109,109,101,110,116,95,115,116, + 97,114,116,218,4,100,97,116,97,90,3,112,111,115,218,11, + 104,101,97,100,101,114,95,115,105,122,101,90,13,104,101,97, + 100,101,114,95,111,102,102,115,101,116,90,10,97,114,99,95, + 111,102,102,115,101,116,114,33,0,0,0,218,5,99,111,117, + 110,116,218,5,102,108,97,103,115,218,8,99,111,109,112,114, + 101,115,115,218,4,116,105,109,101,218,4,100,97,116,101,218, + 3,99,114,99,218,9,100,97,116,97,95,115,105,122,101,218, + 9,110,97,109,101,95,115,105,122,101,218,10,101,120,116,114, + 97,95,115,105,122,101,90,12,99,111,109,109,101,110,116,95, + 115,105,122,101,218,11,102,105,108,101,95,111,102,102,115,101, + 116,114,44,0,0,0,114,13,0,0,0,218,1,116,114,9, + 0,0,0,114,9,0,0,0,114,10,0,0,0,114,27,0, + 0,0,130,1,0,0,115,234,0,0,0,2,1,14,1,14, + 1,18,1,8,2,2,1,14,1,8,1,14,1,14,1,18, + 1,12,1,18,1,18,1,2,3,12,1,12,1,14,1,10, + 1,2,1,6,255,8,2,2,1,2,255,2,1,4,255,2, + 2,10,1,12,1,14,1,10,1,2,1,6,255,10,2,10, + 1,10,1,2,1,6,255,16,2,14,1,10,1,2,1,6, + 255,16,2,16,2,16,1,10,1,18,1,10,1,18,1,8, + 1,8,1,10,1,18,1,4,2,4,2,2,1,14,1,14, + 1,18,1,2,1,10,1,14,1,8,1,18,2,4,1,14, + 1,8,1,16,1,16,1,16,1,16,1,16,1,16,1,16, + 1,16,1,16,1,16,1,16,1,12,1,10,1,18,1,8, + 1,2,2,14,1,14,1,18,1,14,1,18,1,2,4,28, + 1,22,1,14,1,18,1,10,2,10,2,2,3,14,1,14, + 1,18,1,12,2,12,1,20,1,8,1,8,1,36,202,14, + 55,4,1,2,247,2,246,2,246,2,227,2,227,2,248,2, + 246,2,248,255,128,114,27,0,0,0,117,190,1,0,0,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,104,105,106,107,108,109,110,111,112, + 113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,195, + 135,195,188,195,169,195,162,195,164,195,160,195,165,195,167,195, + 170,195,171,195,168,195,175,195,174,195,172,195,132,195,133,195, + 137,195,166,195,134,195,180,195,182,195,178,195,187,195,185,195, + 191,195,150,195,156,194,162,194,163,194,165,226,130,167,198,146, + 195,161,195,173,195,179,195,186,195,177,195,145,194,170,194,186, + 194,191,226,140,144,194,172,194,189,194,188,194,161,194,171,194, + 187,226,150,145,226,150,146,226,150,147,226,148,130,226,148,164, + 226,149,161,226,149,162,226,149,150,226,149,149,226,149,163,226, + 149,145,226,149,151,226,149,157,226,149,156,226,149,155,226,148, + 144,226,148,148,226,148,180,226,148,172,226,148,156,226,148,128, + 226,148,188,226,149,158,226,149,159,226,149,154,226,149,148,226, + 149,169,226,149,166,226,149,160,226,149,144,226,149,172,226,149, + 167,226,149,168,226,149,164,226,149,165,226,149,153,226,149,152, + 226,149,146,226,149,147,226,149,171,226,149,170,226,148,152,226, + 148,140,226,150,136,226,150,132,226,150,140,226,150,144,226,150, + 128,206,177,195,159,206,147,207,128,206,163,207,131,194,181,207, + 132,206,166,206,152,206,169,206,180,226,136,158,207,134,206,181, + 226,136,169,226,137,161,194,177,226,137,165,226,137,164,226,140, + 160,226,140,161,195,183,226,137,136,194,176,226,136,153,194,183, + 226,136,154,226,129,191,194,178,226,150,160,194,160,99,0,0, + 0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0, + 0,0,67,0,0,0,115,106,0,0,0,116,0,114,22,116, + 1,160,2,100,1,161,1,1,0,116,3,100,2,131,1,130, + 1,100,3,97,0,122,56,122,16,100,4,100,5,108,4,109, + 5,125,0,1,0,87,0,110,30,4,0,116,6,121,104,1, + 0,1,0,1,0,116,1,160,2,100,1,161,1,1,0,116, + 3,100,2,131,1,130,1,87,0,100,6,97,0,110,6,100, + 6,97,0,119,0,116,1,160,2,100,7,161,1,1,0,124, + 0,83,0,119,0,41,8,78,122,27,122,105,112,105,109,112, + 111,114,116,58,32,122,108,105,98,32,85,78,65,86,65,73, + 76,65,66,76,69,250,41,99,97,110,39,116,32,100,101,99, + 111,109,112,114,101,115,115,32,100,97,116,97,59,32,122,108, + 105,98,32,110,111,116,32,97,118,97,105,108,97,98,108,101, + 84,114,0,0,0,0,169,1,218,10,100,101,99,111,109,112, + 114,101,115,115,70,122,25,122,105,112,105,109,112,111,114,116, + 58,32,122,108,105,98,32,97,118,97,105,108,97,98,108,101, + 41,7,218,15,95,105,109,112,111,114,116,105,110,103,95,122, + 108,105,98,114,45,0,0,0,114,80,0,0,0,114,3,0, + 0,0,90,4,122,108,105,98,114,143,0,0,0,218,9,69, + 120,99,101,112,116,105,111,110,114,142,0,0,0,114,9,0, + 0,0,114,9,0,0,0,114,10,0,0,0,218,20,95,103, + 101,116,95,100,101,99,111,109,112,114,101,115,115,95,102,117, + 110,99,32,2,0,0,115,30,0,0,0,4,2,10,3,8, + 1,4,2,4,1,16,1,12,1,10,1,8,1,2,128,12, + 2,10,2,4,1,2,249,255,128,114,146,0,0,0,99,2, + 0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,9, + 0,0,0,67,0,0,0,115,134,1,0,0,124,1,92,8, + 125,2,125,3,125,4,125,5,125,6,125,7,125,8,125,9, + 124,4,100,1,107,0,114,36,116,0,100,2,131,1,130,1, + 116,1,160,2,124,0,161,1,144,1,143,4,125,10,122,14, + 124,10,160,3,124,6,161,1,1,0,87,0,110,32,4,0, + 116,4,144,1,121,132,1,0,1,0,1,0,116,0,100,3, + 124,0,155,2,157,2,124,0,100,4,141,2,130,1,124,10, + 160,5,100,5,161,1,125,11,116,6,124,11,131,1,100,5, + 107,3,114,128,116,7,100,6,131,1,130,1,124,11,100,0, + 100,7,133,2,25,0,100,8,107,3,114,162,116,0,100,9, + 124,0,155,2,157,2,124,0,100,4,141,2,130,1,116,8, + 124,11,100,10,100,11,133,2,25,0,131,1,125,12,116,8, + 124,11,100,11,100,5,133,2,25,0,131,1,125,13,100,5, + 124,12,23,0,124,13,23,0,125,14,124,6,124,14,55,0, + 125,6,122,14,124,10,160,3,124,6,161,1,1,0,87,0, + 110,32,4,0,116,4,144,1,121,130,1,0,1,0,1,0, + 116,0,100,3,124,0,155,2,157,2,124,0,100,4,141,2, + 130,1,124,10,160,5,124,4,161,1,125,15,116,6,124,15, + 131,1,124,4,107,3,144,1,114,38,116,4,100,12,131,1, + 130,1,87,0,100,0,4,0,4,0,131,3,1,0,110,18, + 49,0,144,1,115,60,119,1,1,0,1,0,1,0,89,0, + 1,0,124,3,100,1,107,2,144,1,114,84,124,15,83,0, + 122,10,116,9,131,0,125,16,87,0,110,22,4,0,116,10, + 144,1,121,128,1,0,1,0,1,0,116,0,100,13,131,1, + 130,1,124,16,124,15,100,14,131,2,83,0,119,0,119,0, + 119,0,41,15,78,114,0,0,0,0,122,18,110,101,103,97, + 116,105,118,101,32,100,97,116,97,32,115,105,122,101,114,94, + 0,0,0,114,12,0,0,0,114,106,0,0,0,114,100,0, + 0,0,114,95,0,0,0,115,4,0,0,0,80,75,3,4, + 122,23,98,97,100,32,108,111,99,97,108,32,102,105,108,101, + 32,104,101,97,100,101,114,58,32,233,26,0,0,0,114,105, + 0,0,0,122,26,122,105,112,105,109,112,111,114,116,58,32, + 99,97,110,39,116,32,114,101,97,100,32,100,97,116,97,114, + 141,0,0,0,105,241,255,255,255,41,11,114,3,0,0,0, + 114,112,0,0,0,114,113,0,0,0,114,114,0,0,0,114, + 22,0,0,0,114,116,0,0,0,114,55,0,0,0,114,121, + 0,0,0,114,1,0,0,0,114,146,0,0,0,114,145,0, + 0,0,41,17,114,29,0,0,0,114,58,0,0,0,90,8, + 100,97,116,97,112,97,116,104,114,132,0,0,0,114,136,0, + 0,0,114,127,0,0,0,114,139,0,0,0,114,133,0,0, + 0,114,134,0,0,0,114,135,0,0,0,114,125,0,0,0, + 114,126,0,0,0,114,137,0,0,0,114,138,0,0,0,114, + 129,0,0,0,90,8,114,97,119,95,100,97,116,97,114,143, + 0,0,0,114,9,0,0,0,114,9,0,0,0,114,10,0, + 0,0,114,56,0,0,0,53,2,0,0,115,70,0,0,0, + 20,1,8,1,8,1,14,2,2,2,14,1,14,1,18,1, + 10,1,12,1,8,1,16,2,18,2,16,2,16,1,12,1, + 8,1,2,1,14,1,14,1,18,1,10,1,14,1,40,1, + 10,2,4,2,2,3,10,1,14,1,8,1,10,1,2,254, + 2,243,2,240,255,128,114,56,0,0,0,99,2,0,0,0, + 0,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,124,0,124,1,24, + 0,131,1,100,1,107,1,83,0,41,2,78,114,5,0,0, + 0,41,1,218,3,97,98,115,41,2,90,2,116,49,90,2, + 116,50,114,9,0,0,0,114,9,0,0,0,114,10,0,0, + 0,218,9,95,101,113,95,109,116,105,109,101,99,2,0,0, + 115,4,0,0,0,16,2,255,128,114,149,0,0,0,99,5, + 0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,6, + 0,0,0,67,0,0,0,115,254,0,0,0,124,3,124,2, + 100,1,156,2,125,5,116,0,160,1,124,4,124,3,124,5, + 161,3,125,6,124,6,100,2,64,0,100,3,107,3,125,7, + 124,7,114,126,124,6,100,4,64,0,100,3,107,3,125,8, + 116,2,106,3,100,5,107,3,114,124,124,8,115,76,116,2, + 106,3,100,6,107,2,114,124,116,4,124,0,124,2,131,2, + 125,9,124,9,100,0,117,1,114,124,116,2,160,5,116,0, + 106,6,124,9,161,2,125,10,116,0,160,7,124,4,124,10, + 124,3,124,5,161,4,1,0,110,80,116,8,124,0,124,2, + 131,2,92,2,125,11,125,12,124,11,114,206,116,9,116,10, + 124,4,100,7,100,8,133,2,25,0,131,1,124,11,131,2, + 114,186,116,10,124,4,100,8,100,9,133,2,25,0,131,1, + 124,12,107,3,114,206,116,11,160,12,100,10,124,3,155,2, + 157,2,161,1,1,0,100,0,83,0,116,13,160,14,124,4, + 100,9,100,0,133,2,25,0,161,1,125,13,116,15,124,13, + 116,16,131,2,115,250,116,17,100,11,124,1,155,2,100,12, + 157,3,131,1,130,1,124,13,83,0,41,13,78,41,2,114, + 44,0,0,0,114,13,0,0,0,114,5,0,0,0,114,0, + 0,0,0,114,88,0,0,0,90,5,110,101,118,101,114,90, + 6,97,108,119,97,121,115,114,101,0,0,0,114,96,0,0, + 0,114,97,0,0,0,122,22,98,121,116,101,99,111,100,101, + 32,105,115,32,115,116,97,108,101,32,102,111,114,32,122,16, + 99,111,109,112,105,108,101,100,32,109,111,100,117,108,101,32, + 122,21,32,105,115,32,110,111,116,32,97,32,99,111,100,101, + 32,111,98,106,101,99,116,41,18,114,21,0,0,0,90,13, + 95,99,108,97,115,115,105,102,121,95,112,121,99,218,4,95, + 105,109,112,90,21,99,104,101,99,107,95,104,97,115,104,95, + 98,97,115,101,100,95,112,121,99,115,218,15,95,103,101,116, + 95,112,121,99,95,115,111,117,114,99,101,218,11,115,111,117, + 114,99,101,95,104,97,115,104,90,17,95,82,65,87,95,77, + 65,71,73,67,95,78,85,77,66,69,82,90,18,95,118,97, + 108,105,100,97,116,101,95,104,97,115,104,95,112,121,99,218, + 29,95,103,101,116,95,109,116,105,109,101,95,97,110,100,95, + 115,105,122,101,95,111,102,95,115,111,117,114,99,101,114,149, + 0,0,0,114,2,0,0,0,114,45,0,0,0,114,80,0, + 0,0,218,7,109,97,114,115,104,97,108,90,5,108,111,97, + 100,115,114,15,0,0,0,218,10,95,99,111,100,101,95,116, + 121,112,101,218,9,84,121,112,101,69,114,114,111,114,41,14, + 114,32,0,0,0,114,57,0,0,0,114,66,0,0,0,114, + 38,0,0,0,114,128,0,0,0,90,11,101,120,99,95,100, + 101,116,97,105,108,115,114,131,0,0,0,90,10,104,97,115, + 104,95,98,97,115,101,100,90,12,99,104,101,99,107,95,115, + 111,117,114,99,101,90,12,115,111,117,114,99,101,95,98,121, + 116,101,115,114,152,0,0,0,90,12,115,111,117,114,99,101, + 95,109,116,105,109,101,90,11,115,111,117,114,99,101,95,115, + 105,122,101,114,50,0,0,0,114,9,0,0,0,114,9,0, + 0,0,114,10,0,0,0,218,15,95,117,110,109,97,114,115, + 104,97,108,95,99,111,100,101,107,2,0,0,115,72,0,0, + 0,2,2,2,1,6,254,14,5,12,2,4,1,12,1,10, + 1,2,1,2,255,8,1,2,255,10,2,8,1,4,1,4, + 1,2,1,4,254,4,5,8,1,6,255,8,4,6,255,4, + 3,22,3,18,1,2,255,4,2,8,1,4,255,4,2,18, + 2,10,1,16,1,4,1,255,128,114,157,0,0,0,99,1, + 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4, + 0,0,0,67,0,0,0,115,28,0,0,0,124,0,160,0, + 100,1,100,2,161,2,125,0,124,0,160,0,100,3,100,2, + 161,2,125,0,124,0,83,0,41,4,78,115,2,0,0,0, + 13,10,243,1,0,0,0,10,243,1,0,0,0,13,41,1, + 114,19,0,0,0,41,1,218,6,115,111,117,114,99,101,114, + 9,0,0,0,114,9,0,0,0,114,10,0,0,0,218,23, + 95,110,111,114,109,97,108,105,122,101,95,108,105,110,101,95, + 101,110,100,105,110,103,115,152,2,0,0,115,8,0,0,0, + 12,1,12,1,4,1,255,128,114,161,0,0,0,99,2,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,6,0, + 0,0,67,0,0,0,115,24,0,0,0,116,0,124,1,131, + 1,125,1,116,1,124,1,124,0,100,1,100,2,100,3,141, + 4,83,0,41,4,78,114,78,0,0,0,84,41,1,90,12, + 100,111,110,116,95,105,110,104,101,114,105,116,41,2,114,161, + 0,0,0,218,7,99,111,109,112,105,108,101,41,2,114,57, + 0,0,0,114,160,0,0,0,114,9,0,0,0,114,9,0, + 0,0,114,10,0,0,0,218,15,95,99,111,109,112,105,108, + 101,95,115,111,117,114,99,101,159,2,0,0,115,6,0,0, + 0,8,1,16,1,255,128,114,163,0,0,0,99,2,0,0, + 0,0,0,0,0,0,0,0,0,2,0,0,0,11,0,0, + 0,67,0,0,0,115,68,0,0,0,116,0,160,1,124,0, + 100,1,63,0,100,2,23,0,124,0,100,3,63,0,100,4, + 64,0,124,0,100,5,64,0,124,1,100,6,63,0,124,1, + 100,3,63,0,100,7,64,0,124,1,100,5,64,0,100,8, + 20,0,100,9,100,9,100,9,102,9,161,1,83,0,41,10, + 78,233,9,0,0,0,105,188,7,0,0,233,5,0,0,0, + 233,15,0,0,0,233,31,0,0,0,233,11,0,0,0,233, + 63,0,0,0,114,88,0,0,0,114,14,0,0,0,41,2, + 114,133,0,0,0,90,6,109,107,116,105,109,101,41,2,218, + 1,100,114,140,0,0,0,114,9,0,0,0,114,9,0,0, + 0,114,10,0,0,0,218,14,95,112,97,114,115,101,95,100, + 111,115,116,105,109,101,165,2,0,0,115,20,0,0,0,4, + 1,10,1,10,1,6,1,6,1,10,1,10,1,6,1,6, + 249,255,128,114,171,0,0,0,99,2,0,0,0,0,0,0, + 0,0,0,0,0,6,0,0,0,10,0,0,0,67,0,0, + 0,115,110,0,0,0,122,82,124,1,100,1,100,0,133,2, + 25,0,100,2,118,0,115,22,74,0,130,1,124,1,100,0, + 100,1,133,2,25,0,125,1,124,0,106,0,124,1,25,0, + 125,2,124,2,100,3,25,0,125,3,124,2,100,4,25,0, + 125,4,124,2,100,5,25,0,125,5,116,1,124,4,124,3, + 131,2,124,5,102,2,87,0,83,0,4,0,116,2,116,3, + 116,4,102,3,121,108,1,0,1,0,1,0,89,0,100,6, + 83,0,119,0,41,7,78,114,14,0,0,0,169,2,218,1, + 99,218,1,111,114,165,0,0,0,233,6,0,0,0,233,3, + 0,0,0,41,2,114,0,0,0,0,114,0,0,0,0,41, + 5,114,28,0,0,0,114,171,0,0,0,114,26,0,0,0, + 218,10,73,110,100,101,120,69,114,114,111,114,114,156,0,0, + 0,41,6,114,32,0,0,0,114,13,0,0,0,114,58,0, + 0,0,114,133,0,0,0,114,134,0,0,0,90,17,117,110, + 99,111,109,112,114,101,115,115,101,100,95,115,105,122,101,114, + 9,0,0,0,114,9,0,0,0,114,10,0,0,0,114,153, + 0,0,0,178,2,0,0,115,24,0,0,0,2,1,20,2, + 12,1,10,1,8,3,8,1,8,1,16,1,18,1,6,1, + 2,255,255,128,114,153,0,0,0,99,2,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,0,8,0,0,0,67,0, + 0,0,115,80,0,0,0,124,1,100,1,100,0,133,2,25, + 0,100,2,118,0,115,20,74,0,130,1,124,1,100,0,100, + 1,133,2,25,0,125,1,122,14,124,0,106,0,124,1,25, + 0,125,2,87,0,110,18,4,0,116,1,121,78,1,0,1, + 0,1,0,89,0,100,0,83,0,116,2,124,0,106,3,124, + 2,131,2,83,0,119,0,41,3,78,114,14,0,0,0,114, + 172,0,0,0,41,4,114,28,0,0,0,114,26,0,0,0, + 114,56,0,0,0,114,29,0,0,0,41,3,114,32,0,0, + 0,114,13,0,0,0,114,58,0,0,0,114,9,0,0,0, + 114,9,0,0,0,114,10,0,0,0,114,151,0,0,0,197, + 2,0,0,115,18,0,0,0,20,2,12,1,2,2,14,1, + 12,1,6,1,12,2,2,253,255,128,114,151,0,0,0,99, + 2,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0, + 11,0,0,0,67,0,0,0,115,18,1,0,0,116,0,124, + 0,124,1,131,2,125,2,100,0,125,3,116,1,68,0,93, + 204,92,3,125,4,125,5,125,6,124,2,124,4,23,0,125, + 7,116,2,106,3,100,1,124,0,106,4,116,5,124,7,100, + 2,100,3,141,5,1,0,122,14,124,0,106,6,124,7,25, + 0,125,8,87,0,110,18,4,0,116,7,144,1,121,16,1, + 0,1,0,1,0,89,0,113,18,124,8,100,4,25,0,125, + 9,116,8,124,0,106,4,124,8,131,2,125,10,100,0,125, + 11,124,5,114,182,122,20,116,9,124,0,124,9,124,7,124, + 1,124,10,131,5,125,11,87,0,110,50,4,0,116,10,144, + 1,121,14,1,0,125,12,1,0,122,16,124,12,125,3,87, + 0,89,0,100,0,125,12,126,12,110,18,100,0,125,12,126, + 12,119,1,116,11,124,9,124,10,131,2,125,11,124,11,100, + 0,117,0,114,202,113,18,124,8,100,4,25,0,125,9,124, + 11,124,6,124,9,102,3,2,0,1,0,83,0,124,3,114, + 252,100,5,124,3,155,0,157,2,125,13,116,12,124,13,124, + 1,100,6,141,2,124,3,130,2,116,12,100,7,124,1,155, + 2,157,2,124,1,100,6,141,2,130,1,119,0,119,0,41, + 8,78,122,13,116,114,121,105,110,103,32,123,125,123,125,123, + 125,114,88,0,0,0,41,1,90,9,118,101,114,98,111,115, + 105,116,121,114,0,0,0,0,122,20,109,111,100,117,108,101, + 32,108,111,97,100,32,102,97,105,108,101,100,58,32,114,62, + 0,0,0,114,61,0,0,0,41,13,114,36,0,0,0,114, + 91,0,0,0,114,45,0,0,0,114,80,0,0,0,114,29, + 0,0,0,114,20,0,0,0,114,28,0,0,0,114,26,0, + 0,0,114,56,0,0,0,114,157,0,0,0,114,79,0,0, + 0,114,163,0,0,0,114,3,0,0,0,41,14,114,32,0, + 0,0,114,38,0,0,0,114,13,0,0,0,90,12,105,109, + 112,111,114,116,95,101,114,114,111,114,114,92,0,0,0,114, + 93,0,0,0,114,51,0,0,0,114,66,0,0,0,114,58, + 0,0,0,114,40,0,0,0,114,128,0,0,0,114,50,0, + 0,0,90,3,101,120,99,114,81,0,0,0,114,9,0,0, + 0,114,9,0,0,0,114,10,0,0,0,114,48,0,0,0, + 212,2,0,0,115,60,0,0,0,10,1,4,1,14,1,8, + 1,22,1,2,1,14,1,14,1,4,1,8,2,12,1,4, + 1,4,1,2,1,20,1,16,1,16,1,8,128,10,2,8, + 1,2,3,8,1,14,1,4,2,10,1,14,1,18,2,2, + 241,2,247,255,128,114,48,0,0,0,41,46,114,86,0,0, + 0,90,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,21,0, + 0,0,114,1,0,0,0,114,2,0,0,0,90,17,95,102, + 114,111,122,101,110,95,105,109,112,111,114,116,108,105,98,114, + 45,0,0,0,114,150,0,0,0,114,112,0,0,0,114,154, + 0,0,0,114,71,0,0,0,114,133,0,0,0,114,69,0, + 0,0,90,7,95,95,97,108,108,95,95,114,20,0,0,0, + 90,15,112,97,116,104,95,115,101,112,97,114,97,116,111,114, + 115,114,18,0,0,0,114,79,0,0,0,114,3,0,0,0, + 114,25,0,0,0,218,4,116,121,112,101,114,74,0,0,0, + 114,115,0,0,0,114,117,0,0,0,114,119,0,0,0,90, + 13,95,76,111,97,100,101,114,66,97,115,105,99,115,114,4, + 0,0,0,114,91,0,0,0,114,36,0,0,0,114,37,0, + 0,0,114,35,0,0,0,114,27,0,0,0,114,124,0,0, + 0,114,144,0,0,0,114,146,0,0,0,114,56,0,0,0, + 114,149,0,0,0,114,157,0,0,0,218,8,95,95,99,111, + 100,101,95,95,114,155,0,0,0,114,161,0,0,0,114,163, + 0,0,0,114,171,0,0,0,114,153,0,0,0,114,151,0, + 0,0,114,48,0,0,0,114,9,0,0,0,114,9,0,0, + 0,114,9,0,0,0,114,10,0,0,0,218,8,60,109,111, + 100,117,108,101,62,1,0,0,0,115,92,0,0,0,4,0, + 8,16,16,1,8,1,8,1,8,1,8,1,8,1,8,1, + 8,1,8,2,6,3,14,1,16,3,4,4,8,2,4,2, + 4,1,4,1,18,2,0,127,0,127,12,34,12,1,2,1, + 2,1,4,252,8,9,8,4,8,9,8,31,2,126,2,254, + 4,29,8,5,8,21,8,46,8,8,10,40,8,5,8,7, + 8,6,8,13,8,19,12,15,255,128, }; diff --git a/Python/initconfig.c b/Python/initconfig.c index 4d95ac5d885..62087fb4208 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -38,7 +38,8 @@ Options and arguments (and corresponding environment variables):\n\ and comparing bytes/bytearray with str. (-bb: issue errors)\n\ -B : don't write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x\n\ -c cmd : program passed in as string (terminates option list)\n\ --d : debug output from parser; also PYTHONDEBUG=x\n\ +-d : turn on parser debugging output (for experts only, only works on\n\ + debug builds); also PYTHONDEBUG=x\n\ -E : ignore PYTHON* environment variables (such as PYTHONPATH)\n\ -h : print this help message and exit (also --help)\n\ "; diff --git a/Python/marshal.c b/Python/marshal.c index d292987ce05..fa4ec9eb605 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -638,7 +638,7 @@ r_string(Py_ssize_t n, RFILE *p) return res; } if (p->buf == NULL) { - p->buf = PyMem_MALLOC(n); + p->buf = PyMem_Malloc(n); if (p->buf == NULL) { PyErr_NoMemory(); return NULL; @@ -646,7 +646,7 @@ r_string(Py_ssize_t n, RFILE *p) p->buf_size = n; } else if (p->buf_size < n) { - char *tmp = PyMem_REALLOC(p->buf, n); + char *tmp = PyMem_Realloc(p->buf, n); if (tmp == NULL) { PyErr_NoMemory(); return NULL; @@ -1453,7 +1453,7 @@ PyMarshal_ReadShortFromFile(FILE *fp) rf.buf = NULL; res = r_short(&rf); if (rf.buf != NULL) - PyMem_FREE(rf.buf); + PyMem_Free(rf.buf); return res; } @@ -1468,7 +1468,7 @@ PyMarshal_ReadLongFromFile(FILE *fp) rf.buf = NULL; res = r_long(&rf); if (rf.buf != NULL) - PyMem_FREE(rf.buf); + PyMem_Free(rf.buf); return res; } @@ -1501,11 +1501,11 @@ PyMarshal_ReadLastObjectFromFile(FILE *fp) off_t filesize; filesize = getfilesize(fp); if (filesize > 0 && filesize <= REASONABLE_FILE_LIMIT) { - char* pBuf = (char *)PyMem_MALLOC(filesize); + char* pBuf = (char *)PyMem_Malloc(filesize); if (pBuf != NULL) { size_t n = fread(pBuf, 1, (size_t)filesize, fp); PyObject* v = PyMarshal_ReadObjectFromString(pBuf, n); - PyMem_FREE(pBuf); + PyMem_Free(pBuf); return v; } @@ -1534,7 +1534,7 @@ PyMarshal_ReadObjectFromFile(FILE *fp) result = r_object(&rf); Py_DECREF(rf.refs); if (rf.buf != NULL) - PyMem_FREE(rf.buf); + PyMem_Free(rf.buf); return result; } @@ -1555,7 +1555,7 @@ PyMarshal_ReadObjectFromString(const char *str, Py_ssize_t len) result = r_object(&rf); Py_DECREF(rf.refs); if (rf.buf != NULL) - PyMem_FREE(rf.buf); + PyMem_Free(rf.buf); return result; } @@ -1684,7 +1684,7 @@ marshal_load(PyObject *module, PyObject *file) result = read_object(&rf); Py_DECREF(rf.refs); if (rf.buf != NULL) - PyMem_FREE(rf.buf); + PyMem_Free(rf.buf); } else result = NULL; } diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h index 538fdbe3e0b..8495871e213 100644 --- a/Python/opcode_targets.h +++ b/Python/opcode_targets.h @@ -47,7 +47,7 @@ static void *opcode_targets[256] = { &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, - &&TARGET_RERAISE, + &&_unknown_opcode, &&TARGET_WITH_EXCEPT_START, &&TARGET_GET_AITER, &&TARGET_GET_ANEXT, @@ -118,7 +118,7 @@ static void *opcode_targets[256] = { &&TARGET_LOAD_GLOBAL, &&TARGET_IS_OP, &&TARGET_CONTAINS_OP, - &&_unknown_opcode, + &&TARGET_RERAISE, &&_unknown_opcode, &&TARGET_JUMP_IF_NOT_EXC_MATCH, &&TARGET_SETUP_FINALLY, diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 428c887ef41..9828dffad5c 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -55,7 +55,6 @@ static PyStatus add_main_module(PyInterpreterState *interp); static PyStatus init_import_site(void); static PyStatus init_set_builtins_open(void); static PyStatus init_sys_streams(PyThreadState *tstate); -static void call_py_exitfuncs(PyThreadState *tstate); static void wait_for_thread_shutdown(PyThreadState *tstate); static void call_ll_exitfuncs(_PyRuntimeState *runtime); @@ -97,14 +96,6 @@ _Py_IsFinalizing(void) 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"); -} - /* APIs to access the initialization flags * @@ -698,6 +689,12 @@ pycore_init_types(PyThreadState *tstate) if (_PyWarnings_InitState(tstate) < 0) { return _PyStatus_ERR("can't initialize warnings"); } + + status = _PyAtExit_Init(tstate); + if (_PyStatus_EXCEPTION(status)) { + return status; + } + return _PyStatus_OK(); } @@ -1576,6 +1573,9 @@ finalize_interp_types(PyThreadState *tstate) _PyFrame_Fini(tstate); _PyAsyncGen_Fini(tstate); _PyContext_Fini(tstate); + _PyType_Fini(tstate); + // Call _PyUnicode_ClearInterned() before _PyDict_Fini() since it uses + // a dict internally. _PyUnicode_ClearInterned(tstate); _PyDict_Fini(tstate); @@ -1663,7 +1663,7 @@ Py_FinalizeEx(void) * the threads created via Threading. */ - call_py_exitfuncs(tstate); + _PyAtExit_Call(tstate); /* Copy the core config, PyInterpreterState_Delete() free the core config memory */ @@ -1752,9 +1752,6 @@ Py_FinalizeEx(void) /* Destroy the database used by _PyImport_{Fixup,Find}Extension */ _PyImport_Fini(); - /* Cleanup typeobject.c's internal caches. */ - _PyType_Fini(); - /* unload faulthandler module */ _PyFaulthandler_Fini(); @@ -1954,7 +1951,7 @@ Py_EndInterpreter(PyThreadState *tstate) // Wrap up existing "threading"-module-created, non-daemon threads. wait_for_thread_shutdown(tstate); - call_py_exitfuncs(tstate); + _PyAtExit_Call(tstate); if (tstate != interp->tstate_head || tstate->next != NULL) { Py_FatalError("not the last thread"); @@ -2640,30 +2637,6 @@ Py_ExitStatusException(PyStatus status) } } -/* Clean up and exit */ - -/* For the atexit module. */ -void _Py_PyAtExit(void (*func)(PyObject *), PyObject *module) -{ - PyInterpreterState *is = _PyInterpreterState_GET(); - - /* Guard against API misuse (see bpo-17852) */ - assert(is->pyexitfunc == NULL || is->pyexitfunc == func); - - is->pyexitfunc = func; - is->pyexitmodule = module; -} - -static void -call_py_exitfuncs(PyThreadState *tstate) -{ - PyInterpreterState *interp = tstate->interp; - if (interp->pyexitfunc == NULL) - return; - - (*interp->pyexitfunc)(interp->pyexitmodule); - _PyErr_Clear(tstate); -} /* Wait until threading._shutdown completes, provided the threading module was imported in the first place. @@ -2747,6 +2720,21 @@ Py_FdIsInteractive(FILE *fp, const char *filename) } +int +_Py_FdIsInteractive(FILE *fp, PyObject *filename) +{ + if (isatty((int)fileno(fp))) { + return 1; + } + if (!Py_InteractiveFlag) { + return 0; + } + return (filename == NULL) || + (PyUnicode_CompareWithASCIIString(filename, "") == 0) || + (PyUnicode_CompareWithASCIIString(filename, "???") == 0); +} + + /* Wrappers around sigaction() or signal(). */ PyOS_sighandler_t diff --git a/Python/pystate.c b/Python/pystate.c index 600cc5e03a1..c791b239993 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -4,6 +4,7 @@ #include "Python.h" #include "pycore_ceval.h" #include "pycore_initconfig.h" +#include "pycore_object.h" // _PyType_InitCache() #include "pycore_pyerrors.h" #include "pycore_pylifecycle.h" #include "pycore_pymem.h" // _PyMem_SetDefaultAllocator() @@ -73,18 +74,24 @@ _PyRuntimeState_Init_impl(_PyRuntimeState *runtime) runtime->interpreters.mutex = PyThread_allocate_lock(); if (runtime->interpreters.mutex == NULL) { - return _PyStatus_ERR("Can't initialize threads for interpreter"); + return _PyStatus_NO_MEMORY(); } runtime->interpreters.next_id = -1; runtime->xidregistry.mutex = PyThread_allocate_lock(); if (runtime->xidregistry.mutex == NULL) { - return _PyStatus_ERR("Can't initialize threads for cross-interpreter data registry"); + return _PyStatus_NO_MEMORY(); } // Set it to the ID of the main thread of the main interpreter. runtime->main_thread = PyThread_get_thread_ident(); + runtime->unicode_ids.lock = PyThread_allocate_lock(); + if (runtime->unicode_ids.lock == NULL) { + return _PyStatus_NO_MEMORY(); + } + runtime->unicode_ids.next_index = 0; + return _PyStatus_OK(); } @@ -108,17 +115,17 @@ _PyRuntimeState_Fini(_PyRuntimeState *runtime) /* Force the allocator used by _PyRuntimeState_Init(). */ PyMemAllocatorEx old_alloc; _PyMem_SetDefaultAllocator(PYMEM_DOMAIN_RAW, &old_alloc); - - if (runtime->interpreters.mutex != NULL) { - PyThread_free_lock(runtime->interpreters.mutex); - runtime->interpreters.mutex = NULL; +#define FREE_LOCK(LOCK) \ + if (LOCK != NULL) { \ + PyThread_free_lock(LOCK); \ + LOCK = NULL; \ } - if (runtime->xidregistry.mutex != NULL) { - PyThread_free_lock(runtime->xidregistry.mutex); - runtime->xidregistry.mutex = NULL; - } + FREE_LOCK(runtime->interpreters.mutex); + FREE_LOCK(runtime->xidregistry.mutex); + FREE_LOCK(runtime->unicode_ids.lock); +#undef FREE_LOCK PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc); } @@ -139,12 +146,14 @@ _PyRuntimeState_ReInitThreads(_PyRuntimeState *runtime) int reinit_interp = _PyThread_at_fork_reinit(&runtime->interpreters.mutex); int reinit_main_id = _PyThread_at_fork_reinit(&runtime->interpreters.main->id_mutex); int reinit_xidregistry = _PyThread_at_fork_reinit(&runtime->xidregistry.mutex); + int reinit_unicode_ids = _PyThread_at_fork_reinit(&runtime->unicode_ids.lock); PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc); if (reinit_interp < 0 || reinit_main_id < 0 - || reinit_xidregistry < 0) + || reinit_xidregistry < 0 + || reinit_unicode_ids < 0) { return _PyStatus_ERR("Failed to reinitialize runtime locks"); @@ -215,6 +224,7 @@ PyInterpreterState_New(void) _PyGC_InitState(&interp->gc); PyConfig_InitPythonConfig(&interp->config); + _PyType_InitCache(interp); interp->eval_frame = _PyEval_EvalFrameDefault; #ifdef HAVE_DLOPEN @@ -303,6 +313,7 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate) _PyAST_Fini(interp); _PyWarnings_Fini(interp); + _PyAtExit_Fini(interp); // All Python types must be destroyed before the last GC collection. Python // types create a reference cycle to themselves in their in their @@ -605,7 +616,7 @@ new_threadstate(PyInterpreterState *interp, int init) tstate->frame = NULL; tstate->recursion_depth = 0; - tstate->overflowed = 0; + tstate->recursion_headroom = 0; tstate->stackcheck_counter = 0; tstate->tracing = 0; tstate->use_tracing = 0; diff --git a/Python/pystrtod.c b/Python/pystrtod.c index 1c8202c7761..9145d4eba12 100644 --- a/Python/pystrtod.c +++ b/Python/pystrtod.c @@ -255,7 +255,7 @@ _PyOS_ascii_strtod(const char *nptr, char **endptr) char *copy, *c; /* Create a copy of the input, with the '.' converted to the locale-specific decimal point */ - copy = (char *)PyMem_MALLOC(end - digits_pos + + copy = (char *)PyMem_Malloc(end - digits_pos + 1 + decimal_point_len); if (copy == NULL) { *endptr = (char *)nptr; @@ -286,7 +286,7 @@ _PyOS_ascii_strtod(const char *nptr, char **endptr) (fail_pos - copy); } - PyMem_FREE(copy); + PyMem_Free(copy); } else { diff --git a/Python/pythonrun.c b/Python/pythonrun.c index bd49c40e978..dacf1a64710 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -59,48 +59,77 @@ extern "C" { static void flush_io(void); static PyObject *run_mod(mod_ty, PyObject *, PyObject *, PyObject *, PyCompilerFlags *, PyArena *); -static PyObject *run_pyc_file(FILE *, const char *, PyObject *, PyObject *, +static PyObject *run_pyc_file(FILE *, PyObject *, PyObject *, PyCompilerFlags *); static int PyRun_InteractiveOneObjectEx(FILE *, PyObject *, PyCompilerFlags *); +static PyObject* pyrun_file(FILE *fp, PyObject *filename, int start, + PyObject *globals, PyObject *locals, int closeit, + PyCompilerFlags *flags); + + +int +_PyRun_AnyFileObject(FILE *fp, PyObject *filename, int closeit, + PyCompilerFlags *flags) +{ + int decref_filename = 0; + if (filename == NULL) { + filename = PyUnicode_FromString("???"); + if (filename == NULL) { + PyErr_Print(); + return -1; + } + decref_filename = 1; + } + + int res; + if (_Py_FdIsInteractive(fp, filename)) { + res = _PyRun_InteractiveLoopObject(fp, filename, flags); + if (closeit) { + fclose(fp); + } + } + else { + res = _PyRun_SimpleFileObject(fp, filename, closeit, flags); + } + + if (decref_filename) { + Py_DECREF(filename); + } + return res; +} + /* Parse input from a file and execute it */ int PyRun_AnyFileExFlags(FILE *fp, const char *filename, int closeit, PyCompilerFlags *flags) { - if (filename == NULL) - filename = "???"; - if (Py_FdIsInteractive(fp, filename)) { - int err = PyRun_InteractiveLoopFlags(fp, filename, flags); - if (closeit) - fclose(fp); - return err; + PyObject *filename_obj; + if (filename != NULL) { + filename_obj = PyUnicode_DecodeFSDefault(filename); + if (filename_obj == NULL) { + PyErr_Print(); + return -1; + } } - else - return PyRun_SimpleFileExFlags(fp, filename, closeit, flags); + else { + filename_obj = NULL; + } + int res = _PyRun_AnyFileObject(fp, filename_obj, closeit, flags); + Py_XDECREF(filename_obj); + return res; } + int -PyRun_InteractiveLoopFlags(FILE *fp, const char *filename_str, PyCompilerFlags *flags) +_PyRun_InteractiveLoopObject(FILE *fp, PyObject *filename, PyCompilerFlags *flags) { - PyObject *filename, *v; - int ret, err; PyCompilerFlags local_flags = _PyCompilerFlags_INIT; - int nomem_count = 0; -#ifdef Py_REF_DEBUG - int show_ref_count = _Py_GetConfig()->show_ref_count; -#endif - - filename = PyUnicode_DecodeFSDefault(filename_str); - if (filename == NULL) { - PyErr_Print(); - return -1; - } - if (flags == NULL) { flags = &local_flags; } - v = _PySys_GetObjectId(&PyId_ps1); + + PyObject *v = _PySys_GetObjectId(&PyId_ps1); if (v == NULL) { _PySys_SetObjectId(&PyId_ps1, v = PyUnicode_FromString(">>> ")); Py_XDECREF(v); @@ -110,7 +139,13 @@ PyRun_InteractiveLoopFlags(FILE *fp, const char *filename_str, PyCompilerFlags * _PySys_SetObjectId(&PyId_ps2, v = PyUnicode_FromString("... ")); Py_XDECREF(v); } - err = 0; + +#ifdef Py_REF_DEBUG + int show_ref_count = _Py_GetConfig()->show_ref_count; +#endif + int err = 0; + int ret; + int nomem_count = 0; do { ret = PyRun_InteractiveOneObjectEx(fp, filename, flags); if (ret == -1 && PyErr_Occurred()) { @@ -137,10 +172,26 @@ PyRun_InteractiveLoopFlags(FILE *fp, const char *filename_str, PyCompilerFlags * } #endif } while (ret != E_EOF); - Py_DECREF(filename); return err; } + +int +PyRun_InteractiveLoopFlags(FILE *fp, const char *filename, PyCompilerFlags *flags) +{ + PyObject *filename_obj = PyUnicode_DecodeFSDefault(filename); + if (filename_obj == NULL) { + PyErr_Print(); + return -1; + } + + int err = _PyRun_InteractiveLoopObject(fp, filename_obj, flags); + Py_DECREF(filename_obj); + return err; + +} + + /* A PyRun_InteractiveOneObject() auxiliary function that does not print the * error on failure. */ static int @@ -269,82 +320,89 @@ PyRun_InteractiveOneFlags(FILE *fp, const char *filename_str, PyCompilerFlags *f the file type, and, if we may close it, at the first few bytes. */ static int -maybe_pyc_file(FILE *fp, const char* filename, const char* ext, int closeit) +maybe_pyc_file(FILE *fp, PyObject *filename, int closeit) { - if (strcmp(ext, ".pyc") == 0) + PyObject *ext = PyUnicode_FromString(".pyc"); + if (ext == NULL) { + return -1; + } + Py_ssize_t endswith = PyUnicode_Tailmatch(filename, ext, 0, PY_SSIZE_T_MAX, +1); + Py_DECREF(ext); + if (endswith) { return 1; + } /* Only look into the file if we are allowed to close it, since it then should also be seekable. */ - if (closeit) { - /* Read only two bytes of the magic. If the file was opened in - text mode, the bytes 3 and 4 of the magic (\r\n) might not - be read as they are on disk. */ - unsigned int halfmagic = PyImport_GetMagicNumber() & 0xFFFF; - unsigned char buf[2]; - /* Mess: In case of -x, the stream is NOT at its start now, - and ungetc() was used to push back the first newline, - which makes the current stream position formally undefined, - and a x-platform nightmare. - Unfortunately, we have no direct way to know whether -x - was specified. So we use a terrible hack: if the current - stream position is not 0, we assume -x was specified, and - give up. Bug 132850 on SourceForge spells out the - hopelessness of trying anything else (fseek and ftell - don't work predictably x-platform for text-mode files). - */ - int ispyc = 0; - if (ftell(fp) == 0) { - if (fread(buf, 1, 2, fp) == 2 && - ((unsigned int)buf[1]<<8 | buf[0]) == halfmagic) - ispyc = 1; - rewind(fp); - } - return ispyc; + if (!closeit) { + return 0; } - return 0; + + /* Read only two bytes of the magic. If the file was opened in + text mode, the bytes 3 and 4 of the magic (\r\n) might not + be read as they are on disk. */ + unsigned int halfmagic = PyImport_GetMagicNumber() & 0xFFFF; + unsigned char buf[2]; + /* Mess: In case of -x, the stream is NOT at its start now, + and ungetc() was used to push back the first newline, + which makes the current stream position formally undefined, + and a x-platform nightmare. + Unfortunately, we have no direct way to know whether -x + was specified. So we use a terrible hack: if the current + stream position is not 0, we assume -x was specified, and + give up. Bug 132850 on SourceForge spells out the + hopelessness of trying anything else (fseek and ftell + don't work predictably x-platform for text-mode files). + */ + int ispyc = 0; + if (ftell(fp) == 0) { + if (fread(buf, 1, 2, fp) == 2 && + ((unsigned int)buf[1]<<8 | buf[0]) == halfmagic) + ispyc = 1; + rewind(fp); + } + return ispyc; } -static int -set_main_loader(PyObject *d, const char *filename, const char *loader_name) -{ - PyObject *filename_obj, *bootstrap, *loader_type = NULL, *loader; - int result = 0; - filename_obj = PyUnicode_DecodeFSDefault(filename); - if (filename_obj == NULL) - return -1; +static int +set_main_loader(PyObject *d, PyObject *filename, const char *loader_name) +{ PyInterpreterState *interp = _PyInterpreterState_GET(); - 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); + PyObject *bootstrap = PyObject_GetAttrString(interp->importlib, + "_bootstrap_external"); + if (bootstrap == NULL) { return -1; } - loader = PyObject_CallFunction(loader_type, "sN", "__main__", filename_obj); + + PyObject *loader_type = PyObject_GetAttrString(bootstrap, loader_name); + Py_DECREF(bootstrap); + if (loader_type == NULL) { + return -1; + } + + PyObject *loader = PyObject_CallFunction(loader_type, + "sO", "__main__", filename); Py_DECREF(loader_type); if (loader == NULL) { return -1; } + if (PyDict_SetItemString(d, "__loader__", loader) < 0) { - result = -1; + Py_DECREF(loader); + return -1; } Py_DECREF(loader); - return result; + return 0; } + int -PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit, +_PyRun_SimpleFileObject(FILE *fp, PyObject *filename, int closeit, PyCompilerFlags *flags) { PyObject *m, *d, *v; - const char *ext; int set_file_name = 0, ret = -1; - size_t len; m = PyImport_AddModule("__main__"); if (m == NULL) @@ -355,29 +413,29 @@ PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit, if (PyErr_Occurred()) { goto done; } - PyObject *f; - f = PyUnicode_DecodeFSDefault(filename); - if (f == NULL) - goto done; - if (PyDict_SetItemString(d, "__file__", f) < 0) { - Py_DECREF(f); + if (PyDict_SetItemString(d, "__file__", filename) < 0) { goto done; } if (PyDict_SetItemString(d, "__cached__", Py_None) < 0) { - Py_DECREF(f); goto done; } set_file_name = 1; - Py_DECREF(f); } - len = strlen(filename); - ext = filename + len - (len > 4 ? 4 : 0); - if (maybe_pyc_file(fp, filename, ext, closeit)) { + + int pyc = maybe_pyc_file(fp, filename, closeit); + if (pyc < 0) { + goto done; + } + + if (pyc) { FILE *pyc_fp; /* Try to run a pyc file. First, re-open in binary */ - if (closeit) + if (closeit) { fclose(fp); - if ((pyc_fp = _Py_fopen(filename, "rb")) == NULL) { + } + + pyc_fp = _Py_fopen_obj(filename, "rb"); + if (pyc_fp == NULL) { fprintf(stderr, "python: Can't reopen .pyc file\n"); goto done; } @@ -388,17 +446,17 @@ PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit, fclose(pyc_fp); goto done; } - v = run_pyc_file(pyc_fp, filename, d, d, flags); + v = run_pyc_file(pyc_fp, d, d, flags); } else { /* When running from stdin, leave __main__.__loader__ alone */ - if (strcmp(filename, "") != 0 && + if (PyUnicode_CompareWithASCIIString(filename, "") != 0 && set_main_loader(d, filename, "SourceFileLoader") < 0) { fprintf(stderr, "python: failed to set __main__.__loader__\n"); ret = -1; goto done; } - v = PyRun_FileExFlags(fp, filename, Py_file_input, d, d, - closeit, flags); + v = pyrun_file(fp, filename, Py_file_input, d, d, + closeit, flags); } flush_io(); if (v == NULL) { @@ -421,6 +479,21 @@ PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit, return ret; } + +int +PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit, + PyCompilerFlags *flags) +{ + PyObject *filename_obj = PyUnicode_DecodeFSDefault(filename); + if (filename_obj == NULL) { + return -1; + } + int res = _PyRun_SimpleFileObject(fp, filename_obj, closeit, flags); + Py_DECREF(filename_obj); + return res; +} + + int PyRun_SimpleStringFlags(const char *command, PyCompilerFlags *flags) { @@ -1039,40 +1112,54 @@ PyRun_StringFlags(const char *str, int start, PyObject *globals, return ret; } -PyObject * -PyRun_FileExFlags(FILE *fp, const char *filename_str, int start, PyObject *globals, - PyObject *locals, int closeit, PyCompilerFlags *flags) + +static PyObject * +pyrun_file(FILE *fp, PyObject *filename, int start, PyObject *globals, + PyObject *locals, int closeit, PyCompilerFlags *flags) { - PyObject *ret = NULL; + PyArena *arena = PyArena_New(); + if (arena == NULL) { + return NULL; + } + mod_ty mod; - PyArena *arena = NULL; - PyObject *filename; - - filename = PyUnicode_DecodeFSDefault(filename_str); - if (filename == NULL) - goto exit; - - arena = PyArena_New(); - if (arena == NULL) - goto exit; - mod = PyParser_ASTFromFileObject(fp, filename, NULL, start, NULL, NULL, flags, NULL, arena); - if (closeit) + if (closeit) { fclose(fp); - if (mod == NULL) { - goto exit; } - ret = run_mod(mod, filename, globals, locals, flags, arena); -exit: - Py_XDECREF(filename); - if (arena != NULL) - PyArena_Free(arena); + PyObject *ret; + if (mod != NULL) { + ret = run_mod(mod, filename, globals, locals, flags, arena); + } + else { + ret = NULL; + } + PyArena_Free(arena); + return ret; } + +PyObject * +PyRun_FileExFlags(FILE *fp, const char *filename, int start, PyObject *globals, + PyObject *locals, int closeit, PyCompilerFlags *flags) +{ + PyObject *filename_obj = PyUnicode_DecodeFSDefault(filename); + if (filename_obj == NULL) { + return NULL; + } + + PyObject *res = pyrun_file(fp, filename_obj, start, globals, + locals, closeit, flags); + Py_DECREF(filename_obj); + return res; + +} + + static void flush_io(void) { @@ -1155,8 +1242,8 @@ run_mod(mod_ty mod, PyObject *filename, PyObject *globals, PyObject *locals, } static PyObject * -run_pyc_file(FILE *fp, const char *filename, PyObject *globals, - PyObject *locals, PyCompilerFlags *flags) +run_pyc_file(FILE *fp, PyObject *globals, PyObject *locals, + PyCompilerFlags *flags) { PyThreadState *tstate = _PyThreadState_GET(); PyCodeObject *co; @@ -1235,14 +1322,6 @@ Py_CompileStringExFlags(const char *str, const char *filename_str, int start, return co; } -/* For use in Py_LIMITED_API */ -#undef Py_CompileString -PyObject * -PyCompileString(const char *str, const char *filename, int start) -{ - return Py_CompileStringFlags(str, filename, start, NULL); -} - const char * _Py_SourceAsString(PyObject *cmd, const char *funcname, const char *what, PyCompilerFlags *cf, PyObject **cmd_copy) { @@ -1371,6 +1450,109 @@ PyOS_CheckStack(void) #endif /* USE_STACKCHECK */ +/* Deprecated C API functions still provided for binary compatibility */ + +#undef PyRun_AnyFile +PyAPI_FUNC(int) +PyRun_AnyFile(FILE *fp, const char *name) +{ + return PyRun_AnyFileExFlags(fp, name, 0, NULL); +} + +#undef PyRun_AnyFileEx +PyAPI_FUNC(int) +PyRun_AnyFileEx(FILE *fp, const char *name, int closeit) +{ + return PyRun_AnyFileExFlags(fp, name, closeit, NULL); +} + +#undef PyRun_AnyFileFlags +PyAPI_FUNC(int) +PyRun_AnyFileFlags(FILE *fp, const char *name, PyCompilerFlags *flags) +{ + return PyRun_AnyFileExFlags(fp, name, 0, flags); +} + +#undef PyRun_File +PyAPI_FUNC(PyObject *) +PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l) +{ + return PyRun_FileExFlags(fp, p, s, g, l, 0, NULL); +} + +#undef PyRun_FileEx +PyAPI_FUNC(PyObject *) +PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c) +{ + return PyRun_FileExFlags(fp, p, s, g, l, c, NULL); +} + +#undef PyRun_FileFlags +PyAPI_FUNC(PyObject *) +PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, + PyCompilerFlags *flags) +{ + return PyRun_FileExFlags(fp, p, s, g, l, 0, flags); +} + +#undef PyRun_SimpleFile +PyAPI_FUNC(int) +PyRun_SimpleFile(FILE *f, const char *p) +{ + return PyRun_SimpleFileExFlags(f, p, 0, NULL); +} + +#undef PyRun_SimpleFileEx +PyAPI_FUNC(int) +PyRun_SimpleFileEx(FILE *f, const char *p, int c) +{ + return PyRun_SimpleFileExFlags(f, p, c, NULL); +} + + +#undef PyRun_String +PyAPI_FUNC(PyObject *) +PyRun_String(const char *str, int s, PyObject *g, PyObject *l) +{ + return PyRun_StringFlags(str, s, g, l, NULL); +} + +#undef PyRun_SimpleString +PyAPI_FUNC(int) +PyRun_SimpleString(const char *s) +{ + return PyRun_SimpleStringFlags(s, NULL); +} + +#undef Py_CompileString +PyAPI_FUNC(PyObject *) +Py_CompileString(const char *str, const char *p, int s) +{ + return Py_CompileStringExFlags(str, p, s, NULL, -1); +} + +#undef Py_CompileStringFlags +PyAPI_FUNC(PyObject *) +Py_CompileStringFlags(const char *str, const char *p, int s, + PyCompilerFlags *flags) +{ + return Py_CompileStringExFlags(str, p, s, flags, -1); +} + +#undef PyRun_InteractiveOne +PyAPI_FUNC(int) +PyRun_InteractiveOne(FILE *f, const char *p) +{ + return PyRun_InteractiveOneFlags(f, p, NULL); +} + +#undef PyRun_InteractiveLoop +PyAPI_FUNC(int) +PyRun_InteractiveLoop(FILE *f, const char *p) +{ + return PyRun_InteractiveLoopFlags(f, p, NULL); +} + #ifdef __cplusplus } #endif diff --git a/Python/symtable.c b/Python/symtable.c index 0464cd898b2..cce1b1b5f32 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -128,7 +128,7 @@ ste_dealloc(PySTEntryObject *ste) Py_XDECREF(ste->ste_varnames); Py_XDECREF(ste->ste_children); Py_XDECREF(ste->ste_directives); - PyObject_Del(ste); + PyObject_Free(ste); } #define OFF(x) offsetof(PySTEntryObject, x) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index f05b33a9aac..720532eade2 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1181,7 +1181,6 @@ static PyObject * sys_setrecursionlimit_impl(PyObject *module, int new_limit) /*[clinic end generated code: output=35e1c64754800ace input=b0f7a23393924af3]*/ { - int mark; PyThreadState *tstate = _PyThreadState_GET(); if (new_limit < 1) { @@ -1199,8 +1198,7 @@ sys_setrecursionlimit_impl(PyObject *module, int new_limit) 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); - if (tstate->recursion_depth >= mark) { + if (tstate->recursion_depth >= new_limit) { _PyErr_Format(tstate, PyExc_RecursionError, "cannot set the recursion limit to %i at " "the recursion depth %i: the limit is too low", @@ -1909,12 +1907,12 @@ sys__debugmallocstats_impl(PyObject *module) } #ifdef Py_TRACE_REFS -/* Defined in objects.c because it uses static globals if that file */ +/* Defined in objects.c because it uses static globals in that file */ extern PyObject *_Py_GetObjects(PyObject *, PyObject *); #endif #ifdef DYNAMIC_EXECUTION_PROFILE -/* Defined in ceval.c because it uses static globals if that file */ +/* Defined in ceval.c because it uses static globals in that file */ extern PyObject *_Py_GetDXProfile(PyObject *, PyObject *); #endif diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index e6910b3083a..ec7d737518b 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -62,6 +62,10 @@ # define THREAD_STACK_SIZE 0x800000 # endif #endif +#if defined(__VXWORKS__) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0 +#undef THREAD_STACK_SIZE +#define THREAD_STACK_SIZE 0x100000 +#endif /* for safety, ensure a viable minimum stacksize */ #define THREAD_STACK_MIN 0x8000 /* 32 KiB */ #else /* !_POSIX_THREAD_ATTR_STACKSIZE */ diff --git a/Python/traceback.c b/Python/traceback.c index 99b63af11f8..b82cfd3665c 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -419,12 +419,12 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent) if (lseek(fd, 0, SEEK_SET) == (off_t)-1) { Py_DECREF(io); Py_DECREF(binary); - PyMem_FREE(found_encoding); + PyMem_Free(found_encoding); return 0; } fob = _PyObject_CallMethodId(io, &PyId_TextIOWrapper, "Os", binary, encoding); Py_DECREF(io); - PyMem_FREE(found_encoding); + PyMem_Free(found_encoding); if (fob == NULL) { PyErr_Clear(); @@ -622,7 +622,8 @@ PyTraceBack_Print(PyObject *v, PyObject *f) return err; } -/* Reverse a string. For example, "abcd" becomes "dcba". +/* Format an integer in range [0; 0xffffffff] to decimal and write it + into the file fd. This function is signal safe. */ diff --git a/README.rst b/README.rst index b27854d9178..51d60d5da62 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -This is Python version 3.10.0 alpha 2 +This is Python version 3.10.0 alpha 3 ===================================== .. image:: https://travis-ci.com/python/cpython.svg?branch=master diff --git a/Tools/c-analyzer/c_analyzer/__main__.py b/Tools/c-analyzer/c_analyzer/__main__.py index 44325f2952e..24fc6cd1826 100644 --- a/Tools/c-analyzer/c_analyzer/__main__.py +++ b/Tools/c-analyzer/c_analyzer/__main__.py @@ -263,7 +263,7 @@ FORMATS = { def add_output_cli(parser, *, default='summary'): parser.add_argument('--format', dest='fmt', default=default, choices=tuple(FORMATS)) - def process_args(args): + def process_args(args, *, argv=None): pass return process_args @@ -280,7 +280,7 @@ def _cli_check(parser, checks=None, **kwargs): process_checks = add_checks_cli(parser) elif len(checks) == 1 and type(checks) is not dict and re.match(r'^<.*>$', checks[0]): check = checks[0][1:-1] - def process_checks(args): + def process_checks(args, *, argv=None): args.checks = [check] else: process_checks = add_checks_cli(parser, checks=checks) @@ -428,9 +428,9 @@ def _cli_data(parser, filenames=None, known=None): if known is None: sub.add_argument('--known', required=True) - def process_args(args): + def process_args(args, *, argv): if args.datacmd == 'dump': - process_progress(args) + process_progress(args, argv) return process_args @@ -515,6 +515,7 @@ def parse_args(argv=sys.argv[1:], prog=sys.argv[0], *, subset=None): verbosity, traceback_cm = process_args_by_key( args, + argv, processors[cmd], ['verbosity', 'traceback_cm'], ) diff --git a/Tools/c-analyzer/c_common/scriptutil.py b/Tools/c-analyzer/c_common/scriptutil.py index 50dd7548869..ce69af2b6bd 100644 --- a/Tools/c-analyzer/c_common/scriptutil.py +++ b/Tools/c-analyzer/c_common/scriptutil.py @@ -192,7 +192,7 @@ def add_verbosity_cli(parser): parser.add_argument('-q', '--quiet', action='count', default=0) parser.add_argument('-v', '--verbose', action='count', default=0) - def process_args(args): + def process_args(args, *, argv=None): ns = vars(args) key = 'verbosity' if key in ns: @@ -208,7 +208,7 @@ def add_traceback_cli(parser): parser.add_argument('--no-traceback', '--no-tb', dest='traceback', action='store_const', const=False) - def process_args(args): + def process_args(args, *, argv=None): ns = vars(args) key = 'traceback_cm' if key in ns: @@ -262,7 +262,7 @@ def add_sepval_cli(parser, opt, dest, choices, *, sep=',', **kwargs): #kwargs.setdefault('metavar', opt.upper()) parser.add_argument(opt, dest=dest, action='append', **kwargs) - def process_args(args): + def process_args(args, *, argv=None): ns = vars(args) # XXX Use normalize_selection()? @@ -293,7 +293,7 @@ def add_file_filtering_cli(parser, *, excluded=None): excluded = tuple(excluded or ()) - def process_args(args): + def process_args(args, *, argv=None): ns = vars(args) key = 'iter_filenames' if key in ns: @@ -323,7 +323,7 @@ def add_progress_cli(parser, *, threshold=VERBOSITY, **kwargs): parser.add_argument('--no-progress', dest='track_progress', action='store_false') parser.set_defaults(track_progress=True) - def process_args(args): + def process_args(args, *, argv=None): if args.track_progress: ns = vars(args) verbosity = ns.get('verbosity', VERBOSITY) @@ -339,7 +339,7 @@ def add_failure_filtering_cli(parser, pool, *, default=False): metavar=f'"{{all|{"|".join(sorted(pool))}}},..."') parser.add_argument('--no-fail', dest='fail', action='store_const', const=()) - def process_args(args): + def process_args(args, *, argv=None): ns = vars(args) fail = ns.pop('fail') @@ -371,7 +371,7 @@ def add_failure_filtering_cli(parser, pool, *, default=False): def add_kind_filtering_cli(parser, *, default=None): parser.add_argument('--kinds', action='append') - def process_args(args): + def process_args(args, *, argv=None): ns = vars(args) kinds = [] @@ -486,18 +486,18 @@ def _flatten_processors(processors): yield from _flatten_processors(proc) -def process_args(args, processors, *, keys=None): +def process_args(args, argv, processors, *, keys=None): processors = _flatten_processors(processors) ns = vars(args) extracted = {} if keys is None: for process_args in processors: - for key in process_args(args): + for key in process_args(args, argv=argv): extracted[key] = ns.pop(key) else: remainder = set(keys) for process_args in processors: - hanging = process_args(args) + hanging = process_args(args, argv=argv) if isinstance(hanging, str): hanging = [hanging] for key in hanging or (): @@ -510,8 +510,8 @@ def process_args(args, processors, *, keys=None): return extracted -def process_args_by_key(args, processors, keys): - extracted = process_args(args, processors, keys=keys) +def process_args_by_key(args, argv, processors, keys): + extracted = process_args(args, argv, processors, keys=keys) return [extracted[key] for key in keys] diff --git a/Tools/c-analyzer/c_common/tables.py b/Tools/c-analyzer/c_common/tables.py index 411152e3f94..85b50192571 100644 --- a/Tools/c-analyzer/c_common/tables.py +++ b/Tools/c-analyzer/c_common/tables.py @@ -1,4 +1,6 @@ import csv +import re +import textwrap from . import NOT_SET, strutil, fsutil @@ -212,3 +214,177 @@ def _normalize_table_file_props(header, sep): else: sep = None return header, sep + + +################################## +# stdout tables + +WIDTH = 20 + + +def resolve_columns(specs): + if isinstance(specs, str): + specs = specs.replace(',', ' ').strip().split() + return _resolve_colspecs(specs) + + +def build_table(specs, *, sep=' ', defaultwidth=None): + columns = resolve_columns(specs) + return _build_table(columns, sep=sep, defaultwidth=defaultwidth) + + +_COLSPEC_RE = re.compile(textwrap.dedent(r''' + ^ + (?: + [[] + ( + (?: [^\s\]] [^\]]* )? + [^\s\]] + ) #