diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml index 50dc50a65493402..531ed060fd38661 100644 --- a/.azure-pipelines/ci.yml +++ b/.azure-pipelines/ci.yml @@ -1,18 +1,14 @@ variables: - manylinux: false coverage: false -resources: - containers: - - container: manylinux1 - image: pyca/cryptography-manylinux1:x86_64 +trigger: ['master', '3.9', '3.8', '3.7'] jobs: - job: Prebuild displayName: Pre-build checks pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 steps: - template: ./prebuild-checks.yml @@ -24,7 +20,7 @@ jobs: condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true')) pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 steps: - template: ./docs-steps.yml @@ -56,7 +52,7 @@ jobs: condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true')) pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 variables: testRunTitle: '$(build.sourceBranchName)-linux' @@ -69,37 +65,6 @@ jobs: dependencies: apt -- job: ManyLinux1_CI_Tests - displayName: ManyLinux1 CI Tests - dependsOn: Prebuild - condition: | - and( - and( - succeeded(), - eq(variables['manylinux'], 'true') - ), - eq(dependencies.Prebuild.outputs['tests.run'], 'true') - ) - - pool: - vmImage: ubuntu-16.04 - - container: manylinux1 - - variables: - testRunTitle: '$(build.sourceBranchName)-manylinux1' - testRunPlatform: manylinux1 - openssl_version: '' - - steps: - - template: ./posix-steps.yml - parameters: - dependencies: yum - sudo_dependencies: '' - xvfb: false - patchcheck: false - - - job: Ubuntu_Coverage_CI_Tests displayName: Ubuntu CI Tests (coverage) dependsOn: Prebuild @@ -113,7 +78,7 @@ jobs: ) pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 variables: testRunTitle: '$(Build.SourceBranchName)-linux-coverage' diff --git a/.azure-pipelines/pr.yml b/.azure-pipelines/pr.yml index 228f9db4f8ef233..1ffe0a97a2465f0 100644 --- a/.azure-pipelines/pr.yml +++ b/.azure-pipelines/pr.yml @@ -1,18 +1,14 @@ variables: - manylinux: false coverage: false -resources: - containers: - - container: manylinux1 - image: pyca/cryptography-manylinux1:x86_64 +pr: ['master', '3.9', '3.8', '3.7'] jobs: - job: Prebuild displayName: Pre-build checks pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 steps: - template: ./prebuild-checks.yml @@ -24,7 +20,7 @@ jobs: condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true')) pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 steps: - template: ./docs-steps.yml @@ -56,7 +52,7 @@ jobs: condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true')) pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 variables: testRunTitle: '$(system.pullRequest.TargetBranch)-linux' @@ -69,37 +65,6 @@ jobs: dependencies: apt -- job: ManyLinux1_PR_Tests - displayName: ManyLinux1 PR Tests - dependsOn: Prebuild - condition: | - and( - and( - succeeded(), - eq(variables['manylinux'], 'true') - ), - eq(dependencies.Prebuild.outputs['tests.run'], 'true') - ) - - pool: - vmImage: ubuntu-16.04 - - container: manylinux1 - - variables: - testRunTitle: '$(system.pullRequest.TargetBranch)-manylinux1' - testRunPlatform: manylinux1 - openssl_version: '' - - steps: - - template: ./posix-steps.yml - parameters: - dependencies: yum - sudo_dependencies: '' - xvfb: false - patchcheck: false - - - job: Ubuntu_Coverage_PR_Tests displayName: Ubuntu PR Tests (coverage) dependsOn: Prebuild @@ -113,7 +78,7 @@ jobs: ) pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 variables: testRunTitle: '$(Build.SourceBranchName)-linux-coverage' diff --git a/.azure-pipelines/windows-release/msi-steps.yml b/.azure-pipelines/windows-release/msi-steps.yml index a460eb1bac8fe5d..307510a40dd4e50 100644 --- a/.azure-pipelines/windows-release/msi-steps.yml +++ b/.azure-pipelines/windows-release/msi-steps.yml @@ -1,6 +1,12 @@ steps: - template: ./checkout.yml + - powershell: | + $d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }}; + Write-Host "##vso[task.setvariable variable=SigningDescription]Python $($d.PythonVersion)" + displayName: 'Update signing description' + condition: and(succeeded(), not(variables['SigningDescription'])) + - task: DownloadPipelineArtifact@1 displayName: 'Download artifact: doc' inputs: diff --git a/.azure-pipelines/windows-release/stage-pack-msix.yml b/.azure-pipelines/windows-release/stage-pack-msix.yml index 07e343a0b4e0c78..26a5712e845ca9e 100644 --- a/.azure-pipelines/windows-release/stage-pack-msix.yml +++ b/.azure-pipelines/windows-release/stage-pack-msix.yml @@ -105,9 +105,15 @@ jobs: clean: all steps: - - checkout: none + - template: ./checkout.yml - template: ./find-sdk.yml + - powershell: | + $d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }}; + Write-Host "##vso[task.setvariable variable=SigningDescription]Python $($d.PythonVersion)" + displayName: 'Update signing description' + condition: and(succeeded(), not(variables['SigningDescription'])) + - task: DownloadBuildArtifacts@0 displayName: 'Download Artifact: unsigned_msix' inputs: diff --git a/.azure-pipelines/windows-release/stage-sign.yml b/.azure-pipelines/windows-release/stage-sign.yml index 4d757ae8fca0325..584772af8b428e9 100644 --- a/.azure-pipelines/windows-release/stage-sign.yml +++ b/.azure-pipelines/windows-release/stage-sign.yml @@ -26,6 +26,12 @@ jobs: - template: ./checkout.yml - template: ./find-sdk.yml + - powershell: | + $d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }}; + Write-Host "##vso[task.setvariable variable=SigningDescription]Python $($d.PythonVersion)" + displayName: 'Update signing description' + condition: and(succeeded(), not(variables['SigningDescription'])) + - powershell: | Write-Host "##vso[build.addbuildtag]signed" displayName: 'Add build tags' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5649a6670e75f5c..df68fe271de7a8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,20 @@ jobs: echo '::set-output name=run_tests::true' else git fetch origin $GITHUB_BASE_REF --depth=1 - git diff --name-only origin/$GITHUB_BASE_REF... | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true + # git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more + # reliable than git diff "origin/$GITHUB_BASE_REF.." (2 dots), + # but it requires to download more commits (this job uses + # "git fetch --depth=1"). + # + # git diff "origin/$GITHUB_BASE_REF..." (3 dots) works with Git + # 2.26, but Git 2.28 is stricter and fails with "no merge base". + # + # git diff "origin/$GITHUB_BASE_REF.." (2 dots) should be enough on + # GitHub, since GitHub starts by merging origin/$GITHUB_BASE_REF + # into the PR branch anyway. + # + # https://github.com/python/core-workflow/issues/373 + git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true fi build_win32: name: 'Windows (x86)' diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index 26e872c5a348e35..bdaae44e240a029 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -129,12 +129,12 @@ which disallows mutable objects such as :class:`bytearray`. ``S`` (:class:`bytes`) [PyBytesObject \*] Requires that the Python object is a :class:`bytes` object, without attempting any conversion. Raises :exc:`TypeError` if the object is not - a bytes object. The C variable may also be declared as :c:type:`PyObject\*`. + a bytes object. The C variable may also be declared as :c:type:`PyObject*`. ``Y`` (:class:`bytearray`) [PyByteArrayObject \*] Requires that the Python object is a :class:`bytearray` object, without attempting any conversion. Raises :exc:`TypeError` if the object is not - a :class:`bytearray` object. The C variable may also be declared as :c:type:`PyObject\*`. + a :class:`bytearray` object. The C variable may also be declared as :c:type:`PyObject*`. ``u`` (:class:`str`) [const Py_UNICODE \*] Convert a Python Unicode object to a C pointer to a NUL-terminated buffer of @@ -181,7 +181,7 @@ which disallows mutable objects such as :class:`bytearray`. ``U`` (:class:`str`) [PyObject \*] Requires that the Python object is a Unicode object, without attempting any conversion. Raises :exc:`TypeError` if the object is not a Unicode - object. The C variable may also be declared as :c:type:`PyObject\*`. + object. The C variable may also be declared as :c:type:`PyObject*`. ``w*`` (read-write :term:`bytes-like object`) [Py_buffer] This format accepts any object which implements the read-write buffer @@ -194,10 +194,10 @@ which disallows mutable objects such as :class:`bytearray`. It only works for encoded data without embedded NUL bytes. This format requires two arguments. The first is only used as input, and - must be a :c:type:`const char\*` which points to the name of an encoding as a + must be a :c:type:`const char*` which points to the name of an encoding as a NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. An exception is raised if the named encoding is not known to Python. The - second argument must be a :c:type:`char\*\*`; the value of the pointer it + second argument must be a :c:type:`char**`; the value of the pointer it references will be set to a buffer with the contents of the argument text. The text will be encoded in the encoding specified by the first argument. @@ -217,10 +217,10 @@ which disallows mutable objects such as :class:`bytearray`. characters. It requires three arguments. The first is only used as input, and must be a - :c:type:`const char\*` which points to the name of an encoding as a + :c:type:`const char*` which points to the name of an encoding as a NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. An exception is raised if the named encoding is not known to Python. The - second argument must be a :c:type:`char\*\*`; the value of the pointer it + second argument must be a :c:type:`char**`; the value of the pointer it references will be set to a buffer with the contents of the argument text. The text will be encoded in the encoding specified by the first argument. The third argument must be a pointer to an integer; the referenced integer @@ -320,7 +320,7 @@ Other objects ``O!`` (object) [*typeobject*, PyObject \*] Store a Python object in a C object pointer. This is similar to ``O``, but takes two C arguments: the first is the address of a Python type object, the - second is the address of the C variable (of type :c:type:`PyObject\*`) into which + second is the address of the C variable (of type :c:type:`PyObject*`) into which the object pointer is stored. If the Python object does not have the required type, :exc:`TypeError` is raised. @@ -329,13 +329,13 @@ Other objects ``O&`` (object) [*converter*, *anything*] Convert a Python object to a C variable through a *converter* function. This takes two arguments: the first is a function, the second is the address of a C - variable (of arbitrary type), converted to :c:type:`void \*`. The *converter* + variable (of arbitrary type), converted to :c:type:`void *`. The *converter* function in turn is called as follows:: status = converter(object, address); where *object* is the Python object to be converted and *address* is the - :c:type:`void\*` argument that was passed to the :c:func:`PyArg_Parse\*` function. + :c:type:`void*` argument that was passed to the :c:func:`PyArg_Parse\*` function. The returned *status* should be ``1`` for a successful conversion and ``0`` if the conversion has failed. When the conversion fails, the *converter* function should raise an exception and leave the content of *address* unmodified. @@ -481,7 +481,7 @@ API Functions *args*; it must actually be a tuple. The length of the tuple must be at least *min* and no more than *max*; *min* and *max* may be equal. Additional arguments must be passed to the function, each of which should be a pointer to a - :c:type:`PyObject\*` variable; these will be filled in with the values from + :c:type:`PyObject*` variable; these will be filled in with the values from *args*; they will contain borrowed references. The variables which correspond to optional parameters not given by *args* will not be filled in; these should be initialized by the caller. This function returns true on success and false if @@ -650,8 +650,8 @@ Building values ``O&`` (object) [*converter*, *anything*] Convert *anything* to a Python object through a *converter* function. The - function is called with *anything* (which should be compatible with :c:type:`void - \*`) as its argument and should return a "new" Python object, or ``NULL`` if an + function is called with *anything* (which should be compatible with :c:type:`void*`) + as its argument and should return a "new" Python object, or ``NULL`` if an error occurred. ``(items)`` (:class:`tuple`) [*matching-items*] diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index fc1430efa8a4bb7..e32719373cc7166 100644 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -89,7 +89,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`. .. c:type:: Py_buffer - .. c:member:: void \*buf + .. c:member:: void *buf A pointer to the start of the logical structure described by the buffer fields. This can be any location within the underlying physical memory @@ -99,7 +99,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`. For :term:`contiguous` arrays, the value points to the beginning of the memory block. - .. c:member:: void \*obj + .. c:member:: void *obj A new reference to the exporting object. The reference is owned by the consumer and automatically decremented and set to ``NULL`` by @@ -145,7 +145,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`. or a :c:macro:`PyBUF_WRITABLE` request, the consumer must disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``. - .. c:member:: const char \*format + .. c:member:: const char *format A *NUL* terminated string in :mod:`struct` module style syntax describing the contents of a single item. If this is ``NULL``, ``"B"`` (unsigned bytes) @@ -164,7 +164,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`. to 64. Exporters MUST respect this limit, consumers of multi-dimensional buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions. - .. c:member:: Py_ssize_t \*shape + .. c:member:: Py_ssize_t *shape An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` indicating the shape of the memory as an n-dimensional array. Note that @@ -177,7 +177,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`. The shape array is read-only for the consumer. - .. c:member:: Py_ssize_t \*strides + .. c:member:: Py_ssize_t *strides An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` giving the number of bytes to skip to get to a new element in each @@ -189,7 +189,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`. The strides array is read-only for the consumer. - .. c:member:: Py_ssize_t \*suboffsets + .. c:member:: Py_ssize_t *suboffsets An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If ``suboffsets[n] >= 0``, the values stored along the nth dimension are @@ -207,7 +207,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`. The suboffsets array is read-only for the consumer. - .. c:member:: void \*internal + .. c:member:: void *internal This is for use internally by the exporting object. For example, this might be re-cast as an integer by the exporter and used to store flags @@ -301,7 +301,7 @@ must be C-contiguous. +-----------------------------------+-------+---------+------------+--------+ | .. c:macro:: PyBUF_ANY_CONTIGUOUS | yes | yes | NULL | C or F | +-----------------------------------+-------+---------+------------+--------+ -| .. c:macro:: PyBUF_ND | yes | NULL | NULL | C | +| :c:macro:`PyBUF_ND` | yes | NULL | NULL | C | +-----------------------------------+-------+---------+------------+--------+ @@ -438,12 +438,12 @@ Buffer-related functions Send a request to *exporter* to fill in *view* as specified by *flags*. If the exporter cannot provide a buffer of the exact type, it MUST raise - :c:data:`PyExc_BufferError`, set :c:member:`view->obj` to ``NULL`` and + :c:data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``. - On success, fill in *view*, set :c:member:`view->obj` to a new reference + On success, fill in *view*, set ``view->obj`` to a new reference to *exporter* and return 0. In the case of chained buffer providers - that redirect requests to a single object, :c:member:`view->obj` MAY + that redirect requests to a single object, ``view->obj`` MAY refer to this object instead of *exporter* (See :ref:`Buffer Object Structures `). Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls @@ -455,7 +455,7 @@ Buffer-related functions .. c:function:: void PyBuffer_Release(Py_buffer *view) Release the buffer *view* and decrement the reference count for - :c:member:`view->obj`. This function MUST be called when the buffer + ``view->obj``. This function MUST be called when the buffer is no longer being used, otherwise reference leaks may occur. It is an error to call this function on a buffer that was not obtained via @@ -516,9 +516,9 @@ Buffer-related functions *view* as specified by flags, unless *buf* has been designated as read-only and :c:macro:`PyBUF_WRITABLE` is set in *flags*. - On success, set :c:member:`view->obj` to a new reference to *exporter* and + On success, set ``view->obj`` to a new reference to *exporter* and return 0. Otherwise, raise :c:data:`PyExc_BufferError`, set - :c:member:`view->obj` to ``NULL`` and return ``-1``; + ``view->obj`` to ``NULL`` and return ``-1``; If this function is used as part of a :ref:`getbufferproc `, *exporter* MUST be set to the exporting object and *flags* must be passed diff --git a/Doc/c-api/call.rst b/Doc/c-api/call.rst index 0832e7e2193600b..31dc9c8031fdb6d 100644 --- a/Doc/c-api/call.rst +++ b/Doc/c-api/call.rst @@ -84,7 +84,7 @@ This is a pointer to a function with the following signature: and they must be unique. If there are no keyword arguments, then *kwnames* can instead be *NULL*. -.. c:var:: PY_VECTORCALL_ARGUMENTS_OFFSET +.. c:macro:: PY_VECTORCALL_ARGUMENTS_OFFSET If this flag is set in a vectorcall *nargsf* argument, the callee is allowed to temporarily change ``args[-1]``. In other words, *args* points to @@ -283,7 +283,7 @@ please see individual documentation for details. This is the equivalent of the Python expression: ``callable(*args)``. - Note that if you only pass :c:type:`PyObject \*` args, + Note that if you only pass :c:type:`PyObject *` args, :c:func:`PyObject_CallFunctionObjArgs` is a faster alternative. .. versionchanged:: 3.4 @@ -304,17 +304,17 @@ please see individual documentation for details. This is the equivalent of the Python expression: ``obj.name(arg1, arg2, ...)``. - Note that if you only pass :c:type:`PyObject \*` args, + Note that if you only pass :c:type:`PyObject *` args, :c:func:`PyObject_CallMethodObjArgs` is a faster alternative. .. versionchanged:: 3.4 The types of *name* and *format* were changed from ``char *``. -.. c:function:: PyObject* PyObject_CallFunctionObjArgs(PyObject *callable, ..., NULL) +.. c:function:: PyObject* PyObject_CallFunctionObjArgs(PyObject *callable, ...) Call a callable Python object *callable*, with a variable number of - :c:type:`PyObject \*` arguments. The arguments are provided as a variable number + :c:type:`PyObject *` arguments. The arguments are provided as a variable number of parameters followed by *NULL*. Return the result of the call on success, or raise an exception and return @@ -324,11 +324,11 @@ please see individual documentation for details. ``callable(arg1, arg2, ...)``. -.. c:function:: PyObject* PyObject_CallMethodObjArgs(PyObject *obj, PyObject *name, ..., NULL) +.. c:function:: PyObject* PyObject_CallMethodObjArgs(PyObject *obj, PyObject *name, ...) Call a method of the Python object *obj*, where the name of the method is given as a Python string object in *name*. It is called with a variable number of - :c:type:`PyObject \*` arguments. The arguments are provided as a variable number + :c:type:`PyObject *` arguments. The arguments are provided as a variable number of parameters followed by *NULL*. Return the result of the call on success, or raise an exception and return diff --git a/Doc/c-api/capsule.rst b/Doc/c-api/capsule.rst index 78e21140b2f80cf..5eb313c89bfd592 100644 --- a/Doc/c-api/capsule.rst +++ b/Doc/c-api/capsule.rst @@ -15,7 +15,7 @@ Refer to :ref:`using-capsules` for more information on using these objects. .. c:type:: PyCapsule This subtype of :c:type:`PyObject` represents an opaque value, useful for C - extension modules who need to pass an opaque value (as a :c:type:`void\*` + extension modules who need to pass an opaque value (as a :c:type:`void*` pointer) through Python code to other C code. It is often used to make a C function pointer defined in one module available to other modules, so the regular import mechanism can be used to access C APIs defined in dynamically diff --git a/Doc/c-api/concrete.rst b/Doc/c-api/concrete.rst index c1d9fa1b41a3fee..bf263d6e4c2641b 100644 --- a/Doc/c-api/concrete.rst +++ b/Doc/c-api/concrete.rst @@ -115,3 +115,4 @@ Other Objects coro.rst contextvars.rst datetime.rst + decimal.rst diff --git a/Doc/c-api/decimal.rst b/Doc/c-api/decimal.rst new file mode 100644 index 000000000000000..f530571ebae5771 --- /dev/null +++ b/Doc/c-api/decimal.rst @@ -0,0 +1,231 @@ +.. sectionauthor:: Stefan Krah + +.. highlight:: c + + +Decimal capsule API +=================== + +Capsule API functions can be used in the same manner as regular library +functions, provided that the API has been initialized. + + +Initialize +---------- + +Typically, a C extension module that uses the decimal API will do these +steps in its init function: + +.. code-block:: + + #include "pydecimal.h" + + static int decimal_initialized = 0; + if (!decimal_initialized) { + if (import_decimal() < 0) { + return NULL; + } + + decimal_initialized = 1; + } + + +Type checking, predicates, accessors +------------------------------------ + +.. c:function:: int PyDec_TypeCheck(const PyObject *dec) + + Return 1 if ``dec`` is a Decimal, 0 otherwise. This function does not set + any exceptions. + + +.. c:function:: int PyDec_IsSpecial(const PyObject *dec) + + Return 1 if ``dec`` is ``NaN``, ``sNaN`` or ``Infinity``, 0 otherwise. + + Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed that + this is the only failure mode, so if ``dec`` has already been type-checked, no + errors can occur and the function can be treated as a simple predicate. + + +.. c:function:: int PyDec_IsNaN(const PyObject *dec) + + Return 1 if ``dec`` is ``NaN`` or ``sNaN``, 0 otherwise. + + Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed that + this is the only failure mode, so if ``dec`` has already been type-checked, no + errors can occur and the function can be treated as a simple predicate. + + +.. c:function:: int PyDec_IsInfinite(const PyObject *dec) + + Return 1 if ``dec`` is ``Infinity``, 0 otherwise. + + Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed that + this is the only failure mode, so if ``dec`` has already been type-checked, no + errors can occur and the function can be treated as a simple predicate. + + +.. c:function:: int64_t PyDec_GetDigits(const PyObject *dec) + + Return the number of digits in the coefficient. For ``Infinity``, the + number of digits is always zero. Typically, the same applies to ``NaN`` + and ``sNaN``, but both of these can have a payload that is equivalent to + a coefficient. Therefore, ``NaNs`` can have a nonzero return value. + + Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed that + this is the only failure mode, so if ``dec`` has already been type-checked, no + errors can occur and the function can be treated as a simple accessor. + + +Exact conversions between decimals and primitive C types +-------------------------------------------------------- + +This API supports conversions for decimals with a coefficient up to 38 digits. + +Data structures +~~~~~~~~~~~~~~~ + +The conversion functions use the following status codes and data structures: + +.. code-block:: + + /* status cases for getting a triple */ + enum mpd_triple_class { + MPD_TRIPLE_NORMAL, + MPD_TRIPLE_INF, + MPD_TRIPLE_QNAN, + MPD_TRIPLE_SNAN, + MPD_TRIPLE_ERROR, + }; + + typedef struct { + enum mpd_triple_class tag; + uint8_t sign; + uint64_t hi; + uint64_t lo; + int64_t exp; + } mpd_uint128_triple_t; + +The status cases are explained below. ``sign`` is 0 for positive and 1 for negative. +``((uint128_t)hi << 64) + lo`` is the coefficient, ``exp`` is the exponent. + +The data structure is called "triple" because the decimal triple (sign, coeff, exp) +is an established term and (``hi``, ``lo``) represents a single ``uint128_t`` coefficient. + + +Functions +~~~~~~~~~ + +.. c:function:: mpd_uint128_triple_t PyDec_AsUint128Triple(const PyObject *dec) + + Convert a decimal to a triple. As above, it is guaranteed that the only + Python failure mode is a TypeError, checks can be omitted if the type is + known. + + For simplicity, the usage of the function and all special cases are + explained in code form and comments: + +.. code-block:: + + triple = PyDec_AsUint128Triple(dec); + switch (triple.tag) { + case MPD_TRIPLE_QNAN: + /* + * Success: handle a quiet NaN. + * 1) triple.sign is 0 or 1. + * 2) triple.exp is always 0. + * 3) If triple.hi or triple.lo are nonzero, the NaN has a payload. + */ + break; + + case MPD_TRIPLE_SNAN: + /* + * Success: handle a signaling NaN. + * 1) triple.sign is 0 or 1. + * 2) triple.exp is always 0. + * 3) If triple.hi or triple.lo are nonzero, the sNaN has a payload. + */ + break; + + case MPD_TRIPLE_INF: + /* + * Success: handle Infinity. + * 1) triple.sign is 0 or 1. + * 2) triple.exp is always 0. + * 3) triple.hi and triple.lo are always zero. + */ + break; + + case MPD_TRIPLE_NORMAL: + /* Success: handle a finite value. */ + break; + + case MPD_TRIPLE_ERROR: + /* TypeError check: can be omitted if the type of dec is known. */ + if (PyErr_Occurred()) { + return NULL; + } + + /* Too large for conversion. PyDec_AsUint128Triple() does not set an + exception so applications can choose themselves. Typically this + would be a ValueError. */ + PyErr_SetString(PyExc_ValueError, + "value out of bounds for a uint128 triple"); + return NULL; + } + +.. c:function:: PyObject *PyDec_FromUint128Triple(const mpd_uint128_triple_t *triple) + + Create a decimal from a triple. The following rules must be observed for + initializing the triple: + + 1) ``triple.sign`` must always be 0 (for positive) or 1 (for negative). + + 2) ``MPD_TRIPLE_QNAN``: ``triple.exp`` must be 0. If ``triple.hi`` or ``triple.lo`` + are nonzero, create a ``NaN`` with a payload. + + 3) ``MPD_TRIPLE_SNAN``: ``triple.exp`` must be 0. If ``triple.hi`` or ``triple.lo`` + are nonzero, create an ``sNaN`` with a payload. + + 4) ``MPD_TRIPLE_INF``: ``triple.exp``, ``triple.hi`` and ``triple.lo`` must be zero. + + 5) ``MPD_TRIPLE_NORMAL``: ``MPD_MIN_ETINY + 38 < triple.exp < MPD_MAX_EMAX - 38``. + ``triple.hi`` and ``triple.lo`` can be chosen freely. + + 6) ``MPD_TRIPLE_ERROR``: It is always an error to set this tag. + + + If one of the above conditions is not met, the function returns ``NaN`` if + the ``InvalidOperation`` trap is not set in the thread local context. Otherwise, + it sets the ``InvalidOperation`` exception and returns NULL. + + Additionally, though extremely unlikely give the small allocation sizes, + the function can set ``MemoryError`` and return ``NULL``. + + +Advanced API +------------ + +This API enables the use of ``libmpdec`` functions. Since Python is compiled with +hidden symbols, the API requires an external libmpdec and the ``mpdecimal.h`` +header. + + +Functions +~~~~~~~~~ + +.. c:function:: PyObject *PyDec_Alloc(void) + + Return a new decimal that can be used in the ``result`` position of ``libmpdec`` + functions. + +.. c:function:: mpd_t *PyDec_Get(PyObject *v) + + Get a pointer to the internal ``mpd_t`` of the decimal. Decimals are immutable, + so this function must only be used on a new Decimal that has been created by + PyDec_Alloc(). + +.. c:function:: const mpd_t *PyDec_GetConst(const PyObject *v) + + Get a pointer to the constant internal ``mpd_t`` of the decimal. diff --git a/Doc/c-api/dict.rst b/Doc/c-api/dict.rst index 7493837ac622f62..769484134ed5154 100644 --- a/Doc/c-api/dict.rst +++ b/Doc/c-api/dict.rst @@ -73,7 +73,7 @@ Dictionary Objects .. index:: single: PyUnicode_FromString() Insert *val* into the dictionary *p* using *key* as a key. *key* should - be a :c:type:`const char\*`. The key object is created using + be a :c:type:`const char*`. The key object is created using ``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on failure. This function *does not* steal a reference to *val*. @@ -116,7 +116,7 @@ Dictionary Objects .. c:function:: PyObject* PyDict_GetItemString(PyObject *p, const char *key) This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a - :c:type:`const char\*`, rather than a :c:type:`PyObject\*`. + :c:type:`const char*`, rather than a :c:type:`PyObject*`. Note that exceptions which occur while calling :meth:`__hash__` and :meth:`__eq__` methods and creating a temporary string object @@ -165,7 +165,7 @@ Dictionary Objects prior to the first call to this function to start the iteration; the function returns true for each pair in the dictionary, and false once all pairs have been reported. The parameters *pkey* and *pvalue* should either - point to :c:type:`PyObject\*` variables that will be filled in with each key + point to :c:type:`PyObject*` variables that will be filled in with each key and value, respectively, or may be ``NULL``. Any references returned through them are borrowed. *ppos* should not be altered during iteration. Its value represents offsets within the internal dictionary structure, and diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index e7805ba143c5844..247b6d68eceae95 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -637,11 +637,21 @@ The following functions are used to create and modify Unicode exceptions from C. *object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are UTF-8 encoded strings. + .. deprecated:: 3.3 3.11 + + ``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to + ``PyObject_CallFunction(PyExc_UnicodeEncodeError, "sOnns", ...)``. + .. c:function:: PyObject* PyUnicodeTranslateError_Create(const Py_UNICODE *object, Py_ssize_t length, Py_ssize_t start, Py_ssize_t end, const char *reason) Create a :class:`UnicodeTranslateError` object with the attributes *object*, *length*, *start*, *end* and *reason*. *reason* is a UTF-8 encoded string. + .. deprecated:: 3.3 3.11 + + ``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to + ``PyObject_CallFunction(PyExc_UnicodeTranslateError, "Onns", ...)``. + .. c:function:: PyObject* PyUnicodeDecodeError_GetEncoding(PyObject *exc) PyObject* PyUnicodeEncodeError_GetEncoding(PyObject *exc) @@ -773,7 +783,7 @@ Standard Exceptions All standard Python exceptions are available as global variables whose names are ``PyExc_`` followed by the Python exception name. These have the type -:c:type:`PyObject\*`; they are all class objects. For completeness, here are all +:c:type:`PyObject*`; they are all class objects. For completeness, here are all the variables: .. index:: @@ -993,7 +1003,7 @@ Standard Warning Categories All standard Python warning categories are available as global variables whose names are ``PyExc_`` followed by the Python exception name. These have the type -:c:type:`PyObject\*`; they are all class objects. For completeness, here are all +:c:type:`PyObject*`; they are all class objects. For completeness, here are all the variables: .. index:: diff --git a/Doc/c-api/file.rst b/Doc/c-api/file.rst index 5370c4e350a0b58..ea027ee975c6515 100644 --- a/Doc/c-api/file.rst +++ b/Doc/c-api/file.rst @@ -8,7 +8,7 @@ File Objects .. index:: object: file These APIs are a minimal emulation of the Python 2 C API for built-in file -objects, which used to rely on the buffered I/O (:c:type:`FILE\*`) support +objects, which used to rely on the buffered I/O (:c:type:`FILE*`) support from the C standard library. In Python 3, files and streams use the new :mod:`io` module, which defines several layers over the low-level unbuffered I/O of the operating system. The functions described below are @@ -17,7 +17,7 @@ error reporting in the interpreter; third-party code is advised to access the :mod:`io` APIs instead. -.. c:function:: PyFile_FromFd(int fd, const char *name, const char *mode, int buffering, const char *encoding, const char *errors, const char *newline, int closefd) +.. c:function:: PyObject* PyFile_FromFd(int fd, const char *name, const char *mode, int buffering, const char *encoding, const char *errors, const char *newline, int closefd) Create a Python file object from the file descriptor of an already opened file *fd*. The arguments *name*, *encoding*, *errors* and *newline* diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 68fed2acc447ee9..7f06648bcb4572f 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -81,7 +81,7 @@ When a flag is set by an option, the value of the flag is the number of times that the option was set. For example, ``-b`` sets :c:data:`Py_BytesWarningFlag` to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. -.. c:var:: Py_BytesWarningFlag +.. c:var:: int Py_BytesWarningFlag Issue a warning when comparing :class:`bytes` or :class:`bytearray` with :class:`str` or :class:`bytes` with :class:`int`. Issue an error if greater @@ -89,7 +89,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. Set by the :option:`-b` option. -.. c:var:: Py_DebugFlag +.. c:var:: int Py_DebugFlag Turn on parser debugging output (for expert only, depending on compilation options). @@ -97,7 +97,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment variable. -.. c:var:: Py_DontWriteBytecodeFlag +.. c:var:: int Py_DontWriteBytecodeFlag If set to non-zero, Python won't try to write ``.pyc`` files on the import of source modules. @@ -105,14 +105,14 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable. -.. c:var:: Py_FrozenFlag +.. c:var:: int Py_FrozenFlag Suppress error messages when calculating the module search path in :c:func:`Py_GetPath`. Private flag used by ``_freeze_importlib`` and ``frozenmain`` programs. -.. c:var:: Py_HashRandomizationFlag +.. c:var:: int Py_HashRandomizationFlag Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to a non-empty string. @@ -120,14 +120,14 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment variable to initialize the secret hash seed. -.. c:var:: Py_IgnoreEnvironmentFlag +.. c:var:: int Py_IgnoreEnvironmentFlag Ignore all :envvar:`PYTHON*` environment variables, e.g. :envvar:`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set. Set by the :option:`-E` and :option:`-I` options. -.. c:var:: Py_InspectFlag +.. c:var:: int Py_InspectFlag When a script is passed as first argument or the :option:`-c` option is used, enter interactive mode after executing the script or the command, even when @@ -136,11 +136,11 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment variable. -.. c:var:: Py_InteractiveFlag +.. c:var:: int Py_InteractiveFlag Set by the :option:`-i` option. -.. c:var:: Py_IsolatedFlag +.. c:var:: int Py_IsolatedFlag Run Python in isolated mode. In isolated mode :data:`sys.path` contains neither the script's directory nor the user's site-packages directory. @@ -149,7 +149,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. .. versionadded:: 3.4 -.. c:var:: Py_LegacyWindowsFSEncodingFlag +.. c:var:: int Py_LegacyWindowsFSEncodingFlag If the flag is non-zero, use the ``mbcs`` encoding instead of the UTF-8 encoding for the filesystem encoding. @@ -161,7 +161,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. .. availability:: Windows. -.. c:var:: Py_LegacyWindowsStdioFlag +.. c:var:: int Py_LegacyWindowsStdioFlag If the flag is non-zero, use :class:`io.FileIO` instead of :class:`WindowsConsoleIO` for :mod:`sys` standard streams. @@ -173,7 +173,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. .. availability:: Windows. -.. c:var:: Py_NoSiteFlag +.. c:var:: int Py_NoSiteFlag Disable the import of the module :mod:`site` and the site-dependent manipulations of :data:`sys.path` that it entails. Also disable these @@ -182,7 +182,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. Set by the :option:`-S` option. -.. c:var:: Py_NoUserSiteDirectory +.. c:var:: int Py_NoUserSiteDirectory Don't add the :data:`user site-packages directory ` to :data:`sys.path`. @@ -190,12 +190,12 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. Set by the :option:`-s` and :option:`-I` options, and the :envvar:`PYTHONNOUSERSITE` environment variable. -.. c:var:: Py_OptimizeFlag +.. c:var:: int Py_OptimizeFlag Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment variable. -.. c:var:: Py_QuietFlag +.. c:var:: int Py_QuietFlag Don't display the copyright and version messages even in interactive mode. @@ -203,14 +203,14 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. .. versionadded:: 3.2 -.. c:var:: Py_UnbufferedStdioFlag +.. c:var:: int Py_UnbufferedStdioFlag Force the stdout and stderr streams to be unbuffered. Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` environment variable. -.. c:var:: Py_VerboseFlag +.. c:var:: int Py_VerboseFlag Print a message each time a module is initialized, showing the place (filename or built-in module) from which it is loaded. If greater or equal @@ -830,7 +830,7 @@ code, or when embedding the Python interpreter: .. c:type:: PyThreadState This data structure represents the state of a single thread. The only public - data member is :c:type:`PyInterpreterState \*`:attr:`interp`, which points to + data member is :attr:`interp` (:c:type:`PyInterpreterState *`), which points to this thread's interpreter state. @@ -1619,7 +1619,7 @@ The Python interpreter provides low-level support for thread-local storage (TLS) which wraps the underlying native TLS implementation to support the Python-level thread local storage API (:class:`threading.local`). The CPython C level APIs are similar to those offered by pthreads and Windows: -use a thread key and functions to associate a :c:type:`void\*` value per +use a thread key and functions to associate a :c:type:`void*` value per thread. The GIL does *not* need to be held when calling these functions; they supply @@ -1630,8 +1630,8 @@ you need to include :file:`pythread.h` to use thread-local storage. .. note:: None of these API functions handle memory management on behalf of the - :c:type:`void\*` values. You need to allocate and deallocate them yourself. - If the :c:type:`void\*` values happen to be :c:type:`PyObject\*`, these + :c:type:`void*` values. You need to allocate and deallocate them yourself. + If the :c:type:`void*` values happen to be :c:type:`PyObject*`, these functions don't do refcount operations on them either. .. _thread-specific-storage-api: @@ -1727,14 +1727,14 @@ undefined if the given :c:type:`Py_tss_t` has not been initialized by .. c:function:: int PyThread_tss_set(Py_tss_t *key, void *value) - Return a zero value to indicate successfully associating a :c:type:`void\*` + Return a zero value to indicate successfully associating a :c:type:`void*` value with a TSS key in the current thread. Each thread has a distinct - mapping of the key to a :c:type:`void\*` value. + mapping of the key to a :c:type:`void*` value. .. c:function:: void* PyThread_tss_get(Py_tss_t *key) - Return the :c:type:`void\*` value associated with a TSS key in the current + Return the :c:type:`void*` value associated with a TSS key in the current thread. This returns ``NULL`` if no value is associated with the key in the current thread. diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst index e89a788de0d503e..7ca8693afab79c1 100644 --- a/Doc/c-api/intro.rst +++ b/Doc/c-api/intro.rst @@ -229,13 +229,13 @@ Objects, Types and Reference Counts .. index:: object: type Most Python/C API functions have one or more arguments as well as a return value -of type :c:type:`PyObject\*`. This type is a pointer to an opaque data type +of type :c:type:`PyObject*`. This type is a pointer to an opaque data type representing an arbitrary Python object. Since all Python object types are treated the same way by the Python language in most situations (e.g., assignments, scope rules, and argument passing), it is only fitting that they should be represented by a single C type. Almost all Python objects live on the heap: you never declare an automatic or static variable of type -:c:type:`PyObject`, only pointer variables of type :c:type:`PyObject\*` can be +:c:type:`PyObject`, only pointer variables of type :c:type:`PyObject*` can be declared. The sole exception are the type objects; since these must never be deallocated, they are typically static :c:type:`PyTypeObject` objects. @@ -496,7 +496,7 @@ Types There are few other data types that play a significant role in the Python/C API; most are simple C types such as :c:type:`int`, :c:type:`long`, -:c:type:`double` and :c:type:`char\*`. A few structure types are used to +:c:type:`double` and :c:type:`char*`. A few structure types are used to describe static tables used to list the functions exported by a module or the data attributes of a new object type, and another is used to describe the value of a complex number. These will be discussed together with the functions that diff --git a/Doc/c-api/marshal.rst b/Doc/c-api/marshal.rst index 7b179e22e290e1c..7bb0dad2b6b6d50 100644 --- a/Doc/c-api/marshal.rst +++ b/Doc/c-api/marshal.rst @@ -43,7 +43,7 @@ The following functions allow marshalled values to be read back in. .. c:function:: long PyMarshal_ReadLongFromFile(FILE *file) - Return a C :c:type:`long` from the data stream in a :c:type:`FILE\*` opened + Return a C :c:type:`long` from the data stream in a :c:type:`FILE*` opened for reading. Only a 32-bit value can be read in using this function, regardless of the native size of :c:type:`long`. @@ -53,7 +53,7 @@ The following functions allow marshalled values to be read back in. .. c:function:: int PyMarshal_ReadShortFromFile(FILE *file) - Return a C :c:type:`short` from the data stream in a :c:type:`FILE\*` opened + Return a C :c:type:`short` from the data stream in a :c:type:`FILE*` opened for reading. Only a 16-bit value can be read in using this function, regardless of the native size of :c:type:`short`. @@ -63,7 +63,7 @@ The following functions allow marshalled values to be read back in. .. c:function:: PyObject* PyMarshal_ReadObjectFromFile(FILE *file) - Return a Python object from the data stream in a :c:type:`FILE\*` opened for + Return a Python object from the data stream in a :c:type:`FILE*` opened for reading. On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` @@ -72,7 +72,7 @@ The following functions allow marshalled values to be read back in. .. c:function:: PyObject* PyMarshal_ReadLastObjectFromFile(FILE *file) - Return a Python object from the data stream in a :c:type:`FILE\*` opened for + Return a Python object from the data stream in a :c:type:`FILE*` opened for reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function assumes that no further objects will be read from the file, allowing it to aggressively load file data into memory so that the de-serialization can diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst index 8a8542f0479ec59..87425bcf1e71f27 100644 --- a/Doc/c-api/memory.rst +++ b/Doc/c-api/memory.rst @@ -109,7 +109,7 @@ zero bytes. .. c:function:: void* PyMem_RawMalloc(size_t n) - Allocates *n* bytes and returns a pointer of type :c:type:`void\*` to the + Allocates *n* bytes and returns a pointer of type :c:type:`void*` to the allocated memory, or ``NULL`` if the request fails. Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, as @@ -120,7 +120,7 @@ zero bytes. .. c:function:: void* PyMem_RawCalloc(size_t nelem, size_t elsize) Allocates *nelem* elements each whose size in bytes is *elsize* and returns - a pointer of type :c:type:`void\*` to the allocated memory, or ``NULL`` if the + a pointer of type :c:type:`void*` to the allocated memory, or ``NULL`` if the request fails. The memory is initialized to zeros. Requesting zero elements or elements of size zero bytes returns a distinct @@ -180,7 +180,7 @@ The :ref:`default memory allocator ` uses the .. c:function:: void* PyMem_Malloc(size_t n) - Allocates *n* bytes and returns a pointer of type :c:type:`void\*` to the + Allocates *n* bytes and returns a pointer of type :c:type:`void*` to the allocated memory, or ``NULL`` if the request fails. Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, as @@ -191,7 +191,7 @@ The :ref:`default memory allocator ` uses the .. c:function:: void* PyMem_Calloc(size_t nelem, size_t elsize) Allocates *nelem* elements each whose size in bytes is *elsize* and returns - a pointer of type :c:type:`void\*` to the allocated memory, or ``NULL`` if the + a pointer of type :c:type:`void*` to the allocated memory, or ``NULL`` if the request fails. The memory is initialized to zeros. Requesting zero elements or elements of size zero bytes returns a distinct @@ -233,14 +233,14 @@ The following type-oriented macros are provided for convenience. Note that .. c:function:: TYPE* PyMem_New(TYPE, size_t n) Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes of - memory. Returns a pointer cast to :c:type:`TYPE\*`. The memory will not have + memory. Returns a pointer cast to :c:type:`TYPE*`. The memory will not have been initialized in any way. .. c:function:: TYPE* PyMem_Resize(void *p, TYPE, size_t n) Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * - sizeof(TYPE))`` bytes. Returns a pointer cast to :c:type:`TYPE\*`. On return, + sizeof(TYPE))`` bytes. Returns a pointer cast to :c:type:`TYPE*`. On return, *p* will be a pointer to the new memory area, or ``NULL`` in the event of failure. @@ -282,7 +282,7 @@ The :ref:`default object allocator ` uses the .. c:function:: void* PyObject_Malloc(size_t n) - Allocates *n* bytes and returns a pointer of type :c:type:`void\*` to the + Allocates *n* bytes and returns a pointer of type :c:type:`void*` to the allocated memory, or ``NULL`` if the request fails. Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, as @@ -293,7 +293,7 @@ The :ref:`default object allocator ` uses the .. c:function:: void* PyObject_Calloc(size_t nelem, size_t elsize) Allocates *nelem* elements each whose size in bytes is *elsize* and returns - a pointer of type :c:type:`void\*` to the allocated memory, or ``NULL`` if the + a pointer of type :c:type:`void*` to the allocated memory, or ``NULL`` if the request fails. The memory is initialized to zeros. Requesting zero elements or elements of size zero bytes returns a distinct @@ -388,7 +388,7 @@ Customize Memory Allocators Enum used to identify an allocator domain. Domains: - .. c:var:: PYMEM_DOMAIN_RAW + .. c:macro:: PYMEM_DOMAIN_RAW Functions: @@ -397,7 +397,7 @@ Customize Memory Allocators * :c:func:`PyMem_RawCalloc` * :c:func:`PyMem_RawFree` - .. c:var:: PYMEM_DOMAIN_MEM + .. c:macro:: PYMEM_DOMAIN_MEM Functions: @@ -406,7 +406,7 @@ Customize Memory Allocators * :c:func:`PyMem_Calloc` * :c:func:`PyMem_Free` - .. c:var:: PYMEM_DOMAIN_OBJ + .. c:macro:: PYMEM_DOMAIN_OBJ Functions: @@ -519,11 +519,11 @@ Customize pymalloc Arena Allocator | ``void free(void *ctx, size_t size, void *ptr)`` | free an arena | +--------------------------------------------------+---------------------------------------+ -.. c:function:: PyObject_GetArenaAllocator(PyObjectArenaAllocator *allocator) +.. c:function:: void PyObject_GetArenaAllocator(PyObjectArenaAllocator *allocator) Get the arena allocator. -.. c:function:: PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator) +.. c:function:: void PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator) Set the arena allocator. diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index 8a415dfa30a35e0..6e9474bfa40ebaf 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -325,7 +325,7 @@ The *m_slots* array must be terminated by a slot with id 0. The available slot types are: -.. c:var:: Py_mod_create +.. c:macro:: Py_mod_create Specifies a function that is called to create the module object itself. The *value* pointer of this slot must point to a function of the signature: @@ -357,7 +357,7 @@ The available slot types are: ``PyModuleDef`` has non-``NULL`` ``m_traverse``, ``m_clear``, ``m_free``; non-zero ``m_size``; or slots other than ``Py_mod_create``. -.. c:var:: Py_mod_exec +.. c:macro:: Py_mod_exec Specifies a function that is called to *execute* the module. This is equivalent to executing the code of a Python module: typically, diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index b9c137ea352e78e..a387b4a2df13429 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -291,7 +291,7 @@ Object Protocol is equivalent to the Python expression ``type(o)``. This function increments the reference count of the return value. There's really no reason to use this function instead of the common expression ``o->ob_type``, which returns a - pointer of type :c:type:`PyTypeObject\*`, except when the incremented reference + pointer of type :c:type:`PyTypeObject*`, except when the incremented reference count is needed. diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index b2392fa5e19c5a0..a9e1c6fbcc3f943 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -145,7 +145,7 @@ Implementing functions and methods .. c:type:: PyCFunction Type of the functions used to implement most Python callables in C. - Functions of this type take two :c:type:`PyObject\*` parameters and return + Functions of this type take two :c:type:`PyObject*` parameters and return one such value. If the return value is ``NULL``, an exception shall have been set. If not ``NULL``, the return value is interpreted as the return value of the function as exposed in Python. The function must return a new @@ -224,10 +224,10 @@ Implementing functions and methods +------------------+---------------+-------------------------------+ The :attr:`ml_meth` is a C function pointer. The functions may be of different -types, but they always return :c:type:`PyObject\*`. If the function is not of +types, but they always return :c:type:`PyObject*`. If the function is not of the :c:type:`PyCFunction`, the compiler will require a cast in the method table. Even though :c:type:`PyCFunction` defines the first parameter as -:c:type:`PyObject\*`, it is common that the method implementation uses the +:c:type:`PyObject*`, it is common that the method implementation uses the specific C type of the *self* object. The :attr:`ml_flags` field is a bitfield which can include the following flags. @@ -239,7 +239,7 @@ There are these calling conventions: .. data:: METH_VARARGS This is the typical calling convention, where the methods have the type - :c:type:`PyCFunction`. The function expects two :c:type:`PyObject\*` values. + :c:type:`PyCFunction`. The function expects two :c:type:`PyObject*` values. The first one is the *self* object for methods; for module functions, it is the module object. The second parameter (often called *args*) is a tuple object representing all arguments. This parameter is typically processed @@ -260,7 +260,7 @@ There are these calling conventions: Fast calling convention supporting only positional arguments. The methods have the type :c:type:`_PyCFunctionFast`. The first parameter is *self*, the second parameter is a C array - of :c:type:`PyObject\*` values indicating the arguments and the third + of :c:type:`PyObject*` values indicating the arguments and the third parameter is the number of arguments (the length of the array). This is not part of the :ref:`limited API `. @@ -274,7 +274,7 @@ There are these calling conventions: with methods of type :c:type:`_PyCFunctionFastWithKeywords`. Keyword arguments are passed the same way as in the :ref:`vectorcall protocol `: - there is an additional fourth :c:type:`PyObject\*` parameter + there is an additional fourth :c:type:`PyObject*` parameter which is a tuple representing the names of the keyword arguments (which are guaranteed to be strings) or possibly ``NULL`` if there are no keywords. The values of the keyword @@ -312,7 +312,7 @@ There are these calling conventions: Methods with a single object argument can be listed with the :const:`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` with a ``"O"`` argument. They have the type :c:type:`PyCFunction`, with the *self* parameter, and a - :c:type:`PyObject\*` parameter representing the single argument. + :c:type:`PyObject*` parameter representing the single argument. These two constants are not used to indicate the calling convention but the @@ -463,7 +463,7 @@ Accessing attributes of extension types | | | getter and setter | +-------------+------------------+-----------------------------------+ - The ``get`` function takes one :c:type:`PyObject\*` parameter (the + The ``get`` function takes one :c:type:`PyObject*` parameter (the instance) and a function pointer (the associated ``closure``):: typedef PyObject *(*getter)(PyObject *, void *); @@ -471,7 +471,7 @@ Accessing attributes of extension types It should return a new reference on success or ``NULL`` with a set exception on failure. - ``set`` functions take two :c:type:`PyObject\*` parameters (the instance and + ``set`` functions take two :c:type:`PyObject*` parameters (the instance and the value to be set) and a function pointer (the associated ``closure``):: typedef int (*setter)(PyObject *, PyObject *, void *); diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst index c14cb2d38fd54ab..bf751e44acde094 100644 --- a/Doc/c-api/tuple.rst +++ b/Doc/c-api/tuple.rst @@ -161,7 +161,7 @@ type. .. c:type:: PyStructSequence_Field Describes a field of a struct sequence. As a struct sequence is modeled as a - tuple, all fields are typed as :c:type:`PyObject\*`. The index in the + tuple, all fields are typed as :c:type:`PyObject*`. The index in the :attr:`fields` array of the :c:type:`PyStructSequence_Desc` determines which field of the struct sequence is described. diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index f387279d143eecb..2694585660d2861 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -105,10 +105,11 @@ Type Objects See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument. - An exception is raised if *type* is not a heap type. - .. versionadded:: 3.4 + .. versionchanged:: 3.10 + :c:func:`PyType_GetSlot` could accept static types. + .. c:function:: PyObject* PyType_GetModule(PyTypeObject *type) Return the module object associated with the given type when the type was diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index 385c7f94c672f22..ddcb8ae3d0950ce 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -1348,7 +1348,7 @@ and :c:type:`PyType_Type` effectively act as defaults.) The following macro is defined to ease writing rich comparison functions: - .. c:function:: PyObject \*Py_RETURN_RICHCOMPARE(VAL_A, VAL_B, int op) + .. c:macro:: Py_RETURN_RICHCOMPARE(VAL_A, VAL_B, op) Return ``Py_True`` or ``Py_False`` from the function, depending on the result of a comparison. @@ -1386,7 +1386,7 @@ and :c:type:`PyType_Type` effectively act as defaults.) than zero and contains the offset in the instance structure of the weak reference list head (ignoring the GC header, if present); this offset is used by :c:func:`PyObject_ClearWeakRefs` and the :c:func:`PyWeakref_\*` functions. The - instance structure needs to include a field of type :c:type:`PyObject\*` which is + instance structure needs to include a field of type :c:type:`PyObject*` which is initialized to ``NULL``. Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that is the list head for diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index 0748a1e319489d1..5518214a793e0c5 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -34,6 +34,11 @@ can internally be in two states depending on how they were created: :c:type:`Py_UNICODE*` representation; you will have to call :c:func:`PyUnicode_READY` on them before calling any other API. +.. note:: + The "legacy" Unicode object will be removed in Python 3.12 with deprecated + APIs. All Unicode objects will be "canonical" since then. See :pep:`623` + for more information. + Unicode Type """""""""""" @@ -107,6 +112,9 @@ access internal read-only data of Unicode objects: .. versionadded:: 3.3 + .. deprecated-removed:: 3.10 3.12 + This API will be removed with :c:func:`PyUnicode_FromUnicode`. + .. c:function:: Py_ssize_t PyUnicode_GET_LENGTH(PyObject *o) @@ -138,6 +146,9 @@ access internal read-only data of Unicode objects: .. versionadded:: 3.3 + .. deprecated-removed:: 3.10 3.12 + ``PyUnicode_WCHAR_KIND`` is deprecated. + .. c:function:: int PyUnicode_KIND(PyObject *o) @@ -188,7 +199,7 @@ access internal read-only data of Unicode objects: .. versionadded:: 3.3 -.. c:function:: PyUnicode_MAX_CHAR_VALUE(PyObject *o) +.. c:macro:: PyUnicode_MAX_CHAR_VALUE(o) Return the maximum code point that is suitable for creating another string based on *o*, which must be in the "canonical" representation. This is @@ -203,7 +214,7 @@ access internal read-only data of Unicode objects: code units (this includes surrogate pairs as 2 units). *o* has to be a Unicode object (not checked). - .. deprecated-removed:: 3.3 4.0 + .. deprecated-removed:: 3.3 3.12 Part of the old-style Unicode API, please migrate to using :c:func:`PyUnicode_GET_LENGTH`. @@ -213,7 +224,7 @@ access internal read-only data of Unicode objects: Return the size of the deprecated :c:type:`Py_UNICODE` representation in bytes. *o* has to be a Unicode object (not checked). - .. deprecated-removed:: 3.3 4.0 + .. deprecated-removed:: 3.3 3.12 Part of the old-style Unicode API, please migrate to using :c:func:`PyUnicode_GET_LENGTH`. @@ -235,7 +246,7 @@ access internal read-only data of Unicode objects: code to use the new :c:func:`PyUnicode_nBYTE_DATA` macros or use :c:func:`PyUnicode_WRITE` or :c:func:`PyUnicode_READ`. - .. deprecated-removed:: 3.3 4.0 + .. deprecated-removed:: 3.3 3.12 Part of the old-style Unicode API, please migrate to using the :c:func:`PyUnicode_nBYTE_DATA` family of macros. @@ -687,8 +698,10 @@ Extension modules can continue using them, as they will not be removed in Python string content has been filled before using any of the access macros such as :c:func:`PyUnicode_KIND`. - Please migrate to using :c:func:`PyUnicode_FromKindAndData`, - :c:func:`PyUnicode_FromWideChar` or :c:func:`PyUnicode_New`. + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_FromKindAndData`, :c:func:`PyUnicode_FromWideChar`, or + :c:func:`PyUnicode_New`. .. c:function:: Py_UNICODE* PyUnicode_AsUnicode(PyObject *unicode) @@ -701,9 +714,10 @@ Extension modules can continue using them, as they will not be removed in Python embedded null code points, which would cause the string to be truncated when used in most C functions. - Please migrate to using :c:func:`PyUnicode_AsUCS4`, - :c:func:`PyUnicode_AsWideChar`, :c:func:`PyUnicode_ReadChar` or similar new - APIs. + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_AsUCS4`, :c:func:`PyUnicode_AsWideChar`, + :c:func:`PyUnicode_ReadChar` or similar new APIs. .. c:function:: PyObject* PyUnicode_TransformDecimalToASCII(Py_UNICODE *s, Py_ssize_t size) @@ -723,13 +737,20 @@ Extension modules can continue using them, as they will not be removed in Python .. versionadded:: 3.3 + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_AsUCS4`, :c:func:`PyUnicode_AsWideChar`, + :c:func:`PyUnicode_ReadChar` or similar new APIs. + .. c:function:: Py_ssize_t PyUnicode_GetSize(PyObject *unicode) Return the size of the deprecated :c:type:`Py_UNICODE` representation, in code units (this includes surrogate pairs as 2 units). - Please migrate to using :c:func:`PyUnicode_GetLength`. + .. deprecated-removed:: 3.3 3.12 + Part of the old-style Unicode API, please migrate to using + :c:func:`PyUnicode_GET_LENGTH`. .. c:function:: PyObject* PyUnicode_FromObject(PyObject *obj) @@ -1466,17 +1487,21 @@ These are the mapping codec APIs: The following codec API is special in that maps Unicode to Unicode. -.. c:function:: PyObject* PyUnicode_Translate(PyObject *unicode, \ - PyObject *mapping, const char *errors) +.. c:function:: PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors) - Translate a Unicode object using the given *mapping* object and return the - resulting Unicode object. Return ``NULL`` if an exception was raised by the + Translate a string by applying a character mapping table to it and return the + resulting Unicode object. Return ``NULL`` if an exception was raised by the codec. - The *mapping* object must map Unicode ordinal integers to Unicode strings, - integers (which are then interpreted as Unicode ordinals) or ``None`` - (causing deletion of the character). Unmapped character ordinals (ones - which cause a :exc:`LookupError`) are left untouched and are copied as-is. + The mapping table must map Unicode ordinal integers to Unicode ordinal integers + or ``None`` (causing deletion of the character). + + Mapping tables need only provide the :meth:`__getitem__` interface; dictionaries + and sequences work well. Unmapped character ordinals (ones which cause a + :exc:`LookupError`) are left untouched and are copied as-is. + + *errors* has the usual meaning for codecs. It may be ``NULL`` which indicates to + use the default error handling. .. c:function:: PyObject* PyUnicode_TranslateCharmap(const Py_UNICODE *s, Py_ssize_t size, \ @@ -1579,23 +1604,6 @@ They all return ``NULL`` or ``-1`` if an exception occurs. characters are not included in the resulting strings. -.. c:function:: PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, \ - const char *errors) - - Translate a string by applying a character mapping table to it and return the - resulting Unicode object. - - The mapping table must map Unicode ordinal integers to Unicode ordinal integers - or ``None`` (causing deletion of the character). - - Mapping tables need only provide the :meth:`__getitem__` interface; dictionaries - and sequences work well. Unmapped character ordinals (ones which cause a - :exc:`LookupError`) are left untouched and are copied as-is. - - *errors* has the usual meaning for codecs. It may be ``NULL`` which indicates to - use the default error handling. - - .. c:function:: PyObject* PyUnicode_Join(PyObject *separator, PyObject *seq) Join a sequence of strings using the given *separator* and return the resulting diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst index d6aecc394c9e70a..b908cb8354f73f4 100644 --- a/Doc/c-api/veryhigh.rst +++ b/Doc/c-api/veryhigh.rst @@ -16,11 +16,11 @@ parameter. The available start symbols are :const:`Py_eval_input`, :const:`Py_file_input`, and :const:`Py_single_input`. These are described following the functions which accept them as parameters. -Note also that several of these functions take :c:type:`FILE\*` parameters. One +Note also that several of these functions take :c:type:`FILE*` parameters. One particular issue which needs to be handled carefully is that the :c:type:`FILE` structure for different C libraries can be different and incompatible. Under Windows (at least), it is possible for dynamically linked extensions to actually -use different libraries, so care should be taken that :c:type:`FILE\*` parameters +use different libraries, so care should be taken that :c:type:`FILE*` parameters are only passed to these functions if it is certain that they were created by the same library that the Python runtime is using. diff --git a/Doc/conf.py b/Doc/conf.py index 12d74ea24ce4aca..079d17717f381c6 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -15,7 +15,7 @@ extensions = ['sphinx.ext.coverage', 'sphinx.ext.doctest', 'pyspecific', 'c_annotations', 'escape4chm', - 'asdl_highlight'] + 'asdl_highlight', 'peg_highlight'] doctest_global_setup = ''' @@ -228,3 +228,13 @@ # Relative filename of the reference count data file. refcount_file = 'data/refcounts.dat' + +# Sphinx 2 and Sphinx 3 compatibility +# ----------------------------------- + +# bpo-40204: Allow Sphinx 2 syntax in the C domain +c_allow_pre_v3 = True + +# bpo-40204: Disable warnings on Sphinx 2 syntax of the C domain since the +# documentation is built with -W (warnings treated as errors). +c_warn_on_allowed_pre_v3 = False diff --git a/Doc/extending/newtypes_tutorial.rst b/Doc/extending/newtypes_tutorial.rst index 0eb6ffd026f4959..4da77e797d222c4 100644 --- a/Doc/extending/newtypes_tutorial.rst +++ b/Doc/extending/newtypes_tutorial.rst @@ -416,7 +416,7 @@ But this would be risky. Our type doesn't restrict the type of the ``first`` member, so it could be any kind of object. It could have a destructor that causes code to be executed that tries to access the ``first`` member; or that destructor could release the -:term:`Global interpreter Lock` and let arbitrary code run in other +:term:`Global interpreter Lock ` and let arbitrary code run in other threads that accesses and modifies our object. To be paranoid and protect ourselves against this possibility, we almost diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst index 61ffc5dbdaa7736..0731e92f6dbc608 100644 --- a/Doc/faq/programming.rst +++ b/Doc/faq/programming.rst @@ -518,14 +518,14 @@ desired effect in a number of ways. 1) By returning a tuple of the results:: - def func2(a, b): - a = 'new-value' # a and b are local names - b = b + 1 # assigned to new objects - return a, b # return new values - - x, y = 'old-value', 99 - x, y = func2(x, y) - print(x, y) # output: new-value 100 + >>> def func1(a, b): + ... a = 'new-value' # a and b are local names + ... b = b + 1 # assigned to new objects + ... return a, b # return new values + ... + >>> x, y = 'old-value', 99 + >>> func1(x, y) + ('new-value', 100) This is almost always the clearest solution. @@ -533,38 +533,41 @@ desired effect in a number of ways. 3) By passing a mutable (changeable in-place) object:: - def func1(a): - a[0] = 'new-value' # 'a' references a mutable list - a[1] = a[1] + 1 # changes a shared object - - args = ['old-value', 99] - func1(args) - print(args[0], args[1]) # output: new-value 100 + >>> def func2(a): + ... a[0] = 'new-value' # 'a' references a mutable list + ... a[1] = a[1] + 1 # changes a shared object + ... + >>> args = ['old-value', 99] + >>> func2(args) + >>> args + ['new-value', 100] 4) By passing in a dictionary that gets mutated:: - def func3(args): - args['a'] = 'new-value' # args is a mutable dictionary - args['b'] = args['b'] + 1 # change it in-place - - args = {'a': 'old-value', 'b': 99} - func3(args) - print(args['a'], args['b']) + >>> def func3(args): + ... args['a'] = 'new-value' # args is a mutable dictionary + ... args['b'] = args['b'] + 1 # change it in-place + ... + >>> args = {'a': 'old-value', 'b': 99} + >>> func3(args) + >>> args + {'a': 'new-value', 'b': 100} 5) Or bundle up values in a class instance:: - class callByRef: - def __init__(self, /, **args): - for key, value in args.items(): - setattr(self, key, value) - - def func4(args): - args.a = 'new-value' # args is a mutable callByRef - args.b = args.b + 1 # change object in-place - - args = callByRef(a='old-value', b=99) - func4(args) - print(args.a, args.b) + >>> class Namespace: + ... def __init__(self, /, **args): + ... for key, value in args.items(): + ... setattr(self, key, value) + ... + >>> def func4(args): + ... args.a = 'new-value' # args is a mutable Namespace + ... args.b = args.b + 1 # change object in-place + ... + >>> args = Namespace(a='old-value', b=99) + >>> func4(args) + >>> vars(args) + {'a': 'new-value', 'b': 100} There's almost never a good reason to get this complicated. diff --git a/Doc/glossary.rst b/Doc/glossary.rst index e997d366777b384..7be755e4113108b 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -587,7 +587,7 @@ Glossary and :class:`tuple`) and some non-sequence types like :class:`dict`, :term:`file objects `, and objects of any classes you define with an :meth:`__iter__` method or with a :meth:`__getitem__` method - that implements :term:`Sequence` semantics. + that implements :term:`Sequence ` semantics. Iterables can be used in a :keyword:`for` loop and in many other places where a sequence is diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 6928917dbe42003..b792b6c6ab77f2e 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -312,14 +312,12 @@ Running the interpreter shows how the function descriptor works in practice:: >>> d.f > - # Internally, the bound method stores the underlying function, - # the bound instance, and the class of the bound instance. + # Internally, the bound method stores the underlying function and + # the bound instance. >>> d.f.__func__ >>> d.f.__self__ <__main__.D object at 0x1012e1f98> - >>> d.f.__class__ - Static Methods and Class Methods diff --git a/Doc/howto/instrumentation.rst b/Doc/howto/instrumentation.rst index 909deb5fed33fff..f0081e4ec28905a 100644 --- a/Doc/howto/instrumentation.rst +++ b/Doc/howto/instrumentation.rst @@ -272,9 +272,7 @@ should instead read: Available static markers ------------------------ -.. I'm reusing the "c:function" type for markers - -.. c:function:: function__entry(str filename, str funcname, int lineno) +.. object:: function__entry(str filename, str funcname, int lineno) This marker indicates that execution of a Python function has begun. It is only triggered for pure-Python (bytecode) functions. @@ -290,7 +288,7 @@ Available static markers * ``$arg3`` : ``int`` line number -.. c:function:: function__return(str filename, str funcname, int lineno) +.. object:: function__return(str filename, str funcname, int lineno) This marker is the converse of :c:func:`function__entry`, and indicates that execution of a Python function has ended (either via ``return``, or via an @@ -298,7 +296,7 @@ Available static markers The arguments are the same as for :c:func:`function__entry` -.. c:function:: line(str filename, str funcname, int lineno) +.. object:: line(str filename, str funcname, int lineno) This marker indicates a Python line is about to be executed. It is the equivalent of line-by-line tracing with a Python profiler. It is @@ -306,24 +304,24 @@ Available static markers The arguments are the same as for :c:func:`function__entry`. -.. c:function:: gc__start(int generation) +.. object:: gc__start(int generation) Fires when the Python interpreter starts a garbage collection cycle. ``arg0`` is the generation to scan, like :func:`gc.collect()`. -.. c:function:: gc__done(long collected) +.. object:: gc__done(long collected) Fires when the Python interpreter finishes a garbage collection cycle. ``arg0`` is the number of collected objects. -.. c:function:: import__find__load__start(str modulename) +.. object:: import__find__load__start(str modulename) Fires before :mod:`importlib` attempts to find and load the module. ``arg0`` is the module name. .. versionadded:: 3.7 -.. c:function:: import__find__load__done(str modulename, int found) +.. object:: import__find__load__done(str modulename, int found) Fires after :mod:`importlib`'s find_and_load function is called. ``arg0`` is the module name, ``arg1`` indicates if module was @@ -332,7 +330,7 @@ Available static markers .. versionadded:: 3.7 -.. c:function:: audit(str event, void *tuple) +.. object:: audit(str event, void *tuple) Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called. ``arg0`` is the event name as C string, ``arg1`` is a :c:type:`PyObject` @@ -375,14 +373,14 @@ If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/systemtap/tapset``), then these additional probepoints become available: -.. c:function:: python.function.entry(str filename, str funcname, int lineno, frameptr) +.. object:: python.function.entry(str filename, str funcname, int lineno, frameptr) This probe point indicates that execution of a Python function has begun. It is only triggered for pure-Python (bytecode) functions. -.. c:function:: python.function.return(str filename, str funcname, int lineno, frameptr) +.. object:: python.function.return(str filename, str funcname, int lineno, frameptr) - This probe point is the converse of :c:func:`python.function.return`, and + This probe point is the converse of ``python.function.return``, and indicates that execution of a Python function has ended (either via ``return``, or via an exception). It is only triggered for pure-Python (bytecode) functions. diff --git a/Doc/library/__future__.rst b/Doc/library/__future__.rst index e3d749e60178478..41399942d303083 100644 --- a/Doc/library/__future__.rst +++ b/Doc/library/__future__.rst @@ -90,7 +90,7 @@ language using this mechanism: | generator_stop | 3.5.0b1 | 3.7 | :pep:`479`: | | | | | *StopIteration handling inside generators* | +------------------+-------------+--------------+---------------------------------------------+ -| annotations | 3.7.0b1 | 4.0 | :pep:`563`: | +| annotations | 3.7.0b1 | 3.10 | :pep:`563`: | | | | | *Postponed evaluation of annotations* | +------------------+-------------+--------------+---------------------------------------------+ diff --git a/Doc/library/aifc.rst b/Doc/library/aifc.rst index 7328907730fb107..2e917cf7321b857 100644 --- a/Doc/library/aifc.rst +++ b/Doc/library/aifc.rst @@ -208,6 +208,7 @@ number of frames must be filled in. .. method:: aifc.tell() + :noindex: Return the current write position in the output file. Useful in combination with :meth:`setmark`. @@ -232,6 +233,7 @@ number of frames must be filled in. .. method:: aifc.close() + :noindex: Close the AIFF file. The header of the file is updated to reflect the actual size of the audio data. After calling this method, the object can no longer be diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 25cb17811e7183e..755c60fba64115a 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -1800,5 +1800,24 @@ to stdout. Otherwise, the content is read from stdin. .. seealso:: - `Green Tree Snakes `_, an external documentation resource, has good - details on working with Python ASTs. + `Green Tree Snakes `_, an external + documentation resource, has good details on working with Python ASTs. + + `ASTTokens `_ + annotates Python ASTs with the positions of tokens and text in the source + code that generated them. This is helpful for tools that make source code + transformations. + + `leoAst.py `_ unifies the + token-based and parse-tree-based views of python programs by inserting + two-way links between tokens and ast nodes. + + `LibCST `_ parses code as a Concrete Syntax + Tree that looks like an ast tree and keeps all formatting details. It's + useful for building automated refactoring (codemod) applications and + linters. + + `Parso `_ is a Python parser that supports + error recovery and round-trip parsing for different Python versions (in + multiple Python versions). Parso is also able to list multiple syntax errors + in your python file. \ No newline at end of file diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst index 3079716f03ecc0b..9dbd3ab46a3f681 100644 --- a/Doc/library/asyncio-protocol.rst +++ b/Doc/library/asyncio-protocol.rst @@ -993,7 +993,7 @@ loop.subprocess_exec() and SubprocessProtocol An example of a subprocess protocol used to get the output of a subprocess and to wait for the subprocess exit. -The subprocess is created by th :meth:`loop.subprocess_exec` method:: +The subprocess is created by the :meth:`loop.subprocess_exec` method:: import asyncio import sys diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index bac99b795044494..99f012540d989b6 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -387,6 +387,14 @@ Running Tasks Concurrently # Task C: Compute factorial(4)... # Task C: factorial(4) = 24 + .. note:: + If *return_exceptions* is False, cancelling gather() after it + has been marked done won't cancel any submitted awaitables. + For instance, gather can be marked done after propagating an + exception to the caller, therefore, calling ``gather.cancel()`` + after catching an exception (raised by one of the awaitables) from + gather won't cancel any other awaitables. + .. versionchanged:: 3.7 If the *gather* itself is cancelled, the cancellation is propagated regardless of *return_exceptions*. diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst index 1ff22a00d6199de..2f24bb63912fb6b 100644 --- a/Doc/library/base64.rst +++ b/Doc/library/base64.rst @@ -124,7 +124,7 @@ The modern interface provides: whether a lowercase alphabet is acceptable as input. For security purposes, the default is ``False``. - :rfc:`3548` allows for optional mapping of the digit 0 (zero) to the letter O + :rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter O (oh), and for optional mapping of the digit 1 (one) to either the letter I (eye) or letter L (el). The optional argument *map01* when not ``None``, specifies which letter the digit 1 should be mapped to (when *map01* is not ``None``, the @@ -136,6 +136,27 @@ The modern interface provides: input. +.. function:: b32hexencode(s) + + Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined in + :rfc:`4648`. + + .. versionadded:: 3.10 + + +.. function:: b32hexdecode(s, casefold=False) + + Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined in + :rfc:`4648`. + + This version does not allow the digit 0 (zero) to the letter O (oh) and digit + 1 (one) to either the letter I (eye) or letter L (el) mappings, all these + characters are included in the Extended Hex Alphabet and are not + interchangable. + + .. versionadded:: 3.10 + + .. function:: b16encode(s) Encode the :term:`bytes-like object` *s* using Base16 and return the diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst index 56b75ef0f850a67..c3c04db853ed2d4 100644 --- a/Doc/library/calendar.rst +++ b/Doc/library/calendar.rst @@ -349,7 +349,7 @@ For simple text calendars this module provides the following functions. .. function:: monthcalendar(year, month) Returns a matrix representing a month's calendar. Each row represents a week; - days outside of the month a represented by zeros. Each week begins with Monday + days outside of the month are represented by zeros. Each week begins with Monday unless set by :func:`setfirstweekday`. diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 2a3fb142f7297e5..dc7ae30b6d2fa28 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -185,7 +185,7 @@ ABC Inherits from Abstract Methods Mixin expressions. Custom implementations must provide the :meth:`__await__` method. - :term:`Coroutine` objects and instances of the + :term:`Coroutine ` objects and instances of the :class:`~collections.abc.Coroutine` ABC are all instances of this ABC. .. note:: diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index b21d5594c84fa02..675a9ffdd0711ae 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -221,7 +221,8 @@ ProcessPoolExecutor The :class:`ProcessPoolExecutor` class is an :class:`Executor` subclass that uses a pool of processes to execute calls asynchronously. :class:`ProcessPoolExecutor` uses the :mod:`multiprocessing` module, which -allows it to side-step the :term:`Global Interpreter Lock` but also means that +allows it to side-step the :term:`Global Interpreter Lock +` but also means that only picklable objects can be executed and returned. The ``__main__`` module must be importable by worker subprocesses. This means diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst index 739477f55fddda8..2e22a549ee2813d 100644 --- a/Doc/library/configparser.rst +++ b/Doc/library/configparser.rst @@ -674,97 +674,98 @@ be overridden by subclasses or by attribute assignment. .. attribute:: ConfigParser.BOOLEAN_STATES - By default when using :meth:`~ConfigParser.getboolean`, config parsers - consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``, - ``'on'`` and the following values ``False``: ``'0'``, ``'no'``, ``'false'``, - ``'off'``. You can override this by specifying a custom dictionary of strings - and their Boolean outcomes. For example: - - .. doctest:: - - >>> custom = configparser.ConfigParser() - >>> custom['section1'] = {'funky': 'nope'} - >>> custom['section1'].getboolean('funky') - Traceback (most recent call last): - ... - ValueError: Not a boolean: nope - >>> custom.BOOLEAN_STATES = {'sure': True, 'nope': False} - >>> custom['section1'].getboolean('funky') - False - - Other typical Boolean pairs include ``accept``/``reject`` or - ``enabled``/``disabled``. + By default when using :meth:`~ConfigParser.getboolean`, config parsers + consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``, + ``'on'`` and the following values ``False``: ``'0'``, ``'no'``, ``'false'``, + ``'off'``. You can override this by specifying a custom dictionary of strings + and their Boolean outcomes. For example: + + .. doctest:: + + >>> custom = configparser.ConfigParser() + >>> custom['section1'] = {'funky': 'nope'} + >>> custom['section1'].getboolean('funky') + Traceback (most recent call last): + ... + ValueError: Not a boolean: nope + >>> custom.BOOLEAN_STATES = {'sure': True, 'nope': False} + >>> custom['section1'].getboolean('funky') + False + + Other typical Boolean pairs include ``accept``/``reject`` or + ``enabled``/``disabled``. .. method:: ConfigParser.optionxform(option) + :noindex: - This method transforms option names on every read, get, or set - operation. The default converts the name to lowercase. This also - means that when a configuration file gets written, all keys will be - lowercase. Override this method if that's unsuitable. - For example: + This method transforms option names on every read, get, or set + operation. The default converts the name to lowercase. This also + means that when a configuration file gets written, all keys will be + lowercase. Override this method if that's unsuitable. + For example: - .. doctest:: + .. doctest:: + + >>> config = """ + ... [Section1] + ... Key = Value + ... + ... [Section2] + ... AnotherKey = Value + ... """ + >>> typical = configparser.ConfigParser() + >>> typical.read_string(config) + >>> list(typical['Section1'].keys()) + ['key'] + >>> list(typical['Section2'].keys()) + ['anotherkey'] + >>> custom = configparser.RawConfigParser() + >>> custom.optionxform = lambda option: option + >>> custom.read_string(config) + >>> list(custom['Section1'].keys()) + ['Key'] + >>> list(custom['Section2'].keys()) + ['AnotherKey'] - >>> config = """ - ... [Section1] - ... Key = Value - ... - ... [Section2] - ... AnotherKey = Value - ... """ - >>> typical = configparser.ConfigParser() - >>> typical.read_string(config) - >>> list(typical['Section1'].keys()) - ['key'] - >>> list(typical['Section2'].keys()) - ['anotherkey'] - >>> custom = configparser.RawConfigParser() - >>> custom.optionxform = lambda option: option - >>> custom.read_string(config) - >>> list(custom['Section1'].keys()) - ['Key'] - >>> list(custom['Section2'].keys()) - ['AnotherKey'] - - .. note:: - The optionxform function transforms option names to a canonical form. - This should be an idempotent function: if the name is already in - canonical form, it should be returned unchanged. + .. note:: + The optionxform function transforms option names to a canonical form. + This should be an idempotent function: if the name is already in + canonical form, it should be returned unchanged. .. attribute:: ConfigParser.SECTCRE - A compiled regular expression used to parse section headers. The default - matches ``[section]`` to the name ``"section"``. Whitespace is considered - part of the section name, thus ``[ larch ]`` will be read as a section of - name ``" larch "``. Override this attribute if that's unsuitable. For - example: + A compiled regular expression used to parse section headers. The default + matches ``[section]`` to the name ``"section"``. Whitespace is considered + part of the section name, thus ``[ larch ]`` will be read as a section of + name ``" larch "``. Override this attribute if that's unsuitable. For + example: + + .. doctest:: + + >>> import re + >>> config = """ + ... [Section 1] + ... option = value + ... + ... [ Section 2 ] + ... another = val + ... """ + >>> typical = configparser.ConfigParser() + >>> typical.read_string(config) + >>> typical.sections() + ['Section 1', ' Section 2 '] + >>> custom = configparser.ConfigParser() + >>> custom.SECTCRE = re.compile(r"\[ *(?P
[^]]+?) *\]") + >>> custom.read_string(config) + >>> custom.sections() + ['Section 1', 'Section 2'] - .. doctest:: + .. note:: - >>> import re - >>> config = """ - ... [Section 1] - ... option = value - ... - ... [ Section 2 ] - ... another = val - ... """ - >>> typical = configparser.ConfigParser() - >>> typical.read_string(config) - >>> typical.sections() - ['Section 1', ' Section 2 '] - >>> custom = configparser.ConfigParser() - >>> custom.SECTCRE = re.compile(r"\[ *(?P
[^]]+?) *\]") - >>> custom.read_string(config) - >>> custom.sections() - ['Section 1', 'Section 2'] - - .. note:: - - While ConfigParser objects also use an ``OPTCRE`` attribute for recognizing - option lines, it's not recommended to override it because that would - interfere with constructor options *allow_no_value* and *delimiters*. + While ConfigParser objects also use an ``OPTCRE`` attribute for recognizing + option lines, it's not recommended to override it because that would + interfere with constructor options *allow_no_value* and *delimiters*. Legacy API Examples diff --git a/Doc/library/copy.rst b/Doc/library/copy.rst index a8e8bfb1e832bb2..176e01db6f9faf0 100644 --- a/Doc/library/copy.rst +++ b/Doc/library/copy.rst @@ -86,6 +86,7 @@ The latter is called to implement the deep copy operation; it is passed one argument, the ``memo`` dictionary. If the :meth:`__deepcopy__` implementation needs to make a deep copy of a component, it should call the :func:`deepcopy` function with the component as first argument and the memo dictionary as second argument. +The memo dictionary should be treated as an opaque object. .. seealso:: diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index 1201e8972de63c8..0b687db1bd2c4db 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -214,7 +214,7 @@ The module :mod:`curses` defines the following functions: .. function:: getmouse() After :meth:`~window.getch` returns :const:`KEY_MOUSE` to signal a mouse event, this - method should be call to retrieve the queued mouse event, represented as a + method should be called to retrieve the queued mouse event, represented as a 5-tuple ``(id, x, y, z, bstate)``. *id* is an ID value used to distinguish multiple devices, and *x*, *y*, *z* are the event's coordinates. (*z* is currently unused.) *bstate* is an integer value whose bits will be set to @@ -242,6 +242,15 @@ The module :mod:`curses` defines the following functions: Return ``True`` if the terminal can display colors; otherwise, return ``False``. +.. function:: has_extended_color_support() + + Return ``True`` if the module supports extended colors; otherwise, return + ``False``. Extended color support allows more than 256 color pairs for + terminals that support more than 16 colors (e.g. xterm-256color). + + Extended color support requires ncurses version 6.1 or later. + + .. versionadded:: 3.10 .. function:: has_ic() diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index fe63d20671dd744..6e74af062d9e724 100644 --- a/Doc/library/dataclasses.rst +++ b/Doc/library/dataclasses.rst @@ -23,7 +23,7 @@ using :pep:`526` type annotations. For example this code:: @dataclass class InventoryItem: - '''Class for keeping track of an item in inventory.''' + """Class for keeping track of an item in inventory.""" name: str unit_price: float quantity_on_hand: int = 0 diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index 38ad04177c5e894..e194649e30d85c0 100644 --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -1357,6 +1357,9 @@ In addition to the three supplied contexts, new contexts can be created with the The rounding mode of the context is used. Results are always correctly-rounded in the Python version. + ``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if ``InvalidOperation`` + is not trapped, then results in ``Decimal('NaN')``. + .. versionchanged:: 3.3 The C module computes :meth:`power` in terms of the correctly-rounded :meth:`exp` and :meth:`ln` functions. The result is well-defined but diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index 7a898c21b52e03b..25e3511d017858f 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -24,6 +24,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. .. class:: SequenceMatcher + :noindex: This is a flexible class for comparing pairs of sequences of any type, so long as the sequence elements are :term:`hashable`. The basic algorithm predates, and is a @@ -651,6 +652,7 @@ The :class:`Differ` class has this constructor: .. class:: Differ(linejunk=None, charjunk=None) + :noindex: Optional keyword parameters *linejunk* and *charjunk* are for filter functions (or ``None``): diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index f871ec4f13def8b..d0307bd8e9f3d08 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -640,7 +640,7 @@ the original TOS1. .. opcode:: LIST_APPEND (i) - Calls ``list.append(TOS[-i], TOS)``. Used to implement list comprehensions. + Calls ``list.append(TOS1[-i], TOS)``. Used to implement list comprehensions. .. opcode:: MAP_ADD (i) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 4b4f5eb1944cc57..00bfb260c020472 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -50,6 +50,7 @@ helper, :class:`auto`. the bitwise operations without losing their :class:`Flag` membership. .. function:: unique + :noindex: Enum class decorator that ensures only one name is bound to any one value. @@ -113,7 +114,6 @@ The *type* of an enumeration member is the enumeration it belongs to:: >>> isinstance(Color.GREEN, Color) True - >>> Enum members also have a property that contains just their item name:: diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index f4110c3585a0bc7..43c47c1da9434c3 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -7,24 +7,38 @@ Built-in Functions The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical order. -=================== ================= ================== ================== ==================== -.. .. Built-in Functions .. .. -=================== ================= ================== ================== ==================== -:func:`abs` :func:`delattr` :func:`hash` |func-memoryview|_ |func-set|_ -:func:`all` |func-dict|_ :func:`help` :func:`min` :func:`setattr` -:func:`any` :func:`dir` :func:`hex` :func:`next` :func:`slice` -:func:`ascii` :func:`divmod` :func:`id` :func:`object` :func:`sorted` -:func:`bin` :func:`enumerate` :func:`input` :func:`oct` :func:`staticmethod` -:func:`bool` :func:`eval` :func:`int` :func:`open` |func-str|_ -:func:`breakpoint` :func:`exec` :func:`isinstance` :func:`ord` :func:`sum` -|func-bytearray|_ :func:`filter` :func:`issubclass` :func:`pow` :func:`super` -|func-bytes|_ :func:`float` :func:`iter` :func:`print` |func-tuple|_ -:func:`callable` :func:`format` :func:`len` :func:`property` :func:`type` -:func:`chr` |func-frozenset|_ |func-list|_ |func-range|_ :func:`vars` -:func:`classmethod` :func:`getattr` :func:`locals` :func:`repr` :func:`zip` -:func:`compile` :func:`globals` :func:`map` :func:`reversed` :func:`__import__` -:func:`complex` :func:`hasattr` :func:`max` :func:`round` -=================== ================= ================== ================== ==================== ++---------------------------------------------------------------------------------------------------+ +| Built-in Functions | ++=========================+=======================+=======================+=========================+ +| | **A** | | **E** | | **L** | | **R** | +| | :func:`abs` | | :func:`enumerate` | | :func:`len` | | |func-range|_ | +| | :func:`all` | | :func:`eval` | | |func-list|_ | | :func:`repr` | +| | :func:`any` | | :func:`exec` | | :func:`locals` | | :func:`reversed` | +| | :func:`ascii` | | | | | | :func:`round` | +| | | | **F** | | **M** | | | +| | **B** | | :func:`filter` | | :func:`map` | | **S** | +| | :func:`bin` | | :func:`float` | | :func:`max` | | |func-set|_ | +| | :func:`bool` | | :func:`format` | | |func-memoryview|_ | | :func:`setattr` | +| | :func:`breakpoint` | | |func-frozenset|_ | | :func:`min` | | :func:`slice` | +| | |func-bytearray|_ | | | | | | :func:`sorted` | +| | |func-bytes|_ | | **G** | | **N** | | :func:`staticmethod` | +| | | | :func:`getattr` | | :func:`next` | | |func-str|_ | +| | **C** | | :func:`globals` | | | | :func:`sum` | +| | :func:`callable` | | | | **O** | | :func:`super` | +| | :func:`chr` | | **H** | | :func:`object` | | | +| | :func:`classmethod` | | :func:`hasattr` | | :func:`oct` | | **T** | +| | :func:`compile` | | :func:`hash` | | :func:`open` | | |func-tuple|_ | +| | :func:`complex` | | :func:`help` | | :func:`ord` | | :func:`type` | +| | | | :func:`hex` | | | | | +| | **D** | | | | **P** | | **V** | +| | :func:`delattr` | | **I** | | :func:`pow` | | :func:`vars` | +| | |func-dict|_ | | :func:`id` | | :func:`print` | | | +| | :func:`dir` | | :func:`input` | | :func:`property` | | **Z** | +| | :func:`divmod` | | :func:`int` | | | | :func:`zip` | +| | | | :func:`isinstance` | | | | | +| | | | :func:`issubclass` | | | | **_** | +| | | | :func:`iter` | | | | :func:`__import__` | ++-------------------------+-----------------------+-----------------------+-------------------------+ .. using :func:`dict` would create a link to another page, so local targets are used, with replacement texts to make the output in the table consistent @@ -1041,7 +1055,8 @@ are always available. They are listed here in alphabetical order. .. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) Open *file* and return a corresponding :term:`file object`. If the file - cannot be opened, an :exc:`OSError` is raised. + cannot be opened, an :exc:`OSError` is raised. See + :ref:`tut-files` for more examples of how to use this function. *file* is a :term:`path-like object` giving the pathname (absolute or relative to the current working directory) of the file to be opened or an diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index 0c33c865304591e..2d85cd3431711ab 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -106,9 +106,9 @@ The :mod:`gc` module provides the following functions: allocations minus the number of deallocations exceeds *threshold0*, collection starts. Initially only generation ``0`` is examined. If generation ``0`` has been examined more than *threshold1* times since generation ``1`` has been - examined, then generation ``1`` is examined as well. Similarly, *threshold2* - controls the number of collections of generation ``1`` before collecting - generation ``2``. + examined, then generation ``1`` is examined as well. + With the third generation, things are a bit more complicated, + see `Collecting the oldest generation `_ for more information. .. function:: get_count() diff --git a/Doc/library/http.cookiejar.rst b/Doc/library/http.cookiejar.rst index 9ac5d52a2ab09c7..7b1aa80a01797cf 100644 --- a/Doc/library/http.cookiejar.rst +++ b/Doc/library/http.cookiejar.rst @@ -462,16 +462,16 @@ receiving cookies. There are also some strictness switches that allow you to tighten up the rather loose Netscape protocol rules a little bit (at the cost of blocking some benign cookies). -A domain blacklist and whitelist is provided (both off by default). Only domains -not in the blacklist and present in the whitelist (if the whitelist is active) +A domain blocklist and allowlist is provided (both off by default). Only domains +not in the blocklist and present in the allowlist (if the allowlist is active) participate in cookie setting and returning. Use the *blocked_domains* constructor argument, and :meth:`blocked_domains` and :meth:`set_blocked_domains` methods (and the corresponding argument and methods -for *allowed_domains*). If you set a whitelist, you can turn it off again by +for *allowed_domains*). If you set an allowlist, you can turn it off again by setting it to :const:`None`. Domains in block or allow lists that do not start with a dot must equal the -cookie domain to be matched. For example, ``"example.com"`` matches a blacklist +cookie domain to be matched. For example, ``"example.com"`` matches a blocklist entry of ``"example.com"``, but ``"www.example.com"`` does not. Domains that do start with a dot are matched by more specific domains too. For example, both ``"www.example.com"`` and ``"www.coyote.example.com"`` match ``".example.com"`` @@ -494,7 +494,7 @@ and ``".168.1.2"``, 192.168.1.2 is blocked, but 193.168.1.2 is not. .. method:: DefaultCookiePolicy.is_blocked(domain) - Return whether *domain* is on the blacklist for setting or receiving cookies. + Return whether *domain* is on the blocklist for setting or receiving cookies. .. method:: DefaultCookiePolicy.allowed_domains() @@ -509,7 +509,7 @@ and ``".168.1.2"``, 192.168.1.2 is blocked, but 193.168.1.2 is not. .. method:: DefaultCookiePolicy.is_not_allowed(domain) - Return whether *domain* is not on the whitelist for setting or receiving + Return whether *domain* is not on the allowlist for setting or receiving cookies. :class:`DefaultCookiePolicy` instances have the following attributes, which are diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index b1192e7bb465523..75b6fa3861b23d0 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -147,7 +147,7 @@ Go to Line Clear any selection and update the line and column status. Show Completions - Open a scrollable list allowing selection of keywords and attributes. See + Open a scrollable list allowing selection of existing names. See :ref:`Completions ` in the Editing and navigation section below. Expand Word @@ -469,52 +469,58 @@ are restricted to four spaces due to Tcl/Tk limitations. See also the indent/dedent region commands on the :ref:`Format menu `. - .. _completions: Completions ^^^^^^^^^^^ -Completions are supplied for functions, classes, and attributes of classes, -both built-in and user-defined. Completions are also provided for -filenames. - -The AutoCompleteWindow (ACW) will open after a predefined delay (default is -two seconds) after a '.' or (in a string) an os.sep is typed. If after one -of those characters (plus zero or more other characters) a tab is typed -the ACW will open immediately if a possible continuation is found. - -If there is only one possible completion for the characters entered, a -:kbd:`Tab` will supply that completion without opening the ACW. - -'Show Completions' will force open a completions window, by default the -:kbd:`C-space` will open a completions window. In an empty -string, this will contain the files in the current directory. On a -blank line, it will contain the built-in and user-defined functions and -classes in the current namespaces, plus any modules imported. If some -characters have been entered, the ACW will attempt to be more specific. - -If a string of characters is typed, the ACW selection will jump to the -entry most closely matching those characters. Entering a :kbd:`tab` will -cause the longest non-ambiguous match to be entered in the Editor window or -Shell. Two :kbd:`tab` in a row will supply the current ACW selection, as -will return or a double click. Cursor keys, Page Up/Down, mouse selection, -and the scroll wheel all operate on the ACW. - -"Hidden" attributes can be accessed by typing the beginning of hidden -name after a '.', e.g. '_'. This allows access to modules with -``__all__`` set, or to class-private attributes. - -Completions and the 'Expand Word' facility can save a lot of typing! - -Completions are currently limited to those in the namespaces. Names in -an Editor window which are not via ``__main__`` and :data:`sys.modules` will -not be found. Run the module once with your imports to correct this situation. -Note that IDLE itself places quite a few modules in sys.modules, so -much can be found by default, e.g. the re module. - -If you don't like the ACW popping up unbidden, simply make the delay -longer or disable the extension. +Completions are supplied, when requested and available, for module +names, attributes of classes or functions, or filenames. Each request +method displays a completion box with existing names. (See tab +completions below for an exception.) For any box, change the name +being completed and the item highlighted in the box by +typing and deleting characters; by hitting :kbd:`Up`, :kbd:`Down`, +:kbd:`PageUp`, :kbd:`PageDown`, :kbd:`Home`, and :kbd:`End` keys; +and by a single click within the box. Close the box with :kbd:`Escape`, +:kbd:`Enter`, and double :kbd:`Tab` keys or clicks outside the box. +A double click within the box selects and closes. + +One way to open a box is to type a key character and wait for a +predefined interval. This defaults to 2 seconds; customize it +in the settings dialog. (To prevent auto popups, set the delay to a +large number of milliseconds, such as 100000000.) For imported module +names or class or function attributes, type '.'. +For filenames in the root directory, type :data:`os.sep` or +data:`os.altsep` immediately after an opening quote. (On Windows, +one can specify a drive first.) Move into subdirectories by typing a +directory name and a separator. + +Instead of waiting, or after a box is closed, open a completion box +immediately with Show Completions on the Edit menu. The default hot +key is :kbd:`C-space`. If one types a prefix for the desired name +before opening the box, the first match or near miss is made visible. +The result is the same as if one enters a prefix +after the box is displayed. Show Completions after a quote completes +filenames in the current directory instead of a root directory. + +Hitting :kbd:`Tab` after a prefix usually has the same effect as Show +Completions. (With no prefix, it indents.) However, if there is only +one match to the prefix, that match is immediately added to the editor +text without opening a box. + +Invoking 'Show Completions', or hitting :kbd:`Tab` after a prefix, +outside of a string and without a preceding '.' opens a box with +keywords, builtin names, and available module-level names. + +When editing code in an editor (as oppose to Shell), increase the +available module-level names by running your code +and not restarting the Shell thereafter. This is especially useful +after adding imports at the top of a file. This also increases +possible attribute completions. + +Completion boxes intially exclude names beginning with '_' or, for +modules, not included in '__all__'. The hidden names can be accessed +by typing '_' after '.', either before or after the box is opened. .. _calltips: diff --git a/Doc/library/imghdr.rst b/Doc/library/imghdr.rst index 800e919599d9cbf..3d7f6de7a1bec04 100644 --- a/Doc/library/imghdr.rst +++ b/Doc/library/imghdr.rst @@ -14,11 +14,11 @@ byte stream. The :mod:`imghdr` module defines the following function: -.. function:: what(filename, h=None) +.. function:: what(file, h=None) - Tests the image data contained in the file named by *filename*, and returns a - string describing the image type. If optional *h* is provided, the *filename* - is ignored and *h* is assumed to contain the byte stream to test. + Tests the image data contained in the file named by *file*, and returns a + string describing the image type. If optional *h* is provided, the *file* + argument is ignored and *h* is assumed to contain the byte stream to test. .. versionchanged:: 3.6 Accepts a :term:`path-like object`. diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 99bfeacbbc74071..5fb0a4a120b98d3 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -1073,7 +1073,7 @@ find and load modules. .. class:: WindowsRegistryFinder - :term:`Finder` for modules declared in the Windows registry. This class + :term:`Finder ` for modules declared in the Windows registry. This class implements the :class:`importlib.abc.MetaPathFinder` ABC. Only class methods are defined by this class to alleviate the need for @@ -1088,7 +1088,7 @@ find and load modules. .. class:: PathFinder - A :term:`Finder` for :data:`sys.path` and package ``__path__`` attributes. + A :term:`Finder ` for :data:`sys.path` and package ``__path__`` attributes. This class implements the :class:`importlib.abc.MetaPathFinder` ABC. Only class methods are defined by this class to alleviate the need for @@ -1719,6 +1719,29 @@ To import a Python source file directly, use the following recipe spec.loader.exec_module(module) +Implementing lazy imports +''''''''''''''''''''''''' + +The example below shows how to implement lazy imports:: + + >>> import importlib.util + >>> import sys + >>> def lazy_import(name): + ... spec = importlib.util.find_spec(name) + ... loader = importlib.util.LazyLoader(spec.loader) + ... spec.loader = loader + ... module = importlib.util.module_from_spec(spec) + ... sys.modules[name] = module + ... loader.exec_module(module) + ... return module + ... + >>> lazy_typing = lazy_import("typing") + >>> #lazy_typing is a real module object, + >>> #but it is not loaded in memory yet. + >>> lazy_typing.TYPE_CHECKING + False + + Setting up an importer '''''''''''''''''''''' diff --git a/Doc/library/language.rst b/Doc/library/language.rst index 1eac32e45902166..510f064c76d795f 100644 --- a/Doc/library/language.rst +++ b/Doc/library/language.rst @@ -13,10 +13,8 @@ These modules include: .. toctree:: - parser.rst ast.rst symtable.rst - symbol.rst token.rst keyword.rst tokenize.rst diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 08258a65a89dc35..28510acd52bd46e 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -14,7 +14,8 @@ Introduction :mod:`multiprocessing` is a package that supports spawning processes using an API similar to the :mod:`threading` module. The :mod:`multiprocessing` package offers both local and remote concurrency, effectively side-stepping the -:term:`Global Interpreter Lock` by using subprocesses instead of threads. Due +:term:`Global Interpreter Lock ` by using +subprocesses instead of threads. Due to this, the :mod:`multiprocessing` module allows the programmer to fully leverage multiple processors on a given machine. It runs on both Unix and Windows. @@ -2173,7 +2174,8 @@ with the :class:`Pool` class. .. method:: apply_async(func[, args[, kwds[, callback[, error_callback]]]]) - A variant of the :meth:`apply` method which returns a result object. + A variant of the :meth:`apply` method which returns a + :class:`~multiprocessing.pool.AsyncResult` object. If *callback* is specified then it should be a callable which accepts a single argument. When the result becomes ready *callback* is applied to @@ -2203,7 +2205,8 @@ with the :class:`Pool` class. .. method:: map_async(func, iterable[, chunksize[, callback[, error_callback]]]) - A variant of the :meth:`.map` method which returns a result object. + A variant of the :meth:`.map` method which returns a + :class:`~multiprocessing.pool.AsyncResult` object. If *callback* is specified then it should be a callable which accepts a single argument. When the result becomes ready *callback* is applied to diff --git a/Doc/library/parser.rst b/Doc/library/parser.rst deleted file mode 100644 index 79fc10d0675af48..000000000000000 --- a/Doc/library/parser.rst +++ /dev/null @@ -1,357 +0,0 @@ -:mod:`parser` --- Access Python parse trees -=========================================== - -.. module:: parser - :synopsis: Access parse trees for Python source code. - -.. moduleauthor:: Fred L. Drake, Jr. -.. sectionauthor:: Fred L. Drake, Jr. - -.. Copyright 1995 Virginia Polytechnic Institute and State University and Fred - L. Drake, Jr. This copyright notice must be distributed on all copies, but - this document otherwise may be distributed as part of the Python - distribution. No fee may be charged for this document in any representation, - either on paper or electronically. This restriction does not affect other - elements in a distributed package in any way. - -.. index:: single: parsing; Python source code - --------------- - -The :mod:`parser` module provides an interface to Python's internal parser and -byte-code compiler. The primary purpose for this interface is to allow Python -code to edit the parse tree of a Python expression and create executable code -from this. This is better than trying to parse and modify an arbitrary Python -code fragment as a string because parsing is performed in a manner identical to -the code forming the application. It is also faster. - -.. warning:: - - The parser module is deprecated and will be removed in future versions of - Python. For the majority of use cases you can leverage the Abstract Syntax - Tree (AST) generation and compilation stage, using the :mod:`ast` module. - -There are a few things to note about this module which are important to making -use of the data structures created. This is not a tutorial on editing the parse -trees for Python code, but some examples of using the :mod:`parser` module are -presented. - -Most importantly, a good understanding of the Python grammar processed by the -internal parser is required. For full information on the language syntax, refer -to :ref:`reference-index`. The parser -itself is created from a grammar specification defined in the file -:file:`Grammar/Grammar` in the standard Python distribution. The parse trees -stored in the ST objects created by this module are the actual output from the -internal parser when created by the :func:`expr` or :func:`suite` functions, -described below. The ST objects created by :func:`sequence2st` faithfully -simulate those structures. Be aware that the values of the sequences which are -considered "correct" will vary from one version of Python to another as the -formal grammar for the language is revised. However, transporting code from one -Python version to another as source text will always allow correct parse trees -to be created in the target version, with the only restriction being that -migrating to an older version of the interpreter will not support more recent -language constructs. The parse trees are not typically compatible from one -version to another, though source code has usually been forward-compatible within -a major release series. - -Each element of the sequences returned by :func:`st2list` or :func:`st2tuple` -has a simple form. Sequences representing non-terminal elements in the grammar -always have a length greater than one. The first element is an integer which -identifies a production in the grammar. These integers are given symbolic names -in the C header file :file:`Include/graminit.h` and the Python module -:mod:`symbol`. Each additional element of the sequence represents a component -of the production as recognized in the input string: these are always sequences -which have the same form as the parent. An important aspect of this structure -which should be noted is that keywords used to identify the parent node type, -such as the keyword :keyword:`if` in an :const:`if_stmt`, are included in the -node tree without any special treatment. For example, the :keyword:`!if` keyword -is represented by the tuple ``(1, 'if')``, where ``1`` is the numeric value -associated with all :const:`NAME` tokens, including variable and function names -defined by the user. In an alternate form returned when line number information -is requested, the same token might be represented as ``(1, 'if', 12)``, where -the ``12`` represents the line number at which the terminal symbol was found. - -Terminal elements are represented in much the same way, but without any child -elements and the addition of the source text which was identified. The example -of the :keyword:`if` keyword above is representative. The various types of -terminal symbols are defined in the C header file :file:`Include/token.h` and -the Python module :mod:`token`. - -The ST objects are not required to support the functionality of this module, -but are provided for three purposes: to allow an application to amortize the -cost of processing complex parse trees, to provide a parse tree representation -which conserves memory space when compared to the Python list or tuple -representation, and to ease the creation of additional modules in C which -manipulate parse trees. A simple "wrapper" class may be created in Python to -hide the use of ST objects. - -The :mod:`parser` module defines functions for a few distinct purposes. The -most important purposes are to create ST objects and to convert ST objects to -other representations such as parse trees and compiled code objects, but there -are also functions which serve to query the type of parse tree represented by an -ST object. - - -.. seealso:: - - Module :mod:`symbol` - Useful constants representing internal nodes of the parse tree. - - Module :mod:`token` - Useful constants representing leaf nodes of the parse tree and functions for - testing node values. - - -.. _creating-sts: - -Creating ST Objects -------------------- - -ST objects may be created from source code or from a parse tree. When creating -an ST object from source, different functions are used to create the ``'eval'`` -and ``'exec'`` forms. - - -.. function:: expr(source) - - The :func:`expr` function parses the parameter *source* as if it were an input - to ``compile(source, 'file.py', 'eval')``. If the parse succeeds, an ST object - is created to hold the internal parse tree representation, otherwise an - appropriate exception is raised. - - -.. function:: suite(source) - - The :func:`suite` function parses the parameter *source* as if it were an input - to ``compile(source, 'file.py', 'exec')``. If the parse succeeds, an ST object - is created to hold the internal parse tree representation, otherwise an - appropriate exception is raised. - - -.. function:: sequence2st(sequence) - - This function accepts a parse tree represented as a sequence and builds an - internal representation if possible. If it can validate that the tree conforms - to the Python grammar and all nodes are valid node types in the host version of - Python, an ST object is created from the internal representation and returned - to the called. If there is a problem creating the internal representation, or - if the tree cannot be validated, a :exc:`ParserError` exception is raised. An - ST object created this way should not be assumed to compile correctly; normal - exceptions raised by compilation may still be initiated when the ST object is - passed to :func:`compilest`. This may indicate problems not related to syntax - (such as a :exc:`MemoryError` exception), but may also be due to constructs such - as the result of parsing ``del f(0)``, which escapes the Python parser but is - checked by the bytecode compiler. - - Sequences representing terminal tokens may be represented as either two-element - lists of the form ``(1, 'name')`` or as three-element lists of the form ``(1, - 'name', 56)``. If the third element is present, it is assumed to be a valid - line number. The line number may be specified for any subset of the terminal - symbols in the input tree. - - -.. function:: tuple2st(sequence) - - This is the same function as :func:`sequence2st`. This entry point is - maintained for backward compatibility. - - -.. _converting-sts: - -Converting ST Objects ---------------------- - -ST objects, regardless of the input used to create them, may be converted to -parse trees represented as list- or tuple- trees, or may be compiled into -executable code objects. Parse trees may be extracted with or without line -numbering information. - - -.. function:: st2list(st, line_info=False, col_info=False) - - This function accepts an ST object from the caller in *st* and returns a - Python list representing the equivalent parse tree. The resulting list - representation can be used for inspection or the creation of a new parse tree in - list form. This function does not fail so long as memory is available to build - the list representation. If the parse tree will only be used for inspection, - :func:`st2tuple` should be used instead to reduce memory consumption and - fragmentation. When the list representation is required, this function is - significantly faster than retrieving a tuple representation and converting that - to nested lists. - - If *line_info* is true, line number information will be included for all - terminal tokens as a third element of the list representing the token. Note - that the line number provided specifies the line on which the token *ends*. - This information is omitted if the flag is false or omitted. - - -.. function:: st2tuple(st, line_info=False, col_info=False) - - This function accepts an ST object from the caller in *st* and returns a - Python tuple representing the equivalent parse tree. Other than returning a - tuple instead of a list, this function is identical to :func:`st2list`. - - If *line_info* is true, line number information will be included for all - terminal tokens as a third element of the list representing the token. This - information is omitted if the flag is false or omitted. - - -.. function:: compilest(st, filename='') - - .. index:: - builtin: exec - builtin: eval - - The Python byte compiler can be invoked on an ST object to produce code objects - which can be used as part of a call to the built-in :func:`exec` or :func:`eval` - functions. This function provides the interface to the compiler, passing the - internal parse tree from *st* to the parser, using the source file name - specified by the *filename* parameter. The default value supplied for *filename* - indicates that the source was an ST object. - - Compiling an ST object may result in exceptions related to compilation; an - example would be a :exc:`SyntaxError` caused by the parse tree for ``del f(0)``: - this statement is considered legal within the formal grammar for Python but is - not a legal language construct. The :exc:`SyntaxError` raised for this - condition is actually generated by the Python byte-compiler normally, which is - why it can be raised at this point by the :mod:`parser` module. Most causes of - compilation failure can be diagnosed programmatically by inspection of the parse - tree. - - -.. _querying-sts: - -Queries on ST Objects ---------------------- - -Two functions are provided which allow an application to determine if an ST was -created as an expression or a suite. Neither of these functions can be used to -determine if an ST was created from source code via :func:`expr` or -:func:`suite` or from a parse tree via :func:`sequence2st`. - - -.. function:: isexpr(st) - - .. index:: builtin: compile - - When *st* represents an ``'eval'`` form, this function returns ``True``, otherwise - it returns ``False``. This is useful, since code objects normally cannot be queried - for this information using existing built-in functions. Note that the code - objects created by :func:`compilest` cannot be queried like this either, and - are identical to those created by the built-in :func:`compile` function. - - -.. function:: issuite(st) - - This function mirrors :func:`isexpr` in that it reports whether an ST object - represents an ``'exec'`` form, commonly known as a "suite." It is not safe to - assume that this function is equivalent to ``not isexpr(st)``, as additional - syntactic fragments may be supported in the future. - - -.. _st-errors: - -Exceptions and Error Handling ------------------------------ - -The parser module defines a single exception, but may also pass other built-in -exceptions from other portions of the Python runtime environment. See each -function for information about the exceptions it can raise. - - -.. exception:: ParserError - - Exception raised when a failure occurs within the parser module. This is - generally produced for validation failures rather than the built-in - :exc:`SyntaxError` raised during normal parsing. The exception argument is - either a string describing the reason of the failure or a tuple containing a - sequence causing the failure from a parse tree passed to :func:`sequence2st` - and an explanatory string. Calls to :func:`sequence2st` need to be able to - handle either type of exception, while calls to other functions in the module - will only need to be aware of the simple string values. - -Note that the functions :func:`compilest`, :func:`expr`, and :func:`suite` may -raise exceptions which are normally raised by the parsing and compilation -process. These include the built in exceptions :exc:`MemoryError`, -:exc:`OverflowError`, :exc:`SyntaxError`, and :exc:`SystemError`. In these -cases, these exceptions carry all the meaning normally associated with them. -Refer to the descriptions of each function for detailed information. - - -.. _st-objects: - -ST Objects ----------- - -Ordered and equality comparisons are supported between ST objects. Pickling of -ST objects (using the :mod:`pickle` module) is also supported. - - -.. data:: STType - - The type of the objects returned by :func:`expr`, :func:`suite` and - :func:`sequence2st`. - -ST objects have the following methods: - - -.. method:: ST.compile(filename='') - - Same as ``compilest(st, filename)``. - - -.. method:: ST.isexpr() - - Same as ``isexpr(st)``. - - -.. method:: ST.issuite() - - Same as ``issuite(st)``. - - -.. method:: ST.tolist(line_info=False, col_info=False) - - Same as ``st2list(st, line_info, col_info)``. - - -.. method:: ST.totuple(line_info=False, col_info=False) - - Same as ``st2tuple(st, line_info, col_info)``. - - -Example: Emulation of :func:`compile` -------------------------------------- - -While many useful operations may take place between parsing and bytecode -generation, the simplest operation is to do nothing. For this purpose, using -the :mod:`parser` module to produce an intermediate data structure is equivalent -to the code :: - - >>> code = compile('a + 5', 'file.py', 'eval') - >>> a = 5 - >>> eval(code) - 10 - -The equivalent operation using the :mod:`parser` module is somewhat longer, and -allows the intermediate internal parse tree to be retained as an ST object:: - - >>> import parser - >>> st = parser.expr('a + 5') - >>> code = st.compile('file.py') - >>> a = 5 - >>> eval(code) - 10 - -An application which needs both ST and code objects can package this code into -readily available functions:: - - import parser - - def load_suite(source_string): - st = parser.suite(source_string) - return st, st.compile() - - def load_expression(source_string): - st = parser.expr(source_string) - return st, st.compile() diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index bf6fee44df2c885..04810f5204397be 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1134,7 +1134,7 @@ call fails (for example because the path doesn't exist). Create a hard link pointing to a path named *target*. - .. versionchanged:: 3.8 + .. versionadded:: 3.8 .. method:: Path.write_bytes(data) @@ -1196,9 +1196,12 @@ os and os.path pathlib :func:`os.path.exists` :meth:`Path.exists` :func:`os.path.expanduser` :meth:`Path.expanduser` and :meth:`Path.home` +:func:`os.listdir` :meth:`Path.iterdir` :func:`os.path.isdir` :meth:`Path.is_dir` :func:`os.path.isfile` :meth:`Path.is_file` :func:`os.path.islink` :meth:`Path.is_symlink` +:func:`os.link` :meth:`Path.link_to` +:func:`os.symlink` :meth:`Path.symlink_to` :func:`os.readlink` :meth:`Path.readlink` :func:`os.stat` :meth:`Path.stat`, :meth:`Path.owner`, diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst index 2066cbb9fc57cee..3b17b9a62198705 100644 --- a/Doc/library/pkgutil.rst +++ b/Doc/library/pkgutil.rst @@ -68,7 +68,7 @@ support. .. class:: ImpLoader(fullname, file, filename, etc) - :term:`Loader` that wraps Python's "classic" import algorithm. + :term:`Loader ` that wraps Python's "classic" import algorithm. .. deprecated:: 3.3 This emulation is no longer needed, as the standard import mechanism diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst index a12a5bb0b1aa2c0..9b5c8ee645a3864 100644 --- a/Doc/library/py_compile.rst +++ b/Doc/library/py_compile.rst @@ -125,21 +125,33 @@ byte-code cache files in the directory containing the source code. system external to Python like a build system. -.. function:: main(args=None) +Command-Line Interface +---------------------- - Compile several source files. The files named in *args* (or on the command - line, if *args* is ``None``) are compiled and the resulting byte-code is - cached in the normal manner. This function does not search a directory - structure to locate source files; it only compiles files named explicitly. - If ``'-'`` is the only parameter in args, the list of files is taken from - standard input. +This module can be invoked as a script to compile several source +files. The files named in *filenames* are compiled and the resulting +bytecode is cached in the normal manner. This program does not search +a directory structure to locate source files; it only compiles files +named explicitly. The exit status is nonzero if one of the files could +not be compiled. - .. versionchanged:: 3.2 - Added support for ``'-'``. +.. program:: python -m py_compile + +.. cmdoption:: ... + - + + Positional arguments are files to compile. If ``-`` is the only + parameter, the list of files is taken from standard input. + +.. cmdoption:: -q, --quiet + + Suppress errors output. + +.. versionchanged:: 3.2 + Added support for ``-``. -When this module is run as a script, the :func:`main` is used to compile all the -files named on the command line. The exit status is nonzero if one of the files -could not be compiled. +.. versionchanged:: 3.10 + Added support for :option:`-q`. .. seealso:: diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index d798c1a9d10a059..5bcac20a4c60485 100755 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1695,7 +1695,9 @@ to sockets. .. method:: socket.setsockopt(level, optname, value: int) .. method:: socket.setsockopt(level, optname, value: buffer) + :noindex: .. method:: socket.setsockopt(level, optname, None, optlen: int) + :noindex: .. index:: module: struct diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 852091c02ec9a48..1cfd165202d0ef2 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -2032,6 +2032,16 @@ to speed up repeated connections from the same clients. .. versionadded:: 3.7 +.. attribute:: SSLContext.security_level + + An integer representing the `security level + `_ + for the context. This attribute is read-only. + + .. availability:: OpenSSL 1.1.0 or newer + + .. versionadded:: 3.10 + .. attribute:: SSLContext.verify_flags The flags for certificate verification operations. You can set flags like diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 7028d240c59ebb4..5a10faa7bbd293b 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4205,7 +4205,7 @@ The constructors for both classes work the same: Note, the non-operator versions of :meth:`union`, :meth:`intersection`, - :meth:`difference`, and :meth:`symmetric_difference`, :meth:`issubset`, and + :meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:`issuperset` methods will accept any iterable as an argument. In contrast, their operator based counterparts require their arguments to be sets. This precludes error-prone constructions like ``set('abc') & 'cbs'`` diff --git a/Doc/library/string.rst b/Doc/library/string.rst index fa906f799c1082c..62e86d6dd97066c 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -308,7 +308,7 @@ non-empty format specification typically modifies the result. The general form of a *standard format specifier* is: -.. productionlist:: sf +.. productionlist:: format_spec: [[`fill`]`align`][`sign`][#][0][`width`][`grouping_option`][.`precision`][`type`] fill: align: "<" | ">" | "=" | "^" diff --git a/Doc/library/symbol.rst b/Doc/library/symbol.rst deleted file mode 100644 index d56600af29d6e2e..000000000000000 --- a/Doc/library/symbol.rst +++ /dev/null @@ -1,32 +0,0 @@ -:mod:`symbol` --- Constants used with Python parse trees -======================================================== - -.. module:: symbol - :synopsis: Constants representing internal nodes of the parse tree. - -.. sectionauthor:: Fred L. Drake, Jr. - -**Source code:** :source:`Lib/symbol.py` - --------------- - -This module provides constants which represent the numeric values of internal -nodes of the parse tree. Unlike most Python constants, these use lower-case -names. Refer to the file :file:`Grammar/Grammar` in the Python distribution for -the definitions of the names in the context of the language grammar. The -specific numeric values which the names map to may change between Python -versions. - -.. warning:: - - The symbol module is deprecated and will be removed in future versions of - Python. - -This module also provides one additional data object: - - -.. data:: sym_name - - Dictionary mapping the numeric values of the constants defined in this module - back to name strings, allowing more human-readable representation of parse trees - to be generated. diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst index 3efdecb5af7102f..c9521d649b893e3 100644 --- a/Doc/library/symtable.rst +++ b/Doc/library/symtable.rst @@ -156,6 +156,10 @@ Examining Symbol Tables Return ``True`` if the symbol is local to its block. + .. method:: is_annotated() + + Return ``True`` if the symbol is annotated. + .. method:: is_free() Return ``True`` if the symbol is referenced in its block, but not assigned diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index c204263d3a094c1..cca466b56979487 100644 --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -151,6 +151,7 @@ Some facts and figures: .. class:: TarFile + :noindex: Class for reading and writing tar archives. Do not use this class directly: use :func:`tarfile.open` instead. See :ref:`tarfile-objects`. diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst index a59817c10392109..3a2b88c0cb6a205 100644 --- a/Doc/library/tempfile.rst +++ b/Doc/library/tempfile.rst @@ -175,9 +175,8 @@ The module defines the following user-callable items: If you want to force a bytes return value with otherwise default behavior, pass ``suffix=b''``. - If *text* is specified, it indicates whether to open the file in binary - mode (the default) or text mode. On some platforms, this makes no - difference. + If *text* is specified and true, the file is opened in text mode. + Otherwise, (the default) the file is opened in binary mode. :func:`mkstemp` returns a tuple containing an OS-level handle to an open file (as would be returned by :func:`os.open`) and the absolute pathname diff --git a/Doc/library/test.rst b/Doc/library/test.rst index cd05ef07b4a2121..6495b4844449e59 100644 --- a/Doc/library/test.rst +++ b/Doc/library/test.rst @@ -878,7 +878,7 @@ The :mod:`test.support` module defines the following functions: missing. -.. function:: check__all__(test_case, module, name_of_module=None, extra=(), blacklist=()) +.. function:: check__all__(test_case, module, name_of_module=None, extra=(), not_exported=()) Assert that the ``__all__`` variable of *module* contains all public names. @@ -895,8 +895,8 @@ The :mod:`test.support` module defines the following functions: detected as "public", like objects without a proper ``__module__`` attribute. If provided, it will be added to the automatically detected ones. - The *blacklist* argument can be a set of names that must not be treated as part of - the public API even though their names indicate otherwise. + The *not_exported* argument can be a set of names that must not be treated + as part of the public API even though their names indicate otherwise. Example use:: @@ -912,10 +912,10 @@ The :mod:`test.support` module defines the following functions: class OtherTestCase(unittest.TestCase): def test__all__(self): extra = {'BAR_CONST', 'FOO_CONST'} - blacklist = {'baz'} # Undocumented name. + not_exported = {'baz'} # Undocumented name. # bar imports part of its API from _bar. support.check__all__(self, bar, ('bar', '_bar'), - extra=extra, blacklist=blacklist) + extra=extra, not_exported=not_exported) .. versionadded:: 3.6 diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 458e39bf721c68a..7fcf93d74610eba 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -394,7 +394,8 @@ since it is impossible to detect the termination of alien threads. .. impl-detail:: - In CPython, due to the :term:`Global Interpreter Lock`, only one thread + In CPython, due to the :term:`Global Interpreter Lock + `, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome this limitation). If you want your application to make better use of the computational diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst index 2dc44ad36a7f736..9f954255c8b300f 100644 --- a/Doc/library/tkinter.rst +++ b/Doc/library/tkinter.rst @@ -464,12 +464,11 @@ The Packer .. index:: single: packing (widgets) The packer is one of Tk's geometry-management mechanisms. Geometry managers -are used to specify the relative positioning of the positioning of widgets -within their container - their mutual *master*. In contrast to the more -cumbersome *placer* (which is used less commonly, and we do not cover here), the -packer takes qualitative relationship specification - *above*, *to the left of*, -*filling*, etc - and works everything out to determine the exact placement -coordinates for you. +are used to specify the relative positioning of widgets within their container - +their mutual *master*. In contrast to the more cumbersome *placer* (which is +used less commonly, and we do not cover here), the packer takes qualitative +relationship specification - *above*, *to the left of*, *filling*, etc - and +works everything out to determine the exact placement coordinates for you. The size of any *master* widget is determined by the size of the "slave widgets" inside. The packer is used to control where slave widgets appear inside the @@ -542,31 +541,35 @@ the variable, with no further intervention on your part. For example:: - class App(Frame): - def __init__(self, master=None): + import tkinter as tk + + class App(tk.Frame): + def __init__(self, master): super().__init__(master) self.pack() - self.entrythingy = Entry() + self.entrythingy = tk.Entry() self.entrythingy.pack() - # here is the application variable - self.contents = StringVar() - # set it to some value + # Create the application variable. + self.contents = tk.StringVar() + # Set it to some value. self.contents.set("this is a variable") - # tell the entry widget to watch this variable + # Tell the entry widget to watch this variable. self.entrythingy["textvariable"] = self.contents - # and here we get a callback when the user hits return. - # we will have the program print out the value of the - # application variable when the user hits return + # Define a callback for when the user hits return. + # It prints the current value of the variable. self.entrythingy.bind('', - self.print_contents) + self.print_contents) def print_contents(self, event): - print("hi. contents of entry is now ---->", + print("Hi. The current entry content is:", self.contents.get()) + root = tk.Tk() + myapp = App(root) + myapp.mainloop() The Window Manager ^^^^^^^^^^^^^^^^^^ @@ -861,4 +864,4 @@ use raw reads or ``os.read(file.fileno(), maxbytecount)``. WRITABLE EXCEPTION - Constants used in the *mask* arguments. \ No newline at end of file + Constants used in the *mask* arguments. diff --git a/Doc/library/token.rst b/Doc/library/token.rst index dab8f0fa9b64fcf..a1aceba96ce0306 100644 --- a/Doc/library/token.rst +++ b/Doc/library/token.rst @@ -11,7 +11,7 @@ -------------- This module provides constants which represent the numeric values of leaf nodes -of the parse tree (terminal tokens). Refer to the file :file:`Grammar/Grammar` +of the parse tree (terminal tokens). Refer to the file :file:`Grammar/Tokens` in the Python distribution for the definitions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python versions. @@ -70,6 +70,7 @@ the :mod:`tokenize` module. .. data:: TYPE_COMMENT + :noindex: Token value indicating that a type comment was recognized. Such tokens are only produced when :func:`ast.parse()` is invoked with diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index fed85045435b1b6..d3487537df99a95 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -1069,6 +1069,7 @@ More drawing control ~~~~~~~~~~~~~~~~~~~~ .. function:: reset() + :noindex: Delete the turtle's drawings from the screen, re-center the turtle and set variables to the default values. @@ -1090,6 +1091,7 @@ More drawing control .. function:: clear() + :noindex: Delete the turtle's drawings from the screen. Do not move turtle. State and position of the turtle as well as drawings of other turtles are not affected. @@ -1362,6 +1364,7 @@ Using events ------------ .. function:: onclick(fun, btn=1, add=None) + :noindex: :param fun: a function with two arguments which will be called with the coordinates of the clicked point on the canvas diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index e5143c5f8d9e4a4..8208680669de6e2 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1,3 +1,4 @@ +======================================== :mod:`typing` --- Support for type hints ======================================== @@ -34,7 +35,7 @@ In the function ``greeting``, the argument ``name`` is expected to be of type arguments. Type aliases ------------- +============ A type alias is defined by assigning the type to the alias. In this example, ``Vector`` and ``List[float]`` will be treated as interchangeable synonyms:: @@ -72,7 +73,7 @@ Note that ``None`` as a type hint is a special case and is replaced by .. _distinct: NewType -------- +======= Use the :func:`NewType` helper function to create distinct types:: @@ -149,7 +150,7 @@ See :pep:`484` for more details. .. versionadded:: 3.5.2 Callable --------- +======== Frameworks expecting callback functions of specific signatures might be type hinted using ``Callable[[Arg1Type, Arg2Type], ReturnType]``. @@ -172,7 +173,7 @@ for the list of arguments in the type hint: ``Callable[..., ReturnType]``. .. _generics: Generics --------- +======== Since type information about objects kept in containers cannot be statically inferred in a generic way, abstract base classes have been extended to support @@ -199,7 +200,7 @@ called :class:`TypeVar`. User-defined generic types --------------------------- +========================== A user-defined class can be defined as a generic class. @@ -317,14 +318,14 @@ comparable for equality. The :data:`Any` type --------------------- +==================== A special kind of type is :data:`Any`. A static type checker will treat every type as being compatible with :data:`Any` and :data:`Any` as being compatible with every type. This means that it is possible to perform any operation or method call on a -value of type on :data:`Any` and assign it to any variable:: +value of type :data:`Any` and assign it to any variable:: from typing import Any @@ -395,7 +396,7 @@ manner. Use :data:`Any` to indicate that a value is dynamically typed. Nominal vs structural subtyping -------------------------------- +=============================== Initially :pep:`484` defined Python static type system as using *nominal subtyping*. This means that a class ``A`` is allowed where @@ -434,106 +435,152 @@ Moreover, by subclassing a special class :class:`Protocol`, a user can define new custom protocols to fully enjoy structural subtyping (see examples below). +Module contents +=============== -Classes, functions, and decorators ----------------------------------- +The module defines the following classes, functions and decorators. -The module defines the following classes, functions and decorators: +.. note:: -.. class:: TypeVar + This module defines several types that are subclasses of pre-existing + standard library classes which also extend :class:`Generic` + to support type variables inside ``[]``. + These types became redundant in Python 3.9 when the + corresponding pre-existing classes were enhanced to support ``[]``. - Type variable. + The redundant types are deprecated as of Python 3.9 but no + deprecation warnings will be issued by the interpreter. + It is expected that type checkers will flag the deprecated types + when the checked program targets Python 3.9 or newer. - Usage:: + The deprecated types will be removed from the :mod:`typing` module + in the first Python version released 5 years after the release of Python 3.9.0. + See details in :pep:`585`—*Type Hinting Generics In Standard Collections*. - T = TypeVar('T') # Can be anything - A = TypeVar('A', str, bytes) # Must be str or bytes - Type variables exist primarily for the benefit of static type - checkers. They serve as the parameters for generic types as well - as for generic function definitions. See class Generic for more - information on generic types. Generic functions work as follows:: +Special typing primitives +------------------------- - def repeat(x: T, n: int) -> Sequence[T]: - """Return a list containing n references to x.""" - return [x]*n +Special types +""""""""""""" - def longest(x: A, y: A) -> A: - """Return the longest of two strings.""" - return x if len(x) >= len(y) else y +These can be used as types in annotations and do not support ``[]``. - The latter example's signature is essentially the overloading - of ``(str, str) -> str`` and ``(bytes, bytes) -> bytes``. Also note - that if the arguments are instances of some subclass of :class:`str`, - the return type is still plain :class:`str`. +.. data:: Any - At runtime, ``isinstance(x, T)`` will raise :exc:`TypeError`. In general, - :func:`isinstance` and :func:`issubclass` should not be used with types. + Special type indicating an unconstrained type. - Type variables may be marked covariant or contravariant by passing - ``covariant=True`` or ``contravariant=True``. See :pep:`484` for more - details. By default type variables are invariant. Alternatively, - a type variable may specify an upper bound using ``bound=``. - This means that an actual type substituted (explicitly or implicitly) - for the type variable must be a subclass of the boundary type, - see :pep:`484`. + * Every type is compatible with :data:`Any`. + * :data:`Any` is compatible with every type. -.. class:: Generic +.. data:: NoReturn - Abstract base class for generic types. + Special type indicating that a function never returns. + For example:: - A generic type is typically declared by inheriting from an - instantiation of this class with one or more type variables. - For example, a generic mapping type might be defined as:: + from typing import NoReturn - class Mapping(Generic[KT, VT]): - def __getitem__(self, key: KT) -> VT: - ... - # Etc. + def stop() -> NoReturn: + raise RuntimeError('no way') - This class can then be used as follows:: + .. versionadded:: 3.5.4 + .. versionadded:: 3.6.2 - X = TypeVar('X') - Y = TypeVar('Y') +Special forms +""""""""""""" - def lookup_name(mapping: Mapping[X, Y], key: X, default: Y) -> Y: - try: - return mapping[key] - except KeyError: - return default +These can be used as types in annotations using ``[]``, each having a unique syntax. -.. class:: Protocol(Generic) +.. data:: Tuple - Base class for protocol classes. Protocol classes are defined like this:: + Tuple type; ``Tuple[X, Y]`` is the type of a tuple of two items + with the first item of type X and the second of type Y. The type of + the empty tuple can be written as ``Tuple[()]``. - class Proto(Protocol): - def meth(self) -> int: - ... + Example: ``Tuple[T1, T2]`` is a tuple of two elements corresponding + to type variables T1 and T2. ``Tuple[int, float, str]`` is a tuple + of an int, a float and a string. - Such classes are primarily used with static type checkers that recognize - structural subtyping (static duck-typing), for example:: + To specify a variable-length tuple of homogeneous type, + use literal ellipsis, e.g. ``Tuple[int, ...]``. A plain :data:`Tuple` + is equivalent to ``Tuple[Any, ...]``, and in turn to :class:`tuple`. - class C: - def meth(self) -> int: - return 0 + .. deprecated:: 3.9 + :class:`builtins.tuple ` now supports ``[]``. See :pep:`585`. - def func(x: Proto) -> int: - return x.meth() +.. data:: Union - func(C()) # Passes static type check + Union type; ``Union[X, Y]`` means either X or Y. - See :pep:`544` for details. Protocol classes decorated with - :func:`runtime_checkable` (described later) act as simple-minded runtime - protocols that check only the presence of given attributes, ignoring their - type signatures. + To define a union, use e.g. ``Union[int, str]``. Details: - Protocol classes can be generic, for example:: + * The arguments must be types and there must be at least one. - class GenProto(Protocol[T]): - def meth(self) -> T: - ... + * Unions of unions are flattened, e.g.:: - .. versionadded:: 3.8 + Union[Union[int, str], float] == Union[int, str, float] + + * Unions of a single argument vanish, e.g.:: + + Union[int] == int # The constructor actually returns int + + * Redundant arguments are skipped, e.g.:: + + Union[int, str, int] == Union[int, str] + + * When comparing unions, the argument order is ignored, e.g.:: + + Union[int, str] == Union[str, int] + + * You cannot subclass or instantiate a union. + + * You cannot write ``Union[X][Y]``. + + * You can use ``Optional[X]`` as a shorthand for ``Union[X, None]``. + + .. versionchanged:: 3.7 + Don't remove explicit subclasses from unions at runtime. + +.. data:: Optional + + Optional type. + + ``Optional[X]`` is equivalent to ``Union[X, None]``. + + Note that this is not the same concept as an optional argument, + which is one that has a default. An optional argument with a + default does not require the ``Optional`` qualifier on its type + annotation just because it is optional. For example:: + + def foo(arg: int = 0) -> None: + ... + + On the other hand, if an explicit value of ``None`` is allowed, the + use of ``Optional`` is appropriate, whether the argument is optional + or not. For example:: + + def foo(arg: Optional[int] = None) -> None: + ... + +.. data:: Callable + + Callable type; ``Callable[[int], str]`` is a function of (int) -> str. + + The subscription syntax must always be used with exactly two + values: the argument list and the return type. The argument list + must be a list of types or an ellipsis; the return type must be + a single type. + + There is no syntax to indicate optional or keyword arguments; + such function types are rarely used as callback types. + ``Callable[..., ReturnType]`` (literal ellipsis) can be used to + type hint a callable taking any number of arguments and returning + ``ReturnType``. A plain :data:`Callable` is equivalent to + ``Callable[..., Any]``, and in turn to + :class:`collections.abc.Callable`. + + .. deprecated:: 3.9 + :class:`collections.abc.Callable` now supports ``[]``. See :pep:`585`. .. class:: Type(Generic[CT_co]) @@ -577,374 +624,342 @@ The module defines the following classes, functions and decorators: .. versionadded:: 3.5.2 -.. class:: Iterable(Generic[T_co]) + .. deprecated:: 3.9 + :class:`builtins.type ` now supports ``[]``. See :pep:`585`. - A generic version of :class:`collections.abc.Iterable`. +.. data:: Literal -.. class:: Iterator(Iterable[T_co]) + A type that can be used to indicate to type checkers that the + corresponding variable or function parameter has a value equivalent to + the provided literal (or one of several literals). For example:: - A generic version of :class:`collections.abc.Iterator`. + def validate_simple(data: Any) -> Literal[True]: # always returns True + ... -.. class:: Reversible(Iterable[T_co]) + MODE = Literal['r', 'rb', 'w', 'wb'] + def open_helper(file: str, mode: MODE) -> str: + ... - A generic version of :class:`collections.abc.Reversible`. + open_helper('/some/path', 'r') # Passes type check + open_helper('/other/path', 'typo') # Error in type checker -.. class:: SupportsInt + ``Literal[...]`` cannot be subclassed. At runtime, an arbitrary value + is allowed as type argument to ``Literal[...]``, but type checkers may + impose restrictions. See :pep:`586` for more details about literal types. - An ABC with one abstract method ``__int__``. + .. versionadded:: 3.8 -.. class:: SupportsFloat +.. data:: ClassVar - An ABC with one abstract method ``__float__``. + Special type construct to mark class variables. -.. class:: SupportsComplex + As introduced in :pep:`526`, a variable annotation wrapped in ClassVar + indicates that a given attribute is intended to be used as a class variable + and should not be set on instances of that class. Usage:: - An ABC with one abstract method ``__complex__``. + class Starship: + stats: ClassVar[Dict[str, int]] = {} # class variable + damage: int = 10 # instance variable -.. class:: SupportsBytes + :data:`ClassVar` accepts only types and cannot be further subscribed. - An ABC with one abstract method ``__bytes__``. + :data:`ClassVar` is not a class itself, and should not + be used with :func:`isinstance` or :func:`issubclass`. + :data:`ClassVar` does not change Python runtime behavior, but + it can be used by third-party type checkers. For example, a type checker + might flag the following code as an error:: -.. class:: SupportsIndex + enterprise_d = Starship(3000) + enterprise_d.stats = {} # Error, setting class variable on instance + Starship.stats = {} # This is OK - An ABC with one abstract method ``__index__``. + .. versionadded:: 3.5.3 - .. versionadded:: 3.8 +.. data:: Final -.. class:: SupportsAbs + A special typing construct to indicate to type checkers that a name + cannot be re-assigned or overridden in a subclass. For example:: - An ABC with one abstract method ``__abs__`` that is covariant - in its return type. + MAX_SIZE: Final = 9000 + MAX_SIZE += 1 # Error reported by type checker -.. class:: SupportsRound + class Connection: + TIMEOUT: Final[int] = 10 - An ABC with one abstract method ``__round__`` - that is covariant in its return type. + class FastConnector(Connection): + TIMEOUT = 1 # Error reported by type checker -.. class:: Container(Generic[T_co]) + There is no runtime checking of these properties. See :pep:`591` for + more details. - A generic version of :class:`collections.abc.Container`. + .. versionadded:: 3.8 -.. class:: Hashable +.. data:: Annotated - An alias to :class:`collections.abc.Hashable` + A type, introduced in :pep:`593` (``Flexible function and variable + annotations``), to decorate existing types with context-specific metadata + (possibly multiple pieces of it, as ``Annotated`` is variadic). + Specifically, a type ``T`` can be annotated with metadata ``x`` via the + typehint ``Annotated[T, x]``. This metadata can be used for either static + analysis or at runtime. If a library (or tool) encounters a typehint + ``Annotated[T, x]`` and has no special logic for metadata ``x``, it + should ignore it and simply treat the type as ``T``. Unlike the + ``no_type_check`` functionality that currently exists in the ``typing`` + module which completely disables typechecking annotations on a function + or a class, the ``Annotated`` type allows for both static typechecking + of ``T`` (e.g., via mypy or Pyre, which can safely ignore ``x``) + together with runtime access to ``x`` within a specific application. -.. class:: Sized + Ultimately, the responsibility of how to interpret the annotations (if + at all) is the responsibility of the tool or library encountering the + ``Annotated`` type. A tool or library encountering an ``Annotated`` type + can scan through the annotations to determine if they are of interest + (e.g., using ``isinstance()``). - An alias to :class:`collections.abc.Sized` + When a tool or a library does not support annotations or encounters an + unknown annotation it should just ignore it and treat annotated type as + the underlying type. -.. class:: Collection(Sized, Iterable[T_co], Container[T_co]) + It's up to the tool consuming the annotations to decide whether the + client is allowed to have several annotations on one type and how to + merge those annotations. - A generic version of :class:`collections.abc.Collection` + Since the ``Annotated`` type allows you to put several annotations of + the same (or different) type(s) on any node, the tools or libraries + consuming those annotations are in charge of dealing with potential + duplicates. For example, if you are doing value range analysis you might + allow this:: - .. versionadded:: 3.6.0 + T1 = Annotated[int, ValueRange(-10, 5)] + T2 = Annotated[T1, ValueRange(-20, 3)] -.. class:: AbstractSet(Sized, Collection[T_co]) + Passing ``include_extras=True`` to :func:`get_type_hints` lets one + access the extra annotations at runtime. - A generic version of :class:`collections.abc.Set`. + The details of the syntax: -.. class:: MutableSet(AbstractSet[T]) + * The first argument to ``Annotated`` must be a valid type - A generic version of :class:`collections.abc.MutableSet`. + * Multiple type annotations are supported (``Annotated`` supports variadic + arguments):: -.. class:: Mapping(Sized, Collection[KT], Generic[VT_co]) + Annotated[int, ValueRange(3, 10), ctype("char")] - A generic version of :class:`collections.abc.Mapping`. - This type can be used as follows:: + * ``Annotated`` must be called with at least two arguments ( + ``Annotated[int]`` is not valid) - def get_position_in_index(word_list: Mapping[str, int], word: str) -> int: - return word_list[word] + * The order of the annotations is preserved and matters for equality + checks:: -.. class:: MutableMapping(Mapping[KT, VT]) + Annotated[int, ValueRange(3, 10), ctype("char")] != Annotated[ + int, ctype("char"), ValueRange(3, 10) + ] - A generic version of :class:`collections.abc.MutableMapping`. + * Nested ``Annotated`` types are flattened, with metadata ordered + starting with the innermost annotation:: -.. class:: Sequence(Reversible[T_co], Collection[T_co]) + Annotated[Annotated[int, ValueRange(3, 10)], ctype("char")] == Annotated[ + int, ValueRange(3, 10), ctype("char") + ] - A generic version of :class:`collections.abc.Sequence`. + * Duplicated annotations are not removed:: -.. class:: MutableSequence(Sequence[T]) + Annotated[int, ValueRange(3, 10)] != Annotated[ + int, ValueRange(3, 10), ValueRange(3, 10) + ] - A generic version of :class:`collections.abc.MutableSequence`. + * ``Annotated`` can be used with nested and generic aliases:: -.. class:: ByteString(Sequence[int]) + T = TypeVar('T') + Vec = Annotated[List[Tuple[T, T]], MaxLen(10)] + V = Vec[int] - A generic version of :class:`collections.abc.ByteString`. + V == Annotated[List[Tuple[int, int]], MaxLen(10)] - This type represents the types :class:`bytes`, :class:`bytearray`, - and :class:`memoryview` of byte sequences. + .. versionadded:: 3.9 - As a shorthand for this type, :class:`bytes` can be used to - annotate arguments of any of the types mentioned above. +Building generic types +"""""""""""""""""""""" -.. class:: Deque(deque, MutableSequence[T]) +These are not used in annotations. They are building blocks for creating generic types. - A generic version of :class:`collections.deque`. +.. class:: Generic - .. versionadded:: 3.5.4 - .. versionadded:: 3.6.1 + Abstract base class for generic types. -.. class:: List(list, MutableSequence[T]) + A generic type is typically declared by inheriting from an + instantiation of this class with one or more type variables. + For example, a generic mapping type might be defined as:: - Generic version of :class:`list`. - Useful for annotating return types. To annotate arguments it is preferred - to use an abstract collection type such as :class:`Sequence` or - :class:`Iterable`. + class Mapping(Generic[KT, VT]): + def __getitem__(self, key: KT) -> VT: + ... + # Etc. - This type may be used as follows:: + This class can then be used as follows:: - T = TypeVar('T', int, float) + X = TypeVar('X') + Y = TypeVar('Y') - def vec2(x: T, y: T) -> List[T]: - return [x, y] + def lookup_name(mapping: Mapping[X, Y], key: X, default: Y) -> Y: + try: + return mapping[key] + except KeyError: + return default - def keep_positives(vector: Sequence[T]) -> List[T]: - return [item for item in vector if item > 0] +.. class:: TypeVar -.. class:: Set(set, MutableSet[T]) + Type variable. - A generic version of :class:`builtins.set `. - Useful for annotating return types. To annotate arguments it is preferred - to use an abstract collection type such as :class:`AbstractSet`. + Usage:: -.. class:: FrozenSet(frozenset, AbstractSet[T_co]) + T = TypeVar('T') # Can be anything + A = TypeVar('A', str, bytes) # Must be str or bytes - A generic version of :class:`builtins.frozenset `. + Type variables exist primarily for the benefit of static type + checkers. They serve as the parameters for generic types as well + as for generic function definitions. See class Generic for more + information on generic types. Generic functions work as follows:: -.. class:: MappingView(Sized, Iterable[T_co]) + def repeat(x: T, n: int) -> Sequence[T]: + """Return a list containing n references to x.""" + return [x]*n - A generic version of :class:`collections.abc.MappingView`. + def longest(x: A, y: A) -> A: + """Return the longest of two strings.""" + return x if len(x) >= len(y) else y -.. class:: KeysView(MappingView[KT_co], AbstractSet[KT_co]) + The latter example's signature is essentially the overloading + of ``(str, str) -> str`` and ``(bytes, bytes) -> bytes``. Also note + that if the arguments are instances of some subclass of :class:`str`, + the return type is still plain :class:`str`. - A generic version of :class:`collections.abc.KeysView`. + At runtime, ``isinstance(x, T)`` will raise :exc:`TypeError`. In general, + :func:`isinstance` and :func:`issubclass` should not be used with types. -.. class:: ItemsView(MappingView, Generic[KT_co, VT_co]) + Type variables may be marked covariant or contravariant by passing + ``covariant=True`` or ``contravariant=True``. See :pep:`484` for more + details. By default type variables are invariant. Alternatively, + a type variable may specify an upper bound using ``bound=``. + This means that an actual type substituted (explicitly or implicitly) + for the type variable must be a subclass of the boundary type, + see :pep:`484`. - A generic version of :class:`collections.abc.ItemsView`. +.. data:: AnyStr -.. class:: ValuesView(MappingView[VT_co]) + ``AnyStr`` is a type variable defined as + ``AnyStr = TypeVar('AnyStr', str, bytes)``. - A generic version of :class:`collections.abc.ValuesView`. + It is meant to be used for functions that may accept any kind of string + without allowing different kinds of strings to mix. For example:: -.. class:: Awaitable(Generic[T_co]) + def concat(a: AnyStr, b: AnyStr) -> AnyStr: + return a + b - A generic version of :class:`collections.abc.Awaitable`. + concat(u"foo", u"bar") # Ok, output has type 'unicode' + concat(b"foo", b"bar") # Ok, output has type 'bytes' + concat(u"foo", b"bar") # Error, cannot mix unicode and bytes - .. versionadded:: 3.5.2 +.. class:: Protocol(Generic) -.. class:: Coroutine(Awaitable[V_co], Generic[T_co T_contra, V_co]) + Base class for protocol classes. Protocol classes are defined like this:: - A generic version of :class:`collections.abc.Coroutine`. - The variance and order of type variables - correspond to those of :class:`Generator`, for example:: + class Proto(Protocol): + def meth(self) -> int: + ... - from typing import List, Coroutine - c = None # type: Coroutine[List[str], str, int] - ... - x = c.send('hi') # type: List[str] - async def bar() -> None: - x = await c # type: int + Such classes are primarily used with static type checkers that recognize + structural subtyping (static duck-typing), for example:: - .. versionadded:: 3.5.3 + class C: + def meth(self) -> int: + return 0 -.. class:: AsyncIterable(Generic[T_co]) + def func(x: Proto) -> int: + return x.meth() - A generic version of :class:`collections.abc.AsyncIterable`. + func(C()) # Passes static type check - .. versionadded:: 3.5.2 + See :pep:`544` for details. Protocol classes decorated with + :func:`runtime_checkable` (described later) act as simple-minded runtime + protocols that check only the presence of given attributes, ignoring their + type signatures. -.. class:: AsyncIterator(AsyncIterable[T_co]) + Protocol classes can be generic, for example:: - A generic version of :class:`collections.abc.AsyncIterator`. + class GenProto(Protocol[T]): + def meth(self) -> T: + ... - .. versionadded:: 3.5.2 + .. versionadded:: 3.8 -.. class:: ContextManager(Generic[T_co]) +.. decorator:: runtime_checkable - A generic version of :class:`contextlib.AbstractContextManager`. + Mark a protocol class as a runtime protocol. - .. versionadded:: 3.5.4 - .. versionadded:: 3.6.0 + Such a protocol can be used with :func:`isinstance` and :func:`issubclass`. + This raises :exc:`TypeError` when applied to a non-protocol class. This + allows a simple-minded structural check, very similar to "one trick ponies" + in :mod:`collections.abc` such as :class:`Iterable`. For example:: -.. class:: AsyncContextManager(Generic[T_co]) + @runtime_checkable + class Closable(Protocol): + def close(self): ... - A generic version of :class:`contextlib.AbstractAsyncContextManager`. + assert isinstance(open('/some/file'), Closable) - .. versionadded:: 3.5.4 - .. versionadded:: 3.6.2 + .. note:: -.. class:: Dict(dict, MutableMapping[KT, VT]) + :func:`runtime_checkable` will check only the presence of the required methods, + not their type signatures! For example, :class:`builtins.complex ` + implements :func:`__float__`, therefore it passes an :func:`issubclass` check + against :class:`SupportsFloat`. However, the ``complex.__float__`` method + exists only to raise a :class:`TypeError` with a more informative message. - A generic version of :class:`dict`. - Useful for annotating return types. To annotate arguments it is preferred - to use an abstract collection type such as :class:`Mapping`. + .. versionadded:: 3.8 - This type can be used as follows:: +Other special directives +"""""""""""""""""""""""" - def count_words(text: str) -> Dict[str, int]: - ... +These are not used in annotations. They are building blocks for declaring types. -.. class:: DefaultDict(collections.defaultdict, MutableMapping[KT, VT]) +.. class:: NamedTuple - A generic version of :class:`collections.defaultdict`. + Typed version of :func:`collections.namedtuple`. - .. versionadded:: 3.5.2 + Usage:: -.. class:: OrderedDict(collections.OrderedDict, MutableMapping[KT, VT]) + class Employee(NamedTuple): + name: str + id: int - A generic version of :class:`collections.OrderedDict`. + This is equivalent to:: - .. versionadded:: 3.7.2 + Employee = collections.namedtuple('Employee', ['name', 'id']) -.. class:: Counter(collections.Counter, Dict[T, int]) + To give a field a default value, you can assign to it in the class body:: - A generic version of :class:`collections.Counter`. + class Employee(NamedTuple): + name: str + id: int = 3 - .. versionadded:: 3.5.4 - .. versionadded:: 3.6.1 + employee = Employee('Guido') + assert employee.id == 3 -.. class:: ChainMap(collections.ChainMap, MutableMapping[KT, VT]) + Fields with a default value must come after any fields without a default. - A generic version of :class:`collections.ChainMap`. + The resulting class has an extra attribute ``__annotations__`` giving a + dict that maps the field names to the field types. (The field names are in + the ``_fields`` attribute and the default values are in the + ``_field_defaults`` attribute both of which are part of the namedtuple + API.) - .. versionadded:: 3.5.4 - .. versionadded:: 3.6.1 + ``NamedTuple`` subclasses can also have docstrings and methods:: -.. class:: Generator(Iterator[T_co], Generic[T_co, T_contra, V_co]) - - A generator can be annotated by the generic type - ``Generator[YieldType, SendType, ReturnType]``. For example:: - - def echo_round() -> Generator[int, float, str]: - sent = yield 0 - while sent >= 0: - sent = yield round(sent) - return 'Done' - - Note that unlike many other generics in the typing module, the ``SendType`` - of :class:`Generator` behaves contravariantly, not covariantly or - invariantly. - - If your generator will only yield values, set the ``SendType`` and - ``ReturnType`` to ``None``:: - - def infinite_stream(start: int) -> Generator[int, None, None]: - while True: - yield start - start += 1 - - Alternatively, annotate your generator as having a return type of - either ``Iterable[YieldType]`` or ``Iterator[YieldType]``:: - - def infinite_stream(start: int) -> Iterator[int]: - while True: - yield start - start += 1 - -.. class:: AsyncGenerator(AsyncIterator[T_co], Generic[T_co, T_contra]) - - An async generator can be annotated by the generic type - ``AsyncGenerator[YieldType, SendType]``. For example:: - - async def echo_round() -> AsyncGenerator[int, float]: - sent = yield 0 - while sent >= 0.0: - rounded = await round(sent) - sent = yield rounded - - Unlike normal generators, async generators cannot return a value, so there - is no ``ReturnType`` type parameter. As with :class:`Generator`, the - ``SendType`` behaves contravariantly. - - If your generator will only yield values, set the ``SendType`` to - ``None``:: - - async def infinite_stream(start: int) -> AsyncGenerator[int, None]: - while True: - yield start - start = await increment(start) - - Alternatively, annotate your generator as having a return type of - either ``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``:: - - async def infinite_stream(start: int) -> AsyncIterator[int]: - while True: - yield start - start = await increment(start) - - .. versionadded:: 3.6.1 - -.. class:: Text - - ``Text`` is an alias for ``str``. It is provided to supply a forward - compatible path for Python 2 code: in Python 2, ``Text`` is an alias for - ``unicode``. - - Use ``Text`` to indicate that a value must contain a unicode string in - a manner that is compatible with both Python 2 and Python 3:: - - def add_unicode_checkmark(text: Text) -> Text: - return text + u' \u2713' - - .. versionadded:: 3.5.2 - -.. class:: IO - TextIO - BinaryIO - - Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])`` - and ``BinaryIO(IO[bytes])`` - represent the types of I/O streams such as returned by - :func:`open`. - -.. class:: Pattern - Match - - These type aliases - correspond to the return types from :func:`re.compile` and - :func:`re.match`. These types (and the corresponding functions) - are generic in ``AnyStr`` and can be made specific by writing - ``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or - ``Match[bytes]``. - -.. class:: NamedTuple - - Typed version of :func:`collections.namedtuple`. - - Usage:: - - class Employee(NamedTuple): - name: str - id: int - - This is equivalent to:: - - Employee = collections.namedtuple('Employee', ['name', 'id']) - - To give a field a default value, you can assign to it in the class body:: - - class Employee(NamedTuple): - name: str - id: int = 3 - - employee = Employee('Guido') - assert employee.id == 3 - - Fields with a default value must come after any fields without a default. - - The resulting class has an extra attribute ``__annotations__`` giving a - dict that maps the field names to the field types. (The field names are in - the ``_fields`` attribute and the default values are in the - ``_field_defaults`` attribute both of which are part of the namedtuple - API.) - - ``NamedTuple`` subclasses can also have docstrings and methods:: - - class Employee(NamedTuple): - """Represents an employee.""" - name: str - id: int = 3 + class Employee(NamedTuple): + """Represents an employee.""" + name: str + id: int = 3 def __repr__(self) -> str: return f'' @@ -967,13 +982,23 @@ The module defines the following classes, functions and decorators: Removed the ``_field_types`` attribute in favor of the more standard ``__annotations__`` attribute which has the same information. +.. function:: NewType(name, tp) + + A helper function to indicate a distinct type to a typechecker, + see :ref:`distinct`. At runtime it returns a function that returns + its argument. Usage:: + + UserId = NewType('UserId', int) + first_user = UserId(1) + + .. versionadded:: 3.5.2 .. class:: TypedDict(dict) - A simple typed namespace. At runtime it is equivalent to - a plain :class:`dict`. + Special construct to add type hints to a dictionary. + At runtime it is a plain :class:`dict`. - ``TypedDict`` creates a dictionary type that expects all of its + ``TypedDict`` declares a dictionary type that expects all of its instances to have a certain set of keys, where each key is associated with a value of a consistent type. This expectation is not checked at runtime but is only enforced by type checkers. @@ -1014,474 +1039,658 @@ The module defines the following classes, functions and decorators: .. versionadded:: 3.8 -.. class:: ForwardRef +Generic concrete collections +---------------------------- - A class used for internal typing representation of string forward references. - For example, ``List["SomeClass"]`` is implicitly transformed into - ``List[ForwardRef("SomeClass")]``. This class should not be instantiated by - a user, but may be used by introspection tools. +Corresponding to built-in types +""""""""""""""""""""""""""""""" -.. function:: NewType(name, tp) +.. class:: Dict(dict, MutableMapping[KT, VT]) - A helper function to indicate a distinct type to a typechecker, - see :ref:`distinct`. At runtime it returns a function that returns - its argument. Usage:: + A generic version of :class:`dict`. + Useful for annotating return types. To annotate arguments it is preferred + to use an abstract collection type such as :class:`Mapping`. - UserId = NewType('UserId', int) - first_user = UserId(1) + This type can be used as follows:: - .. versionadded:: 3.5.2 + def count_words(text: str) -> Dict[str, int]: + ... -.. function:: cast(typ, val) + .. deprecated:: 3.9 + :class:`builtins.dict ` now supports ``[]``. See :pep:`585`. - Cast a value to a type. +.. class:: List(list, MutableSequence[T]) - This returns the value unchanged. To the type checker this - signals that the return value has the designated type, but at - runtime we intentionally don't check anything (we want this - to be as fast as possible). + Generic version of :class:`list`. + Useful for annotating return types. To annotate arguments it is preferred + to use an abstract collection type such as :class:`Sequence` or + :class:`Iterable`. -.. function:: get_type_hints(obj, globalns=None, localns=None, include_extras=False) + This type may be used as follows:: - Return a dictionary containing type hints for a function, method, module - or class object. + T = TypeVar('T', int, float) - This is often the same as ``obj.__annotations__``. In addition, - forward references encoded as string literals are handled by evaluating - them in ``globals`` and ``locals`` namespaces. If necessary, - ``Optional[t]`` is added for function and method annotations if a default - value equal to ``None`` is set. For a class ``C``, return - a dictionary constructed by merging all the ``__annotations__`` along - ``C.__mro__`` in reverse order. + def vec2(x: T, y: T) -> List[T]: + return [x, y] - The function recursively replaces all ``Annotated[T, ...]`` with ``T``, - unless ``include_extras`` is set to ``True`` (see :class:`Annotated` for - more information). For example:: + def keep_positives(vector: Sequence[T]) -> List[T]: + return [item for item in vector if item > 0] - class Student(NamedTuple): - name: Annotated[str, 'some marker'] + .. deprecated:: 3.9 + :class:`builtins.list ` now supports ``[]``. See :pep:`585`. - get_type_hints(Student) == {'name': str} - get_type_hints(Student, include_extras=False) == {'name': str} - get_type_hints(Student, include_extras=True) == { - 'name': Annotated[str, 'some marker'] - } +.. class:: Set(set, MutableSet[T]) - .. versionchanged:: 3.9 - Added ``include_extras`` parameter as part of :pep:`593`. + A generic version of :class:`builtins.set `. + Useful for annotating return types. To annotate arguments it is preferred + to use an abstract collection type such as :class:`AbstractSet`. -.. function:: get_origin(tp) -.. function:: get_args(tp) + .. deprecated:: 3.9 + :class:`builtins.set ` now supports ``[]``. See :pep:`585`. - Provide basic introspection for generic types and special typing forms. +.. class:: FrozenSet(frozenset, AbstractSet[T_co]) - For a typing object of the form ``X[Y, Z, ...]`` these functions return - ``X`` and ``(Y, Z, ...)``. If ``X`` is a generic alias for a builtin or - :mod:`collections` class, it gets normalized to the original class. - For unsupported objects return ``None`` and ``()`` correspondingly. - Examples:: + A generic version of :class:`builtins.frozenset `. - assert get_origin(Dict[str, int]) is dict - assert get_args(Dict[int, str]) == (int, str) + .. deprecated:: 3.9 + :class:`builtins.frozenset ` now supports ``[]``. See :pep:`585`. - assert get_origin(Union[int, str]) is Union - assert get_args(Union[int, str]) == (int, str) +.. note:: :data:`Tuple` is a special form. - .. versionadded:: 3.8 +Corresponding to types in :mod:`collections` +"""""""""""""""""""""""""""""""""""""""""""" -.. decorator:: overload +.. class:: DefaultDict(collections.defaultdict, MutableMapping[KT, VT]) - The ``@overload`` decorator allows describing functions and methods - that support multiple different combinations of argument types. A series - of ``@overload``-decorated definitions must be followed by exactly one - non-``@overload``-decorated definition (for the same function/method). - The ``@overload``-decorated definitions are for the benefit of the - type checker only, since they will be overwritten by the - non-``@overload``-decorated definition, while the latter is used at - runtime but should be ignored by a type checker. At runtime, calling - a ``@overload``-decorated function directly will raise - :exc:`NotImplementedError`. An example of overload that gives a more - precise type than can be expressed using a union or a type variable:: + A generic version of :class:`collections.defaultdict`. - @overload - def process(response: None) -> None: - ... - @overload - def process(response: int) -> Tuple[int, str]: - ... - @overload - def process(response: bytes) -> str: - ... - def process(response): - + .. versionadded:: 3.5.2 - See :pep:`484` for details and comparison with other typing semantics. + .. deprecated:: 3.9 + :class:`collections.defaultdict` now supports ``[]``. See :pep:`585`. -.. decorator:: final +.. class:: OrderedDict(collections.OrderedDict, MutableMapping[KT, VT]) - A decorator to indicate to type checkers that the decorated method - cannot be overridden, and the decorated class cannot be subclassed. - For example:: + A generic version of :class:`collections.OrderedDict`. - class Base: - @final - def done(self) -> None: - ... - class Sub(Base): - def done(self) -> None: # Error reported by type checker - ... + .. versionadded:: 3.7.2 - @final - class Leaf: - ... - class Other(Leaf): # Error reported by type checker - ... + .. deprecated:: 3.9 + :class:`collections.OrderedDict` now supports ``[]``. See :pep:`585`. - There is no runtime checking of these properties. See :pep:`591` for - more details. +.. class:: ChainMap(collections.ChainMap, MutableMapping[KT, VT]) - .. versionadded:: 3.8 + A generic version of :class:`collections.ChainMap`. -.. decorator:: no_type_check + .. versionadded:: 3.5.4 + .. versionadded:: 3.6.1 - Decorator to indicate that annotations are not type hints. + .. deprecated:: 3.9 + :class:`collections.ChainMap` now supports ``[]``. See :pep:`585`. - This works as class or function :term:`decorator`. With a class, it - applies recursively to all methods defined in that class (but not - to methods defined in its superclasses or subclasses). +.. class:: Counter(collections.Counter, Dict[T, int]) - This mutates the function(s) in place. + A generic version of :class:`collections.Counter`. -.. decorator:: no_type_check_decorator + .. versionadded:: 3.5.4 + .. versionadded:: 3.6.1 - Decorator to give another decorator the :func:`no_type_check` effect. + .. deprecated:: 3.9 + :class:`collections.Counter` now supports ``[]``. See :pep:`585`. - This wraps the decorator with something that wraps the decorated - function in :func:`no_type_check`. +.. class:: Deque(deque, MutableSequence[T]) -.. decorator:: type_check_only + A generic version of :class:`collections.deque`. - Decorator to mark a class or function to be unavailable at runtime. + .. versionadded:: 3.5.4 + .. versionadded:: 3.6.1 - This decorator is itself not available at runtime. It is mainly - intended to mark classes that are defined in type stub files if - an implementation returns an instance of a private class:: + .. deprecated:: 3.9 + :class:`collections.deque` now supports ``[]``. See :pep:`585`. - @type_check_only - class Response: # private or not available at runtime - code: int - def get_header(self, name: str) -> str: ... +Other concrete types +"""""""""""""""""""" - def fetch_response() -> Response: ... +.. class:: IO + TextIO + BinaryIO - Note that returning instances of private classes is not recommended. - It is usually preferable to make such classes public. + Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])`` + and ``BinaryIO(IO[bytes])`` + represent the types of I/O streams such as returned by + :func:`open`. These types are also in the ``typing.io`` namespace. -.. decorator:: runtime_checkable +.. class:: Pattern + Match - Mark a protocol class as a runtime protocol. + These type aliases + correspond to the return types from :func:`re.compile` and + :func:`re.match`. These types (and the corresponding functions) + are generic in ``AnyStr`` and can be made specific by writing + ``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or + ``Match[bytes]``. These types are also in the ``typing.re`` namespace. - Such a protocol can be used with :func:`isinstance` and :func:`issubclass`. - This raises :exc:`TypeError` when applied to a non-protocol class. This - allows a simple-minded structural check, very similar to "one trick ponies" - in :mod:`collections.abc` such as :class:`Iterable`. For example:: + .. deprecated:: 3.9 + Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``. See :pep:`585`. - @runtime_checkable - class Closable(Protocol): - def close(self): ... +.. class:: Text - assert isinstance(open('/some/file'), Closable) + ``Text`` is an alias for ``str``. It is provided to supply a forward + compatible path for Python 2 code: in Python 2, ``Text`` is an alias for + ``unicode``. - **Warning:** this will check only the presence of the required methods, - not their type signatures! + Use ``Text`` to indicate that a value must contain a unicode string in + a manner that is compatible with both Python 2 and Python 3:: - .. versionadded:: 3.8 + def add_unicode_checkmark(text: Text) -> Text: + return text + u' \u2713' -.. data:: Any + .. versionadded:: 3.5.2 - Special type indicating an unconstrained type. +Abstract Base Classes +--------------------- - * Every type is compatible with :data:`Any`. - * :data:`Any` is compatible with every type. +Corresponding to collections in :mod:`collections.abc` +"""""""""""""""""""""""""""""""""""""""""""""""""""""" -.. data:: NoReturn +.. class:: AbstractSet(Sized, Collection[T_co]) - Special type indicating that a function never returns. - For example:: + A generic version of :class:`collections.abc.Set`. - from typing import NoReturn + .. deprecated:: 3.9 + :class:`collections.abc.Set` now supports ``[]``. See :pep:`585`. - def stop() -> NoReturn: - raise RuntimeError('no way') +.. class:: ByteString(Sequence[int]) - .. versionadded:: 3.5.4 - .. versionadded:: 3.6.2 + A generic version of :class:`collections.abc.ByteString`. -.. data:: Union + This type represents the types :class:`bytes`, :class:`bytearray`, + and :class:`memoryview` of byte sequences. - Union type; ``Union[X, Y]`` means either X or Y. + As a shorthand for this type, :class:`bytes` can be used to + annotate arguments of any of the types mentioned above. - To define a union, use e.g. ``Union[int, str]``. Details: + .. deprecated:: 3.9 + :class:`collections.abc.ByteString` now supports ``[]``. See :pep:`585`. - * The arguments must be types and there must be at least one. +.. class:: Collection(Sized, Iterable[T_co], Container[T_co]) - * Unions of unions are flattened, e.g.:: + A generic version of :class:`collections.abc.Collection` - Union[Union[int, str], float] == Union[int, str, float] + .. versionadded:: 3.6.0 - * Unions of a single argument vanish, e.g.:: + .. deprecated:: 3.9 + :class:`collections.abc.Collection` now supports ``[]``. See :pep:`585`. - Union[int] == int # The constructor actually returns int +.. class:: Container(Generic[T_co]) - * Redundant arguments are skipped, e.g.:: + A generic version of :class:`collections.abc.Container`. - Union[int, str, int] == Union[int, str] + .. deprecated:: 3.9 + :class:`collections.abc.Container` now supports ``[]``. See :pep:`585`. - * When comparing unions, the argument order is ignored, e.g.:: +.. class:: ItemsView(MappingView, Generic[KT_co, VT_co]) - Union[int, str] == Union[str, int] + A generic version of :class:`collections.abc.ItemsView`. - * You cannot subclass or instantiate a union. + .. deprecated:: 3.9 + :class:`collections.abc.ItemsView` now supports ``[]``. See :pep:`585`. - * You cannot write ``Union[X][Y]``. +.. class:: KeysView(MappingView[KT_co], AbstractSet[KT_co]) - * You can use ``Optional[X]`` as a shorthand for ``Union[X, None]``. + A generic version of :class:`collections.abc.KeysView`. - .. versionchanged:: 3.7 - Don't remove explicit subclasses from unions at runtime. + .. deprecated:: 3.9 + :class:`collections.abc.KeysView` now supports ``[]``. See :pep:`585`. -.. data:: Optional +.. class:: Mapping(Sized, Collection[KT], Generic[VT_co]) - Optional type. + A generic version of :class:`collections.abc.Mapping`. + This type can be used as follows:: - ``Optional[X]`` is equivalent to ``Union[X, None]``. + def get_position_in_index(word_list: Mapping[str, int], word: str) -> int: + return word_list[word] - Note that this is not the same concept as an optional argument, - which is one that has a default. An optional argument with a - default does not require the ``Optional`` qualifier on its type - annotation just because it is optional. For example:: + .. deprecated:: 3.9 + :class:`collections.abc.Mapping` now supports ``[]``. See :pep:`585`. - def foo(arg: int = 0) -> None: - ... +.. class:: MappingView(Sized, Iterable[T_co]) - On the other hand, if an explicit value of ``None`` is allowed, the - use of ``Optional`` is appropriate, whether the argument is optional - or not. For example:: + A generic version of :class:`collections.abc.MappingView`. - def foo(arg: Optional[int] = None) -> None: - ... + .. deprecated:: 3.9 + :class:`collections.abc.MappingView` now supports ``[]``. See :pep:`585`. -.. data:: Tuple +.. class:: MutableMapping(Mapping[KT, VT]) - Tuple type; ``Tuple[X, Y]`` is the type of a tuple of two items - with the first item of type X and the second of type Y. The type of - the empty tuple can be written as ``Tuple[()]``. + A generic version of :class:`collections.abc.MutableMapping`. - Example: ``Tuple[T1, T2]`` is a tuple of two elements corresponding - to type variables T1 and T2. ``Tuple[int, float, str]`` is a tuple - of an int, a float and a string. + .. deprecated:: 3.9 + :class:`collections.abc.MutableMapping` now supports ``[]``. See :pep:`585`. - To specify a variable-length tuple of homogeneous type, - use literal ellipsis, e.g. ``Tuple[int, ...]``. A plain :data:`Tuple` - is equivalent to ``Tuple[Any, ...]``, and in turn to :class:`tuple`. +.. class:: MutableSequence(Sequence[T]) -.. data:: Callable + A generic version of :class:`collections.abc.MutableSequence`. - Callable type; ``Callable[[int], str]`` is a function of (int) -> str. + .. deprecated:: 3.9 + :class:`collections.abc.MutableSequence` now supports ``[]``. See :pep:`585`. - The subscription syntax must always be used with exactly two - values: the argument list and the return type. The argument list - must be a list of types or an ellipsis; the return type must be - a single type. +.. class:: MutableSet(AbstractSet[T]) - There is no syntax to indicate optional or keyword arguments; - such function types are rarely used as callback types. - ``Callable[..., ReturnType]`` (literal ellipsis) can be used to - type hint a callable taking any number of arguments and returning - ``ReturnType``. A plain :data:`Callable` is equivalent to - ``Callable[..., Any]``, and in turn to - :class:`collections.abc.Callable`. + A generic version of :class:`collections.abc.MutableSet`. -.. data:: Literal + .. deprecated:: 3.9 + :class:`collections.abc.MutableSet` now supports ``[]``. See :pep:`585`. - A type that can be used to indicate to type checkers that the - corresponding variable or function parameter has a value equivalent to - the provided literal (or one of several literals). For example:: +.. class:: Sequence(Reversible[T_co], Collection[T_co]) - def validate_simple(data: Any) -> Literal[True]: # always returns True - ... + A generic version of :class:`collections.abc.Sequence`. - MODE = Literal['r', 'rb', 'w', 'wb'] - def open_helper(file: str, mode: MODE) -> str: - ... + .. deprecated:: 3.9 + :class:`collections.abc.Sequence` now supports ``[]``. See :pep:`585`. - open_helper('/some/path', 'r') # Passes type check - open_helper('/other/path', 'typo') # Error in type checker +.. class:: ValuesView(MappingView[VT_co]) - ``Literal[...]`` cannot be subclassed. At runtime, an arbitrary value - is allowed as type argument to ``Literal[...]``, but type checkers may - impose restrictions. See :pep:`586` for more details about literal types. + A generic version of :class:`collections.abc.ValuesView`. - .. versionadded:: 3.8 + .. deprecated:: 3.9 + :class:`collections.abc.ValuesView` now supports ``[]``. See :pep:`585`. -.. data:: ClassVar +Corresponding to other types in :mod:`collections.abc` +"""""""""""""""""""""""""""""""""""""""""""""""""""""" - Special type construct to mark class variables. +.. class:: Iterable(Generic[T_co]) - As introduced in :pep:`526`, a variable annotation wrapped in ClassVar - indicates that a given attribute is intended to be used as a class variable - and should not be set on instances of that class. Usage:: + A generic version of :class:`collections.abc.Iterable`. - class Starship: - stats: ClassVar[Dict[str, int]] = {} # class variable - damage: int = 10 # instance variable + .. deprecated:: 3.9 + :class:`collections.abc.Iterable` now supports ``[]``. See :pep:`585`. - :data:`ClassVar` accepts only types and cannot be further subscribed. +.. class:: Iterator(Iterable[T_co]) - :data:`ClassVar` is not a class itself, and should not - be used with :func:`isinstance` or :func:`issubclass`. - :data:`ClassVar` does not change Python runtime behavior, but - it can be used by third-party type checkers. For example, a type checker - might flag the following code as an error:: + A generic version of :class:`collections.abc.Iterator`. - enterprise_d = Starship(3000) - enterprise_d.stats = {} # Error, setting class variable on instance - Starship.stats = {} # This is OK + .. deprecated:: 3.9 + :class:`collections.abc.Iterator` now supports ``[]``. See :pep:`585`. - .. versionadded:: 3.5.3 +.. class:: Generator(Iterator[T_co], Generic[T_co, T_contra, V_co]) -.. data:: Final + A generator can be annotated by the generic type + ``Generator[YieldType, SendType, ReturnType]``. For example:: - A special typing construct to indicate to type checkers that a name - cannot be re-assigned or overridden in a subclass. For example:: + def echo_round() -> Generator[int, float, str]: + sent = yield 0 + while sent >= 0: + sent = yield round(sent) + return 'Done' - MAX_SIZE: Final = 9000 - MAX_SIZE += 1 # Error reported by type checker + Note that unlike many other generics in the typing module, the ``SendType`` + of :class:`Generator` behaves contravariantly, not covariantly or + invariantly. - class Connection: - TIMEOUT: Final[int] = 10 + If your generator will only yield values, set the ``SendType`` and + ``ReturnType`` to ``None``:: - class FastConnector(Connection): - TIMEOUT = 1 # Error reported by type checker + def infinite_stream(start: int) -> Generator[int, None, None]: + while True: + yield start + start += 1 - There is no runtime checking of these properties. See :pep:`591` for - more details. + Alternatively, annotate your generator as having a return type of + either ``Iterable[YieldType]`` or ``Iterator[YieldType]``:: - .. versionadded:: 3.8 + def infinite_stream(start: int) -> Iterator[int]: + while True: + yield start + start += 1 -.. data:: AnyStr + .. deprecated:: 3.9 + :class:`collections.abc.Generator` now supports ``[]``. See :pep:`585`. - ``AnyStr`` is a type variable defined as - ``AnyStr = TypeVar('AnyStr', str, bytes)``. +.. class:: Hashable - It is meant to be used for functions that may accept any kind of string - without allowing different kinds of strings to mix. For example:: + An alias to :class:`collections.abc.Hashable` - def concat(a: AnyStr, b: AnyStr) -> AnyStr: - return a + b +.. class:: Reversible(Iterable[T_co]) - concat(u"foo", u"bar") # Ok, output has type 'unicode' - concat(b"foo", b"bar") # Ok, output has type 'bytes' - concat(u"foo", b"bar") # Error, cannot mix unicode and bytes + A generic version of :class:`collections.abc.Reversible`. -.. data:: TYPE_CHECKING + .. deprecated:: 3.9 + :class:`collections.abc.Reversible` now supports ``[]``. See :pep:`585`. - A special constant that is assumed to be ``True`` by 3rd party static - type checkers. It is ``False`` at runtime. Usage:: +.. class:: Sized - if TYPE_CHECKING: - import expensive_mod + An alias to :class:`collections.abc.Sized` - def fun(arg: 'expensive_mod.SomeType') -> None: - local_var: expensive_mod.AnotherType = other_fun() +Asynchronous programming +"""""""""""""""""""""""" - Note that the first type annotation must be enclosed in quotes, making it a - "forward reference", to hide the ``expensive_mod`` reference from the - interpreter runtime. Type annotations for local variables are not - evaluated, so the second annotation does not need to be enclosed in quotes. +.. class:: Coroutine(Awaitable[V_co], Generic[T_co T_contra, V_co]) + + A generic version of :class:`collections.abc.Coroutine`. + The variance and order of type variables + correspond to those of :class:`Generator`, for example:: + + from typing import List, Coroutine + c = None # type: Coroutine[List[str], str, int] + ... + x = c.send('hi') # type: List[str] + async def bar() -> None: + x = await c # type: int + + .. versionadded:: 3.5.3 + + .. deprecated:: 3.9 + :class:`collections.abc.Coroutine` now supports ``[]``. See :pep:`585`. + +.. class:: AsyncGenerator(AsyncIterator[T_co], Generic[T_co, T_contra]) + + An async generator can be annotated by the generic type + ``AsyncGenerator[YieldType, SendType]``. For example:: + + async def echo_round() -> AsyncGenerator[int, float]: + sent = yield 0 + while sent >= 0.0: + rounded = await round(sent) + sent = yield rounded + + Unlike normal generators, async generators cannot return a value, so there + is no ``ReturnType`` type parameter. As with :class:`Generator`, the + ``SendType`` behaves contravariantly. + + If your generator will only yield values, set the ``SendType`` to + ``None``:: + + async def infinite_stream(start: int) -> AsyncGenerator[int, None]: + while True: + yield start + start = await increment(start) + + Alternatively, annotate your generator as having a return type of + either ``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``:: + + async def infinite_stream(start: int) -> AsyncIterator[int]: + while True: + yield start + start = await increment(start) + + .. versionadded:: 3.6.1 + + .. deprecated:: 3.9 + :class:`collections.abc.AsyncGenerator` now supports ``[]``. See :pep:`585`. + +.. class:: AsyncIterable(Generic[T_co]) + + A generic version of :class:`collections.abc.AsyncIterable`. .. versionadded:: 3.5.2 -.. data:: Annotated + .. deprecated:: 3.9 + :class:`collections.abc.AsyncIterable` now supports ``[]``. See :pep:`585`. - A type, introduced in :pep:`593` (``Flexible function and variable - annotations``), to decorate existing types with context-specific metadata - (possibly multiple pieces of it, as ``Annotated`` is variadic). - Specifically, a type ``T`` can be annotated with metadata ``x`` via the - typehint ``Annotated[T, x]``. This metadata can be used for either static - analysis or at runtime. If a library (or tool) encounters a typehint - ``Annotated[T, x]`` and has no special logic for metadata ``x``, it - should ignore it and simply treat the type as ``T``. Unlike the - ``no_type_check`` functionality that currently exists in the ``typing`` - module which completely disables typechecking annotations on a function - or a class, the ``Annotated`` type allows for both static typechecking - of ``T`` (e.g., via mypy or Pyre, which can safely ignore ``x``) - together with runtime access to ``x`` within a specific application. +.. class:: AsyncIterator(AsyncIterable[T_co]) - Ultimately, the responsibility of how to interpret the annotations (if - at all) is the responsibility of the tool or library encountering the - ``Annotated`` type. A tool or library encountering an ``Annotated`` type - can scan through the annotations to determine if they are of interest - (e.g., using ``isinstance()``). + A generic version of :class:`collections.abc.AsyncIterator`. - When a tool or a library does not support annotations or encounters an - unknown annotation it should just ignore it and treat annotated type as - the underlying type. + .. versionadded:: 3.5.2 - It's up to the tool consuming the annotations to decide whether the - client is allowed to have several annotations on one type and how to - merge those annotations. + .. deprecated:: 3.9 + :class:`collections.abc.AsyncIterator` now supports ``[]``. See :pep:`585`. - Since the ``Annotated`` type allows you to put several annotations of - the same (or different) type(s) on any node, the tools or libraries - consuming those annotations are in charge of dealing with potential - duplicates. For example, if you are doing value range analysis you might - allow this:: +.. class:: Awaitable(Generic[T_co]) - T1 = Annotated[int, ValueRange(-10, 5)] - T2 = Annotated[T1, ValueRange(-20, 3)] + A generic version of :class:`collections.abc.Awaitable`. - Passing ``include_extras=True`` to :func:`get_type_hints` lets one - access the extra annotations at runtime. + .. versionadded:: 3.5.2 - The details of the syntax: + .. deprecated:: 3.9 + :class:`collections.abc.Awaitable` now supports ``[]``. See :pep:`585`. - * The first argument to ``Annotated`` must be a valid type - * Multiple type annotations are supported (``Annotated`` supports variadic - arguments):: +Context manager types +""""""""""""""""""""" - Annotated[int, ValueRange(3, 10), ctype("char")] +.. class:: ContextManager(Generic[T_co]) - * ``Annotated`` must be called with at least two arguments ( - ``Annotated[int]`` is not valid) + A generic version of :class:`contextlib.AbstractContextManager`. - * The order of the annotations is preserved and matters for equality - checks:: + .. versionadded:: 3.5.4 + .. versionadded:: 3.6.0 - Annotated[int, ValueRange(3, 10), ctype("char")] != Annotated[ - int, ctype("char"), ValueRange(3, 10) - ] + .. deprecated:: 3.9 + :class:`collections.contextlib.AbstractContextManager` now supports ``[]``. See :pep:`585`. - * Nested ``Annotated`` types are flattened, with metadata ordered - starting with the innermost annotation:: +.. class:: AsyncContextManager(Generic[T_co]) - Annotated[Annotated[int, ValueRange(3, 10)], ctype("char")] == Annotated[ - int, ValueRange(3, 10), ctype("char") - ] + A generic version of :class:`contextlib.AbstractAsyncContextManager`. - * Duplicated annotations are not removed:: + .. versionadded:: 3.5.4 + .. versionadded:: 3.6.2 - Annotated[int, ValueRange(3, 10)] != Annotated[ - int, ValueRange(3, 10), ValueRange(3, 10) - ] + .. deprecated:: 3.9 + :class:`collections.contextlib.AbstractAsyncContextManager` now supports ``[]``. See :pep:`585`. - * ``Annotated`` can be used with nested and generic aliases:: +Protocols +--------- - T = TypeVar('T') - Vec = Annotated[List[Tuple[T, T]], MaxLen(10)] - V = Vec[int] +These protocols are decorated with :func:`runtime_checkable`. - V == Annotated[List[Tuple[int, int]], MaxLen(10)] +.. class:: SupportsAbs + + An ABC with one abstract method ``__abs__`` that is covariant + in its return type. + +.. class:: SupportsBytes + + An ABC with one abstract method ``__bytes__``. + +.. class:: SupportsComplex + + An ABC with one abstract method ``__complex__``. + +.. class:: SupportsFloat + + An ABC with one abstract method ``__float__``. + +.. class:: SupportsIndex + + An ABC with one abstract method ``__index__``. + + .. versionadded:: 3.8 + +.. class:: SupportsInt + + An ABC with one abstract method ``__int__``. + +.. class:: SupportsRound + + An ABC with one abstract method ``__round__`` + that is covariant in its return type. + +Functions and decorators +------------------------ + +.. function:: cast(typ, val) + + Cast a value to a type. + + This returns the value unchanged. To the type checker this + signals that the return value has the designated type, but at + runtime we intentionally don't check anything (we want this + to be as fast as possible). + +.. decorator:: overload + + The ``@overload`` decorator allows describing functions and methods + that support multiple different combinations of argument types. A series + of ``@overload``-decorated definitions must be followed by exactly one + non-``@overload``-decorated definition (for the same function/method). + The ``@overload``-decorated definitions are for the benefit of the + type checker only, since they will be overwritten by the + non-``@overload``-decorated definition, while the latter is used at + runtime but should be ignored by a type checker. At runtime, calling + a ``@overload``-decorated function directly will raise + :exc:`NotImplementedError`. An example of overload that gives a more + precise type than can be expressed using a union or a type variable:: + + @overload + def process(response: None) -> None: + ... + @overload + def process(response: int) -> Tuple[int, str]: + ... + @overload + def process(response: bytes) -> str: + ... + def process(response): + + + See :pep:`484` for details and comparison with other typing semantics. + +.. decorator:: final + + A decorator to indicate to type checkers that the decorated method + cannot be overridden, and the decorated class cannot be subclassed. + For example:: + + class Base: + @final + def done(self) -> None: + ... + class Sub(Base): + def done(self) -> None: # Error reported by type checker + ... + + @final + class Leaf: + ... + class Other(Leaf): # Error reported by type checker + ... + + There is no runtime checking of these properties. See :pep:`591` for + more details. + + .. versionadded:: 3.8 + +.. decorator:: no_type_check + + Decorator to indicate that annotations are not type hints. + + This works as class or function :term:`decorator`. With a class, it + applies recursively to all methods defined in that class (but not + to methods defined in its superclasses or subclasses). + + This mutates the function(s) in place. + +.. decorator:: no_type_check_decorator + + Decorator to give another decorator the :func:`no_type_check` effect. + + This wraps the decorator with something that wraps the decorated + function in :func:`no_type_check`. + +.. decorator:: type_check_only + + Decorator to mark a class or function to be unavailable at runtime. + + This decorator is itself not available at runtime. It is mainly + intended to mark classes that are defined in type stub files if + an implementation returns an instance of a private class:: + + @type_check_only + class Response: # private or not available at runtime + code: int + def get_header(self, name: str) -> str: ... + + def fetch_response() -> Response: ... + + Note that returning instances of private classes is not recommended. + It is usually preferable to make such classes public. + +Introspection helpers +--------------------- + +.. function:: get_type_hints(obj, globalns=None, localns=None, include_extras=False) + + Return a dictionary containing type hints for a function, method, module + or class object. + + This is often the same as ``obj.__annotations__``. In addition, + forward references encoded as string literals are handled by evaluating + them in ``globals`` and ``locals`` namespaces. If necessary, + ``Optional[t]`` is added for function and method annotations if a default + value equal to ``None`` is set. For a class ``C``, return + a dictionary constructed by merging all the ``__annotations__`` along + ``C.__mro__`` in reverse order. + + The function recursively replaces all ``Annotated[T, ...]`` with ``T``, + unless ``include_extras`` is set to ``True`` (see :class:`Annotated` for + more information). For example:: + + class Student(NamedTuple): + name: Annotated[str, 'some marker'] + + get_type_hints(Student) == {'name': str} + get_type_hints(Student, include_extras=False) == {'name': str} + get_type_hints(Student, include_extras=True) == { + 'name': Annotated[str, 'some marker'] + } + + .. versionchanged:: 3.9 + Added ``include_extras`` parameter as part of :pep:`593`. + +.. function:: get_args(tp) +.. function:: get_origin(tp) + + Provide basic introspection for generic types and special typing forms. + + For a typing object of the form ``X[Y, Z, ...]`` these functions return + ``X`` and ``(Y, Z, ...)``. If ``X`` is a generic alias for a builtin or + :mod:`collections` class, it gets normalized to the original class. + For unsupported objects return ``None`` and ``()`` correspondingly. + Examples:: + + assert get_origin(Dict[str, int]) is dict + assert get_args(Dict[int, str]) == (int, str) + + assert get_origin(Union[int, str]) is Union + assert get_args(Union[int, str]) == (int, str) + + .. versionadded:: 3.8 + +.. class:: ForwardRef + + A class used for internal typing representation of string forward references. + For example, ``List["SomeClass"]`` is implicitly transformed into + ``List[ForwardRef("SomeClass")]``. This class should not be instantiated by + a user, but may be used by introspection tools. + +Constant +-------- + +.. data:: TYPE_CHECKING + + A special constant that is assumed to be ``True`` by 3rd party static + type checkers. It is ``False`` at runtime. Usage:: + + if TYPE_CHECKING: + import expensive_mod + + def fun(arg: 'expensive_mod.SomeType') -> None: + local_var: expensive_mod.AnotherType = other_fun() + + The first type annotation must be enclosed in quotes, making it a + "forward reference", to hide the ``expensive_mod`` reference from the + interpreter runtime. Type annotations for local variables are not + evaluated, so the second annotation does not need to be enclosed in quotes. + + .. note:: + + If ``from __future__ import annotations`` is used in Python 3.7 or later, + annotations are not evaluated at function definition time. + Instead, the are stored as strings in ``__annotations__``, + This makes it unnecessary to use quotes around the annotation. + (see :pep:`563`). + + .. versionadded:: 3.5.2 - .. versionadded:: 3.9 diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 3643d1ad96ed116..c5360f91f518d61 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -647,6 +647,9 @@ the *new_callable* argument to :func:`patch`. arguments and make more complex assertions. See :ref:`calls as tuples `. + .. versionchanged:: 3.8 + Added ``args`` and ``kwargs`` properties. + .. attribute:: call_args_list diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 0dddbd25d991b55..a52df9ee01578ce 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -73,7 +73,7 @@ test runner for those new to unit testing. For production environments it is recommended that tests be driven by a continuous integration system such as `Buildbot `_, `Jenkins `_ - or `Hudson `_. + or `Travis-CI `_, or `AppVeyor `_. .. _unittest-minimal-example: diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst index 02f0c01e224ddf8..f9c8ba7398f66fd 100644 --- a/Doc/library/urllib.parse.rst +++ b/Doc/library/urllib.parse.rst @@ -68,15 +68,15 @@ or on combining URL components into a URL string. .. doctest:: :options: +NORMALIZE_WHITESPACE - >>> from urllib.parse import urlparse - >>> urlparse('//www.cwi.nl:80/%7Eguido/Python.html') - ParseResult(scheme='', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html', + >>> from urllib.parse import urlparse + >>> urlparse('//www.cwi.nl:80/%7Eguido/Python.html') + ParseResult(scheme='', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html', params='', query='', fragment='') - >>> urlparse('www.cwi.nl/%7Eguido/Python.html') - ParseResult(scheme='', netloc='', path='www.cwi.nl/%7Eguido/Python.html', + >>> urlparse('www.cwi.nl/%7Eguido/Python.html') + ParseResult(scheme='', netloc='', path='www.cwi.nl/%7Eguido/Python.html', params='', query='', fragment='') - >>> urlparse('help/Python.html') - ParseResult(scheme='', netloc='', path='help/Python.html', params='', + >>> urlparse('help/Python.html') + ParseResult(scheme='', netloc='', path='help/Python.html', params='', query='', fragment='') The *scheme* argument gives the default addressing scheme, to be @@ -138,14 +138,14 @@ or on combining URL components into a URL string. .. doctest:: :options: +NORMALIZE_WHITESPACE - >>> from urllib.parse import urlparse - >>> u = urlparse('//www.cwi.nl:80/%7Eguido/Python.html') - >>> u - ParseResult(scheme='', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html', - params='', query='', fragment='') - >>> u._replace(scheme='http') - ParseResult(scheme='http', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html', - params='', query='', fragment='') + >>> from urllib.parse import urlparse + >>> u = urlparse('//www.cwi.nl:80/%7Eguido/Python.html') + >>> u + ParseResult(scheme='', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html', + params='', query='', fragment='') + >>> u._replace(scheme='http') + ParseResult(scheme='http', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html', + params='', query='', fragment='') .. versionchanged:: 3.2 @@ -153,7 +153,7 @@ or on combining URL components into a URL string. .. versionchanged:: 3.3 The fragment is now parsed for all URL schemes (unless *allow_fragment* is - false), in accordance with :rfc:`3986`. Previously, a whitelist of + false), in accordance with :rfc:`3986`. Previously, an allowlist of schemes that support fragments existed. .. versionchanged:: 3.6 diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 288ce14d36f0163..b37f230feb60153 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -946,7 +946,7 @@ tracking URIs for which authentication credentials should always be sent. If *is_authenticated* is specified as ``True``, *realm* is ignored. -.. method:: HTTPPasswordMgr.find_user_password(realm, authuri) +.. method:: HTTPPasswordMgrWithPriorAuth.find_user_password(realm, authuri) Same as for :class:`HTTPPasswordMgrWithDefaultRealm` objects diff --git a/Doc/library/xml.sax.handler.rst b/Doc/library/xml.sax.handler.rst index ae0877ca90db07b..3746a58c9b9558a 100644 --- a/Doc/library/xml.sax.handler.rst +++ b/Doc/library/xml.sax.handler.rst @@ -11,12 +11,12 @@ -------------- -The SAX API defines four kinds of handlers: content handlers, DTD handlers, -error handlers, and entity resolvers. Applications normally only need to -implement those interfaces whose events they are interested in; they can -implement the interfaces in a single object or in multiple objects. Handler -implementations should inherit from the base classes provided in the module -:mod:`xml.sax.handler`, so that all methods get default implementations. +The SAX API defines five kinds of handlers: content handlers, DTD handlers, +error handlers, entity resolvers and lexical handlers. Applications normally +only need to implement those interfaces whose events they are interested in; +they can implement the interfaces in a single object or in multiple objects. +Handler implementations should inherit from the base classes provided in the +module :mod:`xml.sax.handler`, so that all methods get default implementations. .. class:: ContentHandler @@ -47,6 +47,12 @@ implementations should inherit from the base classes provided in the module application. The methods of this object control whether errors are immediately converted to exceptions or are handled in some other way. + +.. class:: LexicalHandler + + Interface used by the parser to represent low freqency events which may not + be of interest to many applications. + In addition to these classes, :mod:`xml.sax.handler` provides symbolic constants for the feature and property names. @@ -114,7 +120,7 @@ for the feature and property names. .. data:: property_lexical_handler | value: ``"http://xml.org/sax/properties/lexical-handler"`` - | data type: xml.sax.sax2lib.LexicalHandler (not supported in Python 2) + | data type: xml.sax.handler.LexicalHandler (not supported in Python 2) | description: An optional extension handler for lexical events like comments. | access: read/write @@ -413,3 +419,45 @@ the passed-in exception object. information will continue to be passed to the application. Raising an exception in this method will cause parsing to end. + +.. _lexical-handler-objects: + +LexicalHandler Objects +---------------------- +Optional SAX2 handler for lexical events. + +This handler is used to obtain lexical information about an XML +document. Lexical information includes information describing the +document encoding used and XML comments embedded in the document, as +well as section boundaries for the DTD and for any CDATA sections. +The lexical handlers are used in the same manner as content handlers. + +Set the LexicalHandler of an XMLReader by using the setProperty method +with the property identifier +``'http://xml.org/sax/properties/lexical-handler'``. + + +.. method:: LexicalHandler.comment(content) + + Reports a comment anywhere in the document (including the DTD and + outside the document element). + +.. method:: LexicalHandler.startDTD(name, public_id, system_id) + + Reports the start of the DTD declarations if the document has an + associated DTD. + +.. method:: LexicalHandler.endDTD() + + Reports the end of DTD declaration. + +.. method:: LexicalHandler.startCDATA() + + Reports the start of a CDATA marked section. + + The contents of the CDATA marked section will be reported through + the characters handler. + +.. method:: LexicalHandler.endCDATA() + + Reports the end of a CDATA marked section. diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index c14e7c79fe14cfb..df720f6cc32380c 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -571,9 +571,9 @@ value --- this is a syntactic restriction that is not expressed by the grammar. **Default parameter values are evaluated from left to right when the function definition is executed.** This means that the expression is evaluated once, when the function is defined, and that the same "pre-computed" value is used for each -call. This is especially important to understand when a default parameter is a +call. This is especially important to understand when a default parameter value is a mutable object, such as a list or a dictionary: if the function modifies the -object (e.g. by appending an item to a list), the default value is in effect +object (e.g. by appending an item to a list), the default parameter value is in effect modified. This is generally not what was intended. A way around this is to use ``None`` as the default, and explicitly test for it in the body of the function, e.g.:: diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index c5a7f046992dd11..a817408c3b1ef55 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2601,7 +2601,7 @@ Awaitable Objects ----------------- An :term:`awaitable` object generally implements an :meth:`__await__` method. -:term:`Coroutine` objects returned from :keyword:`async def` functions +:term:`Coroutine objects ` returned from :keyword:`async def` functions are awaitable. .. note:: @@ -2626,7 +2626,7 @@ are awaitable. Coroutine Objects ----------------- -:term:`Coroutine` objects are :term:`awaitable` objects. +:term:`Coroutine objects ` are :term:`awaitable` objects. A coroutine's execution can be controlled by calling :meth:`__await__` and iterating over the result. When the coroutine has finished executing and returns, the iterator raises :exc:`StopIteration`, and the exception's diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 8036a491c29ab11..18abce3c510bdb8 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -1650,9 +1650,26 @@ Assignment expressions .. productionlist:: assignment_expression: [`identifier` ":="] `expression` -.. TODO: BPO-39868 +An assignment expression (sometimes also called a "named expression" or +"walrus") assigns an :token:`expression` to an :token:`identifier`, while also +returning the value of the :token:`expression`. -See :pep:`572` for more details about assignment expressions. +One common use case is when handling matched regular expressions: + +.. code-block:: python + + if matching := pattern.search(data): + do_something(matching) + +Or, when processing a file stream in chunks: + +.. code-block:: python + + while chunk := file.read(9000): + process(chunk) + +.. versionadded:: 3.8 + See :pep:`572` for more details about assignment expressions. .. _if_expr: diff --git a/Doc/reference/grammar.rst b/Doc/reference/grammar.rst index 83d0f8532c63666..acf83765b5796cc 100644 --- a/Doc/reference/grammar.rst +++ b/Doc/reference/grammar.rst @@ -1,7 +1,19 @@ Full Grammar specification ========================== -This is the full Python grammar, as it is read by the parser generator and used -to parse Python source files: +This is the full Python grammar, derived directly from the grammar +used to generate the CPython parser (see :source:`Grammar/python.gram`). +The version here omits details related to code generation and +error recovery. -.. literalinclude:: ../../Grammar/Grammar +The notation is a mixture of `EBNF +`_ +and `PEG `_. +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). + +.. literalinclude:: ../../Grammar/python.gram + :language: peg diff --git a/Doc/reference/introduction.rst b/Doc/reference/introduction.rst index bb7e3906dba6072..62480bd7dd9a614 100644 --- a/Doc/reference/introduction.rst +++ b/Doc/reference/introduction.rst @@ -93,7 +93,7 @@ Notation The descriptions of lexical analysis and syntax use a modified BNF grammar notation. This uses the following style of definition: -.. productionlist:: * +.. productionlist:: name: `lc_letter` (`lc_letter` | "_")* lc_letter: "a"..."z" diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst index 7d70cbcaa372ac5..4c0f5688da4d750 100644 --- a/Doc/reference/lexical_analysis.rst +++ b/Doc/reference/lexical_analysis.rst @@ -637,9 +637,11 @@ and formatted string literals may be concatenated with plain string literals. single: string; formatted literal single: string; interpolated literal single: f-string + single: fstring single: {} (curly brackets); in formatted string literal single: ! (exclamation); in formatted string literal single: : (colon); in formatted string literal + single: = (equals); for help in debugging using string literals .. _f-strings: Formatted string literals @@ -659,7 +661,7 @@ for the contents of the string is: .. productionlist:: f_string: (`literal_char` | "{{" | "}}" | `replacement_field`)* - replacement_field: "{" `f_expression` ["!" `conversion`] [":" `format_spec`] "}" + replacement_field: "{" `f_expression` ["="] ["!" `conversion`] [":" `format_spec`] "}" f_expression: (`conditional_expression` | "*" `or_expr`) : ("," `conditional_expression` | "," "*" `or_expr`)* [","] : | `yield_expression` @@ -671,10 +673,11 @@ The parts of the string outside curly braces are treated literally, except that any doubled curly braces ``'{{'`` or ``'}}'`` are replaced with the corresponding single curly brace. A single opening curly bracket ``'{'`` marks a replacement field, which starts with a -Python expression. After the expression, there may be a conversion field, -introduced by an exclamation point ``'!'``. A format specifier may also -be appended, introduced by a colon ``':'``. A replacement field ends -with a closing curly bracket ``'}'``. +Python expression. To display both the expression text and its value after +evaluation, (useful in debugging), an equal sign ``'='`` may be added after the +expression. A conversion field, introduced by an exclamation point ``'!'`` may +follow. A format specifier may also be appended, introduced by a colon ``':'``. +A replacement field ends with a closing curly bracket ``'}'``. Expressions in formatted string literals are treated like regular Python expressions surrounded by parentheses, with a few exceptions. @@ -690,6 +693,17 @@ left to right. containing an :keyword:`async for` clause were illegal in the expressions in formatted string literals due to a problem with the implementation. +When the equal sign ``'='`` is provided, the output will have the expression +text, the ``'='`` and the evaluated value. Spaces after the opening brace +``'{'``, within the expression and after the ``'='`` are all retained in the +output. By default, the ``'='`` causes the :func:`repr` of the expression to be +provided, unless there is a format specified. When a format is specified it +defaults to the :func:`str` of the expression unless a conversion ``'!r'`` is +declared. + +.. versionadded:: 3.8 + The equal sign ``'='`` was added in Python 3.8. + If a conversion is specified, the result of evaluating the expression is converted before formatting. Conversion ``'!s'`` calls :func:`str` on the result, ``'!r'`` calls :func:`repr`, and ``'!a'`` calls :func:`ascii`. @@ -724,9 +738,22 @@ Some examples of formatted string literals:: >>> today = datetime(year=2017, month=1, day=27) >>> f"{today:%B %d, %Y}" # using date format specifier 'January 27, 2017' + >>> f"{today=:%B %d, %Y}" # using date format specifier and debugging + 'today=January 27, 2017' >>> number = 1024 >>> f"{number:#0x}" # using integer format specifier '0x400' + >>> foo = "bar" + >>> f"{ foo = }" # preserves whitespace + " foo = 'bar'" + >>> line = "The mill's closed" + >>> f"{line = }" + 'line = "The mill\'s closed"' + >>> f"{line = :20}" + "line = The mill's closed " + >>> f"{line = !r:20}" + 'line = "The mill\'s closed" ' + A consequence of sharing the same syntax as regular string literals is that characters in the replacement fields must not conflict with the diff --git a/Doc/tools/extensions/asdl_highlight.py b/Doc/tools/extensions/asdl_highlight.py index 7d2ef011c1b7667..b1989e53957072f 100644 --- a/Doc/tools/extensions/asdl_highlight.py +++ b/Doc/tools/extensions/asdl_highlight.py @@ -1,6 +1,9 @@ import os import sys -sys.path.append(os.path.abspath("../Parser/")) +from pathlib import Path + +CPYTHON_ROOT = Path(__file__).resolve().parent.parent.parent.parent +sys.path.append(str(CPYTHON_ROOT / "Parser")) from pygments.lexer import RegexLexer, bygroups, include, words from pygments.token import (Comment, Generic, Keyword, Name, Operator, diff --git a/Doc/tools/extensions/peg_highlight.py b/Doc/tools/extensions/peg_highlight.py new file mode 100644 index 000000000000000..f02515d3919cf24 --- /dev/null +++ b/Doc/tools/extensions/peg_highlight.py @@ -0,0 +1,75 @@ +from pygments.lexer import RegexLexer, bygroups, include +from pygments.token import Comment, Generic, Keyword, Name, Operator, Punctuation, Text + +from sphinx.highlighting import lexers + + +class PEGLexer(RegexLexer): + """Pygments Lexer for PEG grammar (.gram) files + + This lexer strips the following elements from the grammar: + + - Meta-tags + - Variable assignments + - Actions + - Lookaheads + - Rule types + - Rule options + - Rules named `invalid_*` or `incorrect_*` + """ + + name = "PEG" + aliases = ["peg"] + filenames = ["*.gram"] + _name = r"([^\W\d]\w*)" + _text_ws = r"(\s*)" + + tokens = { + "ws": [(r"\n", Text), (r"\s+", Text), (r"#.*$", Comment.Singleline),], + "lookaheads": [ + (r"(?<=\|\s)(&\w+\s?)", bygroups(None)), + (r"(?<=\|\s)(&'.+'\s?)", bygroups(None)), + (r'(?<=\|\s)(&".+"\s?)', bygroups(None)), + (r"(?<=\|\s)(&\(.+\)\s?)", bygroups(None)), + ], + "metas": [ + (r"(@\w+ '''(.|\n)+?''')", bygroups(None)), + (r"^(@.*)$", bygroups(None)), + ], + "actions": [(r"{(.|\n)+?}", bygroups(None)),], + "strings": [ + (r"'\w+?'", Keyword), + (r'"\w+?"', Keyword), + (r"'\W+?'", Text), + (r'"\W+?"', Text), + ], + "variables": [(_name + _text_ws + "(=)", bygroups(None, None, None),),], + "invalids": [ + (r"^(\s+\|\s+invalid_\w+\s*\n)", bygroups(None)), + (r"^(\s+\|\s+incorrect_\w+\s*\n)", bygroups(None)), + (r"^(#.*invalid syntax.*(?:.|\n)*)", bygroups(None),), + ], + "root": [ + include("invalids"), + include("ws"), + include("lookaheads"), + include("metas"), + include("actions"), + include("strings"), + include("variables"), + (r"\b(?!(NULL|EXTRA))([A-Z_]+)\b\s*(?!\()", Text,), + ( + r"^\s*" + _name + "\s*" + "(\[.*\])?" + "\s*" + "(\(.+\))?" + "\s*(:)", + bygroups(Name.Function, None, None, Punctuation), + ), + (_name, Name.Function), + (r"[\||\.|\+|\*|\?]", Operator), + (r"{|}|\(|\)|\[|\]", Punctuation), + (r".", Text), + ], + } + + +def setup(app): + lexers["peg"] = PEGLexer() + return {"version": "1.0", "parallel_read_safe": True} diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 250d2a9ddb416b4..0d780e3ba89643e 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -114,8 +114,8 @@ accessible. "Directly accessible" here means that an unqualified reference to a name attempts to find the name in the namespace. Although scopes are determined statically, they are used dynamically. At any -time during execution, At any time during execution, there are 3 or 4 nested -scopes whose namespaces are directly accessible: +time during execution, there are 3 or 4 nested scopes whose namespaces are +directly accessible: * the innermost scope, which is searched first, contains the local names * the scopes of any enclosing functions, which are searched starting with the @@ -849,7 +849,7 @@ defines :meth:`__next__`, then :meth:`__iter__` can just return ``self``:: Generators ========== -:term:`Generator`\s are a simple and powerful tool for creating iterators. They +:term:`Generators ` are a simple and powerful tool for creating iterators. They are written like regular functions but use the :keyword:`yield` statement whenever they want to return data. Each time :func:`next` is called on it, the generator resumes where it left off (it remembers all the data values and which diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index a3b53ba48e9b7c8..eb5ae01a7c04d4c 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -103,6 +103,22 @@ New Modules Improved Modules ================ +base64 +------ + +Add :func:`base64.b32hexencode` and :func:`base64.b32hexdecode` to support the +Base32 Encoding with Extended Hex Alphabet. + +curses +------ + +The extended color functions added in ncurses 6.1 will be used transparently +by :func:`curses.color_content`, :func:`curses.init_color`, +:func:`curses.init_pair`, and :func:`curses.pair_content`. A new function, +:func:`curses.has_extended_color_support`, indicates whether extended color +support is provided by the underlying ncurses library. +(Contributed by Jeffrey Kintscher and Hans Petter Jansson in :issue:`36982`.) + glob ---- @@ -110,6 +126,18 @@ Added the *root_dir* and *dir_fd* parameters in :func:`~glob.glob` and :func:`~glob.iglob` which allow to specify the root directory for searching. (Contributed by Serhiy Storchaka in :issue:`38144`.) +os +-- + +Added :func:`os.cpu_count()` support for VxWorks RTOS. +(Contributed by Peixing Xin in :issue:`41440`.) + +py_compile +---------- + +Added ``--quiet`` option to command-line interface of :mod:`py_compile`. +(Contributed by Gregory Schevchenko in :issue:`38731`.) + sys --- @@ -117,10 +145,21 @@ Add :data:`sys.orig_argv` attribute: the list of the original command line arguments passed to the Python executable. (Contributed by Victor Stinner in :issue:`23427`.) +xml +--- + +Add a :class:`~xml.sax.handler.LexicalHandler` class to the +:mod:`xml.sax.handler` module. +(Contributed by Jonathan Gossage and Zackery Spytz in :issue:`35018`.) + Optimizations ============= +* Constructors :func:`str`, :func:`bytes` and :func:`bytearray` are now faster + (around 30--40% for small objects). + (Contributed by Serhiy Storchaka in :issue:`41334`.) + * The :mod:`runpy` module now imports fewer modules. The ``python3 -m module-name`` command startup time is 1.3x faster in average. @@ -134,6 +173,12 @@ Deprecated Removed ======= +* The ``ParserBase.error()`` method from the private and undocumented ``_markupbase`` + module has been removed. :class:`html.parser.HTMLParser` is the only subclass of + ``ParserBase`` and its ``error()`` implementation has already been removed in + Python 3.5. + (Contributed by Berker Peksag in :issue:`31844`.) + Porting to Python 3.10 ====================== diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index ca3eda05c515af4..06bee9966c0be24 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -2311,7 +2311,7 @@ Multi-threading =============== * The mechanism for serializing execution of concurrently running Python threads - (generally known as the :term:`GIL` or :term:`Global Interpreter Lock`) has + (generally known as the :term:`GIL` or Global Interpreter Lock) has been rewritten. Among the objectives were more predictable switching intervals and reduced overhead due to lock contention and the number of ensuing system calls. The notion of a "check interval" to allow thread diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index f1a033c6dae61fd..361e6db07c3cdbf 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -2309,9 +2309,9 @@ Encoders: :c:func:`PyUnicode_AsUTF8String` * :c:func:`PyUnicode_EncodeUTF32` * :c:func:`PyUnicode_EncodeUTF16` -* :c:func:`PyUnicode_EncodeUnicodeEscape:` use +* :c:func:`PyUnicode_EncodeUnicodeEscape` use :c:func:`PyUnicode_AsUnicodeEscapeString` -* :c:func:`PyUnicode_EncodeRawUnicodeEscape:` use +* :c:func:`PyUnicode_EncodeRawUnicodeEscape` use :c:func:`PyUnicode_AsRawUnicodeEscapeString` * :c:func:`PyUnicode_EncodeLatin1`: use :c:func:`PyUnicode_AsLatin1String` * :c:func:`PyUnicode_EncodeASCII`: use :c:func:`PyUnicode_AsASCIIString` diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index b4540ac1dd9028d..1defee4090f2884 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -412,7 +412,7 @@ uses were to provide type hints to function parameters and return values. It became evident that it would be beneficial for Python users, if the standard library included the base definitions and tools for type annotations. -:pep:`484` introduces a :term:`provisional module ` to +:pep:`484` introduces a :term:`provisional module ` to provide these standard definitions and tools, along with some conventions for situations where annotations are not available. @@ -726,7 +726,7 @@ New Modules typing ------ -The new :mod:`typing` :term:`provisional ` module +The new :mod:`typing` :term:`provisional ` module provides standard definitions and tools for function type annotations. See :ref:`Type Hints ` for more information. @@ -772,7 +772,7 @@ Steven Bethard, paul j3 and Daniel Eriksson in :issue:`14910`.) asyncio ------- -Since the :mod:`asyncio` module is :term:`provisional `, +Since the :mod:`asyncio` module is :term:`provisional `, all changes introduced in Python 3.5 have also been backported to Python 3.4.x. Notable changes in the :mod:`asyncio` module since Python 3.4.0: @@ -1867,7 +1867,7 @@ A new :func:`~sys.set_coroutine_wrapper` function allows setting a global hook that will be called whenever a :term:`coroutine object ` is created by an :keyword:`async def` function. A corresponding :func:`~sys.get_coroutine_wrapper` can be used to obtain a currently set -wrapper. Both functions are :term:`provisional `, +wrapper. Both functions are :term:`provisional `, and are intended for debugging purposes only. (Contributed by Yury Selivanov in :issue:`24017`.) diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index 04c1f7e71db3214..85a6657fdfbdacc 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -1597,7 +1597,7 @@ to filter block traces by their address space (domain). typing ------ -Since the :mod:`typing` module is :term:`provisional `, +Since the :mod:`typing` module is :term:`provisional `, all changes introduced in Python 3.6 have also been backported to Python 3.5.x. diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 59b96621bdd4b51..25b1e1e33e325cf 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -171,7 +171,7 @@ on a per-module basis in Python 3.7 using a :mod:`__future__` import:: from __future__ import annotations -It will become the default in Python 4.0. +It will become the default in Python 3.10. .. seealso:: @@ -636,7 +636,7 @@ The :mod:`asyncio` module has received many new features, usability and :ref:`performance improvements `. Notable changes include: -* The new :term:`provisional ` :func:`asyncio.run` function can +* The new :term:`provisional ` :func:`asyncio.run` function can be used to run a coroutine from synchronous code by automatically creating and destroying the event loop. (Contributed by Yury Selivanov in :issue:`32314`.) diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index b6ed2da36889a32..a2fa17811b3fc89 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -646,7 +646,8 @@ loop on every invocation: (Contributed by Yury Selivanov in :issue:`37028`.) The exception :class:`asyncio.CancelledError` now inherits from -:class:`BaseException` rather than :class:`Exception`. +:class:`BaseException` rather than :class:`Exception` and no longer inherits +from :class:`concurrent.futures.CancelledError`. (Contributed by Yury Selivanov in :issue:`32528`.) On Windows, the default event loop is now :class:`~asyncio.ProactorEventLoop`. @@ -1951,7 +1952,8 @@ Changes in the Python API (Contributed by Anthony Sottile in :issue:`36264`.) * The exception :class:`asyncio.CancelledError` now inherits from - :class:`BaseException` rather than :class:`Exception`. + :class:`BaseException` rather than :class:`Exception` and no longer inherits + from :class:`concurrent.futures.CancelledError`. (Contributed by Yury Selivanov in :issue:`32528`.) * The function :func:`asyncio.wait_for` now correctly waits for cancellation diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index c2db9bc74ccdd69..be7406e13c2cd44 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -887,7 +887,6 @@ Removed :func:`asyncio.current_task` and :func:`asyncio.all_tasks` instead. (Contributed by Rémi Lapeyre in :issue:`40967`) - Porting to Python 3.9 ===================== @@ -1025,6 +1024,13 @@ C API Changes New Features ------------ +* :pep:`573`: Add :c:func:`PyType_FromModuleAndSpec` to associate + a module with a class; :c:func:`PyType_GetModule` and + :c:func:`PyType_GetModuleState` to retrieve the module and its state; and + :c:data:`PyCMethod` and :c:data:`METH_METHOD` to allow a method to + access the class it was defined in. + (Contributed by Marcel Plch and Petr Viktorin in :issue:`38787`.) + * Add :c:func:`PyFrame_GetCode` function: get a frame code. Add :c:func:`PyFrame_GetBack` function: get the frame next outer frame. (Contributed by Victor Stinner in :issue:`40421`.) diff --git a/Grammar/Grammar b/Grammar/Grammar deleted file mode 100644 index 170518af74e5a7b..000000000000000 --- a/Grammar/Grammar +++ /dev/null @@ -1,207 +0,0 @@ -# Grammar for Python - -# NOTE WELL: You should also follow all the steps listed at -# https://devguide.python.org/grammar/ - -# Start symbols for the grammar: -# single_input is a single interactive statement; -# file_input is a module or sequence of commands read from an input file; -# eval_input is the input for the eval() functions. -# func_type_input is a PEP 484 Python 2 function type comment -# NB: compound_stmt in single_input is followed by extra NEWLINE! -# NB: due to the way TYPE_COMMENT is tokenized it will always be followed by a NEWLINE -single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE -file_input: (NEWLINE | stmt)* ENDMARKER -eval_input: testlist NEWLINE* ENDMARKER - -decorator: '@' namedexpr_test NEWLINE -decorators: decorator+ -decorated: decorators (classdef | funcdef | async_funcdef) - -async_funcdef: ASYNC funcdef -funcdef: 'def' NAME parameters ['->' test] ':' [TYPE_COMMENT] func_body_suite - -parameters: '(' [typedargslist] ')' - -# The following definition for typedarglist is equivalent to this set of rules: -# -# arguments = argument (',' [TYPE_COMMENT] argument)* -# argument = tfpdef ['=' test] -# kwargs = '**' tfpdef [','] [TYPE_COMMENT] -# args = '*' [tfpdef] -# kwonly_kwargs = (',' [TYPE_COMMENT] argument)* (TYPE_COMMENT | [',' [TYPE_COMMENT] [kwargs]]) -# args_kwonly_kwargs = args kwonly_kwargs | kwargs -# poskeyword_args_kwonly_kwargs = arguments ( TYPE_COMMENT | [',' [TYPE_COMMENT] [args_kwonly_kwargs]]) -# typedargslist_no_posonly = poskeyword_args_kwonly_kwargs | args_kwonly_kwargs -# typedarglist = (arguments ',' [TYPE_COMMENT] '/' [',' [[TYPE_COMMENT] 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] (',' [TYPE_COMMENT] tfpdef ['=' test])* ',' [TYPE_COMMENT] '/' [',' [ [TYPE_COMMENT] tfpdef ['=' test] ( - ',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] [ - '*' [tfpdef] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] ['**' tfpdef [','] [TYPE_COMMENT]]]) - | '**' tfpdef [','] [TYPE_COMMENT]]]) - | '*' [tfpdef] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] ['**' tfpdef [','] [TYPE_COMMENT]]]) - | '**' tfpdef [','] [TYPE_COMMENT]]] ) -| (tfpdef ['=' test] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] [ - '*' [tfpdef] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] ['**' tfpdef [','] [TYPE_COMMENT]]]) - | '**' tfpdef [','] [TYPE_COMMENT]]]) - | '*' [tfpdef] (',' [TYPE_COMMENT] tfpdef ['=' test])* (TYPE_COMMENT | [',' [TYPE_COMMENT] ['**' tfpdef [','] [TYPE_COMMENT]]]) - | '**' tfpdef [','] [TYPE_COMMENT]) -) -tfpdef: NAME [':' test] - -# The following definition for varargslist is equivalent to this set of rules: -# -# arguments = argument (',' argument )* -# argument = vfpdef ['=' test] -# kwargs = '**' vfpdef [','] -# args = '*' [vfpdef] -# 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] (',' vfpdef ['=' test])* [',' [ - '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]] - | '**' vfpdef [',']]] - | '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]] - | '**' vfpdef [',']) ]] | (vfpdef ['=' test] (',' vfpdef ['=' test])* [',' [ - '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]] - | '**' vfpdef [',']]] - | '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]] - | '**' vfpdef [','] -) -vfpdef: NAME - -stmt: simple_stmt | compound_stmt -simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE -small_stmt: (expr_stmt | del_stmt | pass_stmt | flow_stmt | - import_stmt | global_stmt | nonlocal_stmt | assert_stmt) -expr_stmt: testlist_star_expr (annassign | augassign (yield_expr|testlist) | - [('=' (yield_expr|testlist_star_expr))+ [TYPE_COMMENT]] ) -annassign: ':' test ['=' (yield_expr|testlist_star_expr)] -testlist_star_expr: (test|star_expr) (',' (test|star_expr))* [','] -augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' | - '<<=' | '>>=' | '**=' | '//=') -# For normal and annotated assignments, additional restrictions enforced by the interpreter -del_stmt: 'del' exprlist -pass_stmt: 'pass' -flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt | yield_stmt -break_stmt: 'break' -continue_stmt: 'continue' -return_stmt: 'return' [testlist_star_expr] -yield_stmt: yield_expr -raise_stmt: 'raise' [test ['from' test]] -import_stmt: import_name | import_from -import_name: 'import' dotted_as_names -# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS -import_from: ('from' (('.' | '...')* dotted_name | ('.' | '...')+) - 'import' ('*' | '(' import_as_names ')' | import_as_names)) -import_as_name: NAME ['as' NAME] -dotted_as_name: dotted_name ['as' NAME] -import_as_names: import_as_name (',' import_as_name)* [','] -dotted_as_names: dotted_as_name (',' dotted_as_name)* -dotted_name: NAME ('.' NAME)* -global_stmt: 'global' NAME (',' NAME)* -nonlocal_stmt: 'nonlocal' NAME (',' NAME)* -assert_stmt: 'assert' test [',' test] - -compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated | async_stmt -async_stmt: ASYNC (funcdef | with_stmt | for_stmt) -if_stmt: 'if' namedexpr_test ':' suite ('elif' namedexpr_test ':' suite)* ['else' ':' suite] -while_stmt: 'while' namedexpr_test ':' suite ['else' ':' suite] -for_stmt: 'for' exprlist 'in' testlist ':' [TYPE_COMMENT] suite ['else' ':' suite] -try_stmt: ('try' ':' suite - ((except_clause ':' suite)+ - ['else' ':' suite] - ['finally' ':' suite] | - 'finally' ':' suite)) -with_stmt: 'with' with_item (',' with_item)* ':' [TYPE_COMMENT] suite -with_item: test ['as' expr] -# NB compile.c makes sure that the default except clause is last -except_clause: 'except' [test ['as' NAME]] -suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT - -namedexpr_test: test [':=' test] -test: or_test ['if' or_test 'else' test] | lambdef -test_nocond: or_test | lambdef_nocond -lambdef: 'lambda' [varargslist] ':' test -lambdef_nocond: 'lambda' [varargslist] ':' test_nocond -or_test: and_test ('or' and_test)* -and_test: not_test ('and' not_test)* -not_test: 'not' not_test | comparison -comparison: expr (comp_op expr)* -# <> isn't actually a valid comparison operator in Python. It's here for the -# sake of a __future__ import described in PEP 401 (which really works :-) -comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is'|'is' 'not' -star_expr: '*' expr -expr: xor_expr ('|' xor_expr)* -xor_expr: and_expr ('^' and_expr)* -and_expr: shift_expr ('&' shift_expr)* -shift_expr: arith_expr (('<<'|'>>') arith_expr)* -arith_expr: term (('+'|'-') term)* -term: factor (('*'|'@'|'/'|'%'|'//') factor)* -factor: ('+'|'-'|'~') factor | power -power: atom_expr ['**' factor] -atom_expr: [AWAIT] atom trailer* -atom: ('(' [yield_expr|testlist_comp] ')' | - '[' [testlist_comp] ']' | - '{' [dictorsetmaker] '}' | - NAME | NUMBER | STRING+ | '...' | 'None' | 'True' | 'False') -testlist_comp: (namedexpr_test|star_expr) ( comp_for | (',' (namedexpr_test|star_expr))* [','] ) -trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME -subscriptlist: subscript (',' subscript)* [','] -subscript: test | [test] ':' [test] [sliceop] -sliceop: ':' [test] -exprlist: (expr|star_expr) (',' (expr|star_expr))* [','] -testlist: test (',' test)* [','] -dictorsetmaker: ( ((test ':' test | '**' expr) - (comp_for | (',' (test ':' test | '**' expr))* [','])) | - ((test | star_expr) - (comp_for | (',' (test | star_expr))* [','])) ) - -classdef: 'class' NAME ['(' [arglist] ')'] ':' suite - -arglist: argument (',' argument)* [','] - -# The reason that keywords are test nodes instead of NAME is that using NAME -# results in an ambiguity. ast.c makes sure it's a NAME. -# "test '=' test" is really "keyword '=' test", but we have no such token. -# These need to be in a single rule to avoid grammar that is ambiguous -# to our LL(1) parser. Even though 'test' includes '*expr' in star_expr, -# we explicitly match '*' here, too, to give it proper precedence. -# Illegal combinations and orderings are blocked in ast.c: -# multiple (test comp_for) arguments are blocked; keyword unpackings -# that precede iterable unpackings are blocked; etc. -argument: ( test [comp_for] | - test ':=' test | - test '=' test | - '**' test | - '*' test ) - -comp_iter: comp_for | comp_if -sync_comp_for: 'for' exprlist 'in' or_test [comp_iter] -comp_for: [ASYNC] sync_comp_for -comp_if: 'if' test_nocond [comp_iter] - -# not used in grammar, but may appear in "node" passed from Parser to Compiler -encoding_decl: NAME - -yield_expr: 'yield' [yield_arg] -yield_arg: 'from' test | testlist_star_expr - -# the TYPE_COMMENT in suites is only parsed for funcdefs, -# but can't go elsewhere due to ambiguity -func_body_suite: simple_stmt | NEWLINE [TYPE_COMMENT NEWLINE] INDENT stmt+ DEDENT - -func_type_input: func_type NEWLINE* ENDMARKER -func_type: '(' [typelist] ')' '->' test -# typelist is a modified typedargslist (see above) -typelist: (test (',' test)* [',' - ['*' [test] (',' test)* [',' '**' test] | '**' test]] - | '*' [test] (',' test)* [',' '**' test] | '**' test) diff --git a/Include/cpython/frameobject.h b/Include/cpython/frameobject.h index c76fbe0616cb25b..63240b5b6d5ccb9 100644 --- a/Include/cpython/frameobject.h +++ b/Include/cpython/frameobject.h @@ -4,6 +4,21 @@ # error "this header file must not be included directly" #endif +/* These values are chosen so that the inline functions below all + * compare f_state to zero. + */ +enum _framestate { + FRAME_CREATED = -2, + FRAME_SUSPENDED = -1, + FRAME_EXECUTING = 0, + FRAME_RETURNED = 1, + FRAME_UNWINDING = 2, + FRAME_RAISED = 3, + FRAME_CLEARED = 4 +}; + +typedef signed char PyFrameState; + typedef struct { int b_type; /* what kind of block this is */ int b_handler; /* where to jump to find handler */ @@ -18,11 +33,8 @@ struct _frame { PyObject *f_globals; /* global symbol table (PyDictObject) */ PyObject *f_locals; /* local symbol table (any mapping) */ PyObject **f_valuestack; /* points after the last local */ - /* Next free slot in f_valuestack. Frame creation sets to f_valuestack. - Frame evaluation usually NULLs it, but a frame that yields sets it - to the current stack top. */ - PyObject **f_stacktop; PyObject *f_trace; /* Trace function */ + int f_stackdepth; /* Depth of value stack */ char f_trace_lines; /* Emit per-line trace events? */ char f_trace_opcodes; /* Emit per-opcode trace events? */ @@ -37,11 +49,22 @@ struct _frame { bytecode index. */ int f_lineno; /* Current line number */ int f_iblock; /* index in f_blockstack */ - char f_executing; /* whether the frame is still executing */ + PyFrameState f_state; /* What state the frame is in */ PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */ }; +static inline int _PyFrame_IsRunnable(struct _frame *f) { + return f->f_state < FRAME_EXECUTING; +} + +static inline int _PyFrame_IsExecuting(struct _frame *f) { + return f->f_state == FRAME_EXECUTING; +} + +static inline int _PyFrameHasCompleted(struct _frame *f) { + return f->f_state > FRAME_EXECUTING; +} /* Standard object interface */ diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h index 3f347dc2e2d62be..c2500d927bf7f07 100644 --- a/Include/cpython/pyerrors.h +++ b/Include/cpython/pyerrors.h @@ -145,7 +145,10 @@ PyAPI_FUNC(PyObject *) PyErr_ProgramTextObject( PyObject *filename, int lineno); -/* Create a UnicodeEncodeError object */ +/* Create a UnicodeEncodeError object. + * + * TODO: This API will be removed in Python 3.11. + */ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_Create( const char *encoding, /* UTF-8 encoded string */ const Py_UNICODE *object, @@ -155,7 +158,10 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_Create( const char *reason /* UTF-8 encoded string */ ); -/* Create a UnicodeTranslateError object */ +/* Create a UnicodeTranslateError object. + * + * TODO: This API will be removed in Python 3.11. + */ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_Create( const Py_UNICODE *object, Py_ssize_t length, diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index 49ad32d5d199e15..300408cb262991d 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -11,7 +11,9 @@ /* --- Internal Unicode Operations ---------------------------------------- */ -#define USE_UNICODE_WCHAR_CACHE 1 +#ifndef USE_UNICODE_WCHAR_CACHE +# define USE_UNICODE_WCHAR_CACHE 1 +#endif /* USE_UNICODE_WCHAR_CACHE */ /* Since splitting on whitespace is an important use case, and whitespace in most situations is solely ASCII whitespace, we @@ -50,7 +52,7 @@ Py_DEPRECATED(3.3) static inline void Py_UNICODE_COPY(Py_UNICODE *target, const Py_UNICODE *source, Py_ssize_t length) { - memcpy(target, source, length * sizeof(Py_UNICODE)); + memcpy(target, source, (size_t)(length) * sizeof(Py_UNICODE)); } Py_DEPRECATED(3.3) static inline void diff --git a/Include/genobject.h b/Include/genobject.h index 8ffd15646f084e2..a76dc92e811c42b 100644 --- a/Include/genobject.h +++ b/Include/genobject.h @@ -16,8 +16,6 @@ extern "C" { PyObject_HEAD \ /* Note: gi_frame can be NULL if the generator is "finished" */ \ PyFrameObject *prefix##_frame; \ - /* True if generator is being executed. */ \ - char prefix##_running; \ /* The code object backing the generator */ \ PyObject *prefix##_code; \ /* List of weak reference. */ \ diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h index cfc27470c80411e..538aa5a653fbfcf 100644 --- a/Include/internal/pycore_interp.h +++ b/Include/internal/pycore_interp.h @@ -13,13 +13,6 @@ extern "C" { #include "pycore_gc.h" /* struct _gc_runtime_state */ #include "pycore_warnings.h" /* struct _warnings_runtime_state */ -struct _Py_parser_state { - struct { - int level; - int atbol; - } listnode; -}; - struct _pending_calls { PyThread_type_lock lock; /* Request for running pending calls. */ @@ -240,8 +233,6 @@ struct _is { PyObject *audit_hooks; - struct _Py_parser_state parser; - #if _PY_NSMALLNEGINTS + _PY_NSMALLPOSINTS > 0 /* Small integers are preallocated in this array so that they can be shared. diff --git a/Include/internal/pycore_pathconfig.h b/Include/internal/pycore_pathconfig.h index 42d61b1ca26bdfd..15447f54490fb42 100644 --- a/Include/internal/pycore_pathconfig.h +++ b/Include/internal/pycore_pathconfig.h @@ -65,6 +65,7 @@ extern wchar_t* _Py_GetDLLPath(void); extern PyStatus _PyConfig_WritePathConfig(const PyConfig *config); extern void _Py_DumpPathConfig(PyThreadState *tstate); +extern PyObject* _PyPathConfig_AsDict(void); #ifdef __cplusplus } diff --git a/Include/object.h b/Include/object.h index 537567040f9871f..10f1d6a3dff2dd1 100644 --- a/Include/object.h +++ b/Include/object.h @@ -637,8 +637,16 @@ times. static inline int -PyType_HasFeature(PyTypeObject *type, unsigned long feature) { - return ((PyType_GetFlags(type) & feature) != 0); +PyType_HasFeature(PyTypeObject *type, unsigned long feature) +{ + unsigned long flags; +#ifdef Py_LIMITED_API + // PyTypeObject is opaque in the limited C API + flags = PyType_GetFlags(type); +#else + flags = type->tp_flags; +#endif + return ((flags & feature) != 0); } #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag) diff --git a/Include/opcode.h b/Include/opcode.h index 19944fac0b9f2b3..420c87aa0f24f3e 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -127,6 +127,28 @@ extern "C" { #define SET_UPDATE 163 #define DICT_MERGE 164 #define DICT_UPDATE 165 +#ifdef NEED_OPCODE_JUMP_TABLES +static uint32_t _PyOpcode_RelativeJump[8] = { + 0U, + 0U, + 536870912U, + 67125248U, + 67141632U, + 0U, + 0U, + 0U, +}; +static uint32_t _PyOpcode_Jump[8] = { + 0U, + 0U, + 536870912U, + 101695488U, + 67141632U, + 0U, + 0U, + 0U, +}; +#endif /* OPCODE_TABLES */ /* EXCEPT_HANDLER is a special, implicit block type which is created when entering an except handler. It is not an opcode but we define it here diff --git a/Include/pydecimal.h b/Include/pydecimal.h new file mode 100644 index 000000000000000..9b6440e1c2ab1cb --- /dev/null +++ b/Include/pydecimal.h @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2020 Stefan Krah. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +#ifndef CPYTHON_DECIMAL_H_ +#define CPYTHON_DECIMAL_H_ + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/****************************************************************************/ +/* Libmpdec API */ +/****************************************************************************/ + +#ifndef LIBMPDEC_MPDECIMAL_H_ +struct mpd_t; /* ABI-stable in the libmpdec-2.x series */ + +/* status cases for getting a triple */ +enum mpd_triple_class { + MPD_TRIPLE_NORMAL, + MPD_TRIPLE_INF, + MPD_TRIPLE_QNAN, + MPD_TRIPLE_SNAN, + MPD_TRIPLE_ERROR, +}; + +typedef struct { + enum mpd_triple_class tag; + uint8_t sign; + uint64_t hi; + uint64_t lo; + int64_t exp; +} mpd_uint128_triple_t; +#endif + + +/****************************************************************************/ +/* Capsule API */ +/****************************************************************************/ + +/* Simple API */ +#define PyDec_TypeCheck_INDEX 0 +#define PyDec_TypeCheck_RETURN int +#define PyDec_TypeCheck_ARGS (const PyObject *) + +#define PyDec_IsSpecial_INDEX 1 +#define PyDec_IsSpecial_RETURN int +#define PyDec_IsSpecial_ARGS (const PyObject *) + +#define PyDec_IsNaN_INDEX 2 +#define PyDec_IsNaN_RETURN int +#define PyDec_IsNaN_ARGS (const PyObject *) + +#define PyDec_IsInfinite_INDEX 3 +#define PyDec_IsInfinite_RETURN int +#define PyDec_IsInfinite_ARGS (const PyObject *) + +#define PyDec_GetDigits_INDEX 4 +#define PyDec_GetDigits_RETURN int64_t +#define PyDec_GetDigits_ARGS (const PyObject *) + +#define PyDec_AsUint128Triple_INDEX 5 +#define PyDec_AsUint128Triple_RETURN mpd_uint128_triple_t +#define PyDec_AsUint128Triple_ARGS (const PyObject *) + +#define PyDec_FromUint128Triple_INDEX 6 +#define PyDec_FromUint128Triple_RETURN PyObject * +#define PyDec_FromUint128Triple_ARGS (const mpd_uint128_triple_t *triple) + +/* Advanced API */ +#define PyDec_Alloc_INDEX 7 +#define PyDec_Alloc_RETURN PyObject * +#define PyDec_Alloc_ARGS (void) + +#define PyDec_Get_INDEX 8 +#define PyDec_Get_RETURN mpd_t * +#define PyDec_Get_ARGS (PyObject *) + +#define PyDec_GetConst_INDEX 9 +#define PyDec_GetConst_RETURN const mpd_t * +#define PyDec_GetConst_ARGS (const PyObject *) + +#define CPYTHON_DECIMAL_MAX_API 10 + + +#ifdef CPYTHON_DECIMAL_MODULE +/* Simple API */ +static PyDec_TypeCheck_RETURN PyDec_TypeCheck PyDec_TypeCheck_ARGS; +static PyDec_IsSpecial_RETURN PyDec_IsSpecial PyDec_IsSpecial_ARGS; +static PyDec_IsNaN_RETURN PyDec_IsNaN PyDec_IsNaN_ARGS; +static PyDec_IsInfinite_RETURN PyDec_IsInfinite PyDec_IsInfinite_ARGS; +static PyDec_GetDigits_RETURN PyDec_GetDigits PyDec_GetDigits_ARGS; +static PyDec_AsUint128Triple_RETURN PyDec_AsUint128Triple PyDec_AsUint128Triple_ARGS; +static PyDec_FromUint128Triple_RETURN PyDec_FromUint128Triple PyDec_FromUint128Triple_ARGS; + +/* Advanced API */ +static PyDec_Alloc_RETURN PyDec_Alloc PyDec_Alloc_ARGS; +static PyDec_Get_RETURN PyDec_Get PyDec_Get_ARGS; +static PyDec_GetConst_RETURN PyDec_GetConst PyDec_GetConst_ARGS; +#else +static void **_decimal_api; + +/* Simple API */ +#define PyDec_TypeCheck \ + (*(PyDec_TypeCheck_RETURN (*)PyDec_TypeCheck_ARGS) _decimal_api[PyDec_TypeCheck_INDEX]) + +#define PyDec_IsSpecial \ + (*(PyDec_IsSpecial_RETURN (*)PyDec_IsSpecial_ARGS) _decimal_api[PyDec_IsSpecial_INDEX]) + +#define PyDec_IsNaN \ + (*(PyDec_IsNaN_RETURN (*)PyDec_IsNaN_ARGS) _decimal_api[PyDec_IsNaN_INDEX]) + +#define PyDec_IsInfinite \ + (*(PyDec_IsInfinite_RETURN (*)PyDec_IsInfinite_ARGS) _decimal_api[PyDec_IsInfinite_INDEX]) + +#define PyDec_GetDigits \ + (*(PyDec_GetDigits_RETURN (*)PyDec_GetDigits_ARGS) _decimal_api[PyDec_GetDigits_INDEX]) + +#define PyDec_AsUint128Triple \ + (*(PyDec_AsUint128Triple_RETURN (*)PyDec_AsUint128Triple_ARGS) _decimal_api[PyDec_AsUint128Triple_INDEX]) + +#define PyDec_FromUint128Triple \ + (*(PyDec_FromUint128Triple_RETURN (*)PyDec_FromUint128Triple_ARGS) _decimal_api[PyDec_FromUint128Triple_INDEX]) + +/* Advanced API */ +#define PyDec_Alloc \ + (*(PyDec_Alloc_RETURN (*)PyDec_Alloc_ARGS) _decimal_api[PyDec_Alloc_INDEX]) + +#define PyDec_Get \ + (*(PyDec_Get_RETURN (*)PyDec_Get_ARGS) _decimal_api[PyDec_Get_INDEX]) + +#define PyDec_GetConst \ + (*(PyDec_GetConst_RETURN (*)PyDec_GetConst_ARGS) _decimal_api[PyDec_GetConst_INDEX]) + + +static int +import_decimal(void) +{ + _decimal_api = (void **)PyCapsule_Import("_decimal._API", 0); + if (_decimal_api == NULL) { + return -1; + } + + return 0; +} +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* CPYTHON_DECIMAL_H_ */ diff --git a/Include/typeslots.h b/Include/typeslots.h index 64f6fff51444937..8b571d378648192 100644 --- a/Include/typeslots.h +++ b/Include/typeslots.h @@ -88,3 +88,43 @@ /* New in 3.5 */ #define Py_tp_finalize 80 #endif +/* New in 3.10 */ +#if defined(Py_LIMITED_API) +#undef Py_tp_as_async +#undef Py_tp_as_buffer +#undef Py_tp_as_mapping +#undef Py_tp_as_number +#undef Py_tp_as_sequence +#undef Py_tp_basicsize +#undef Py_tp_cache +#undef Py_tp_dict +#undef Py_tp_dictoffset +#undef Py_tp_flags +#undef Py_tp_itemsize +#undef Py_tp_mro +#undef Py_tp_name +#undef Py_tp_subclasses +#undef Py_tp_vectorcall_offset +#undef Py_tp_version_tag +#undef Py_tp_weaklist +#undef Py_tp_weaklistoffset +#else +#define Py_tp_as_async 81 +#define Py_tp_as_buffer 82 +#define Py_tp_as_mapping 83 +#define Py_tp_as_number 84 +#define Py_tp_as_sequence 85 +#define Py_tp_basicsize 86 +#define Py_tp_cache 87 +#define Py_tp_dict 88 +#define Py_tp_dictoffset 89 +#define Py_tp_flags 90 +#define Py_tp_itemsize 91 +#define Py_tp_mro 92 +#define Py_tp_name 93 +#define Py_tp_subclasses 94 +#define Py_tp_vectorcall_offset 95 +#define Py_tp_version_tag 96 +#define Py_tp_weaklist 97 +#define Py_tp_weaklistoffset 98 +#endif diff --git a/Lib/__future__.py b/Lib/__future__.py index d7cb8ac5f497456..0e7b5552343356d 100644 --- a/Lib/__future__.py +++ b/Lib/__future__.py @@ -66,18 +66,20 @@ # code.h and used by compile.h, so that an editor search will find them here. # However, they're not exported in __all__, because they don't really belong to # this module. -CO_NESTED = 0x0010 # nested_scopes -CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000) -CO_FUTURE_DIVISION = 0x20000 # division -CO_FUTURE_ABSOLUTE_IMPORT = 0x40000 # perform absolute imports by default -CO_FUTURE_WITH_STATEMENT = 0x80000 # with statement -CO_FUTURE_PRINT_FUNCTION = 0x100000 # print function -CO_FUTURE_UNICODE_LITERALS = 0x200000 # unicode string literals +CO_NESTED = 0x0010 # nested_scopes +CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000) +CO_FUTURE_DIVISION = 0x20000 # division +CO_FUTURE_ABSOLUTE_IMPORT = 0x40000 # perform absolute imports by default +CO_FUTURE_WITH_STATEMENT = 0x80000 # with statement +CO_FUTURE_PRINT_FUNCTION = 0x100000 # print function +CO_FUTURE_UNICODE_LITERALS = 0x200000 # unicode string literals CO_FUTURE_BARRY_AS_BDFL = 0x400000 -CO_FUTURE_GENERATOR_STOP = 0x800000 # StopIteration becomes RuntimeError in generators -CO_FUTURE_ANNOTATIONS = 0x1000000 # annotations become strings at runtime +CO_FUTURE_GENERATOR_STOP = 0x800000 # StopIteration becomes RuntimeError in generators +CO_FUTURE_ANNOTATIONS = 0x1000000 # annotations become strings at runtime + class _Feature: + def __init__(self, optionalRelease, mandatoryRelease, compiler_flag): self.optional = optionalRelease self.mandatory = mandatoryRelease @@ -88,7 +90,6 @@ def getOptionalRelease(self): This is a 5-tuple, of the same form as sys.version_info. """ - return self.optional def getMandatoryRelease(self): @@ -97,7 +98,6 @@ def getMandatoryRelease(self): This is a 5-tuple, of the same form as sys.version_info, or, if the feature was dropped, is None. """ - return self.mandatory def __repr__(self): @@ -105,6 +105,7 @@ def __repr__(self): self.mandatory, self.compiler_flag)) + nested_scopes = _Feature((2, 1, 0, "beta", 1), (2, 2, 0, "alpha", 0), CO_NESTED) @@ -142,5 +143,5 @@ def __repr__(self): CO_FUTURE_GENERATOR_STOP) annotations = _Feature((3, 7, 0, "beta", 1), - (4, 0, 0, "alpha", 0), + (3, 10, 0, "alpha", 0), CO_FUTURE_ANNOTATIONS) diff --git a/Lib/_markupbase.py b/Lib/_markupbase.py index 2af5f1c23b60662..3ad7e279960f7e1 100644 --- a/Lib/_markupbase.py +++ b/Lib/_markupbase.py @@ -29,10 +29,6 @@ def __init__(self): raise RuntimeError( "_markupbase.ParserBase must be subclassed") - def error(self, message): - raise NotImplementedError( - "subclasses of ParserBase must override error()") - def reset(self): self.lineno = 1 self.offset = 0 @@ -131,12 +127,11 @@ def parse_declaration(self, i): # also in data attribute specifications of attlist declaration # also link type declaration subsets in linktype declarations # also link attribute specification lists in link declarations - self.error("unsupported '[' char in %s declaration" % decltype) + raise AssertionError("unsupported '[' char in %s declaration" % decltype) else: - self.error("unexpected '[' char in declaration") + raise AssertionError("unexpected '[' char in declaration") else: - self.error( - "unexpected %r char in declaration" % rawdata[j]) + raise AssertionError("unexpected %r char in declaration" % rawdata[j]) if j < 0: return j return -1 # incomplete @@ -156,7 +151,9 @@ def parse_marked_section(self, i, report=1): # look for MS Office ]> ending match= _msmarkedsectionclose.search(rawdata, i+3) else: - self.error('unknown status keyword %r in marked section' % rawdata[i+3:j]) + raise AssertionError( + 'unknown status keyword %r in marked section' % rawdata[i+3:j] + ) if not match: return -1 if report: @@ -168,7 +165,7 @@ def parse_marked_section(self, i, report=1): def parse_comment(self, i, report=1): rawdata = self.rawdata if rawdata[i:i+4] != '\n'. + format(self.specified_comment[0])) + self.test_data.write('\n'. + format(self.specified_doctype)) + self.test_data.write('\n') + self.test_data.write('\n') + self.test_data.write('\n') + self.test_data.write('\n') + self.test_data.write('\n') + self.test_data.write('\n'. + format(self.specified_entity_names[0])) + self.test_data.write('\n'. + format(self.specified_entity_names[1])) + self.test_data.write('\n'. + format(self.specified_entity_names[2])) + self.test_data.write(']>\n') + self.test_data.write('<{}>'.format(self.specified_doctype)) + self.test_data.write('Aristotle\n') + self.test_data.write('Alexander\n') + self.test_data.write('Supplication\n') + self.test_data.write('Teach me patience!\n') + self.test_data.write('
&{};&{};&{};
\n'. + format(self.specified_entity_names[1], + self.specified_entity_names[0], + self.specified_entity_names[2])) + self.test_data.write('\n'.format(self.specified_comment[1])) + self.test_data.write('\n'.format(self.specified_doctype)) + self.test_data.seek(0) + + # Data received from handlers - to be validated + self.version = None + self.encoding = None + self.standalone = None + self.doctype = None + self.publicID = None + self.systemID = None + self.end_of_dtd = False + self.comments = [] + + def test_handlers(self): + class TestLexicalHandler(LexicalHandler): + def __init__(self, test_harness, *args, **kwargs): + super().__init__(*args, **kwargs) + self.test_harness = test_harness + + def startDTD(self, doctype, publicID, systemID): + self.test_harness.doctype = doctype + self.test_harness.publicID = publicID + self.test_harness.systemID = systemID + + def endDTD(self): + self.test_harness.end_of_dtd = True + + def comment(self, text): + self.test_harness.comments.append(text) + + self.parser = create_parser() + self.parser.setContentHandler(ContentHandler()) + self.parser.setProperty( + 'http://xml.org/sax/properties/lexical-handler', + TestLexicalHandler(self)) + source = InputSource() + source.setCharacterStream(self.test_data) + self.parser.parse(source) + self.assertEqual(self.doctype, self.specified_doctype) + self.assertIsNone(self.publicID) + self.assertIsNone(self.systemID) + self.assertTrue(self.end_of_dtd) + self.assertEqual(len(self.comments), + len(self.specified_comment)) + self.assertEqual(f' {self.specified_comment[0]} ', self.comments[0]) + + +class CDATAHandlerTest(unittest.TestCase): + def setUp(self): + self.parser = None + self.specified_chars = [] + self.specified_chars.append(('Parseable character data', False)) + self.specified_chars.append(('<> &% - assorted other XML junk.', True)) + self.char_index = 0 # Used to index specified results within handlers + self.test_data = StringIO() + self.test_data.write('\n') + self.test_data.write('\n') + self.test_data.write(f'{self.specified_chars[0][0]}\n') + self.test_data.write('\n') + self.test_data.write('\n') + self.test_data.write(f'\n') + self.test_data.write('\n') + self.test_data.write('\n') + self.test_data.seek(0) + + # Data received from handlers - to be validated + self.chardata = [] + self.in_cdata = False + + def test_handlers(self): + class TestLexicalHandler(LexicalHandler): + def __init__(self, test_harness, *args, **kwargs): + super().__init__(*args, **kwargs) + self.test_harness = test_harness + + def startCDATA(self): + self.test_harness.in_cdata = True + + def endCDATA(self): + self.test_harness.in_cdata = False + + class TestCharHandler(ContentHandler): + def __init__(self, test_harness, *args, **kwargs): + super().__init__(*args, **kwargs) + self.test_harness = test_harness + + def characters(self, content): + if content != '\n': + h = self.test_harness + t = h.specified_chars[h.char_index] + h.assertEqual(t[0], content) + h.assertEqual(t[1], h.in_cdata) + h.char_index += 1 + + self.parser = create_parser() + self.parser.setContentHandler(TestCharHandler(self)) + self.parser.setProperty( + 'http://xml.org/sax/properties/lexical-handler', + TestLexicalHandler(self)) + source = InputSource() + source.setCharacterStream(self.test_data) + self.parser.parse(source) + + self.assertFalse(self.in_cdata) + self.assertEqual(self.char_index, 2) + + def test_main(): run_unittest(MakeParserTest, ParseTest, @@ -1366,7 +1518,10 @@ def test_main(): StreamReaderWriterXmlgenTest, ExpatReaderTest, ErrorReportingTest, - XmlReaderTest) + XmlReaderTest, + LexicalHandlerTest, + CDATAHandlerTest) + if __name__ == "__main__": test_main() diff --git a/Lib/test/test_selectors.py b/Lib/test/test_selectors.py index 2274c39a79a5327..851b1fc1b9e0c49 100644 --- a/Lib/test/test_selectors.py +++ b/Lib/test/test_selectors.py @@ -6,6 +6,7 @@ import socket import sys from test import support +from test.support import os_helper from test.support import socket_helper from time import sleep import unittest @@ -536,7 +537,7 @@ def test_register_bad_fd(self): # a file descriptor that's been closed should raise an OSError # with EBADF s = self.SELECTOR() - bad_f = support.make_bad_fd() + bad_f = os_helper.make_bad_fd() with self.assertRaises(OSError) as cm: s.register(bad_f, selectors.EVENT_READ) self.assertEqual(cm.exception.errno, errno.EBADF) diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 45553a6a42de792..c6567906321fe17 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -9,6 +9,7 @@ import time import unittest from test import support +from test.support import os_helper from test.support.script_helper import assert_python_ok, spawn_python try: import _testcapi @@ -154,7 +155,7 @@ def test_invalid_call(self): signal.set_wakeup_fd(signal.SIGINT, False) def test_invalid_fd(self): - fd = support.make_bad_fd() + fd = os_helper.make_bad_fd() self.assertRaises((ValueError, OSError), signal.set_wakeup_fd, fd) diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 9751c64c99e74a6..97b5c5de95bbc24 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -7,9 +7,10 @@ import unittest import test.support from test import support +from test.support import os_helper from test.support import socket_helper -from test.support import (captured_stderr, TESTFN, EnvironmentVarGuard, - change_cwd) +from test.support import captured_stderr +from test.support.os_helper import TESTFN, EnvironmentVarGuard, change_cwd import builtins import encodings import glob @@ -598,12 +599,19 @@ def test_startup_interactivehook_isolated_explicit(self): @unittest.skipUnless(sys.platform == 'win32', "only supported on Windows") class _pthFileTests(unittest.TestCase): - def _create_underpth_exe(self, lines): + def _create_underpth_exe(self, lines, exe_pth=True): + import _winapi temp_dir = tempfile.mkdtemp() - self.addCleanup(test.support.rmtree, temp_dir) + self.addCleanup(os_helper.rmtree, temp_dir) exe_file = os.path.join(temp_dir, os.path.split(sys.executable)[1]) + dll_src_file = _winapi.GetModuleFileName(sys.dllhandle) + dll_file = os.path.join(temp_dir, os.path.split(dll_src_file)[1]) shutil.copy(sys.executable, exe_file) - _pth_file = os.path.splitext(exe_file)[0] + '._pth' + shutil.copy(dll_src_file, dll_file) + if exe_pth: + _pth_file = os.path.splitext(exe_file)[0] + '._pth' + else: + _pth_file = os.path.splitext(dll_file)[0] + '._pth' with open(_pth_file, 'w') as f: for line in lines: print(line, file=f) @@ -671,5 +679,30 @@ def test_underpth_file(self): self.assertTrue(rc, "sys.path is incorrect") + def test_underpth_dll_file(self): + libpath = os.path.dirname(os.path.dirname(encodings.__file__)) + exe_prefix = os.path.dirname(sys.executable) + exe_file = self._create_underpth_exe([ + 'fake-path-name', + *[libpath for _ in range(200)], + '', + '# comment', + 'import site' + ], exe_pth=False) + sys_prefix = os.path.dirname(exe_file) + env = os.environ.copy() + env['PYTHONPATH'] = 'from-env' + env['PATH'] = '{};{}'.format(exe_prefix, os.getenv('PATH')) + rc = subprocess.call([exe_file, '-c', + 'import sys; sys.exit(not sys.flags.no_site and ' + '%r in sys.path and %r in sys.path and %r not in sys.path and ' + 'all("\\r" not in p and "\\n" not in p for p in sys.path))' % ( + os.path.join(sys_prefix, 'fake-path-name'), + libpath, + os.path.join(sys_prefix, 'from-env'), + )], env=env) + self.assertTrue(rc, "sys.path is incorrect") + + if __name__ == "__main__": unittest.main() diff --git a/Lib/test/test_smtpd.py b/Lib/test/test_smtpd.py index d5d5abfcf370a8c..6303192d1b26cc3 100644 --- a/Lib/test/test_smtpd.py +++ b/Lib/test/test_smtpd.py @@ -1003,12 +1003,11 @@ def test_multiple_emails_with_extended_command_length(self): class MiscTestCase(unittest.TestCase): def test__all__(self): - blacklist = { + not_exported = { "program", "Devnull", "DEBUGSTREAM", "NEWLINE", "COMMASPACE", "DATA_SIZE_DEFAULT", "usage", "Options", "parseargs", - } - support.check__all__(self, smtpd, blacklist=blacklist) + support.check__all__(self, smtpd, not_exported=not_exported) if __name__ == "__main__": diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 5db8cec567afb58..7cdd115a9515399 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -15,6 +15,7 @@ import test.support from test.support import reap_children, verbose +from test.support import os_helper from test.support import socket_helper from test.support import threading_helper @@ -299,7 +300,7 @@ class ErrorHandlerTest(unittest.TestCase): KeyboardInterrupt are not passed.""" def tearDown(self): - test.support.unlink(test.support.TESTFN) + os_helper.unlink(os_helper.TESTFN) def test_sync_handled(self): BaseErrorTestServer(ValueError) @@ -329,7 +330,7 @@ def test_forking_not_handled(self): self.check_result(handled=False) def check_result(self, handled): - with open(test.support.TESTFN) as log: + with open(os_helper.TESTFN) as log: expected = 'Handler called\n' + 'Error handled\n' * handled self.assertEqual(log.read(), expected) @@ -347,7 +348,7 @@ def __init__(self, exception): self.wait_done() def handle_error(self, request, client_address): - with open(test.support.TESTFN, 'a') as log: + with open(os_helper.TESTFN, 'a') as log: log.write('Error handled\n') def wait_done(self): @@ -356,7 +357,7 @@ def wait_done(self): class BadHandler(socketserver.BaseRequestHandler): def handle(self): - with open(test.support.TESTFN, 'a') as log: + with open(os_helper.TESTFN, 'a') as log: log.write('Handler called\n') raise self.server.exception('Test error') diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py index 5ca43461d9940da..b410c03221bf323 100644 --- a/Lib/test/test_source_encoding.py +++ b/Lib/test/test_source_encoding.py @@ -1,7 +1,9 @@ # -*- coding: koi8-r -*- import unittest -from test.support import TESTFN, unlink, unload, rmtree, script_helper, captured_stdout +from test.support import script_helper, captured_stdout +from test.support.os_helper import TESTFN, unlink, rmtree +from test.support.import_helper import unload import importlib import os import sys diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py index 07793c84c8e912c..a143acc659ef6a5 100644 --- a/Lib/test/test_spwd.py +++ b/Lib/test/test_spwd.py @@ -1,8 +1,9 @@ import os import unittest -from test import support +from test.support import import_helper -spwd = support.import_module('spwd') + +spwd = import_helper.import_module('spwd') @unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0, diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index ecb6049a6750f3c..26eec969a82e0d7 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -4,8 +4,11 @@ import unittest import unittest.mock from test import support +from test.support import import_helper +from test.support import os_helper from test.support import socket_helper from test.support import threading_helper +from test.support import warnings_helper import socket import select import time @@ -27,7 +30,7 @@ except ImportError: ctypes = None -ssl = support.import_module("ssl") +ssl = import_helper.import_module("ssl") from ssl import TLSVersion, _TLSContentType, _TLSMessageType @@ -571,7 +574,7 @@ def test_refcycle(self): s = socket.socket(socket.AF_INET) ss = test_wrap_socket(s) wr = weakref.ref(ss) - with support.check_warnings(("", ResourceWarning)): + with warnings_helper.check_warnings(("", ResourceWarning)): del ss self.assertEqual(wr(), None) @@ -893,7 +896,7 @@ def test_get_default_verify_paths(self): self.assertEqual(len(paths), 6) self.assertIsInstance(paths, ssl.DefaultVerifyPaths) - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env["SSL_CERT_DIR"] = CAPATH env["SSL_CERT_FILE"] = CERTFILE paths = ssl.get_default_verify_paths() @@ -1270,6 +1273,25 @@ def test_min_max_version(self): ctx.maximum_version = ssl.TLSVersion.TLSv1 + @unittest.skipUnless( + hasattr(ssl.SSLContext, 'security_level'), + "requires OpenSSL >= 1.1.0" + ) + def test_security_level(self): + ctx = ssl.SSLContext() + # The default security callback allows for levels between 0-5 + # with OpenSSL defaulting to 1, however some vendors override the + # default value (e.g. Debian defaults to 2) + security_level_range = { + 0, + 1, # OpenSSL default + 2, # Debian + 3, + 4, + 5, + } + self.assertIn(ctx.security_level, security_level_range) + @unittest.skipUnless(have_verify_flags(), "verify_flags need OpenSSL > 0.9.8") def test_verify_flags(self): @@ -1586,7 +1608,7 @@ def test_load_default_certs(self): @unittest.skipIf(IS_LIBRESSL, "LibreSSL doesn't support env vars") def test_load_default_certs_env(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env["SSL_CERT_DIR"] = CAPATH env["SSL_CERT_FILE"] = CERTFILE ctx.load_default_certs() @@ -1600,7 +1622,7 @@ def test_load_default_certs_env_windows(self): stats = ctx.cert_store_stats() ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env["SSL_CERT_DIR"] = CAPATH env["SSL_CERT_FILE"] = CERTFILE ctx.load_default_certs() @@ -4247,9 +4269,9 @@ def test_read_write_after_close_raises_valuerror(self): def test_sendfile(self): TEST_DATA = b"x" * 512 - with open(support.TESTFN, 'wb') as f: + with open(os_helper.TESTFN, 'wb') as f: f.write(TEST_DATA) - self.addCleanup(support.unlink, support.TESTFN) + self.addCleanup(os_helper.unlink, os_helper.TESTFN) context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.verify_mode = ssl.CERT_REQUIRED context.load_verify_locations(SIGNING_CA) @@ -4258,7 +4280,7 @@ def test_sendfile(self): with server: with context.wrap_socket(socket.socket()) as s: s.connect((HOST, server.port)) - with open(support.TESTFN, 'rb') as file: + with open(os_helper.TESTFN, 'rb') as file: s.sendfile(file) self.assertEqual(s.recv(1024), TEST_DATA) @@ -4584,21 +4606,21 @@ def test_bpo37428_pha_cert_none(self): class TestSSLDebug(unittest.TestCase): - def keylog_lines(self, fname=support.TESTFN): + def keylog_lines(self, fname=os_helper.TESTFN): with open(fname) as f: return len(list(f)) @requires_keylog @unittest.skipIf(Py_DEBUG_WIN32, "Avoid mixing debug/release CRT on Windows") def test_keylog_defaults(self): - self.addCleanup(support.unlink, support.TESTFN) + self.addCleanup(os_helper.unlink, os_helper.TESTFN) ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) self.assertEqual(ctx.keylog_filename, None) - self.assertFalse(os.path.isfile(support.TESTFN)) - ctx.keylog_filename = support.TESTFN - self.assertEqual(ctx.keylog_filename, support.TESTFN) - self.assertTrue(os.path.isfile(support.TESTFN)) + self.assertFalse(os.path.isfile(os_helper.TESTFN)) + ctx.keylog_filename = os_helper.TESTFN + self.assertEqual(ctx.keylog_filename, os_helper.TESTFN) + self.assertTrue(os.path.isfile(os_helper.TESTFN)) self.assertEqual(self.keylog_lines(), 1) ctx.keylog_filename = None @@ -4607,7 +4629,7 @@ def test_keylog_defaults(self): with self.assertRaises((IsADirectoryError, PermissionError)): # Windows raises PermissionError ctx.keylog_filename = os.path.dirname( - os.path.abspath(support.TESTFN)) + os.path.abspath(os_helper.TESTFN)) with self.assertRaises(TypeError): ctx.keylog_filename = 1 @@ -4615,10 +4637,10 @@ def test_keylog_defaults(self): @requires_keylog @unittest.skipIf(Py_DEBUG_WIN32, "Avoid mixing debug/release CRT on Windows") def test_keylog_filename(self): - self.addCleanup(support.unlink, support.TESTFN) + self.addCleanup(os_helper.unlink, os_helper.TESTFN) client_context, server_context, hostname = testing_context() - client_context.keylog_filename = support.TESTFN + client_context.keylog_filename = os_helper.TESTFN server = ThreadedEchoServer(context=server_context, chatty=False) with server: with client_context.wrap_socket(socket.socket(), @@ -4628,7 +4650,7 @@ def test_keylog_filename(self): self.assertEqual(self.keylog_lines(), 6) client_context.keylog_filename = None - server_context.keylog_filename = support.TESTFN + server_context.keylog_filename = os_helper.TESTFN server = ThreadedEchoServer(context=server_context, chatty=False) with server: with client_context.wrap_socket(socket.socket(), @@ -4636,8 +4658,8 @@ def test_keylog_filename(self): s.connect((HOST, server.port)) self.assertGreaterEqual(self.keylog_lines(), 11) - client_context.keylog_filename = support.TESTFN - server_context.keylog_filename = support.TESTFN + client_context.keylog_filename = os_helper.TESTFN + server_context.keylog_filename = os_helper.TESTFN server = ThreadedEchoServer(context=server_context, chatty=False) with server: with client_context.wrap_socket(socket.socket(), @@ -4653,19 +4675,19 @@ def test_keylog_filename(self): "test is not compatible with ignore_environment") @unittest.skipIf(Py_DEBUG_WIN32, "Avoid mixing debug/release CRT on Windows") def test_keylog_env(self): - self.addCleanup(support.unlink, support.TESTFN) + self.addCleanup(os_helper.unlink, os_helper.TESTFN) with unittest.mock.patch.dict(os.environ): - os.environ['SSLKEYLOGFILE'] = support.TESTFN - self.assertEqual(os.environ['SSLKEYLOGFILE'], support.TESTFN) + os.environ['SSLKEYLOGFILE'] = os_helper.TESTFN + self.assertEqual(os.environ['SSLKEYLOGFILE'], os_helper.TESTFN) ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) self.assertEqual(ctx.keylog_filename, None) ctx = ssl.create_default_context() - self.assertEqual(ctx.keylog_filename, support.TESTFN) + self.assertEqual(ctx.keylog_filename, os_helper.TESTFN) ctx = ssl._create_stdlib_context() - self.assertEqual(ctx.keylog_filename, support.TESTFN) + self.assertEqual(ctx.keylog_filename, os_helper.TESTFN) def test_msg_callback(self): client_context, server_context, hostname = testing_context() diff --git a/Lib/test/test_startfile.py b/Lib/test/test_startfile.py index 1a26a8025e6243e..589ffa25244da99 100644 --- a/Lib/test/test_startfile.py +++ b/Lib/test/test_startfile.py @@ -9,6 +9,7 @@ import unittest from test import support +from test.support import os_helper import os import platform import sys @@ -27,7 +28,7 @@ def test_empty(self): # we're not about to delete. If we're running under -j, that # means the test harness provided directory isn't a safe option. # See http://bugs.python.org/issue15526 for more details - with support.change_cwd(path.dirname(sys.executable)): + with os_helper.change_cwd(path.dirname(sys.executable)): empty = path.join(path.dirname(__file__), "empty.vbs") startfile(empty) startfile(empty, "open") diff --git a/Lib/test/test_stat.py b/Lib/test/test_stat.py index d9e4ffde658dbd0..83d09e17f93c563 100644 --- a/Lib/test/test_stat.py +++ b/Lib/test/test_stat.py @@ -3,7 +3,9 @@ import socket import sys from test.support import socket_helper -from test.support import TESTFN, import_fresh_module +from test.support.import_helper import import_fresh_module +from test.support.os_helper import TESTFN + c_stat = import_fresh_module('stat', fresh=['_stat']) py_stat = import_fresh_module('stat', blocked=['_stat']) diff --git a/Lib/test/test_statistics.py b/Lib/test/test_statistics.py index bf415dda557e60c..997110732a17657 100644 --- a/Lib/test/test_statistics.py +++ b/Lib/test/test_statistics.py @@ -15,10 +15,10 @@ import sys import unittest from test import support +from test.support import import_helper from decimal import Decimal from fractions import Fraction -from test import support # Module to be tested. @@ -179,8 +179,10 @@ class _DoNothing: # We prefer this for testing numeric values that may not be exactly equal, # and avoid using TestCase.assertAlmostEqual, because it sucks :-) -py_statistics = support.import_fresh_module('statistics', blocked=['_statistics']) -c_statistics = support.import_fresh_module('statistics', fresh=['_statistics']) +py_statistics = import_helper.import_fresh_module('statistics', + blocked=['_statistics']) +c_statistics = import_helper.import_fresh_module('statistics', + fresh=['_statistics']) class TestModules(unittest.TestCase): diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 0162424e2fd6b69..434ba567db0a560 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -376,7 +376,9 @@ def _assert_cwd(self, expected_cwd, python_arg, **kwargs): # matches *expected_cwd*. p = subprocess.Popen([python_arg, "-c", "import os, sys; " - "sys.stdout.write(os.getcwd()); " + "buf = sys.stdout.buffer; " + "buf.write(os.getcwd().encode()); " + "buf.flush(); " "sys.exit(47)"], stdout=subprocess.PIPE, **kwargs) @@ -385,7 +387,7 @@ def _assert_cwd(self, expected_cwd, python_arg, **kwargs): self.assertEqual(47, p.returncode) normcase = os.path.normcase self.assertEqual(normcase(expected_cwd), - normcase(p.stdout.read().decode("utf-8"))) + normcase(p.stdout.read().decode())) def test_cwd(self): # Check that cwd changes the cwd for the child process. diff --git a/Lib/test/test_sundry.py b/Lib/test/test_sundry.py index 2accad1aeebd4f9..04e572c00a19690 100644 --- a/Lib/test/test_sundry.py +++ b/Lib/test/test_sundry.py @@ -3,15 +3,17 @@ import platform import sys from test import support +from test.support import import_helper +from test.support import warnings_helper import unittest class TestUntestedModules(unittest.TestCase): def test_untested_modules_can_be_imported(self): untested = ('encodings', 'formatter') - with support.check_warnings(quiet=True): + with warnings_helper.check_warnings(quiet=True): for name in untested: try: - support.import_module('test.test_{}'.format(name)) + import_helper.import_module('test.test_{}'.format(name)) except unittest.SkipTest: importlib.import_module(name) else: diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index b268511844b8281..71a66c27aa21df0 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -391,14 +391,14 @@ def test_detect_api_mismatch__ignore(self): def test_check__all__(self): extra = {'tempdir'} - blacklist = {'template'} + not_exported = {'template'} support.check__all__(self, tempfile, extra=extra, - blacklist=blacklist) + not_exported=not_exported) extra = {'TextTestResult', 'installHandler'} - blacklist = {'load_tests', "TestProgram", "BaseTestSuite"} + not_exported = {'load_tests', "TestProgram", "BaseTestSuite"} support.check__all__(self, unittest, @@ -407,7 +407,7 @@ def test_check__all__(self): "unittest.main", "unittest.runner", "unittest.signals", "unittest.async_case"), extra=extra, - blacklist=blacklist) + not_exported=not_exported) self.assertRaises(AssertionError, support.check__all__, self, unittest) diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py index d19355888e4b347..fa514917a1f0210 100644 --- a/Lib/test/test_symtable.py +++ b/Lib/test/test_symtable.py @@ -63,6 +63,13 @@ def test_type(self): self.assertEqual(self.spam.get_type(), "function") self.assertEqual(self.internal.get_type(), "function") + def test_id(self): + self.assertGreater(self.top.get_id(), 0) + self.assertGreater(self.Mine.get_id(), 0) + self.assertGreater(self.a_method.get_id(), 0) + self.assertGreater(self.spam.get_id(), 0) + self.assertGreater(self.internal.get_id(), 0) + def test_optimized(self): self.assertFalse(self.top.is_optimized()) diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index aaba6630ff43968..30c29a26a992707 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -10,6 +10,7 @@ import sysconfig import test.support from test import support +from test.support import os_helper from test.support.script_helper import assert_python_ok, assert_python_failure from test.support import threading_helper import textwrap @@ -632,7 +633,7 @@ def test_ioencoding(self): out = p.communicate()[0].strip() self.assertEqual(out, b'\xbd') - @unittest.skipUnless(test.support.FS_NONASCII, + @unittest.skipUnless(os_helper.FS_NONASCII, 'requires OS support of non-ASCII encodings') @unittest.skipUnless(sys.getfilesystemencoding() == locale.getpreferredencoding(False), 'requires FS encoding to match locale') @@ -641,10 +642,10 @@ def test_ioencoding_nonascii(self): env["PYTHONIOENCODING"] = "" p = subprocess.Popen([sys.executable, "-c", - 'print(%a)' % test.support.FS_NONASCII], + 'print(%a)' % os_helper.FS_NONASCII], stdout=subprocess.PIPE, env=env) out = p.communicate()[0].strip() - self.assertEqual(out, os.fsencode(test.support.FS_NONASCII)) + self.assertEqual(out, os.fsencode(os_helper.FS_NONASCII)) @unittest.skipIf(sys.base_prefix != sys.prefix, 'Test is not venv-compatible') @@ -1236,7 +1237,7 @@ class C(object): pass nfrees = len(x.f_code.co_freevars) extras = x.f_code.co_stacksize + x.f_code.co_nlocals +\ ncells + nfrees - 1 - check(x, vsize('5P2c4P3ic' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P')) + check(x, vsize('4Pi2c4P3ic' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P')) # function def func(): pass check(func, size('13P')) @@ -1253,7 +1254,7 @@ def bar(cls): check(bar, size('PP')) # generator def get_gen(): yield 1 - check(get_gen(), size('Pb2PPP4P')) + check(get_gen(), size('P2PPP4P')) # iterator check(iter('abc'), size('lP')) # callable-iterator diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py index 482e918acac574a..3f902b1fe74ce83 100644 --- a/Lib/test/test_sys_settrace.py +++ b/Lib/test/test_sys_settrace.py @@ -948,7 +948,7 @@ def test_jump_in_nested_finally_3(output): output.append(11) output.append(12) - @jump_test(5, 11, [2, 4], (ValueError, 'unreachable')) + @jump_test(5, 11, [2, 4], (ValueError, 'after')) def test_no_jump_over_return_try_finally_in_finally_block(output): try: output.append(2) @@ -1457,7 +1457,7 @@ async def test_jump_between_async_with_blocks(output): async with asynctracecontext(output, 4): output.append(5) - @jump_test(5, 7, [2, 4], (ValueError, "unreachable")) + @jump_test(5, 7, [2, 4], (ValueError, "after")) def test_no_jump_over_return_out_of_finally_block(output): try: output.append(2) diff --git a/Lib/test/test_syslog.py b/Lib/test/test_syslog.py index 6f902f104909d0b..fe09bd39f8b7fd9 100644 --- a/Lib/test/test_syslog.py +++ b/Lib/test/test_syslog.py @@ -1,6 +1,5 @@ - -from test import support -syslog = support.import_module("syslog") #skip if not supported +from test.support import import_helper +syslog = import_helper.import_module("syslog") #skip if not supported import unittest # XXX(nnorwitz): This test sucks. I don't know of a platform independent way diff --git a/Lib/test/test_tabnanny.py b/Lib/test/test_tabnanny.py index 95840d6ac0c5f4c..4dfbd2985d5b5a8 100644 --- a/Lib/test/test_tabnanny.py +++ b/Lib/test/test_tabnanny.py @@ -12,7 +12,8 @@ import tempfile import textwrap from test.support import (captured_stderr, captured_stdout, script_helper, - findfile, unlink) + findfile) +from test.support.os_helper import unlink SOURCE_CODES = { diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index d60d35b5be04ae8..4ef20db09716362 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -11,6 +11,7 @@ import tarfile from test import support +from test.support import os_helper from test.support import script_helper # Check for our compression modules. @@ -30,7 +31,7 @@ def sha256sum(data): return sha256(data).hexdigest() -TEMPDIR = os.path.abspath(support.TESTFN) + "-tardir" +TEMPDIR = os.path.abspath(os_helper.TESTFN) + "-tardir" tarextdir = TEMPDIR + '-extract-test' tarname = support.findfile("testtar.tar") gzipname = os.path.join(TEMPDIR, "testtar.tar.gz") @@ -429,6 +430,13 @@ def test_premature_end_of_archive(self): with self.assertRaisesRegex(tarfile.ReadError, "unexpected end of data"): tar.extractfile(t).read() + def test_length_zero_header(self): + # bpo-39017 (CVE-2019-20907): reading a zero-length header should fail + # with an exception + with self.assertRaisesRegex(tarfile.ReadError, "file could not be opened successfully"): + with tarfile.open(support.findfile('recursion.tar')) as tar: + pass + class MiscReadTestBase(CommonReadTest): def requires_name_attribute(self): pass @@ -568,21 +576,21 @@ def test_find_members(self): @unittest.skipUnless(hasattr(os, "link"), "Missing hardlink implementation") - @support.skip_unless_symlink + @os_helper.skip_unless_symlink def test_extract_hardlink(self): # Test hardlink extraction (e.g. bug #857297). with tarfile.open(tarname, errorlevel=1, encoding="iso8859-1") as tar: tar.extract("ustar/regtype", TEMPDIR) - self.addCleanup(support.unlink, os.path.join(TEMPDIR, "ustar/regtype")) + self.addCleanup(os_helper.unlink, os.path.join(TEMPDIR, "ustar/regtype")) tar.extract("ustar/lnktype", TEMPDIR) - self.addCleanup(support.unlink, os.path.join(TEMPDIR, "ustar/lnktype")) + self.addCleanup(os_helper.unlink, os.path.join(TEMPDIR, "ustar/lnktype")) with open(os.path.join(TEMPDIR, "ustar/lnktype"), "rb") as f: data = f.read() self.assertEqual(sha256sum(data), sha256_regtype) tar.extract("ustar/symtype", TEMPDIR) - self.addCleanup(support.unlink, os.path.join(TEMPDIR, "ustar/symtype")) + self.addCleanup(os_helper.unlink, os.path.join(TEMPDIR, "ustar/symtype")) with open(os.path.join(TEMPDIR, "ustar/symtype"), "rb") as f: data = f.read() self.assertEqual(sha256sum(data), sha256_regtype) @@ -615,7 +623,7 @@ def format_mtime(mtime): self.assertEqual(tarinfo.mtime, file_mtime, errmsg) finally: tar.close() - support.rmtree(DIR) + os_helper.rmtree(DIR) def test_extract_directory(self): dirtype = "ustar/dirtype" @@ -630,11 +638,11 @@ def test_extract_directory(self): if sys.platform != "win32": self.assertEqual(os.stat(extracted).st_mode & 0o777, 0o755) finally: - support.rmtree(DIR) + os_helper.rmtree(DIR) def test_extractall_pathlike_name(self): DIR = pathlib.Path(TEMPDIR) / "extractall" - with support.temp_dir(DIR), \ + with os_helper.temp_dir(DIR), \ tarfile.open(tarname, encoding="iso8859-1") as tar: directories = [t for t in tar if t.isdir()] tar.extractall(DIR, directories) @@ -645,7 +653,7 @@ def test_extractall_pathlike_name(self): def test_extract_pathlike_name(self): dirtype = "ustar/dirtype" DIR = pathlib.Path(TEMPDIR) / "extractall" - with support.temp_dir(DIR), \ + with os_helper.temp_dir(DIR), \ tarfile.open(tarname, encoding="iso8859-1") as tar: tarinfo = tar.getmember(dirtype) tar.extract(tarinfo, path=DIR) @@ -669,7 +677,7 @@ def test_init_close_fobj(self): else: self.fail("ReadError not raised") finally: - support.unlink(empty) + os_helper.unlink(empty) def test_parallel_iteration(self): # Issue #16601: Restarting iteration over tarfile continued @@ -1019,7 +1027,7 @@ def _fs_supports_holes(): fobj.write(b'x' * 4096) fobj.truncate() s = os.stat(name) - support.unlink(name) + os_helper.unlink(name) return (s.st_blocks * 512 < s.st_size) else: return False @@ -1164,7 +1172,7 @@ def test_directory_size(self): finally: tar.close() finally: - support.rmdir(path) + os_helper.rmdir(path) # mock the following: # os.listdir: so we know that files are in the wrong order @@ -1186,9 +1194,9 @@ def test_ordered_recursion(self): finally: tar.close() finally: - support.unlink(os.path.join(path, "1")) - support.unlink(os.path.join(path, "2")) - support.rmdir(path) + os_helper.unlink(os.path.join(path, "1")) + os_helper.unlink(os.path.join(path, "2")) + os_helper.rmdir(path) def test_gettarinfo_pathlike_name(self): with tarfile.open(tmpname, self.mode) as tar: @@ -1222,10 +1230,10 @@ def test_link_size(self): finally: tar.close() finally: - support.unlink(target) - support.unlink(link) + os_helper.unlink(target) + os_helper.unlink(link) - @support.skip_unless_symlink + @os_helper.skip_unless_symlink def test_symlink_size(self): path = os.path.join(TEMPDIR, "symlink") os.symlink("link_target", path) @@ -1237,7 +1245,7 @@ def test_symlink_size(self): finally: tar.close() finally: - support.unlink(path) + os_helper.unlink(path) def test_add_self(self): # Test for #1257255. @@ -1250,7 +1258,7 @@ def test_add_self(self): self.assertEqual(tar.getnames(), [], "added the archive to itself") - with support.change_cwd(TEMPDIR): + with os_helper.change_cwd(TEMPDIR): tar.add(dstname) self.assertEqual(tar.getnames(), [], "added the archive to itself") @@ -1263,7 +1271,7 @@ def test_filter(self): try: for name in ("foo", "bar", "baz"): name = os.path.join(tempdir, name) - support.create_empty_file(name) + os_helper.create_empty_file(name) def filter(tarinfo): if os.path.basename(tarinfo.name) == "bar": @@ -1291,7 +1299,7 @@ def filter(tarinfo): finally: tar.close() finally: - support.rmtree(tempdir) + os_helper.rmtree(tempdir) # Guarantee that stored pathnames are not modified. Don't # remove ./ or ../ or double slashes. Still make absolute @@ -1302,7 +1310,7 @@ def _test_pathname(self, path, cmp_path=None, dir=False): # and compare the stored name with the original. foo = os.path.join(TEMPDIR, "foo") if not dir: - support.create_empty_file(foo) + os_helper.create_empty_file(foo) else: os.mkdir(foo) @@ -1319,14 +1327,14 @@ def _test_pathname(self, path, cmp_path=None, dir=False): tar.close() if not dir: - support.unlink(foo) + os_helper.unlink(foo) else: - support.rmdir(foo) + os_helper.rmdir(foo) self.assertEqual(t.name, cmp_path or path.replace(os.sep, "/")) - @support.skip_unless_symlink + @os_helper.skip_unless_symlink def test_extractall_symlinks(self): # Test if extractall works properly when tarfile contains symlinks tempdir = os.path.join(TEMPDIR, "testsymlinks") @@ -1349,8 +1357,8 @@ def test_extractall_symlinks(self): except OSError: self.fail("extractall failed with symlinked files") finally: - support.unlink(temparchive) - support.rmtree(tempdir) + os_helper.unlink(temparchive) + os_helper.rmtree(tempdir) def test_pathnames(self): self._test_pathname("foo") @@ -1378,7 +1386,7 @@ def test_abs_pathnames(self): def test_cwd(self): # Test adding the current working directory. - with support.change_cwd(TEMPDIR): + with os_helper.change_cwd(TEMPDIR): tar = tarfile.open(tmpname, self.mode) try: tar.add(".") @@ -1446,7 +1454,7 @@ def test_file_mode(self): # Test for issue #8464: Create files with correct # permissions. if os.path.exists(tmpname): - support.unlink(tmpname) + os_helper.unlink(tmpname) original_umask = os.umask(0o022) try: @@ -1592,7 +1600,7 @@ def test_headers_written_only_for_device_files(self): self.assertEqual(buf_blk[device_headers], b"0000000\0" * 2) self.assertEqual(buf_reg[device_headers], b"\0" * 16) finally: - support.rmtree(tempdir) + os_helper.rmtree(tempdir) class CreateTest(WriteTestBase, unittest.TestCase): @@ -1602,7 +1610,7 @@ class CreateTest(WriteTestBase, unittest.TestCase): file_path = os.path.join(TEMPDIR, "spameggs42") def setUp(self): - support.unlink(tmpname) + os_helper.unlink(tmpname) @classmethod def setUpClass(cls): @@ -1611,7 +1619,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): - support.unlink(cls.file_path) + os_helper.unlink(cls.file_path) def test_create(self): with tarfile.open(tmpname, self.mode) as tobj: @@ -1726,8 +1734,8 @@ def setUp(self): def tearDown(self): self.tar.close() - support.unlink(self.foo) - support.unlink(self.bar) + os_helper.unlink(self.foo) + os_helper.unlink(self.bar) def test_add_twice(self): # The same name will be added as a REGTYPE every @@ -2036,7 +2044,7 @@ class AppendTestBase: def setUp(self): self.tarname = tmpname if os.path.exists(self.tarname): - support.unlink(self.tarname) + os_helper.unlink(self.tarname) def _create_testtar(self, mode="w:"): with tarfile.open(tarname, encoding="iso8859-1") as src: @@ -2249,22 +2257,19 @@ def test_number_field_limits(self): tarfile.itn(0x10000000000, 6, tarfile.GNU_FORMAT) def test__all__(self): - blacklist = {'version', 'grp', 'pwd', 'symlink_exception', - 'NUL', 'BLOCKSIZE', 'RECORDSIZE', 'GNU_MAGIC', - 'POSIX_MAGIC', 'LENGTH_NAME', 'LENGTH_LINK', - 'LENGTH_PREFIX', 'REGTYPE', 'AREGTYPE', 'LNKTYPE', - 'SYMTYPE', 'CHRTYPE', 'BLKTYPE', 'DIRTYPE', 'FIFOTYPE', - 'CONTTYPE', 'GNUTYPE_LONGNAME', 'GNUTYPE_LONGLINK', - 'GNUTYPE_SPARSE', 'XHDTYPE', 'XGLTYPE', 'SOLARIS_XHDTYPE', - 'SUPPORTED_TYPES', 'REGULAR_TYPES', 'GNU_TYPES', - 'PAX_FIELDS', 'PAX_NAME_FIELDS', 'PAX_NUMBER_FIELDS', - 'stn', 'nts', 'nti', 'itn', 'calc_chksums', 'copyfileobj', - 'filemode', - 'EmptyHeaderError', 'TruncatedHeaderError', - 'EOFHeaderError', 'InvalidHeaderError', - 'SubsequentHeaderError', 'ExFileObject', - 'main'} - support.check__all__(self, tarfile, blacklist=blacklist) + not_exported = { + 'version', 'grp', 'pwd', 'symlink_exception', 'NUL', 'BLOCKSIZE', + 'RECORDSIZE', 'GNU_MAGIC', 'POSIX_MAGIC', 'LENGTH_NAME', + 'LENGTH_LINK', 'LENGTH_PREFIX', 'REGTYPE', 'AREGTYPE', 'LNKTYPE', + 'SYMTYPE', 'CHRTYPE', 'BLKTYPE', 'DIRTYPE', 'FIFOTYPE', 'CONTTYPE', + 'GNUTYPE_LONGNAME', 'GNUTYPE_LONGLINK', 'GNUTYPE_SPARSE', + 'XHDTYPE', 'XGLTYPE', 'SOLARIS_XHDTYPE', 'SUPPORTED_TYPES', + 'REGULAR_TYPES', 'GNU_TYPES', 'PAX_FIELDS', 'PAX_NAME_FIELDS', + 'PAX_NUMBER_FIELDS', 'stn', 'nts', 'nti', 'itn', 'calc_chksums', + 'copyfileobj', 'filemode', 'EmptyHeaderError', + 'TruncatedHeaderError', 'EOFHeaderError', 'InvalidHeaderError', + 'SubsequentHeaderError', 'ExFileObject', 'main'} + support.check__all__(self, tarfile, not_exported=not_exported) class CommandLineTest(unittest.TestCase): @@ -2281,7 +2286,7 @@ def make_simple_tarfile(self, tar_name): files = [support.findfile('tokenize_tests.txt'), support.findfile('tokenize_tests-no-coding-cookie-' 'and-utf8-bom-sig-only.txt')] - self.addCleanup(support.unlink, tar_name) + self.addCleanup(os_helper.unlink, tar_name) with tarfile.open(tar_name, 'w') as tf: for tardata in files: tf.add(tardata, arcname=os.path.basename(tardata)) @@ -2327,7 +2332,7 @@ def test_test_command_invalid_file(self): self.assertEqual(out, b'') self.assertEqual(rc, 1) finally: - support.unlink(tmpname) + os_helper.unlink(tmpname) def test_list_command(self): for tar_name in testtarnames: @@ -2369,7 +2374,7 @@ def test_create_command(self): with tarfile.open(tmpname) as tar: tar.getmembers() finally: - support.unlink(tmpname) + os_helper.unlink(tmpname) def test_create_command_verbose(self): files = [support.findfile('tokenize_tests.txt'), @@ -2383,7 +2388,7 @@ def test_create_command_verbose(self): with tarfile.open(tmpname) as tar: tar.getmembers() finally: - support.unlink(tmpname) + os_helper.unlink(tmpname) def test_create_command_dotless_filename(self): files = [support.findfile('tokenize_tests.txt')] @@ -2393,7 +2398,7 @@ def test_create_command_dotless_filename(self): with tarfile.open(dotlessname) as tar: tar.getmembers() finally: - support.unlink(dotlessname) + os_helper.unlink(dotlessname) def test_create_command_dot_started_filename(self): tar_name = os.path.join(TEMPDIR, ".testtar") @@ -2404,7 +2409,7 @@ def test_create_command_dot_started_filename(self): with tarfile.open(tar_name) as tar: tar.getmembers() finally: - support.unlink(tar_name) + os_helper.unlink(tar_name) def test_create_command_compressed(self): files = [support.findfile('tokenize_tests.txt'), @@ -2419,41 +2424,41 @@ def test_create_command_compressed(self): with filetype.taropen(tar_name) as tar: tar.getmembers() finally: - support.unlink(tar_name) + os_helper.unlink(tar_name) def test_extract_command(self): self.make_simple_tarfile(tmpname) for opt in '-e', '--extract': try: - with support.temp_cwd(tarextdir): + with os_helper.temp_cwd(tarextdir): out = self.tarfilecmd(opt, tmpname) self.assertEqual(out, b'') finally: - support.rmtree(tarextdir) + os_helper.rmtree(tarextdir) def test_extract_command_verbose(self): self.make_simple_tarfile(tmpname) for opt in '-v', '--verbose': try: - with support.temp_cwd(tarextdir): + with os_helper.temp_cwd(tarextdir): out = self.tarfilecmd(opt, '-e', tmpname, PYTHONIOENCODING='utf-8') self.assertIn(b' file is extracted.', out) finally: - support.rmtree(tarextdir) + os_helper.rmtree(tarextdir) def test_extract_command_different_directory(self): self.make_simple_tarfile(tmpname) try: - with support.temp_cwd(tarextdir): + with os_helper.temp_cwd(tarextdir): out = self.tarfilecmd('-e', tmpname, 'spamdir') self.assertEqual(out, b'') finally: - support.rmtree(tarextdir) + os_helper.rmtree(tarextdir) def test_extract_command_invalid_file(self): zipname = support.findfile('zipdir.zip') - with support.temp_cwd(tarextdir): + with os_helper.temp_cwd(tarextdir): rc, out, err = self.tarfilecmd_failure('-e', zipname) self.assertIn(b' is not a tar archive.', err) self.assertEqual(out, b'') @@ -2716,7 +2721,7 @@ def test_keyword_only(self, mock_geteuid): def setUpModule(): - support.unlink(TEMPDIR) + os_helper.unlink(TEMPDIR) os.makedirs(TEMPDIR) global testtarnames @@ -2727,14 +2732,14 @@ def setUpModule(): # Create compressed tarfiles. for c in GzipTest, Bz2Test, LzmaTest: if c.open: - support.unlink(c.tarname) + os_helper.unlink(c.tarname) testtarnames.append(c.tarname) with c.open(c.tarname, "wb") as tar: tar.write(data) def tearDownModule(): if os.path.exists(TEMPDIR): - support.rmtree(TEMPDIR) + os_helper.rmtree(TEMPDIR) if __name__ == "__main__": unittest.main() diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index db982dac8d6533f..cd2a30e533ae032 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -6,6 +6,7 @@ import warnings from test import support from test.support import import_helper +from test.support import os_helper # Skip this test if the _tkinter module wasn't built. _tkinter = import_helper.import_module('_tkinter') @@ -192,26 +193,26 @@ def test_getboolean(self): def testEvalFile(self): tcl = self.interp - with open(support.TESTFN, 'w') as f: - self.addCleanup(support.unlink, support.TESTFN) + with open(os_helper.TESTFN, 'w') as f: + self.addCleanup(os_helper.unlink, os_helper.TESTFN) f.write("""set a 1 set b 2 set c [ expr $a + $b ] """) - tcl.evalfile(support.TESTFN) + tcl.evalfile(os_helper.TESTFN) self.assertEqual(tcl.eval('set a'),'1') self.assertEqual(tcl.eval('set b'),'2') self.assertEqual(tcl.eval('set c'),'3') def test_evalfile_null_in_result(self): tcl = self.interp - with open(support.TESTFN, 'w') as f: - self.addCleanup(support.unlink, support.TESTFN) + with open(os_helper.TESTFN, 'w') as f: + self.addCleanup(os_helper.unlink, os_helper.TESTFN) f.write(""" set a "a\0b" set b "a\\0b" """) - tcl.evalfile(support.TESTFN) + tcl.evalfile(os_helper.TESTFN) self.assertEqual(tcl.eval('set a'), 'a\x00b') self.assertEqual(tcl.eval('set b'), 'a\x00b') @@ -243,7 +244,7 @@ def testLoadWithUNC(self): if not os.path.exists(unc_name): raise unittest.SkipTest('Cannot connect to UNC Path') - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env.unset("TCL_LIBRARY") stdout = subprocess.check_output( [unc_name, '-c', 'import tkinter; print(tkinter)']) diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index ad82e304e32f3db..d02d3b346f9cc8e 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -4,7 +4,8 @@ import test.support from test.support import threading_helper -from test.support import verbose, import_module, cpython_only +from test.support import verbose, cpython_only +from test.support.import_helper import import_module from test.support.script_helper import assert_python_ok, assert_python_failure import random @@ -1364,9 +1365,9 @@ class BarrierTests(lock_tests.BarrierTests): class MiscTestCase(unittest.TestCase): def test__all__(self): extra = {"ThreadError"} - blacklist = {'currentThread', 'activeCount'} + not_exported = {'currentThread', 'activeCount'} support.check__all__(self, threading, ('threading', '_thread'), - extra=extra, blacklist=blacklist) + extra=extra, not_exported=not_exported) class InterruptMainTests(unittest.TestCase): diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py index 6de7aa87bb2f9e3..681f2c72f9c3785 100644 --- a/Lib/test/test_tokenize.py +++ b/Lib/test/test_tokenize.py @@ -1,4 +1,5 @@ from test import support +from test.support import os_helper from tokenize import (tokenize, _tokenize, untokenize, NUMBER, NAME, OP, STRING, ENDMARKER, ENCODING, tok_name, detect_encoding, open as tokenize_open, Untokenizer, generate_tokens, @@ -1265,8 +1266,8 @@ def test_false_encoding(self): self.assertEqual(consumed_lines, [b'print("#coding=fake")']) def test_open(self): - filename = support.TESTFN + '.py' - self.addCleanup(support.unlink, filename) + filename = os_helper.TESTFN + '.py' + self.addCleanup(os_helper.unlink, filename) # test coding cookie for encoding in ('iso-8859-15', 'utf-8'): diff --git a/Lib/test/test_tools/test_fixcid.py b/Lib/test/test_tools/test_fixcid.py index bce029b1aac83ae..3df13680437194f 100644 --- a/Lib/test/test_tools/test_fixcid.py +++ b/Lib/test/test_tools/test_fixcid.py @@ -5,6 +5,7 @@ import runpy import sys from test import support +from test.support import os_helper from test.test_tools import skip_if_missing, scriptsdir import unittest @@ -57,15 +58,15 @@ def test_alter_comments(self): ) def test_directory(self): - os.mkdir(support.TESTFN) - self.addCleanup(support.rmtree, support.TESTFN) - c_filename = os.path.join(support.TESTFN, "file.c") + os.mkdir(os_helper.TESTFN) + self.addCleanup(os_helper.rmtree, os_helper.TESTFN) + c_filename = os.path.join(os_helper.TESTFN, "file.c") with open(c_filename, "w") as file: file.write("int xx;\n") - with open(os.path.join(support.TESTFN, "file.py"), "w") as file: + with open(os.path.join(os_helper.TESTFN, "file.py"), "w") as file: file.write("xx = 'unaltered'\n") script = os.path.join(scriptsdir, "fixcid.py") - output = self.run_script(args=(support.TESTFN,)) + output = self.run_script(args=(os_helper.TESTFN,)) self.assertMultiLineEqual(output, "{}:\n" "1\n" @@ -74,10 +75,10 @@ def test_directory(self): ) def run_script(self, input="", *, args=("-",), substfile="xx yy\n"): - substfilename = support.TESTFN + ".subst" + substfilename = os_helper.TESTFN + ".subst" with open(substfilename, "w") as file: file.write(substfile) - self.addCleanup(support.unlink, substfilename) + self.addCleanup(os_helper.unlink, substfilename) argv = ["fixcid.py", "-s", substfilename] + list(args) script = os.path.join(scriptsdir, "fixcid.py") diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py index 42e20f8f7716dbe..8da657907eab872 100644 --- a/Lib/test/test_tools/test_i18n.py +++ b/Lib/test/test_tools/test_i18n.py @@ -7,7 +7,7 @@ from test.support.script_helper import assert_python_ok from test.test_tools import skip_if_missing, toolsdir -from test.support import temp_cwd, temp_dir +from test.support.os_helper import temp_cwd, temp_dir skip_if_missing() diff --git a/Lib/test/test_tools/test_lll.py b/Lib/test/test_tools/test_lll.py index 568cbfb5e474608..ec0c97334fdebdd 100644 --- a/Lib/test/test_tools/test_lll.py +++ b/Lib/test/test_tools/test_lll.py @@ -3,6 +3,7 @@ import os import tempfile from test import support +from test.support import os_helper from test.test_tools import skip_if_missing, import_tool import unittest @@ -14,7 +15,7 @@ class lllTests(unittest.TestCase): def setUp(self): self.lll = import_tool('lll') - @support.skip_unless_symlink + @os_helper.skip_unless_symlink def test_lll_multiple_dirs(self): with tempfile.TemporaryDirectory() as dir1, \ tempfile.TemporaryDirectory() as dir2: diff --git a/Lib/test/test_tools/test_md5sum.py b/Lib/test/test_tools/test_md5sum.py index 321bc4bb3628261..bfc1f287fff6e12 100644 --- a/Lib/test/test_tools/test_md5sum.py +++ b/Lib/test/test_tools/test_md5sum.py @@ -2,7 +2,7 @@ import os import unittest -from test import support +from test.support import os_helper from test.support import hashlib_helper from test.support.script_helper import assert_python_ok, assert_python_failure @@ -15,8 +15,8 @@ class MD5SumTests(unittest.TestCase): @classmethod def setUpClass(cls): cls.script = os.path.join(scriptsdir, 'md5sum.py') - os.mkdir(support.TESTFN) - cls.fodder = os.path.join(support.TESTFN, 'md5sum.fodder') + os.mkdir(os_helper.TESTFN) + cls.fodder = os.path.join(os_helper.TESTFN, 'md5sum.fodder') with open(cls.fodder, 'wb') as f: f.write(b'md5sum\r\ntest file\r\n') cls.fodder_md5 = b'd38dae2eb1ab346a292ef6850f9e1a0d' @@ -24,7 +24,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): - support.rmtree(support.TESTFN) + os_helper.rmtree(os_helper.TESTFN) def test_noargs(self): rc, out, err = assert_python_ok(self.script) diff --git a/Lib/test/test_tools/test_pathfix.py b/Lib/test/test_tools/test_pathfix.py index 03ed29d3f974f23..ff61935298b920b 100644 --- a/Lib/test/test_tools/test_pathfix.py +++ b/Lib/test/test_tools/test_pathfix.py @@ -3,6 +3,7 @@ import sys import unittest from test import support +from test.support import os_helper from test.test_tools import scriptsdir, skip_if_missing @@ -14,7 +15,7 @@ class TestPathfixFunctional(unittest.TestCase): script = os.path.join(scriptsdir, 'pathfix.py') def setUp(self): - self.addCleanup(support.unlink, support.TESTFN) + self.addCleanup(os_helper.unlink, os_helper.TESTFN) def pathfix(self, shebang, pathfix_flags, exitcode=0, stdout='', stderr='', directory=''): @@ -24,7 +25,7 @@ def pathfix(self, shebang, pathfix_flags, exitcode=0, stdout='', stderr='', filename = os.path.join(directory, 'script-A_1.py') pathfix_arg = directory else: - filename = support.TESTFN + filename = os_helper.TESTFN pathfix_arg = filename with open(filename, 'w', encoding='utf8') as f: @@ -56,8 +57,8 @@ def pathfix(self, shebang, pathfix_flags, exitcode=0, stdout='', stderr='', return new_shebang def test_recursive(self): - tmpdir = support.TESTFN + '.d' - self.addCleanup(support.rmtree, tmpdir) + tmpdir = os_helper.TESTFN + '.d' + self.addCleanup(os_helper.rmtree, tmpdir) os.mkdir(tmpdir) expected_stderr = f"recursedown('{os.path.basename(tmpdir)}')\n" self.assertEqual( diff --git a/Lib/test/test_tools/test_pindent.py b/Lib/test/test_tools/test_pindent.py index e293bc872ce51e6..e7a547ad7d61277 100644 --- a/Lib/test/test_tools/test_pindent.py +++ b/Lib/test/test_tools/test_pindent.py @@ -6,6 +6,7 @@ import subprocess import textwrap from test import support +from test.support import os_helper from test.support.script_helper import assert_python_ok from test.test_tools import scriptsdir, skip_if_missing @@ -34,7 +35,7 @@ def lstriplines(self, data): def test_selftest(self): self.maxDiff = None - with support.temp_dir() as directory: + with os_helper.temp_dir() as directory: data_path = os.path.join(directory, '_test.py') with open(self.script) as f: closed = f.read() diff --git a/Lib/test/test_tools/test_sundry.py b/Lib/test/test_tools/test_sundry.py index 10eb6941b3be6f8..52369ec09a77fbc 100644 --- a/Lib/test/test_tools/test_sundry.py +++ b/Lib/test/test_tools/test_sundry.py @@ -8,7 +8,7 @@ import os import sys import unittest -from test import support +from test.support import import_helper from test.test_tools import scriptsdir, import_tool, skip_if_missing @@ -16,21 +16,21 @@ class TestSundryScripts(unittest.TestCase): # At least make sure the rest don't have syntax errors. When tests are - # added for a script it should be added to the whitelist below. + # added for a script it should be added to the allowlist below. # scripts that have independent tests. - whitelist = ['reindent', 'pdeps', 'gprof2html', 'md5sum'] + allowlist = ['reindent', 'pdeps', 'gprof2html', 'md5sum'] # scripts that can't be imported without running - blacklist = ['make_ctype'] + denylist = ['make_ctype'] # scripts that use windows-only modules windows_only = ['win_add2path'] - # blacklisted for other reasons + # denylisted for other reasons other = ['analyze_dxp', '2to3'] - skiplist = blacklist + whitelist + windows_only + other + skiplist = denylist + allowlist + windows_only + other def test_sundry(self): - old_modules = support.modules_setup() + old_modules = import_helper.modules_setup() try: for fn in os.listdir(scriptsdir): if not fn.endswith('.py'): @@ -43,7 +43,7 @@ def test_sundry(self): import_tool(name) finally: # Unload all modules loaded in this test - support.modules_cleanup(*old_modules) + import_helper.modules_cleanup(*old_modules) @unittest.skipIf(sys.platform != "win32", "Windows-only test") def test_sundry_windows(self): diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py index c03982ba72b3f1f..75478557e787196 100644 --- a/Lib/test/test_trace.py +++ b/Lib/test/test_trace.py @@ -1,6 +1,7 @@ import os import sys -from test.support import TESTFN, TESTFN_UNICODE, FS_NONASCII, rmtree, unlink, captured_stdout +from test.support import captured_stdout +from test.support.os_helper import (TESTFN, rmtree, unlink) from test.support.script_helper import assert_python_ok, assert_python_failure import textwrap import unittest diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index c5fbd8700ae9b1c..730596efd8bcecc 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -1191,9 +1191,9 @@ class MiscTest(unittest.TestCase): def test_all(self): expected = set() - blacklist = {'print_list'} + denylist = {'print_list'} for name in dir(traceback): - if name.startswith('_') or name in blacklist: + if name.startswith('_') or name in denylist: continue module_object = getattr(traceback, name) if getattr(module_object, '__module__', None) == 'traceback': diff --git a/Lib/test/test_tracemalloc.py b/Lib/test/test_tracemalloc.py index c5ae4e6d653bf74..a0037f81b88f277 100644 --- a/Lib/test/test_tracemalloc.py +++ b/Lib/test/test_tracemalloc.py @@ -7,6 +7,7 @@ from test.support.script_helper import (assert_python_ok, assert_python_failure, interpreter_requires_environment) from test import support +from test.support import os_helper try: import _testcapi @@ -287,11 +288,11 @@ def test_snapshot(self): self.assertGreater(snapshot.traces[1].traceback.total_nframe, 10) # write on disk - snapshot.dump(support.TESTFN) - self.addCleanup(support.unlink, support.TESTFN) + snapshot.dump(os_helper.TESTFN) + self.addCleanup(os_helper.unlink, os_helper.TESTFN) # load from disk - snapshot2 = tracemalloc.Snapshot.load(support.TESTFN) + snapshot2 = tracemalloc.Snapshot.load(os_helper.TESTFN) self.assertEqual(snapshot2.traces, snapshot.traces) # tracemalloc must be tracing memory allocations to take a snapshot @@ -306,11 +307,11 @@ def test_snapshot_save_attr(self): # take a snapshot with a new attribute snapshot = tracemalloc.take_snapshot() snapshot.test_attr = "new" - snapshot.dump(support.TESTFN) - self.addCleanup(support.unlink, support.TESTFN) + snapshot.dump(os_helper.TESTFN) + self.addCleanup(os_helper.unlink, os_helper.TESTFN) # load() should recreate the attribute - snapshot2 = tracemalloc.Snapshot.load(support.TESTFN) + snapshot2 = tracemalloc.Snapshot.load(os_helper.TESTFN) self.assertEqual(snapshot2.test_attr, "new") def fork_child(self): diff --git a/Lib/test/test_ttk_guionly.py b/Lib/test/test_ttk_guionly.py index 462665db5f3e751..abb26433652f178 100644 --- a/Lib/test/test_ttk_guionly.py +++ b/Lib/test/test_ttk_guionly.py @@ -1,8 +1,9 @@ import unittest from test import support +from test.support import import_helper # Skip this test if _tkinter wasn't built. -support.import_module('_tkinter') +import_helper.import_module('_tkinter') # Skip test if tk cannot be initialized. support.requires('gui') diff --git a/Lib/test/test_ttk_textonly.py b/Lib/test/test_ttk_textonly.py index 7540a4310344c1f..013b0e9ee21da4b 100644 --- a/Lib/test/test_ttk_textonly.py +++ b/Lib/test/test_ttk_textonly.py @@ -1,7 +1,9 @@ from test import support +from test.support import import_helper + # Skip this test if _tkinter does not exist. -support.import_module('_tkinter') +import_helper.import_module('_tkinter') from tkinter.test import runtktests diff --git a/Lib/test/test_turtle.py b/Lib/test/test_turtle.py index 38448c791be66c8..46ff4a3aac709a7 100644 --- a/Lib/test/test_turtle.py +++ b/Lib/test/test_turtle.py @@ -1,8 +1,11 @@ import pickle import unittest from test import support +from test.support import import_helper +from test.support import os_helper -turtle = support.import_module('turtle') + +turtle = import_helper.import_module('turtle') Vec2D = turtle.Vec2D test_config = """\ @@ -50,10 +53,10 @@ class TurtleConfigTest(unittest.TestCase): def get_cfg_file(self, cfg_str): - self.addCleanup(support.unlink, support.TESTFN) - with open(support.TESTFN, 'w') as f: + self.addCleanup(os_helper.unlink, os_helper.TESTFN) + with open(os_helper.TESTFN, 'w') as f: f.write(cfg_str) - return support.TESTFN + return os_helper.TESTFN def test_config_dict(self): diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 398add05a12b992..b3be99141afca99 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -1387,7 +1387,7 @@ def close(self): self.assertIsSubclass(B, Custom) self.assertNotIsSubclass(A, Custom) - def test_builtin_protocol_whitelist(self): + def test_builtin_protocol_allowlist(self): with self.assertRaises(TypeError): class CustomProtocol(TestCase, Protocol): pass @@ -2456,6 +2456,12 @@ def foo(a: tuple[ForwardRef('T')]): self.assertEqual(get_type_hints(foo, globals(), locals()), {'a': tuple[T]}) + def test_double_forward(self): + def foo(a: 'List[\'int\']'): + pass + self.assertEqual(get_type_hints(foo, globals(), locals()), + {'a': List[int]}) + def test_forward_recursion_actually(self): def namespace1(): a = typing.ForwardRef('A') diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index afc95555db02699..d485bc7ede2b923 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -723,6 +723,7 @@ def test_isidentifier(self): self.assertFalse("0".isidentifier()) @support.cpython_only + @support.requires_legacy_unicode_capi def test_isidentifier_legacy(self): import _testcapi u = '𝖀𝖓𝖎𝖈𝖔𝖉𝖊' @@ -2350,6 +2351,7 @@ def test_getnewargs(self): self.assertEqual(len(args), 1) @support.cpython_only + @support.requires_legacy_unicode_capi def test_resize(self): from _testcapi import getargs_u for length in range(1, 100, 7): @@ -2920,6 +2922,7 @@ def test_copycharacters(self): self.assertRaises(SystemError, unicode_copycharacters, s, 0, b'', 0, 0) @support.cpython_only + @support.requires_legacy_unicode_capi def test_encode_decimal(self): from _testcapi import unicode_encodedecimal self.assertEqual(unicode_encodedecimal('123'), @@ -2936,6 +2939,7 @@ def test_encode_decimal(self): unicode_encodedecimal, "123\u20ac", "replace") @support.cpython_only + @support.requires_legacy_unicode_capi def test_transform_decimal(self): from _testcapi import unicode_transformdecimaltoascii as transform_decimal self.assertEqual(transform_decimal('123'), diff --git a/Lib/test/test_unicode_file_functions.py b/Lib/test/test_unicode_file_functions.py index 1cd0d621cd4b3a1..7ef11aac9f8ef62 100644 --- a/Lib/test/test_unicode_file_functions.py +++ b/Lib/test/test_unicode_file_functions.py @@ -6,6 +6,8 @@ import warnings from unicodedata import normalize from test import support +from test.support import os_helper + filenames = [ '1_abc', @@ -62,14 +64,14 @@ class UnicodeFileTests(unittest.TestCase): def setUp(self): try: - os.mkdir(support.TESTFN) + os.mkdir(os_helper.TESTFN) except FileExistsError: pass - self.addCleanup(support.rmtree, support.TESTFN) + self.addCleanup(os_helper.rmtree, os_helper.TESTFN) files = set() for name in self.files: - name = os.path.join(support.TESTFN, self.norm(name)) + name = os.path.join(os_helper.TESTFN, self.norm(name)) with open(name, 'wb') as f: f.write((name+'\n').encode("utf-8")) os.stat(name) @@ -144,9 +146,10 @@ def test_listdir(self): sf0 = set(self.files) with warnings.catch_warnings(): warnings.simplefilter("ignore", DeprecationWarning) - f1 = os.listdir(support.TESTFN.encode(sys.getfilesystemencoding())) - f2 = os.listdir(support.TESTFN) - sf2 = set(os.path.join(support.TESTFN, f) for f in f2) + f1 = os.listdir(os_helper.TESTFN.encode( + sys.getfilesystemencoding())) + f2 = os.listdir(os_helper.TESTFN) + sf2 = set(os.path.join(os_helper.TESTFN, f) for f in f2) self.assertEqual(sf0, sf2, "%a != %a" % (sf0, sf2)) self.assertEqual(len(f1), len(f2)) @@ -156,9 +159,10 @@ def test_rename(self): os.rename("tmp", name) def test_directory(self): - dirname = os.path.join(support.TESTFN, 'Gr\xfc\xdf-\u66e8\u66e9\u66eb') + dirname = os.path.join(os_helper.TESTFN, + 'Gr\xfc\xdf-\u66e8\u66e9\u66eb') filename = '\xdf-\u66e8\u66e9\u66eb' - with support.temp_cwd(dirname): + with os_helper.temp_cwd(dirname): with open(filename, 'wb') as f: f.write((filename + '\n').encode("utf-8")) os.access(filename,os.R_OK) diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index cbfa9ba60c2c8f9..f202f970ccb38ff 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1,6 +1,8 @@ import unittest from test import support +from test.support import os_helper from test.support import socket_helper +from test.support import warnings_helper from test import test_urllib import os @@ -765,7 +767,7 @@ def test_file(self): h = urllib.request.FileHandler() o = h.parent = MockOpener() - TESTFN = support.TESTFN + TESTFN = os_helper.TESTFN urlpath = sanepathname2url(os.path.abspath(TESTFN)) towrite = b"hello, world\n" urls = [ @@ -1490,7 +1492,7 @@ def test_basic_auth(self): self.check_basic_auth(headers, realm) # no quote: expect a warning - with support.check_warnings(("Basic Auth Realm was unquoted", + with warnings_helper.check_warnings(("Basic Auth Realm was unquoted", UserWarning)): headers = [f'WWW-Authenticate: Basic realm={realm}'] self.check_basic_auth(headers, realm) diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py index e568cc457554957..ebb43c30b4d5052 100644 --- a/Lib/test/test_urllib2_localnet.py +++ b/Lib/test/test_urllib2_localnet.py @@ -8,9 +8,9 @@ import unittest import hashlib -from test import support from test.support import hashlib_helper from test.support import threading_helper +from test.support import warnings_helper try: import ssl @@ -567,7 +567,7 @@ def test_https(self): def test_https_with_cafile(self): handler = self.start_https_server(certfile=CERT_localhost) - with support.check_warnings(('', DeprecationWarning)): + with warnings_helper.check_warnings(('', DeprecationWarning)): # Good cert data = self.urlopen("https://localhost:%s/bizarre" % handler.port, cafile=CERT_localhost) @@ -585,7 +585,7 @@ def test_https_with_cafile(self): def test_https_with_cadefault(self): handler = self.start_https_server(certfile=CERT_localhost) # Self-signed cert should fail verification with system certificate store - with support.check_warnings(('', DeprecationWarning)): + with warnings_helper.check_warnings(('', DeprecationWarning)): with self.assertRaises(urllib.error.URLError) as cm: self.urlopen("https://localhost:%s/bizarre" % handler.port, cadefault=True) diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py index cb74685715d35b9..c1d55ee8b29b34f 100644 --- a/Lib/test/test_urllib2net.py +++ b/Lib/test/test_urllib2net.py @@ -1,6 +1,7 @@ import errno import unittest from test import support +from test.support import os_helper from test.support import socket_helper from test.test_urllib2 import sanepathname2url @@ -148,7 +149,7 @@ def test_ftp(self): self._test_urls(urls, self._extra_handlers()) def test_file(self): - TESTFN = support.TESTFN + TESTFN = os_helper.TESTFN f = open(TESTFN, 'w') try: f.write('hi there\n') diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py index 28680aa6b2405d7..773101ce41f6021 100644 --- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -1,5 +1,6 @@ import unittest from test import support +from test.support import os_helper from test.support import socket_helper import contextlib @@ -162,7 +163,7 @@ def urlretrieve(self, *args, **kwargs): try: yield file_location, info finally: - support.unlink(file_location) + os_helper.unlink(file_location) def test_basic(self): # Test basic functionality. @@ -176,8 +177,8 @@ def test_basic(self): def test_specified_path(self): # Make sure that specifying the location of the file to write to works. with self.urlretrieve(self.logo, - support.TESTFN) as (file_location, info): - self.assertEqual(file_location, support.TESTFN) + os_helper.TESTFN) as (file_location, info): + self.assertEqual(file_location, os_helper.TESTFN) self.assertTrue(os.path.exists(file_location)) with open(file_location, 'rb') as f: self.assertTrue(f.read(), "reading from temporary file failed") diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index ca003d55d7c8904..5bb62cdb3740243 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -15,9 +15,8 @@ import sys import tempfile from test.support import (captured_stdout, captured_stderr, requires_zlib, - can_symlink, EnvironmentVarGuard, rmtree, - import_module, skip_if_broken_multiprocessing_synchronize) +from test.support.os_helper import (can_symlink, EnvironmentVarGuard, rmtree) import unittest import venv from unittest.mock import patch diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py index dcc0ea89b5a85cd..04f7560ecc09c17 100644 --- a/Lib/test/test_warnings/__init__.py +++ b/Lib/test/test_warnings/__init__.py @@ -7,14 +7,20 @@ import textwrap import unittest from test import support +from test.support import import_helper +from test.support import os_helper +from test.support import warnings_helper from test.support.script_helper import assert_python_ok, assert_python_failure from test.test_warnings.data import stacklevel as warning_tests import warnings as original_warnings -py_warnings = support.import_fresh_module('warnings', blocked=['_warnings']) -c_warnings = support.import_fresh_module('warnings', fresh=['_warnings']) + +py_warnings = import_helper.import_fresh_module('warnings', + blocked=['_warnings']) +c_warnings = import_helper.import_fresh_module('warnings', + fresh=['_warnings']) Py_DEBUG = hasattr(sys, 'gettotalrefcount') @@ -440,7 +446,7 @@ def test_stacklevel(self): def test_stacklevel_import(self): # Issue #24305: With stacklevel=2, module-level warnings should work. - support.unload('test.test_warnings.data.import_warning') + import_helper.unload('test.test_warnings.data.import_warning') with warnings_state(self.module): with original_warnings.catch_warnings(record=True, module=self.module) as w: @@ -543,7 +549,7 @@ class CWarnTests(WarnTests, unittest.TestCase): module = c_warnings # As an early adopter, we sanity check the - # test.support.import_fresh_module utility function + # test.import_helper.import_fresh_module utility function def test_accelerated(self): self.assertIsNot(original_warnings, self.module) self.assertFalse(hasattr(self.module.warn, '__code__')) @@ -552,7 +558,7 @@ class PyWarnTests(WarnTests, unittest.TestCase): module = py_warnings # As an early adopter, we sanity check the - # test.support.import_fresh_module utility function + # test.import_helper.import_fresh_module utility function def test_pure_python(self): self.assertIsNot(original_warnings, self.module) self.assertTrue(hasattr(self.module.warn, '__code__')) @@ -927,9 +933,9 @@ class PyWarningsDisplayTests(WarningsDisplayTests, unittest.TestCase): module = py_warnings def test_tracemalloc(self): - self.addCleanup(support.unlink, support.TESTFN) + self.addCleanup(os_helper.unlink, os_helper.TESTFN) - with open(support.TESTFN, 'w') as fp: + with open(os_helper.TESTFN, 'w') as fp: fp.write(textwrap.dedent(""" def func(): f = open(__file__) @@ -949,8 +955,8 @@ def run(*args): return stderr # tracemalloc disabled - filename = os.path.abspath(support.TESTFN) - stderr = run('-Wd', support.TESTFN) + filename = os.path.abspath(os_helper.TESTFN) + stderr = run('-Wd', os_helper.TESTFN) expected = textwrap.dedent(f''' {filename}:5: ResourceWarning: unclosed file <...> f = None @@ -959,7 +965,7 @@ def run(*args): self.assertEqual(stderr, expected) # tracemalloc enabled - stderr = run('-Wd', '-X', 'tracemalloc=2', support.TESTFN) + stderr = run('-Wd', '-X', 'tracemalloc=2', os_helper.TESTFN) expected = textwrap.dedent(f''' {filename}:5: ResourceWarning: unclosed file <...> f = None @@ -1093,7 +1099,7 @@ def test_check_warnings(self): wmod = self.module if wmod is not sys.modules['warnings']: self.skipTest('module to test is not loaded warnings module') - with support.check_warnings(quiet=False) as w: + with warnings_helper.check_warnings(quiet=False) as w: self.assertEqual(w.warnings, []) wmod.simplefilter("always") wmod.warn("foo") @@ -1105,18 +1111,18 @@ def test_check_warnings(self): w.reset() self.assertEqual(w.warnings, []) - with support.check_warnings(): + with warnings_helper.check_warnings(): # defaults to quiet=True without argument pass - with support.check_warnings(('foo', UserWarning)): + with warnings_helper.check_warnings(('foo', UserWarning)): wmod.warn("foo") with self.assertRaises(AssertionError): - with support.check_warnings(('', RuntimeWarning)): + with warnings_helper.check_warnings(('', RuntimeWarning)): # defaults to quiet=False with argument pass with self.assertRaises(AssertionError): - with support.check_warnings(('foo', RuntimeWarning)): + with warnings_helper.check_warnings(('foo', RuntimeWarning)): wmod.warn("foo") class CCatchWarningTests(CatchWarningTests, unittest.TestCase): @@ -1198,7 +1204,7 @@ def test_default_filter_configuration(self): @unittest.skipUnless(sys.getfilesystemencoding() != 'ascii', 'requires non-ascii filesystemencoding') def test_nonascii(self): - PYTHONWARNINGS="ignore:DeprecationWarning" + support.FS_NONASCII + PYTHONWARNINGS="ignore:DeprecationWarning" + os_helper.FS_NONASCII rc, stdout, stderr = assert_python_ok("-c", "import sys; sys.stdout.write(str(sys.warnoptions))", PYTHONIOENCODING="utf-8", @@ -1218,7 +1224,7 @@ def test_issue_8766(self): # "import encodings" emits a warning whereas the warnings is not loaded # or not completely loaded (warnings imports indirectly encodings by # importing linecache) yet - with support.temp_cwd() as cwd, support.temp_cwd('encodings'): + with os_helper.temp_cwd() as cwd, os_helper.temp_cwd('encodings'): # encodings loaded by initfsencoding() assert_python_ok('-c', 'pass', PYTHONPATH=cwd) diff --git a/Lib/test/test_wave.py b/Lib/test/test_wave.py index eb231cb19c6d0a8..f85e40b31d0100f 100644 --- a/Lib/test/test_wave.py +++ b/Lib/test/test_wave.py @@ -107,8 +107,7 @@ class WavePCM32Test(WaveTest, unittest.TestCase): class MiscTestCase(unittest.TestCase): def test__all__(self): - blacklist = {'WAVE_FORMAT_PCM'} - support.check__all__(self, wave, blacklist=blacklist) + support.check__all__(self, wave, not_exported={'WAVE_FORMAT_PCM'}) class WaveLowLevelTest(unittest.TestCase): diff --git a/Lib/test/test_webbrowser.py b/Lib/test/test_webbrowser.py index 519a9432abe012d..673cc995d3f5a40 100644 --- a/Lib/test/test_webbrowser.py +++ b/Lib/test/test_webbrowser.py @@ -5,6 +5,8 @@ import subprocess from unittest import mock from test import support +from test.support import import_helper +from test.support import os_helper URL = 'http://www.example.com' @@ -270,7 +272,7 @@ def test_register_preferred(self): class ImportTest(unittest.TestCase): def test_register(self): - webbrowser = support.import_fresh_module('webbrowser') + webbrowser = import_helper.import_fresh_module('webbrowser') self.assertIsNone(webbrowser._tryorder) self.assertFalse(webbrowser._browsers) @@ -284,7 +286,7 @@ class ExampleBrowser: self.assertEqual(webbrowser._browsers['example1'], [ExampleBrowser, None]) def test_get(self): - webbrowser = support.import_fresh_module('webbrowser') + webbrowser = import_helper.import_fresh_module('webbrowser') self.assertIsNone(webbrowser._tryorder) self.assertFalse(webbrowser._browsers) @@ -293,38 +295,38 @@ def test_get(self): self.assertIsNotNone(webbrowser._tryorder) def test_synthesize(self): - webbrowser = support.import_fresh_module('webbrowser') + webbrowser = import_helper.import_fresh_module('webbrowser') name = os.path.basename(sys.executable).lower() webbrowser.register(name, None, webbrowser.GenericBrowser(name)) webbrowser.get(sys.executable) def test_environment(self): - webbrowser = support.import_fresh_module('webbrowser') + webbrowser = import_helper.import_fresh_module('webbrowser') try: browser = webbrowser.get().name except (webbrowser.Error, AttributeError) as err: self.skipTest(str(err)) - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env["BROWSER"] = browser - webbrowser = support.import_fresh_module('webbrowser') + webbrowser = import_helper.import_fresh_module('webbrowser') webbrowser.get() def test_environment_preferred(self): - webbrowser = support.import_fresh_module('webbrowser') + webbrowser = import_helper.import_fresh_module('webbrowser') try: webbrowser.get() least_preferred_browser = webbrowser.get(webbrowser._tryorder[-1]).name except (webbrowser.Error, AttributeError, IndexError) as err: self.skipTest(str(err)) - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env["BROWSER"] = least_preferred_browser - webbrowser = support.import_fresh_module('webbrowser') + webbrowser = import_helper.import_fresh_module('webbrowser') self.assertEqual(webbrowser.get().name, least_preferred_browser) - with support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: env["BROWSER"] = sys.executable - webbrowser = support.import_fresh_module('webbrowser') + webbrowser = import_helper.import_fresh_module('webbrowser') self.assertEqual(webbrowser.get().name, sys.executable) diff --git a/Lib/test/test_winconsoleio.py b/Lib/test/test_winconsoleio.py index a44f7bbd27b7009..1807e47c66c387a 100644 --- a/Lib/test/test_winconsoleio.py +++ b/Lib/test/test_winconsoleio.py @@ -6,7 +6,7 @@ import sys import tempfile import unittest -from test import support +from test.support import os_helper if sys.platform != 'win32': raise unittest.SkipTest("test only relevant on win32") @@ -109,7 +109,7 @@ def test_conin_conout_names(self): def test_conout_path(self): temp_path = tempfile.mkdtemp() - self.addCleanup(support.rmtree, temp_path) + self.addCleanup(os_helper.rmtree, temp_path) conout_path = os.path.join(temp_path, 'CONOUT$') diff --git a/Lib/test/test_winsound.py b/Lib/test/test_winsound.py index dca77cb45bfa915..3c3359b9004fd2f 100644 --- a/Lib/test/test_winsound.py +++ b/Lib/test/test_winsound.py @@ -5,9 +5,11 @@ import unittest from test import support +from test.support import import_helper + support.requires('audio') -winsound = support.import_module('winsound') +winsound = import_helper.import_module('winsound') # Unless we actually have an ear in the room, we have no idea whether a sound diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py index 63f9b92a83de24e..d22c35d92c4e330 100644 --- a/Lib/test/test_xml_etree.py +++ b/Lib/test/test_xml_etree.py @@ -111,7 +111,7 @@ def checkwarnings(*filters, quiet=False): def decorator(test): def newtest(*args, **kwargs): - with support.check_warnings(*filters, quiet=quiet): + with warnings_helper.check_warnings(*filters, quiet=quiet): test(*args, **kwargs) functools.update_wrapper(newtest, test) return newtest @@ -128,7 +128,7 @@ def test_sanity(self): def test_all(self): names = ("xml.etree.ElementTree", "_elementtree") - support.check__all__(self, ET, names, blacklist=("HTML_EMPTY",)) + support.check__all__(self, ET, names, not_exported=("HTML_EMPTY",)) def serialize(elem, to_string=True, encoding='unicode', **options): diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py index e26e1714a540bdb..e68613bb910dd41 100644 --- a/Lib/test/test_xml_etree_c.py +++ b/Lib/test/test_xml_etree_c.py @@ -2,7 +2,7 @@ import io import struct from test import support -from test.support import import_fresh_module +from test.support.import_helper import import_fresh_module import types import unittest diff --git a/Lib/test/test_xxtestfuzz.py b/Lib/test/test_xxtestfuzz.py index 15924aaeff38513..3304c6e703a1736 100644 --- a/Lib/test/test_xxtestfuzz.py +++ b/Lib/test/test_xxtestfuzz.py @@ -1,8 +1,8 @@ import faulthandler -import test.support +from test.support import import_helper import unittest -_xxtestfuzz = test.support.import_module('_xxtestfuzz') +_xxtestfuzz = import_helper.import_module('_xxtestfuzz') class TestFuzzer(unittest.TestCase): diff --git a/Lib/test/test_yield_from.py b/Lib/test/test_yield_from.py index 4735ef4bee3b36f..d105d8c6eb513c1 100644 --- a/Lib/test/test_yield_from.py +++ b/Lib/test/test_yield_from.py @@ -938,6 +938,9 @@ def two(): res.append(g1.throw(MyErr)) except StopIteration: pass + except: + self.assertEqual(res, [0, 1, 2, 3]) + raise # Check with close class MyIt(object): def __iter__(self): diff --git a/Lib/test/test_zipfile64.py b/Lib/test/test_zipfile64.py index 3a788de221264da..810fdedef39dddb 100644 --- a/Lib/test/test_zipfile64.py +++ b/Lib/test/test_zipfile64.py @@ -17,6 +17,7 @@ from tempfile import TemporaryFile +from test.support import os_helper from test.support import TESTFN, requires_zlib TESTFN2 = TESTFN + "2" @@ -138,8 +139,8 @@ def testMoreThan64kFilesAppend(self): self.assertEqual(content, "%d" % (i**3 % 57)) def tearDown(self): - support.unlink(TESTFN) - support.unlink(TESTFN2) + os_helper.unlink(TESTFN) + os_helper.unlink(TESTFN2) if __name__ == "__main__": unittest.main() diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py index 560286071c69029..8df7489f754d3f6 100644 --- a/Lib/test/test_zipimport.py +++ b/Lib/test/test_zipimport.py @@ -9,6 +9,8 @@ import unittest.mock from test import support +from test.support import import_helper +from test.support import os_helper from zipfile import ZipFile, ZipInfo, ZIP_STORED, ZIP_DEFLATED @@ -68,14 +70,14 @@ def setUp(self): self.meta_path = sys.meta_path[:] self.path_hooks = sys.path_hooks[:] sys.path_importer_cache.clear() - self.modules_before = support.modules_setup() + self.modules_before = import_helper.modules_setup() def tearDown(self): sys.path[:] = self.path sys.meta_path[:] = self.meta_path sys.path_hooks[:] = self.path_hooks sys.path_importer_cache.clear() - support.modules_cleanup(*self.modules_before) + import_helper.modules_cleanup(*self.modules_before) class UncompressedZipImportTestCase(ImportHooksBaseTestCase): @@ -92,7 +94,7 @@ def setUp(self): def makeTree(self, files, dirName=TEMP_DIR): # Create a filesystem based set of modules/packages # defined by files under the directory dirName. - self.addCleanup(support.rmtree, dirName) + self.addCleanup(os_helper.rmtree, dirName) for name, (mtime, data) in files.items(): path = os.path.join(dirName, name) @@ -110,7 +112,7 @@ def makeZip(self, files, zipName=TEMP_ZIP, **kw): # Create a zip archive based set of modules/packages # defined by files in the zip file zipName. If the # key 'stuff' exists in kw it is prepended to the archive. - self.addCleanup(support.unlink, zipName) + self.addCleanup(os_helper.unlink, zipName) with ZipFile(zipName, "w") as z: for name, (mtime, data) in files.items(): @@ -438,7 +440,7 @@ def testZipImporterMethods(self): packdir2 + TESTMOD + pyc_ext: (NOW, test_pyc), "spam" + pyc_ext: (NOW, test_pyc)} - self.addCleanup(support.unlink, TEMP_ZIP) + self.addCleanup(os_helper.unlink, TEMP_ZIP) with ZipFile(TEMP_ZIP, "w") as z: for name, (mtime, data) in files.items(): zinfo = ZipInfo(name, time.localtime(mtime)) @@ -492,7 +494,7 @@ def testZipImporterMethodsInSubDirectory(self): files = {packdir2 + "__init__" + pyc_ext: (NOW, test_pyc), packdir2 + TESTMOD + pyc_ext: (NOW, test_pyc)} - self.addCleanup(support.unlink, TEMP_ZIP) + self.addCleanup(os_helper.unlink, TEMP_ZIP) with ZipFile(TEMP_ZIP, "w") as z: for name, (mtime, data) in files.items(): zinfo = ZipInfo(name, time.localtime(mtime)) @@ -536,7 +538,7 @@ def testZipImporterMethodsInSubDirectory(self): self.assertEqual(loader.get_filename(mod_name), mod.__file__) def testGetData(self): - self.addCleanup(support.unlink, TEMP_ZIP) + self.addCleanup(os_helper.unlink, TEMP_ZIP) with ZipFile(TEMP_ZIP, "w") as z: z.compression = self.compression name = "testdata.dat" @@ -644,11 +646,11 @@ def testTraceback(self): files = {TESTMOD + ".py": (NOW, raise_src)} self.doTest(None, files, TESTMOD, call=self.doTraceback) - @unittest.skipIf(support.TESTFN_UNENCODABLE is None, + @unittest.skipIf(os_helper.TESTFN_UNENCODABLE is None, "need an unencodable filename") def testUnencodable(self): - filename = support.TESTFN_UNENCODABLE + ".zip" - self.addCleanup(support.unlink, filename) + filename = os_helper.TESTFN_UNENCODABLE + ".zip" + self.addCleanup(os_helper.unlink, filename) with ZipFile(filename, "w") as z: zinfo = ZipInfo(TESTMOD + ".py", time.localtime(NOW)) zinfo.compress_type = self.compression @@ -656,8 +658,8 @@ def testUnencodable(self): zipimport.zipimporter(filename).load_module(TESTMOD) def testBytesPath(self): - filename = support.TESTFN + ".zip" - self.addCleanup(support.unlink, filename) + filename = os_helper.TESTFN + ".zip" + self.addCleanup(os_helper.unlink, filename) with ZipFile(filename, "w") as z: zinfo = ZipInfo(TESTMOD + ".py", time.localtime(NOW)) zinfo.compress_type = self.compression @@ -709,12 +711,12 @@ def testFilenameTooLong(self): self.assertZipFailure('A' * 33000) def testEmptyFile(self): - support.unlink(TESTMOD) - support.create_empty_file(TESTMOD) + os_helper.unlink(TESTMOD) + os_helper.create_empty_file(TESTMOD) self.assertZipFailure(TESTMOD) def testFileUnreadable(self): - support.unlink(TESTMOD) + os_helper.unlink(TESTMOD) fd = os.open(TESTMOD, os.O_CREAT, 000) try: os.close(fd) @@ -725,10 +727,10 @@ def testFileUnreadable(self): # If we leave "the read-only bit" set on Windows, nothing can # delete TESTMOD, and later tests suffer bogus failures. os.chmod(TESTMOD, 0o666) - support.unlink(TESTMOD) + os_helper.unlink(TESTMOD) def testNotZipFile(self): - support.unlink(TESTMOD) + os_helper.unlink(TESTMOD) fp = open(TESTMOD, 'w+') fp.write('a' * 22) fp.close() @@ -736,7 +738,7 @@ def testNotZipFile(self): # XXX: disabled until this works on Big-endian machines def _testBogusZipFile(self): - support.unlink(TESTMOD) + os_helper.unlink(TESTMOD) fp = open(TESTMOD, 'w+') fp.write(struct.pack('=I', 0x06054B50)) fp.write('a' * 18) @@ -771,7 +773,7 @@ def test_main(): BadFileZipImportTestCase, ) finally: - support.unlink(TESTMOD) + os_helper.unlink(TESTMOD) if __name__ == "__main__": test_main() diff --git a/Lib/test/test_zoneinfo/_support.py b/Lib/test/test_zoneinfo/_support.py index 0fe162c25836876..5a76c163fb75bda 100644 --- a/Lib/test/test_zoneinfo/_support.py +++ b/Lib/test/test_zoneinfo/_support.py @@ -3,7 +3,7 @@ import sys import threading import unittest -from test.support import import_fresh_module +from test.support.import_helper import import_fresh_module OS_ENV_LOCK = threading.Lock() TZPATH_LOCK = threading.Lock() diff --git a/Lib/test/test_zoneinfo/test_zoneinfo.py b/Lib/test/test_zoneinfo/test_zoneinfo.py index 1f1fa60f1ffc1fe..a9375fd55857bc1 100644 --- a/Lib/test/test_zoneinfo/test_zoneinfo.py +++ b/Lib/test/test_zoneinfo/test_zoneinfo.py @@ -6,7 +6,6 @@ import importlib.metadata import io import json -import lzma import os import pathlib import pickle @@ -20,7 +19,9 @@ from . import _support as test_support from ._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase +from test.support.import_helper import import_module +lzma = import_module('lzma') py_zoneinfo, c_zoneinfo = test_support.get_modules() try: @@ -462,7 +463,7 @@ class CZoneInfoDatetimeSubclassTest(DatetimeSubclassMixin, CZoneInfoTest): pass -class ZoneInfoTestSubclass(ZoneInfoTest): +class ZoneInfoSubclassTest(ZoneInfoTest): @classmethod def setUpClass(cls): super().setUpClass() @@ -483,7 +484,7 @@ def test_subclass_own_cache(self): self.assertIsInstance(sub_obj, self.klass) -class CZoneInfoTestSubclass(ZoneInfoTest): +class CZoneInfoSubclassTest(ZoneInfoSubclassTest): module = c_zoneinfo diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index a3378d012fb41ab..1067ab6a8b8a1d9 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -3965,7 +3965,7 @@ def __init__(self, master, variable, value, *values, **kwargs): if 'command' in kwargs: del kwargs['command'] if kwargs: - raise TclError('unknown option -'+kwargs.keys()[0]) + raise TclError('unknown option -'+next(iter(kwargs))) menu.add_command(label=value, command=_setit(variable, value, callback)) for v in values: diff --git a/Lib/tkinter/test/test_tkinter/test_images.py b/Lib/tkinter/test/test_tkinter/test_images.py index 2805d35a1f5b1bf..6c6cb4e148573fe 100644 --- a/Lib/tkinter/test/test_tkinter/test_images.py +++ b/Lib/tkinter/test/test_tkinter/test_images.py @@ -1,6 +1,7 @@ import unittest import tkinter from test import support +from test.support import os_helper from tkinter.test.support import AbstractTkTest, requires_tcl support.requires('gui') @@ -296,12 +297,12 @@ def test_get(self): def test_write(self): image = self.create() - self.addCleanup(support.unlink, support.TESTFN) + self.addCleanup(os_helper.unlink, os_helper.TESTFN) - image.write(support.TESTFN) + image.write(os_helper.TESTFN) image2 = tkinter.PhotoImage('::img::test2', master=self.root, format='ppm', - file=support.TESTFN) + file=os_helper.TESTFN) self.assertEqual(str(image2), '::img::test2') self.assertEqual(image2.type(), 'photo') self.assertEqual(image2.width(), 16) @@ -309,10 +310,10 @@ def test_write(self): self.assertEqual(image2.get(0, 0), image.get(0, 0)) self.assertEqual(image2.get(15, 8), image.get(15, 8)) - image.write(support.TESTFN, format='gif', from_coords=(4, 6, 6, 9)) + image.write(os_helper.TESTFN, format='gif', from_coords=(4, 6, 6, 9)) image3 = tkinter.PhotoImage('::img::test3', master=self.root, format='gif', - file=support.TESTFN) + file=os_helper.TESTFN) self.assertEqual(str(image3), '::img::test3') self.assertEqual(image3.type(), 'photo') self.assertEqual(image3.width(), 2) diff --git a/Lib/tkinter/test/test_tkinter/test_loadtk.py b/Lib/tkinter/test/test_tkinter/test_loadtk.py index bab7bcd37ce3188..760ba721340829e 100644 --- a/Lib/tkinter/test/test_tkinter/test_loadtk.py +++ b/Lib/tkinter/test/test_tkinter/test_loadtk.py @@ -2,6 +2,7 @@ import sys import unittest import test.support as test_support +from test.support import os_helper from tkinter import Tcl, TclError test_support.requires('gui') @@ -24,7 +25,7 @@ def testLoadTkFailure(self): # XXX Maybe on tk older than 8.4.13 it would be possible, # see tkinter.h. return - with test_support.EnvironmentVarGuard() as env: + with os_helper.EnvironmentVarGuard() as env: if 'DISPLAY' in os.environ: del env['DISPLAY'] # on some platforms, deleting environment variables diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index 16e9d93944c205d..721e81369a8d5b7 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -307,6 +307,10 @@ class OptionMenuTest(MenubuttonTest, unittest.TestCase): def create(self, default='b', values=('a', 'b', 'c'), **kwargs): return tkinter.OptionMenu(self.root, None, default, *values, **kwargs) + def test_bad_kwarg(self): + with self.assertRaisesRegex(TclError, r"^unknown option -image$"): + tkinter.OptionMenu(self.root, None, 'b', image='') + @add_standard_options(IntegerSizeTests, StandardOptionsTests) class EntryTest(AbstractWidgetTest, unittest.TestCase): diff --git a/Lib/typing.py b/Lib/typing.py index fd657caafee870f..fce8da4fe3cf05d 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -244,14 +244,16 @@ def inner(*args, **kwds): return inner -def _eval_type(t, globalns, localns): +def _eval_type(t, globalns, localns, recursive_guard=frozenset()): """Evaluate all forward reverences in the given type t. For use of globalns and localns see the docstring for get_type_hints(). + recursive_guard is used to prevent prevent infinite recursion + with recursive ForwardRef. """ if isinstance(t, ForwardRef): - return t._evaluate(globalns, localns) + return t._evaluate(globalns, localns, recursive_guard) if isinstance(t, (_GenericAlias, GenericAlias)): - ev_args = tuple(_eval_type(a, globalns, localns) for a in t.__args__) + ev_args = tuple(_eval_type(a, globalns, localns, recursive_guard) for a in t.__args__) if ev_args == t.__args__: return t if isinstance(t, GenericAlias): @@ -477,7 +479,9 @@ def __init__(self, arg, is_argument=True): self.__forward_value__ = None self.__forward_is_argument__ = is_argument - def _evaluate(self, globalns, localns): + def _evaluate(self, globalns, localns, recursive_guard): + if self.__forward_arg__ in recursive_guard: + return self if not self.__forward_evaluated__ or localns is not globalns: if globalns is None and localns is None: globalns = localns = {} @@ -485,10 +489,14 @@ def _evaluate(self, globalns, localns): globalns = localns elif localns is None: localns = globalns - self.__forward_value__ = _type_check( + type_ =_type_check( eval(self.__forward_code__, globalns, localns), "Forward references must evaluate to types.", - is_argument=self.__forward_is_argument__) + is_argument=self.__forward_is_argument__, + ) + self.__forward_value__ = _eval_type( + type_, globalns, localns, recursive_guard | {self.__forward_arg__} + ) self.__forward_evaluated__ = True return self.__forward_value__ @@ -1013,7 +1021,7 @@ def _allow_reckless_class_cheks(): return True -_PROTO_WHITELIST = { +_PROTO_ALLOWLIST = { 'collections.abc': [ 'Callable', 'Awaitable', 'Iterable', 'Iterator', 'AsyncIterable', 'Hashable', 'Sized', 'Container', 'Collection', 'Reversible', @@ -1132,8 +1140,8 @@ def _proto_hook(other): # ... otherwise check consistency of bases, and prohibit instantiation. for base in cls.__bases__: if not (base in (object, Generic) or - base.__module__ in _PROTO_WHITELIST and - base.__name__ in _PROTO_WHITELIST[base.__module__] or + base.__module__ in _PROTO_ALLOWLIST and + base.__name__ in _PROTO_ALLOWLIST[base.__module__] or issubclass(base, Generic) and base._is_protocol): raise TypeError('Protocols can only inherit from other' ' protocols, got %r' % base) diff --git a/Lib/unittest/test/test_discovery.py b/Lib/unittest/test/test_discovery.py index 16e081e1fb76ec1..9d502c51fb36ab9 100644 --- a/Lib/unittest/test/test_discovery.py +++ b/Lib/unittest/test/test_discovery.py @@ -5,6 +5,7 @@ import types import pickle from test import support +from test.support import import_helper import test.test_importlib.util import unittest @@ -848,7 +849,7 @@ def _find_tests(start_dir, pattern, namespace=None): with unittest.mock.patch('builtins.__import__', _import): # Since loader.discover() can modify sys.path, restore it when done. - with support.DirsOnSysPath(): + with import_helper.DirsOnSysPath(): # Make sure to remove 'package' from sys.modules when done. with test.test_importlib.util.uncache('package'): suite = loader.discover('package') @@ -865,7 +866,7 @@ def _import(packagename, *args, **kwargs): with unittest.mock.patch('builtins.__import__', _import): # Since loader.discover() can modify sys.path, restore it when done. - with support.DirsOnSysPath(): + with import_helper.DirsOnSysPath(): # Make sure to remove 'package' from sys.modules when done. with test.test_importlib.util.uncache('package'): with self.assertRaises(TypeError) as cm: diff --git a/Lib/unittest/test/test_result.py b/Lib/unittest/test/test_result.py index 0ffb87b40256cff..a4af67bd8d56de2 100644 --- a/Lib/unittest/test/test_result.py +++ b/Lib/unittest/test/test_result.py @@ -2,7 +2,7 @@ import sys import textwrap -from test import support +from test.support import warnings_helper import traceback import unittest @@ -458,8 +458,8 @@ def __init__(self, stream=None, descriptions=None, verbosity=None): class Test_OldTestResult(unittest.TestCase): def assertOldResultWarning(self, test, failures): - with support.check_warnings(("TestResult has no add.+ method,", - RuntimeWarning)): + with warnings_helper.check_warnings( + ("TestResult has no add.+ method,", RuntimeWarning)): result = OldResult() test.run(result) self.assertEqual(len(result.failures), failures) diff --git a/Lib/uuid.py b/Lib/uuid.py index 9ddce813fc4692f..5ae0a3e5fa449d9 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -45,7 +45,6 @@ """ import os -import platform import sys from enum import Enum @@ -54,10 +53,13 @@ __author__ = 'Ka-Ping Yee ' # The recognized platforms - known behaviors -_AIX = platform.system() == 'AIX' -_DARWIN = platform.system() == 'Darwin' -_LINUX = platform.system() == 'Linux' -_WINDOWS = platform.system() == 'Windows' +if sys.platform in ('win32', 'darwin'): + _AIX = _LINUX = False +else: + import platform + _platform_system = platform.system() + _AIX = _platform_system == 'AIX' + _LINUX = _platform_system == 'Linux' _MAC_DELIM = b':' _MAC_OMITS_LEADING_ZEROES = False @@ -618,9 +620,9 @@ def _random_getnode(): # @unittest.skipUnless(_uuid._ifconfig_getnode in _uuid._GETTERS, ...) if _LINUX: _OS_GETTERS = [_ip_getnode, _ifconfig_getnode] -elif _DARWIN: +elif sys.platform == 'darwin': _OS_GETTERS = [_ifconfig_getnode, _arp_getnode, _netstat_getnode] -elif _WINDOWS: +elif sys.platform == 'win32': # bpo-40201: _windll_getnode will always succeed, so these are not needed _OS_GETTERS = [] elif _AIX: diff --git a/Lib/venv/scripts/common/Activate.ps1 b/Lib/venv/scripts/common/Activate.ps1 index a3bc6fb1f05bf96..51fc55c4ec7cb9c 100644 --- a/Lib/venv/scripts/common/Activate.ps1 +++ b/Lib/venv/scripts/common/Activate.ps1 @@ -96,6 +96,11 @@ function global:deactivate ([switch]$NonDestructive) { Remove-Item -Path env:VIRTUAL_ENV } + # Just remove VIRTUAL_ENV_PROMPT altogether. + if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { + Remove-Item -Path env:VIRTUAL_ENV_PROMPT + } + # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force @@ -228,6 +233,7 @@ if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " _OLD_VIRTUAL_PROMPT } + $env:VIRTUAL_ENV_PROMPT = $Prompt } # Clear PYTHONHOME diff --git a/Lib/venv/scripts/common/activate b/Lib/venv/scripts/common/activate index 45af3536aa191d0..6fbc2b8801da049 100644 --- a/Lib/venv/scripts/common/activate +++ b/Lib/venv/scripts/common/activate @@ -28,6 +28,7 @@ deactivate () { fi unset VIRTUAL_ENV + unset VIRTUAL_ENV_PROMPT if [ ! "${1:-}" = "nondestructive" ] ; then # Self destruct! unset -f deactivate @@ -56,6 +57,8 @@ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then _OLD_VIRTUAL_PS1="${PS1:-}" PS1="__VENV_PROMPT__${PS1:-}" export PS1 + VIRTUAL_ENV_PROMPT="__VENV_PROMPT__" + export VIRTUAL_ENV_PROMPT fi # This should detect bash and zsh, which have a hash command that must diff --git a/Lib/venv/scripts/nt/activate.bat b/Lib/venv/scripts/nt/activate.bat index af4c7e0abacb1c4..c1c3c82ee37f107 100644 --- a/Lib/venv/scripts/nt/activate.bat +++ b/Lib/venv/scripts/nt/activate.bat @@ -25,6 +25,7 @@ if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH% set PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH% +set VIRTUAL_ENV_PROMPT=__VENV_PROMPT__ :END if defined _OLD_CODEPAGE ( diff --git a/Lib/venv/scripts/nt/deactivate.bat b/Lib/venv/scripts/nt/deactivate.bat index 1205c618686fbb0..62a39a7584f4d7c 100644 --- a/Lib/venv/scripts/nt/deactivate.bat +++ b/Lib/venv/scripts/nt/deactivate.bat @@ -17,5 +17,6 @@ if defined _OLD_VIRTUAL_PATH ( set _OLD_VIRTUAL_PATH= set VIRTUAL_ENV= +set VIRTUAL_ENV_PROMPT= :END diff --git a/Lib/venv/scripts/posix/activate.csh b/Lib/venv/scripts/posix/activate.csh index 68a0dc74e1a3c7a..d6f697c55ed81cc 100644 --- a/Lib/venv/scripts/posix/activate.csh +++ b/Lib/venv/scripts/posix/activate.csh @@ -3,7 +3,7 @@ # Created by Davide Di Blasi . # Ported to Python 3.3 venv by Andrew Svetlov -alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate' +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' # Unset irrelevant variables. deactivate nondestructive @@ -18,6 +18,7 @@ set _OLD_VIRTUAL_PROMPT="$prompt" if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then set prompt = "__VENV_PROMPT__$prompt" + setenv VIRTUAL_ENV_PROMPT "__VENV_PROMPT__" endif alias pydoc python -m pydoc diff --git a/Lib/venv/scripts/posix/activate.fish b/Lib/venv/scripts/posix/activate.fish index 54b9ea5676b66b4..e40a1d714894fa3 100644 --- a/Lib/venv/scripts/posix/activate.fish +++ b/Lib/venv/scripts/posix/activate.fish @@ -20,6 +20,7 @@ function deactivate -d "Exit virtual environment and return to normal shell env end set -e VIRTUAL_ENV + set -e VIRTUAL_ENV_PROMPT if test "$argv[1]" != "nondestructive" # Self-destruct! functions -e deactivate @@ -61,4 +62,5 @@ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" end set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" + set -gx VIRTUAL_ENV_PROMPT "__VENV_PROMPT__" end diff --git a/Lib/xml/sax/handler.py b/Lib/xml/sax/handler.py index 481733d2cbe6e5a..e8d417e51942329 100644 --- a/Lib/xml/sax/handler.py +++ b/Lib/xml/sax/handler.py @@ -340,3 +340,48 @@ def resolveEntity(self, publicId, systemId): property_xml_string, property_encoding, property_interning_dict] + + +class LexicalHandler: + """Optional SAX2 handler for lexical events. + + This handler is used to obtain lexical information about an XML + document, that is, information about how the document was encoded + (as opposed to what it contains, which is reported to the + ContentHandler), such as comments and CDATA marked section + boundaries. + + To set the LexicalHandler of an XMLReader, use the setProperty + method with the property identifier + 'http://xml.org/sax/properties/lexical-handler'.""" + + def comment(self, content): + """Reports a comment anywhere in the document (including the + DTD and outside the document element). + + content is a string that holds the contents of the comment.""" + + def startDTD(self, name, public_id, system_id): + """Report the start of the DTD declarations, if the document + has an associated DTD. + + A startEntity event will be reported before declaration events + from the external DTD subset are reported, and this can be + used to infer from which subset DTD declarations derive. + + name is the name of the document element type, public_id the + public identifier of the DTD (or None if none were supplied) + and system_id the system identfier of the external subset (or + None if none were supplied).""" + + def endDTD(self): + """Signals the end of DTD declarations.""" + + def startCDATA(self): + """Reports the beginning of a CDATA marked section. + + The contents of the CDATA marked section will be reported + through the characters event.""" + + def endCDATA(self): + """Reports the end of a CDATA marked section.""" diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 4fab4882efaeb63..a58b922ce30b836 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -307,9 +307,9 @@ def library_recipes(): ), ), dict( - name="SQLite 3.32.2", - url="https://sqlite.org/2020/sqlite-autoconf-3320200.tar.gz", - checksum='eb498918a33159cdf8104997aad29e83', + name="SQLite 3.32.3", + url="https://sqlite.org/2020/sqlite-autoconf-3320300.tar.gz", + checksum='2e3911a3c15e85c2f2d040154bbe5ce3', extra_cflags=('-Os ' '-DSQLITE_ENABLE_FTS5 ' '-DSQLITE_ENABLE_FTS4 ' diff --git a/Makefile.pre.in b/Makefile.pre.in index 3428b9842a5a0f7..0a19313ea993971 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -354,7 +354,6 @@ PYTHON_OBJS= \ Python/mysnprintf.o \ Python/mystrtoul.o \ Python/pathconfig.o \ - Python/peephole.o \ Python/preconfig.o \ Python/pyarena.o \ Python/pyctype.o \ @@ -545,7 +544,6 @@ coverage-lcov: '*/Modules/zlib/*' \ '*/Include/*' \ '*/Modules/xx*.c' \ - '*/Parser/listnode.c' \ '*/Python/pyfpe.c' \ '*/Python/pystrcmp.c' \ '/usr/include/*' \ diff --git a/Misc/ACKS b/Misc/ACKS index 641ef0cace00e2f..1599b09c692b756 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -798,6 +798,7 @@ Geert Jansen Jack Jansen Hans-Peter Jansen Bill Janssen +Hans Petter Jansson Jon Janzen Thomas Jarosch Juhana Jauhiainen @@ -882,6 +883,7 @@ Sam Kimbrel Tomohiko Kinebuchi James King W. Trevor King +Jeffrey Kintscher Paul Kippes Steve Kirsch Sebastian Kirsche @@ -1266,6 +1268,7 @@ Richard Oudkerk Russel Owen Joonas Paalasmaa Martin Packman +Elisha Paine Shriphani Palakodety Julien Palard Aviv Palivoda @@ -1564,6 +1567,7 @@ Justin Sheehy Akash Shende Charlie Shepherd Bruce Sherwood +Gregory Shevchenko Alexander Shigin Pete Shinners Michael Shiplett diff --git a/Misc/NEWS.d/3.9.0a1.rst b/Misc/NEWS.d/3.9.0a1.rst index fb74d3622263d4a..fe9fc58e3979ae7 100644 --- a/Misc/NEWS.d/3.9.0a1.rst +++ b/Misc/NEWS.d/3.9.0a1.rst @@ -5081,7 +5081,7 @@ Stop adding newline when saving an IDLE shell window. Add an option to toggle IDLE's cursor blink for shell, editor, and output windows. See Settings, General, Window Preferences, Cursor Blink. Patch by -Zachary Spytz. +Zackery Spytz. .. diff --git a/Misc/NEWS.d/3.9.0a5.rst b/Misc/NEWS.d/3.9.0a5.rst index 39e017768c3ad0b..355a3fc22350cb8 100644 --- a/Misc/NEWS.d/3.9.0a5.rst +++ b/Misc/NEWS.d/3.9.0a5.rst @@ -232,7 +232,7 @@ exits before trying to take the GIL. Fix a possible :exc:`SystemError` in ``math.{atan2,copysign,remainder}()`` when the first argument cannot be converted to a :class:`float`. Patch by -Zachary Spytz. +Zackery Spytz. .. diff --git a/Misc/NEWS.d/next/C API/2020-07-08-10-14-52.bpo-40170.N6Qx1i.rst b/Misc/NEWS.d/next/C API/2020-07-08-10-14-52.bpo-40170.N6Qx1i.rst new file mode 100644 index 000000000000000..760a3ff4d17b44f --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-07-08-10-14-52.bpo-40170.N6Qx1i.rst @@ -0,0 +1,4 @@ +Revert :c:func:`PyType_HasFeature` change: it reads again directly the +:c:member:`PyTypeObject.tp_flags` member when the limited C API is not used, +rather than always calling :c:func:`PyType_GetFlags` which hides implementation +details. 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 new file mode 100644 index 000000000000000..668bfb2c2e27915 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-07-08-21-01-49.bpo-41073.VqQZON.rst @@ -0,0 +1 @@ +:c:func:`PyType_GetSlot()` could accept static types. diff --git a/Misc/NEWS.d/next/C API/2020-08-10-16-05-08.bpo-41324.waZD35.rst b/Misc/NEWS.d/next/C API/2020-08-10-16-05-08.bpo-41324.waZD35.rst new file mode 100644 index 000000000000000..e09332ab11e1d7f --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-08-10-16-05-08.bpo-41324.waZD35.rst @@ -0,0 +1,3 @@ +Add a minimal decimal capsule API. The API supports fast conversions +between Decimals up to 38 digits and their triple representation as a C +struct. diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-05-25-05-27-39.bpo-36982.0UHgfB.rst b/Misc/NEWS.d/next/Core and Builtins/2019-05-25-05-27-39.bpo-36982.0UHgfB.rst new file mode 100644 index 000000000000000..f105f1857d487f2 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2019-05-25-05-27-39.bpo-36982.0UHgfB.rst @@ -0,0 +1 @@ +Use ncurses extended color functions when available to support terminals with 256 colors, and add the new function :func:`curses.has_extended_color_support` to indicate whether extended color support is provided by the underlying ncurses library. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-05-03-22-26-00.bpo-29590.aRz3l7.rst b/Misc/NEWS.d/next/Core and Builtins/2020-05-03-22-26-00.bpo-29590.aRz3l7.rst new file mode 100644 index 000000000000000..2570c4f2c7c0fd9 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-05-03-22-26-00.bpo-29590.aRz3l7.rst @@ -0,0 +1,2 @@ +Make the stack trace correct after calling :meth:`generator.throw` +on a generator that has yielded from a ``yield from``. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-06-30-20-17-31.bpo-41175.acJoXB.rst b/Misc/NEWS.d/next/Core and Builtins/2020-06-30-20-17-31.bpo-41175.acJoXB.rst new file mode 100644 index 000000000000000..844fb804c0c8d4d --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-06-30-20-17-31.bpo-41175.acJoXB.rst @@ -0,0 +1,2 @@ +Guard against a NULL pointer dereference within bytearrayobject triggered by +the ``bytearray() + bytearray()`` operation. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-06-20-43-19.bpo-1635741.LYhsni.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-06-20-43-19.bpo-1635741.LYhsni.rst new file mode 100644 index 000000000000000..956fcd5d1ee29e0 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-06-20-43-19.bpo-1635741.LYhsni.rst @@ -0,0 +1 @@ +Port :mod:`winapi` to multiphase initialization diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-07-16-10-52.bpo-1635741.zU-H_n.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-07-16-10-52.bpo-1635741.zU-H_n.rst new file mode 100644 index 000000000000000..52e184dc3170741 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-07-16-10-52.bpo-1635741.zU-H_n.rst @@ -0,0 +1 @@ +Port :mod:`multiprocessing` to multi-phase initialization diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-08-21-55-23.bpo-41252.nBWL-Y.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-08-21-55-23.bpo-41252.nBWL-Y.rst new file mode 100644 index 000000000000000..65f3189c83ec64c --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-08-21-55-23.bpo-41252.nBWL-Y.rst @@ -0,0 +1 @@ +Fix incorrect refcounting in _ssl.c's ``_servername_callback()``. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-08-22-03-54.bpo-41247.PndYIk.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-08-22-03-54.bpo-41247.PndYIk.rst new file mode 100644 index 000000000000000..08699b6e4a1f017 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-08-22-03-54.bpo-41247.PndYIk.rst @@ -0,0 +1,2 @@ +Always cache the running loop holder when running +``asyncio.set_running_loop``. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-17-11-31-54.bpo-41323.ChbZHh.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-17-11-31-54.bpo-41323.ChbZHh.rst new file mode 100644 index 000000000000000..671d874b535afd7 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-17-11-31-54.bpo-41323.ChbZHh.rst @@ -0,0 +1,3 @@ +Bytecode optimizations are performed directly on the control flow graph. +This will result in slightly more compact code objects in some +circumstances. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-18-08-15-32.bpo-41295.pu8Ezo.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-18-08-15-32.bpo-41295.pu8Ezo.rst new file mode 100644 index 000000000000000..d61fd8f0a296837 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-18-08-15-32.bpo-41295.pu8Ezo.rst @@ -0,0 +1,3 @@ +Resolve a regression in CPython 3.8.4 where defining "__setattr__" in a +multi-inheritance setup and calling up the hierarchy chain could fail +if builtins/extension types were involved in the base types. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-18-18-01-10.bpo-41334.t5xMGp.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-18-18-01-10.bpo-41334.t5xMGp.rst new file mode 100644 index 000000000000000..5d44527a561a118 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-18-18-01-10.bpo-41334.t5xMGp.rst @@ -0,0 +1,2 @@ +Constructors :func:`str`, :func:`bytes` and :func:`bytearray` are now faster +(around 30--40% for small objects). diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-19-15-40-52.bpo-41342.RRk_m_.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-19-15-40-52.bpo-41342.RRk_m_.rst new file mode 100644 index 000000000000000..38851a7f7fc0f40 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-19-15-40-52.bpo-41342.RRk_m_.rst @@ -0,0 +1 @@ +:func:`round` with integer argument is now faster (9--60%). diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-20-17-01-17.bpo-38156.ptcdRy.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-20-17-01-17.bpo-38156.ptcdRy.rst new file mode 100644 index 000000000000000..254d13cf3ed3a7f --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-20-17-01-17.bpo-38156.ptcdRy.rst @@ -0,0 +1 @@ +Handle interrupts that come after EOF correctly in ``PyOS_StdioReadline``. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst b/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst new file mode 100644 index 000000000000000..3a93a5769310703 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-07-27-01-50-06.bpo-41340.pZXfcF.rst @@ -0,0 +1 @@ +Removed fallback implementation for ``strdup``. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-08-02-15-53-12.bpo-41431.TblUBT.rst b/Misc/NEWS.d/next/Core and Builtins/2020-08-02-15-53-12.bpo-41431.TblUBT.rst new file mode 100644 index 000000000000000..fa9d047edc39459 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-08-02-15-53-12.bpo-41431.TblUBT.rst @@ -0,0 +1,2 @@ +Optimize ``dict_merge()`` for copying dict (e.g. ``dict(d)`` and +``{}.update(d)``). diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-08-12-19-32-15.bpo-41531.WgPzjT.rst b/Misc/NEWS.d/next/Core and Builtins/2020-08-12-19-32-15.bpo-41531.WgPzjT.rst new file mode 100644 index 000000000000000..8544664f39335d6 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-08-12-19-32-15.bpo-41531.WgPzjT.rst @@ -0,0 +1,2 @@ +Fix a bug that was dropping keys when compiling dict literals with more than +0xFFFF elements. Patch by Pablo Galindo. diff --git a/Misc/NEWS.d/next/Documentation/2019-08-16-20-25-42.bpo-37703.Qm_l_H.rst b/Misc/NEWS.d/next/Documentation/2019-08-16-20-25-42.bpo-37703.Qm_l_H.rst new file mode 100644 index 000000000000000..a1a1c354b1688b0 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2019-08-16-20-25-42.bpo-37703.Qm_l_H.rst @@ -0,0 +1,2 @@ +Updated Documentation to comprehensively elaborate on the behaviour of +gather.cancel() diff --git a/Misc/NEWS.d/next/Documentation/2020-07-21-15-23-30.bpo-40979.pLA8rO.rst b/Misc/NEWS.d/next/Documentation/2020-07-21-15-23-30.bpo-40979.pLA8rO.rst new file mode 100644 index 000000000000000..b0ca4327ad61a42 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2020-07-21-15-23-30.bpo-40979.pLA8rO.rst @@ -0,0 +1 @@ +Refactored typing.rst, arranging more than 70 classes, functions, and decorators into new sub-sections. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Documentation/2020-07-25-14-20-00.bpo-41314.yrjko0.rst b/Misc/NEWS.d/next/Documentation/2020-07-25-14-20-00.bpo-41314.yrjko0.rst new file mode 100644 index 000000000000000..48f9c933828b0d5 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2020-07-25-14-20-00.bpo-41314.yrjko0.rst @@ -0,0 +1 @@ +Changed the release when ``from __future__ import annotations`` becomes the default from ``4.0`` to ``3.10`` (following a change in PEP 563). diff --git a/Misc/NEWS.d/next/Documentation/2020-07-27-20-46-17.bpo-41045.GFF6Ul.rst b/Misc/NEWS.d/next/Documentation/2020-07-27-20-46-17.bpo-41045.GFF6Ul.rst new file mode 100644 index 000000000000000..dfc9891bb89f278 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2020-07-27-20-46-17.bpo-41045.GFF6Ul.rst @@ -0,0 +1 @@ +Add documentation for debug feature of f-strings. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Documentation/2020-08-12-18-35-40.bpo-40204.C8A_pe.rst b/Misc/NEWS.d/next/Documentation/2020-08-12-18-35-40.bpo-40204.C8A_pe.rst new file mode 100644 index 000000000000000..152f6c98b900484 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2020-08-12-18-35-40.bpo-40204.C8A_pe.rst @@ -0,0 +1,3 @@ +Enable Sphinx 3.2 ``c_allow_pre_v3`` option and disable +``c_warn_on_allowed_pre_v3`` option to make the documentation compatible +with Sphinx 2 and Sphinx 3. diff --git a/Misc/NEWS.d/next/IDLE/2020-07-07-18-44-30.bpo-37765.umc1o8.rst b/Misc/NEWS.d/next/IDLE/2020-07-07-18-44-30.bpo-37765.umc1o8.rst new file mode 100644 index 000000000000000..f8b53ca482a21e8 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2020-07-07-18-44-30.bpo-37765.umc1o8.rst @@ -0,0 +1,2 @@ +Add keywords to module name completion list. Rewrite Completions +section of IDLE doc. diff --git a/Misc/NEWS.d/next/IDLE/2020-07-16-17-39-06.bpo-41300.wRixNb.rst b/Misc/NEWS.d/next/IDLE/2020-07-16-17-39-06.bpo-41300.wRixNb.rst new file mode 100644 index 000000000000000..080775f7d7ab44c --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2020-07-16-17-39-06.bpo-41300.wRixNb.rst @@ -0,0 +1,2 @@ +Save files with non-ascii chars. Fix regression released in 3.9.0b4 and +3.8.4. diff --git a/Misc/NEWS.d/next/IDLE/2020-07-24-17-49-58.bpo-41373.YQIPu_.rst b/Misc/NEWS.d/next/IDLE/2020-07-24-17-49-58.bpo-41373.YQIPu_.rst new file mode 100644 index 000000000000000..b50a72fe676a826 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2020-07-24-17-49-58.bpo-41373.YQIPu_.rst @@ -0,0 +1,3 @@ +Save files loaded with no line ending, as when blank, or different line +endings, by setting its line ending to the system default. Fix regression in +3.8.4 and 3.9.0b4. diff --git a/Misc/NEWS.d/next/IDLE/2020-08-09-13-42-55.bpo-41468.zkP0_Y.rst b/Misc/NEWS.d/next/IDLE/2020-08-09-13-42-55.bpo-41468.zkP0_Y.rst new file mode 100644 index 000000000000000..e41c7d574905cd5 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2020-08-09-13-42-55.bpo-41468.zkP0_Y.rst @@ -0,0 +1 @@ +Improve IDLE run crash error message (which users should never see). diff --git a/Misc/NEWS.d/next/Library/2018-07-30-12-48-17.bpo-31844.0_GKsD.rst b/Misc/NEWS.d/next/Library/2018-07-30-12-48-17.bpo-31844.0_GKsD.rst new file mode 100644 index 000000000000000..9034afd3284c4fb --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-07-30-12-48-17.bpo-31844.0_GKsD.rst @@ -0,0 +1,4 @@ +Remove ``ParserBase.error()`` method from the private and undocumented +``_markupbase`` module. :class:`html.parser.HTMLParser` is the only +subclass of ``ParserBase`` and its ``error()`` implementation was deprecated +in Python 3.4 and removed in Python 3.5. diff --git a/Misc/NEWS.d/next/Library/2019-11-13-07-37-11.bpo-38731.9qmcSx.rst b/Misc/NEWS.d/next/Library/2019-11-13-07-37-11.bpo-38731.9qmcSx.rst new file mode 100644 index 000000000000000..ba9e522ecfcbf69 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-11-13-07-37-11.bpo-38731.9qmcSx.rst @@ -0,0 +1,2 @@ +Add ``--quiet`` option to command-line interface of :mod:`py_compile`. +Patch by Gregory Schevchenko. diff --git a/Misc/NEWS.d/next/Library/2020-03-11-07-44-06.bpo-31122.zIQ80l.rst b/Misc/NEWS.d/next/Library/2020-03-11-07-44-06.bpo-31122.zIQ80l.rst new file mode 100644 index 000000000000000..2e70f7aee65c835 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-03-11-07-44-06.bpo-31122.zIQ80l.rst @@ -0,0 +1 @@ +ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-05-22-12-45-58.bpo-40726.7oBdMw.rst b/Misc/NEWS.d/next/Library/2020-05-22-12-45-58.bpo-40726.7oBdMw.rst new file mode 100644 index 000000000000000..7409eb3d80df644 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-05-22-12-45-58.bpo-40726.7oBdMw.rst @@ -0,0 +1,2 @@ +Handle cases where the ``end_lineno`` is ``None`` on +:func:`ast.increment_lineno`. diff --git a/Misc/NEWS.d/next/Library/2020-05-27-00-09-52.bpo-16995.4niOT7.rst b/Misc/NEWS.d/next/Library/2020-05-27-00-09-52.bpo-16995.4niOT7.rst new file mode 100644 index 000000000000000..88b95998d085f67 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-05-27-00-09-52.bpo-16995.4niOT7.rst @@ -0,0 +1,2 @@ +Add :func:`base64.b32hexencode` and :func:`base64.b32hexdecode` to support the +Base32 Encoding with Extended Hex Alphabet. diff --git a/Misc/NEWS.d/next/Library/2020-05-30-12-44-29.bpo-39384.Iqxy3q.rst b/Misc/NEWS.d/next/Library/2020-05-30-12-44-29.bpo-39384.Iqxy3q.rst new file mode 100644 index 000000000000000..482ae624da079de --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-05-30-12-44-29.bpo-39384.Iqxy3q.rst @@ -0,0 +1 @@ +Fixed email.contentmanager to allow set_content() to set a null string. diff --git a/Misc/NEWS.d/next/Library/2020-06-17-23-49-45.bpo-35018.NP5_Qk.rst b/Misc/NEWS.d/next/Library/2020-06-17-23-49-45.bpo-35018.NP5_Qk.rst new file mode 100644 index 000000000000000..f764323ae631cfc --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-06-17-23-49-45.bpo-35018.NP5_Qk.rst @@ -0,0 +1,2 @@ +Add the :class:`xml.sax.handler.LexicalHandler` class that is present in +other SAX XML implementations. diff --git a/Misc/NEWS.d/next/Library/2020-06-18-10-34-59.bpo-41025.elf_nz.rst b/Misc/NEWS.d/next/Library/2020-06-18-10-34-59.bpo-41025.elf_nz.rst new file mode 100644 index 000000000000000..21e184d0a40631e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-06-18-10-34-59.bpo-41025.elf_nz.rst @@ -0,0 +1,2 @@ +Fixed an issue preventing the C implementation of :class:`zoneinfo.ZoneInfo` +from being subclassed. diff --git a/Misc/NEWS.d/next/Library/2020-07-01-17-33-50.bpo-41182.FPFI0N.rst b/Misc/NEWS.d/next/Library/2020-07-01-17-33-50.bpo-41182.FPFI0N.rst new file mode 100644 index 000000000000000..ae31db512abdc1d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-01-17-33-50.bpo-41182.FPFI0N.rst @@ -0,0 +1 @@ +selector: use DefaultSelector based upon implementation diff --git a/Misc/NEWS.d/next/Library/2020-07-02-15-03-04.bpo-41195.cEnpO3.rst b/Misc/NEWS.d/next/Library/2020-07-02-15-03-04.bpo-41195.cEnpO3.rst new file mode 100644 index 000000000000000..f96d5fadbdc7b83 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-02-15-03-04.bpo-41195.cEnpO3.rst @@ -0,0 +1,2 @@ +Add read-only ssl.SSLContext.security_level attribute to retrieve the +context's security level. diff --git a/Misc/NEWS.d/next/Library/2020-07-07-21-56-26.bpo-41235.H2csMU.rst b/Misc/NEWS.d/next/Library/2020-07-07-21-56-26.bpo-41235.H2csMU.rst new file mode 100644 index 000000000000000..c55275bb1c622b9 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-07-21-56-26.bpo-41235.H2csMU.rst @@ -0,0 +1 @@ +Fix the error handling in :meth:`ssl.SSLContext.load_dh_params`. diff --git a/Misc/NEWS.d/next/Library/2020-07-11-00-15-01.bpo-41273.SVrsJh.rst b/Misc/NEWS.d/next/Library/2020-07-11-00-15-01.bpo-41273.SVrsJh.rst new file mode 100644 index 000000000000000..c08204b9908c635 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-11-00-15-01.bpo-41273.SVrsJh.rst @@ -0,0 +1,3 @@ +Speed up any transport using ``_ProactorReadPipeTransport`` by calling +``recv_into`` instead of ``recv``, thus not creating a new buffer for each +``recv`` call in the transport's read loop. diff --git a/Misc/NEWS.d/next/Library/2020-07-12-22-16-58.bpo-39017.x3Cg-9.rst b/Misc/NEWS.d/next/Library/2020-07-12-22-16-58.bpo-39017.x3Cg-9.rst new file mode 100644 index 000000000000000..ad26676f8b85633 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-12-22-16-58.bpo-39017.x3Cg-9.rst @@ -0,0 +1 @@ +Avoid infinite loop when reading specially crafted TAR files using the tarfile module (CVE-2019-20907). diff --git a/Misc/NEWS.d/next/Library/2020-07-13-15-06-35.bpo-41288.8mn5P-.rst b/Misc/NEWS.d/next/Library/2020-07-13-15-06-35.bpo-41288.8mn5P-.rst new file mode 100644 index 000000000000000..3c3adbabf16ff18 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-13-15-06-35.bpo-41288.8mn5P-.rst @@ -0,0 +1,2 @@ +Unpickling invalid NEWOBJ_EX opcode with the C implementation raises now +UnpicklingError instead of crashing. diff --git a/Misc/NEWS.d/next/Library/2020-07-18-18-07-40.bpo-41333.upkHIm.rst b/Misc/NEWS.d/next/Library/2020-07-18-18-07-40.bpo-41333.upkHIm.rst new file mode 100644 index 000000000000000..73e8b1199772ded --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-18-18-07-40.bpo-41333.upkHIm.rst @@ -0,0 +1 @@ +:meth:`collections.OrderedDict.pop` is now 2 times faster. diff --git a/Misc/NEWS.d/next/Library/2020-07-20-19-13-17.bpo-41341.wqrj8C.rst b/Misc/NEWS.d/next/Library/2020-07-20-19-13-17.bpo-41341.wqrj8C.rst new file mode 100644 index 000000000000000..c78b24d2faae720 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-20-19-13-17.bpo-41341.wqrj8C.rst @@ -0,0 +1 @@ +Recursive evaluation of `typing.ForwardRef` in `get_type_hints`. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-07-21-16-20-55.bpo-35328.jXovHb.rst b/Misc/NEWS.d/next/Library/2020-07-21-16-20-55.bpo-35328.jXovHb.rst new file mode 100644 index 000000000000000..f4d1c6511d0d1cd --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-21-16-20-55.bpo-35328.jXovHb.rst @@ -0,0 +1,2 @@ +Set the environment variable ``VIRTUAL_ENV_PROMPT`` at :mod:`venv` +activation. diff --git a/Misc/NEWS.d/next/Library/2020-07-21-21-45-55.bpo-41364.5O-k7A.rst b/Misc/NEWS.d/next/Library/2020-07-21-21-45-55.bpo-41364.5O-k7A.rst new file mode 100644 index 000000000000000..f136e892ae5fe09 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-21-21-45-55.bpo-41364.5O-k7A.rst @@ -0,0 +1 @@ +Reduce import overhead of :mod:`uuid`. diff --git a/Misc/NEWS.d/next/Library/2020-07-23-01-18-34.bpo-41317.O17Z6x.rst b/Misc/NEWS.d/next/Library/2020-07-23-01-18-34.bpo-41317.O17Z6x.rst new file mode 100644 index 000000000000000..1af985e90e3e989 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-23-01-18-34.bpo-41317.O17Z6x.rst @@ -0,0 +1,2 @@ +Use add_done_callback() in asyncio.loop.sock_accept() to unsubscribe reader +early on cancellation. diff --git a/Misc/NEWS.d/next/Library/2020-07-26-21-18-43.bpo-41384.MlzIgV.rst b/Misc/NEWS.d/next/Library/2020-07-26-21-18-43.bpo-41384.MlzIgV.rst new file mode 100644 index 000000000000000..d797374a09e6f60 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-26-21-18-43.bpo-41384.MlzIgV.rst @@ -0,0 +1,2 @@ +Raise TclError instead of TypeError when an unknown option is passed to +tkinter.OptionMenu. diff --git a/Misc/NEWS.d/next/Library/2020-07-30-14-56-58.bpo-41440.rju34k.rst b/Misc/NEWS.d/next/Library/2020-07-30-14-56-58.bpo-41440.rju34k.rst new file mode 100644 index 000000000000000..3ee1f656d1870c5 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-07-30-14-56-58.bpo-41440.rju34k.rst @@ -0,0 +1 @@ +Add :func:`os.cpu_count()` support for VxWorks RTOS. diff --git a/Misc/NEWS.d/next/Library/2020-08-01-00-51-15.bpo-41421.dHKRVB.rst b/Misc/NEWS.d/next/Library/2020-08-01-00-51-15.bpo-41421.dHKRVB.rst new file mode 100644 index 000000000000000..cf291c60d8ad575 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-01-00-51-15.bpo-41421.dHKRVB.rst @@ -0,0 +1,3 @@ +Make an algebraic simplification to random.paretovariate(). It now is +slightly less subject to round-off error and is slightly faster. Inputs that +used to cause ZeroDivisionError now cause an OverflowError instead. diff --git a/Misc/NEWS.d/next/Library/2020-08-03-01-59-48.bpo-41425.KJo6zF.rst b/Misc/NEWS.d/next/Library/2020-08-03-01-59-48.bpo-41425.KJo6zF.rst new file mode 100644 index 000000000000000..617df72faeb37f1 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-03-01-59-48.bpo-41425.KJo6zF.rst @@ -0,0 +1 @@ +Make tkinter doc example runnable. diff --git a/Misc/NEWS.d/next/Library/2020-08-04-00-20-30.bpo-41467.Z8DgTL.rst b/Misc/NEWS.d/next/Library/2020-08-04-00-20-30.bpo-41467.Z8DgTL.rst new file mode 100644 index 000000000000000..f12693e117631a1 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-04-00-20-30.bpo-41467.Z8DgTL.rst @@ -0,0 +1,3 @@ +On Windows, fix asyncio ``recv_into()`` return value when the socket/pipe is +closed (:exc:`BrokenPipeError`): return ``0`` rather than an empty byte +string (``b''``). diff --git a/Misc/NEWS.d/next/Library/2020-08-07-06-06-29.bpo-41497.aBtsWz.rst b/Misc/NEWS.d/next/Library/2020-08-07-06-06-29.bpo-41497.aBtsWz.rst new file mode 100644 index 000000000000000..2c863ed7ffa3fad --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-07-06-06-29.bpo-41497.aBtsWz.rst @@ -0,0 +1 @@ +Fix potential UnicodeDecodeError in dis module. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-08-07-15-18-16.bpo-41503.IYftcu.rst b/Misc/NEWS.d/next/Library/2020-08-07-15-18-16.bpo-41503.IYftcu.rst new file mode 100644 index 000000000000000..c34996d881937b7 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-07-15-18-16.bpo-41503.IYftcu.rst @@ -0,0 +1 @@ +Fixed a race between setTarget and flush in logging.handlers.MemoryHandler. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-08-09-18-16-05.bpo-41513.e6K6EK.rst b/Misc/NEWS.d/next/Library/2020-08-09-18-16-05.bpo-41513.e6K6EK.rst new file mode 100644 index 000000000000000..cfb9f98c376a020 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-09-18-16-05.bpo-41513.e6K6EK.rst @@ -0,0 +1,2 @@ +Minor algorithmic improvement to math.hypot() and math.dist() giving small +gains in speed and accuracy. diff --git a/Misc/NEWS.d/next/Library/2020-08-12-13-25-16.bpo-41520.BEUWa4.rst b/Misc/NEWS.d/next/Library/2020-08-12-13-25-16.bpo-41520.BEUWa4.rst new file mode 100644 index 000000000000000..0e140d91bb4b61c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-12-13-25-16.bpo-41520.BEUWa4.rst @@ -0,0 +1 @@ +Fix :mod:`codeop` regression that prevented turning compile warnings into errors. diff --git a/Misc/NEWS.d/next/Library/2020-08-13-08-07-25.bpo-40782.aGZqmB.rst b/Misc/NEWS.d/next/Library/2020-08-13-08-07-25.bpo-40782.aGZqmB.rst new file mode 100644 index 000000000000000..d4c7e0e2419df44 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-13-08-07-25.bpo-40782.aGZqmB.rst @@ -0,0 +1 @@ +Change the method asyncio.AbstractEventLoop.run_in_executor to not be a coroutine. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Security/2020-02-12-14-17-39.bpo-39603.Gt3RSg.rst b/Misc/NEWS.d/next/Security/2020-02-12-14-17-39.bpo-39603.Gt3RSg.rst new file mode 100644 index 000000000000000..990affc3edd9d8f --- /dev/null +++ b/Misc/NEWS.d/next/Security/2020-02-12-14-17-39.bpo-39603.Gt3RSg.rst @@ -0,0 +1,2 @@ +Prevent http header injection by rejecting control characters in +http.client.putrequest(...). diff --git a/Misc/NEWS.d/next/Security/2020-07-15-20-15-08.bpo-41304.vNEeYA.rst b/Misc/NEWS.d/next/Security/2020-07-15-20-15-08.bpo-41304.vNEeYA.rst new file mode 100644 index 000000000000000..8cc4bb8d280a720 --- /dev/null +++ b/Misc/NEWS.d/next/Security/2020-07-15-20-15-08.bpo-41304.vNEeYA.rst @@ -0,0 +1 @@ +Fixes `python3x._pth` being ignored on Windows, caused by the fix for :issue:`29778` (CVE-2020-15801). diff --git a/Misc/NEWS.d/next/Tests/2019-09-14-13-20-27.bpo-38169.hurq4B.rst b/Misc/NEWS.d/next/Tests/2019-09-14-13-20-27.bpo-38169.hurq4B.rst new file mode 100644 index 000000000000000..3972b9d440a8719 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2019-09-14-13-20-27.bpo-38169.hurq4B.rst @@ -0,0 +1 @@ +Increase code coverage for SharedMemory and ShareableList diff --git a/Misc/NEWS.d/next/Tests/2020-04-09-15-40-03.bpo-31904.TJ4k3d.rst b/Misc/NEWS.d/next/Tests/2020-04-09-15-40-03.bpo-31904.TJ4k3d.rst new file mode 100644 index 000000000000000..40d232ec2f1e4f9 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-04-09-15-40-03.bpo-31904.TJ4k3d.rst @@ -0,0 +1 @@ +Increase LOOPBACK_TIMEOUT to 10 for VxWorks RTOS. diff --git a/Misc/NEWS.d/next/Tests/2020-08-07-17-28-49.bpo-41477.GrFexU.rst b/Misc/NEWS.d/next/Tests/2020-08-07-17-28-49.bpo-41477.GrFexU.rst new file mode 100644 index 000000000000000..bf0f54abecd85d6 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-08-07-17-28-49.bpo-41477.GrFexU.rst @@ -0,0 +1 @@ +Make ctypes optional in test_genericalias. diff --git a/Misc/NEWS.d/next/Tests/2020-08-11-14-59-13.bpo-41521.w2UYK7.rst b/Misc/NEWS.d/next/Tests/2020-08-11-14-59-13.bpo-41521.w2UYK7.rst new file mode 100644 index 000000000000000..658372b1a7f2230 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-08-11-14-59-13.bpo-41521.w2UYK7.rst @@ -0,0 +1,2 @@ +:mod:`test.support`: Rename ``blacklist`` parameter of +:func:`~test.support.check__all__` to ``not_exported``. diff --git a/Misc/NEWS.d/next/Windows/2020-07-20-23-26-26.bpo-40741.C9sc_d.rst b/Misc/NEWS.d/next/Windows/2020-07-20-23-26-26.bpo-40741.C9sc_d.rst new file mode 100644 index 000000000000000..69b7cce43803c69 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-07-20-23-26-26.bpo-40741.C9sc_d.rst @@ -0,0 +1 @@ +Update Windows release to include SQLite 3.32.3. diff --git a/Misc/NEWS.d/next/Windows/2020-07-28-11-55-43.bpo-41412.ME20KB.rst b/Misc/NEWS.d/next/Windows/2020-07-28-11-55-43.bpo-41412.ME20KB.rst new file mode 100644 index 000000000000000..274264ad876d3ca --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-07-28-11-55-43.bpo-41412.ME20KB.rst @@ -0,0 +1,2 @@ +The installer will now fail to install on Windows 7 and Windows 8. Further, +the UCRT dependency is now always downloaded on demand. diff --git a/Misc/NEWS.d/next/Windows/2020-07-28-12-39-32.bpo-40948.ISUFO6.rst b/Misc/NEWS.d/next/Windows/2020-07-28-12-39-32.bpo-40948.ISUFO6.rst new file mode 100644 index 000000000000000..f8831d8c13701cb --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-07-28-12-39-32.bpo-40948.ISUFO6.rst @@ -0,0 +1 @@ +Improve post-install message to direct people to the "py" command. diff --git a/Misc/NEWS.d/next/Windows/2020-08-06-16-59-10.bpo-41492.2FQ9cM.rst b/Misc/NEWS.d/next/Windows/2020-08-06-16-59-10.bpo-41492.2FQ9cM.rst new file mode 100644 index 000000000000000..065803e2c207593 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-08-06-16-59-10.bpo-41492.2FQ9cM.rst @@ -0,0 +1 @@ +Fixes the description that appears in UAC prompts. diff --git a/Misc/NEWS.d/next/Windows/2020-08-13-22-40-58.bpo-41526.-i2bwb.rst b/Misc/NEWS.d/next/Windows/2020-08-13-22-40-58.bpo-41526.-i2bwb.rst new file mode 100644 index 000000000000000..756c8270599f276 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-08-13-22-40-58.bpo-41526.-i2bwb.rst @@ -0,0 +1,2 @@ +Fixed layout of final page of the installer by removing the special thanks +to Mark Hammond (with his permission). diff --git a/Misc/NEWS.d/next/macOS/2020-06-19-14-19-08.bpo-40741.L7yTbm.rst b/Misc/NEWS.d/next/macOS/2020-06-19-14-19-08.bpo-40741.L7yTbm.rst new file mode 100644 index 000000000000000..78a21b76c2fe4e7 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2020-06-19-14-19-08.bpo-40741.L7yTbm.rst @@ -0,0 +1 @@ +Update macOS installer to use SQLite 3.32.3. diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index b378742648b2a2b..4a1c91e9eddd67f 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -291,10 +291,13 @@ get_running_loop(PyObject **loop) static int set_running_loop(PyObject *loop) { - cached_running_holder = NULL; - cached_running_holder_tsid = 0; + PyObject *ts_dict = NULL; + + PyThreadState *tstate = PyThreadState_Get(); + if (tstate != NULL) { + ts_dict = _PyThreadState_GetDict(tstate); // borrowed + } - PyObject *ts_dict = PyThreadState_GetDict(); // borrowed if (ts_dict == NULL) { PyErr_SetString( PyExc_RuntimeError, "thread-local storage is not available"); @@ -314,6 +317,9 @@ set_running_loop(PyObject *loop) } Py_DECREF(rl); + cached_running_holder = (PyObject *)rl; + cached_running_holder_tsid = PyThreadState_GetID(tstate); + return 0; } diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index ceae67ebb161274..0ac48b92bff8bad 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -1366,8 +1366,6 @@ WCharArray_get_value(CDataObject *self, void *Py_UNUSED(ignored)) static int WCharArray_set_value(CDataObject *self, PyObject *value, void *Py_UNUSED(ignored)) { - Py_ssize_t result = 0; - if (value == NULL) { PyErr_SetString(PyExc_TypeError, "can't delete attribute"); @@ -1378,29 +1376,24 @@ WCharArray_set_value(CDataObject *self, PyObject *value, void *Py_UNUSED(ignored "unicode string expected instead of %s instance", Py_TYPE(value)->tp_name); return -1; - } else - Py_INCREF(value); + } + Py_ssize_t size = self->b_size / sizeof(wchar_t); Py_ssize_t len = PyUnicode_AsWideChar(value, NULL, 0); if (len < 0) { return -1; } // PyUnicode_AsWideChar() returns number of wchars including trailing null byte, // when it is called with NULL. - if (((size_t)len-1) > self->b_size/sizeof(wchar_t)) { + assert(len > 0); + if (len - 1 > size) { PyErr_SetString(PyExc_ValueError, "string too long"); - result = -1; - goto done; - } - result = PyUnicode_AsWideChar(value, - (wchar_t *)self->b_ptr, - self->b_size/sizeof(wchar_t)); - if (result >= 0 && (size_t)result < self->b_size/sizeof(wchar_t)) - ((wchar_t *)self->b_ptr)[result] = (wchar_t)0; - done: - Py_DECREF(value); - - return result >= 0 ? 0 : -1; + return -1; + } + if (PyUnicode_AsWideChar(value, (wchar_t *)self->b_ptr, size) < 0) { + return -1; + } + return 0; } static PyGetSetDef WCharArray_getsets[] = { @@ -3484,10 +3477,12 @@ _validate_paramflags(PyTypeObject *type, PyObject *paramflags) for (i = 0; i < len; ++i) { PyObject *item = PyTuple_GET_ITEM(paramflags, i); int flag; - char *name; + PyObject *name = Py_None; PyObject *defval; PyObject *typ; - if (!PyArg_ParseTuple(item, "i|ZO", &flag, &name, &defval)) { + if (!PyArg_ParseTuple(item, "i|OO", &flag, &name, &defval) || + !(name == Py_None || PyUnicode_Check(name))) + { PyErr_SetString(PyExc_TypeError, "paramflags must be a sequence of (int [,string [,value]]) tuples"); return 0; diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 6030cc3d43670df..261ae5ceb9e48a5 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -1300,7 +1300,6 @@ module. load_flags are as defined for LoadLibraryEx in the\n\ Windows API.\n"; static PyObject *load_library(PyObject *self, PyObject *args) { - const WCHAR *name; PyObject *nameobj; int load_flags = 0; HMODULE hMod; @@ -1309,14 +1308,14 @@ static PyObject *load_library(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "U|i:LoadLibrary", &nameobj, &load_flags)) return NULL; - name = _PyUnicode_AsUnicode(nameobj); - if (!name) - return NULL; - if (PySys_Audit("ctypes.dlopen", "O", nameobj) < 0) { return NULL; } + WCHAR *name = PyUnicode_AsWideCharString(nameobj, NULL); + if (!name) + return NULL; + Py_BEGIN_ALLOW_THREADS /* bpo-36085: Limit DLL search directories to avoid pre-loading * attacks and enable use of the AddDllDirectory function. @@ -1325,6 +1324,7 @@ static PyObject *load_library(PyObject *self, PyObject *args) err = hMod ? 0 : GetLastError(); Py_END_ALLOW_THREADS + PyMem_Free(name); if (err == ERROR_MOD_NOT_FOUND) { PyErr_Format(PyExc_FileNotFoundError, ("Could not find module '%.500S' (or one of its " diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c index 3a9b7119201cf02..3bd9ae438db4402 100644 --- a/Modules/_ctypes/cfield.c +++ b/Modules/_ctypes/cfield.c @@ -1220,11 +1220,8 @@ U_set(void *ptr, PyObject *value, Py_ssize_t length) "string too long (%zd, maximum length %zd)", size, length); return NULL; - } else if (size < length-1) - /* copy terminating NUL character if there is space */ - size += 1; - - if (PyUnicode_AsWideChar(value, (wchar_t *)ptr, size) == -1) { + } + if (PyUnicode_AsWideChar(value, (wchar_t *)ptr, length) == -1) { return NULL; } diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index c70b0e2a19fadc4..34331017f85c7b9 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -134,6 +134,31 @@ typedef chtype attr_t; /* No attr_t type is available */ #define STRICT_SYSV_CURSES #endif +#if defined(NCURSES_EXT_COLORS) && defined(NCURSES_EXT_FUNCS) +#define _NCURSES_EXTENDED_COLOR_FUNCS 1 +#else +#define _NCURSES_EXTENDED_COLOR_FUNCS 0 +#endif /* defined(NCURSES_EXT_COLORS) && defined(NCURSES_EXT_FUNCS) */ + +#if _NCURSES_EXTENDED_COLOR_FUNCS +#define _NCURSES_COLOR_VAL_TYPE int +#define _CURSES_INIT_COLOR_FUNC init_extended_color +#define _CURSES_INIT_PAIR_FUNC init_extended_pair +#define _COLOR_CONTENT_FUNC extended_color_content +#define _CURSES_PAIR_NUMBER_FUNC extended_pair_content +#else +#define _NCURSES_COLOR_VAL_TYPE short +#define _CURSES_INIT_COLOR_FUNC init_color +#define _CURSES_INIT_PAIR_FUNC init_pair +#define _COLOR_CONTENT_FUNC color_content +#define _CURSES_PAIR_NUMBER_FUNC pair_content +#endif /* _NCURSES_EXTENDED_COLOR_FUNCS */ + +#define _CURSES_FUNC_NAME_STR(s) #s + +#define _CURSES_INIT_COLOR_FUNC_NAME _CURSES_FUNC_NAME_STR(_CURSES_INIT_COLOR_FUNC) +#define _CURSES_INIT_PAIR_FUNC_NAME _CURSES_FUNC_NAME_STR(_CURSES_INIT_PAIR_FUNC) + /*[clinic input] module _curses class _curses.window "PyCursesWindowObject *" "&PyCursesWindow_Type" @@ -387,6 +412,104 @@ PyCurses_ConvertToString(PyCursesWindowObject *win, PyObject *obj, return 0; } +static int +color_converter(PyObject *arg, void *ptr) +{ + long color_number; + int overflow; + + color_number = PyLong_AsLongAndOverflow(arg, &overflow); + if (color_number == -1 && PyErr_Occurred()) + return 0; + + if (overflow > 0 || color_number > COLORS) { + PyErr_Format(PyExc_ValueError, + "Color number is greater than COLORS (%d).", + COLORS); + return 0; + } + else if (overflow < 0 || color_number < 0) { + PyErr_SetString(PyExc_ValueError, + "Color number is less than 0."); + return 0; + } + + *(int *)ptr = (int)color_number; + return 1; +} + +/*[python input] +class color_converter(CConverter): + type = 'int' + converter = 'color_converter' +[python start generated code]*/ +/*[python end generated code: output=da39a3ee5e6b4b0d input=4260d2b6e66b3709]*/ + +static int +pair_converter(PyObject *arg, void *ptr) +{ + long pair_number; + int overflow; + + pair_number = PyLong_AsLongAndOverflow(arg, &overflow); + if (pair_number == -1 && PyErr_Occurred()) + return 0; + + if (overflow > 0 || pair_number > COLOR_PAIRS - 1) { + PyErr_Format(PyExc_ValueError, + "Color pair is greater than COLOR_PAIRS-1 (%d).", + COLOR_PAIRS - 1); + return 0; + } + else if (overflow < 0 || pair_number < 1) { + PyErr_SetString(PyExc_ValueError, + "Color pair is less than 1."); + return 0; + } + + *(int *)ptr = (int)pair_number; + return 1; +} + +/*[python input] +class pair_converter(CConverter): + type = 'int' + converter = 'pair_converter' +[python start generated code]*/ +/*[python end generated code: output=da39a3ee5e6b4b0d input=1a918ae6a1b32af7]*/ + +static int +component_converter(PyObject *arg, void *ptr) +{ + long component; + int overflow; + + component = PyLong_AsLongAndOverflow(arg, &overflow); + if (component == -1 && PyErr_Occurred()) + return 0; + + if (overflow > 0 || component > 1000) { + PyErr_SetString(PyExc_ValueError, + "Color component is greater than 1000"); + return 0; + } + else if (overflow < 0 || component < 0) { + PyErr_SetString(PyExc_ValueError, + "Color component is less than 0"); + return 0; + } + + *(short *)ptr = (short)component; + return 1; +} + +/*[python input] +class component_converter(CConverter): + type = 'short' + converter = 'component_converter' +[python start generated code]*/ +/*[python end generated code: output=da39a3ee5e6b4b0d input=38e9be01d33927fb]*/ + /* Function versions of the 3 functions for testing whether curses has been initialised or not. */ @@ -2585,7 +2708,7 @@ NoArgOrFlagNoReturnFunctionBody(cbreak, flag) /*[clinic input] _curses.color_content - color_number: short + color_number: color The number of the color (0 - COLORS). / @@ -2596,15 +2719,15 @@ which will be between 0 (no component) and 1000 (maximum amount of component). [clinic start generated code]*/ static PyObject * -_curses_color_content_impl(PyObject *module, short color_number) -/*[clinic end generated code: output=cb15cf3120d4bfc1 input=5555abb1c11e11b7]*/ +_curses_color_content_impl(PyObject *module, int color_number) +/*[clinic end generated code: output=17b466df7054e0de input=c10ef58f694b13ee]*/ { - short r,g,b; + _NCURSES_COLOR_VAL_TYPE r,g,b; PyCursesInitialised; PyCursesInitialisedColor; - if (color_content(color_number, &r, &g, &b) != ERR) + if (_COLOR_CONTENT_FUNC(color_number, &r, &g, &b) != ERR) return Py_BuildValue("(iii)", r, g, b); else { PyErr_SetString(PyCursesError, @@ -2616,7 +2739,7 @@ _curses_color_content_impl(PyObject *module, short color_number) /*[clinic input] _curses.color_pair - color_number: short + color_number: color The number of the color (0 - COLORS). / @@ -2627,8 +2750,8 @@ other A_* attributes. pair_number() is the counterpart to this function. [clinic start generated code]*/ static PyObject * -_curses_color_pair_impl(PyObject *module, short color_number) -/*[clinic end generated code: output=6a84cb6b29ecaf9a input=a9d3eb6f50e4dc12]*/ +_curses_color_pair_impl(PyObject *module, int color_number) +/*[clinic end generated code: output=3fd752e8e24c93fb input=b049033819ab4ef5]*/ { PyCursesInitialised; PyCursesInitialisedColor; @@ -3027,13 +3150,13 @@ _curses_has_key_impl(PyObject *module, int key) /*[clinic input] _curses.init_color - color_number: short + color_number: color The number of the color to be changed (0 - COLORS). - r: short + r: component Red component (0 - 1000). - g: short + g: component Green component (0 - 1000). - b: short + b: component Blue component (0 - 1000). / @@ -3045,24 +3168,24 @@ most terminals; it is active only if can_change_color() returns 1. [clinic start generated code]*/ static PyObject * -_curses_init_color_impl(PyObject *module, short color_number, short r, - short g, short b) -/*[clinic end generated code: output=280236f5efe9776a input=f3a05bd38f619175]*/ +_curses_init_color_impl(PyObject *module, int color_number, short r, short g, + short b) +/*[clinic end generated code: output=d7ed71b2d818cdf2 input=8a2fe94ca9204aa5]*/ { PyCursesInitialised; PyCursesInitialisedColor; - return PyCursesCheckERR(init_color(color_number, r, g, b), "init_color"); + return PyCursesCheckERR(_CURSES_INIT_COLOR_FUNC(color_number, r, g, b), _CURSES_INIT_COLOR_FUNC_NAME); } /*[clinic input] _curses.init_pair - pair_number: short + pair_number: pair The number of the color-pair to be changed (1 - (COLOR_PAIRS-1)). - fg: short + fg: color Foreground color number (0 - COLORS). - bg: short + bg: color Background color number (0 - COLORS). / @@ -3073,14 +3196,13 @@ all occurrences of that color-pair are changed to the new definition. [clinic start generated code]*/ static PyObject * -_curses_init_pair_impl(PyObject *module, short pair_number, short fg, - short bg) -/*[clinic end generated code: output=9c2ce39c22f376b6 input=c9f0b11b17a2ac6d]*/ +_curses_init_pair_impl(PyObject *module, int pair_number, int fg, int bg) +/*[clinic end generated code: output=a0bba03d2bbc3ee6 input=b865583a18061c1f]*/ { PyCursesInitialised; PyCursesInitialisedColor; - return PyCursesCheckERR(init_pair(pair_number, fg, bg), "init_pair"); + return PyCursesCheckERR(_CURSES_INIT_PAIR_FUNC(pair_number, fg, bg), _CURSES_INIT_PAIR_FUNC_NAME); } static PyObject *ModDict; @@ -3697,7 +3819,7 @@ NoArgNoReturnFunctionBody(noraw) /*[clinic input] _curses.pair_content - pair_number: short + pair_number: pair The number of the color pair (1 - (COLOR_PAIRS-1)). / @@ -3705,15 +3827,15 @@ Return a tuple (fg, bg) containing the colors for the requested color pair. [clinic start generated code]*/ static PyObject * -_curses_pair_content_impl(PyObject *module, short pair_number) -/*[clinic end generated code: output=5a72aa1a28bbacf3 input=f4d7fec5643b976b]*/ +_curses_pair_content_impl(PyObject *module, int pair_number) +/*[clinic end generated code: output=4a726dd0e6885f3f input=b42eacf8a4103852]*/ { - short f, b; + _NCURSES_COLOR_VAL_TYPE f, b; PyCursesInitialised; PyCursesInitialisedColor; - if (pair_content(pair_number, &f, &b)==ERR) { + if (_CURSES_PAIR_NUMBER_FUNC(pair_number, &f, &b)==ERR) { PyErr_SetString(PyCursesError, "Argument 1 was out of range. (1..COLOR_PAIRS-1)"); return NULL; @@ -4450,6 +4572,21 @@ make_ncurses_version(void) #endif /* NCURSES_VERSION */ +/*[clinic input] +_curses.has_extended_color_support + +Return True if the module supports extended colors; otherwise, return False. + +Extended color support allows more than 256 color-pairs for terminals +that support more than 16 colors (e.g. xterm-256color). +[clinic start generated code]*/ + +static PyObject * +_curses_has_extended_color_support_impl(PyObject *module) +/*[clinic end generated code: output=68f1be2b57d92e22 input=4b905f046e35ee9f]*/ +{ + return PyBool_FromLong(_NCURSES_EXTENDED_COLOR_FUNCS); +} /* List of functions defined in the module */ @@ -4476,6 +4613,7 @@ static PyMethodDef PyCurses_methods[] = { _CURSES_GETSYX_METHODDEF _CURSES_GETWIN_METHODDEF _CURSES_HAS_COLORS_METHODDEF + _CURSES_HAS_EXTENDED_COLOR_SUPPORT_METHODDEF _CURSES_HAS_IC_METHODDEF _CURSES_HAS_IL_METHODDEF _CURSES_HAS_KEY_METHODDEF diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index ff7c647c2220c18..e7c44acba02fc2e 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008-2012 Stefan Krah. All rights reserved. + * Copyright (c) 2008-2020 Stefan Krah. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,6 +33,8 @@ #include +#define CPYTHON_DECIMAL_MODULE +#include "pydecimal.h" #include "docstrings.h" @@ -56,6 +58,11 @@ #define BOUNDS_CHECK(x, MIN, MAX) x = (x < MIN || MAX < x) ? MAX : x +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) + #define UNUSED __attribute__((unused)) +#else + #define UNUSED +#endif /* _Py_DEC_MINALLOC >= MPD_MINALLOC */ #define _Py_DEC_MINALLOC 4 @@ -5550,6 +5557,160 @@ static PyTypeObject PyDecContext_Type = }; +/****************************************************************************/ +/* C-API */ +/****************************************************************************/ + +static void *_decimal_api[CPYTHON_DECIMAL_MAX_API]; + +/* Simple API */ +static int +PyDec_TypeCheck(const PyObject *v) +{ + return PyDec_Check(v); +} + +static int +PyDec_IsSpecial(const PyObject *v) +{ + if (!PyDec_Check(v)) { + PyErr_SetString(PyExc_TypeError, + "PyDec_IsSpecial: argument must be a Decimal"); + return -1; + } + + return mpd_isspecial(MPD(v)); +} + +static int +PyDec_IsNaN(const PyObject *v) +{ + if (!PyDec_Check(v)) { + PyErr_SetString(PyExc_TypeError, + "PyDec_IsNaN: argument must be a Decimal"); + return -1; + } + + return mpd_isnan(MPD(v)); +} + +static int +PyDec_IsInfinite(const PyObject *v) +{ + if (!PyDec_Check(v)) { + PyErr_SetString(PyExc_TypeError, + "PyDec_IsInfinite: argument must be a Decimal"); + return -1; + } + + return mpd_isinfinite(MPD(v)); +} + +static int64_t +PyDec_GetDigits(const PyObject *v) +{ + if (!PyDec_Check(v)) { + PyErr_SetString(PyExc_TypeError, + "PyDec_GetDigits: argument must be a Decimal"); + return -1; + } + + return MPD(v)->digits; +} + +static mpd_uint128_triple_t +PyDec_AsUint128Triple(const PyObject *v) +{ + if (!PyDec_Check(v)) { + mpd_uint128_triple_t triple = { MPD_TRIPLE_ERROR, 0, 0, 0, 0 }; + PyErr_SetString(PyExc_TypeError, + "PyDec_AsUint128Triple: argument must be a Decimal"); + return triple; + } + + return mpd_as_uint128_triple(MPD(v)); +} + +static PyObject * +PyDec_FromUint128Triple(const mpd_uint128_triple_t *triple) +{ + PyObject *context; + PyObject *result; + uint32_t status = 0; + + CURRENT_CONTEXT(context); + + result = dec_alloc(); + if (result == NULL) { + return NULL; + } + + if (mpd_from_uint128_triple(MPD(result), triple, &status) < 0) { + if (dec_addstatus(context, status)) { + Py_DECREF(result); + return NULL; + } + } + + return result; +} + +/* Advanced API */ +static PyObject * +PyDec_Alloc(void) +{ + return dec_alloc(); +} + +static mpd_t * +PyDec_Get(PyObject *v) +{ + if (!PyDec_Check(v)) { + PyErr_SetString(PyExc_TypeError, + "PyDec_Get: argument must be a Decimal"); + return NULL; + } + + return MPD(v); +} + +static const mpd_t * +PyDec_GetConst(const PyObject *v) +{ + if (!PyDec_Check(v)) { + PyErr_SetString(PyExc_TypeError, + "PyDec_GetConst: argument must be a Decimal"); + return NULL; + } + + return MPD(v); +} + +static PyObject * +init_api(void) +{ + /* Simple API */ + _decimal_api[PyDec_TypeCheck_INDEX] = (void *)PyDec_TypeCheck; + _decimal_api[PyDec_IsSpecial_INDEX] = (void *)PyDec_IsSpecial; + _decimal_api[PyDec_IsNaN_INDEX] = (void *)PyDec_IsNaN; + _decimal_api[PyDec_IsInfinite_INDEX] = (void *)PyDec_IsInfinite; + _decimal_api[PyDec_GetDigits_INDEX] = (void *)PyDec_GetDigits; + _decimal_api[PyDec_AsUint128Triple_INDEX] = (void *)PyDec_AsUint128Triple; + _decimal_api[PyDec_FromUint128Triple_INDEX] = (void *)PyDec_FromUint128Triple; + + /* Advanced API */ + _decimal_api[PyDec_Alloc_INDEX] = (void *)PyDec_Alloc; + _decimal_api[PyDec_Get_INDEX] = (void *)PyDec_Get; + _decimal_api[PyDec_GetConst_INDEX] = (void *)PyDec_GetConst; + + return PyCapsule_New(_decimal_api, "_decimal._API", NULL); +} + + +/****************************************************************************/ +/* Module */ +/****************************************************************************/ + static PyMethodDef _decimal_methods [] = { { "getcontext", (PyCFunction)PyDec_GetCurrentContext, METH_NOARGS, doc_getcontext}, @@ -5660,17 +5821,27 @@ PyInit__decimal(void) DecCondMap *cm; struct ssize_constmap *ssize_cm; struct int_constmap *int_cm; + static PyObject *capsule = NULL; + static int initialized = 0; int i; /* Init libmpdec */ - mpd_traphandler = dec_traphandler; - mpd_mallocfunc = PyMem_Malloc; - mpd_reallocfunc = PyMem_Realloc; - mpd_callocfunc = mpd_callocfunc_em; - mpd_free = PyMem_Free; - mpd_setminalloc(_Py_DEC_MINALLOC); + if (!initialized) { + mpd_traphandler = dec_traphandler; + mpd_mallocfunc = PyMem_Malloc; + mpd_reallocfunc = PyMem_Realloc; + mpd_callocfunc = mpd_callocfunc_em; + mpd_free = PyMem_Free; + mpd_setminalloc(_Py_DEC_MINALLOC); + + capsule = init_api(); + if (capsule == NULL) { + return NULL; + } + initialized = 1; + } /* Init external C-API functions */ _py_long_multiply = PyLong_Type.tp_as_number->nb_multiply; @@ -5895,6 +6066,11 @@ PyInit__decimal(void) CHECK_INT(PyModule_AddStringConstant(m, "__version__", "1.70")); CHECK_INT(PyModule_AddStringConstant(m, "__libmpdec_version__", mpd_version())); + /* Add capsule API */ + Py_INCREF(capsule); + if (PyModule_AddObject(m, "_API", capsule) < 0) { + goto error; + } return m; diff --git a/Modules/_decimal/libmpdec/mpdecimal.c b/Modules/_decimal/libmpdec/mpdecimal.c index ad8db508b36f0a5..f0e4d7f343a4382 100644 --- a/Modules/_decimal/libmpdec/mpdecimal.c +++ b/Modules/_decimal/libmpdec/mpdecimal.c @@ -64,7 +64,7 @@ #if defined(_MSC_VER) #define ALWAYS_INLINE __forceinline -#elif defined(LEGACY_COMPILER) +#elif defined(__IBMC__) || defined(LEGACY_COMPILER) #define ALWAYS_INLINE #undef inline #define inline @@ -8656,3 +8656,355 @@ mpd_qimport_u32(mpd_t *result, mpd_qresize(result, result->len, status); mpd_qfinalize(result, ctx, status); } + + +/******************************************************************************/ +/* From triple */ +/******************************************************************************/ + +#if defined(CONFIG_64) && defined(__SIZEOF_INT128__) +static mpd_ssize_t +_set_coeff(uint64_t data[3], uint64_t hi, uint64_t lo) +{ + __uint128_t d = ((__uint128_t)hi << 64) + lo; + __uint128_t q, r; + + q = d / MPD_RADIX; + r = d % MPD_RADIX; + data[0] = (uint64_t)r; + d = q; + + q = d / MPD_RADIX; + r = d % MPD_RADIX; + data[1] = (uint64_t)r; + d = q; + + q = d / MPD_RADIX; + r = d % MPD_RADIX; + data[2] = (uint64_t)r; + + if (q != 0) { + abort(); /* GCOV_NOT_REACHED */ + } + + return data[2] != 0 ? 3 : (data[1] != 0 ? 2 : 1); +} +#else +static size_t +_uint_from_u16(mpd_uint_t *w, mpd_ssize_t wlen, const uint16_t *u, size_t ulen) +{ + const mpd_uint_t ubase = 1U<<16; + mpd_ssize_t n = 0; + mpd_uint_t carry; + + assert(wlen > 0 && ulen > 0); + + w[n++] = u[--ulen]; + while (--ulen != SIZE_MAX) { + carry = _mpd_shortmul_c(w, w, n, ubase); + if (carry) { + if (n >= wlen) { + abort(); /* GCOV_NOT_REACHED */ + } + w[n++] = carry; + } + carry = _mpd_shortadd(w, n, u[ulen]); + if (carry) { + if (n >= wlen) { + abort(); /* GCOV_NOT_REACHED */ + } + w[n++] = carry; + } + } + + return n; +} + +static mpd_ssize_t +_set_coeff(mpd_uint_t *data, mpd_ssize_t len, uint64_t hi, uint64_t lo) +{ + uint16_t u16[8] = {0}; + + u16[7] = (uint16_t)((hi & 0xFFFF000000000000ULL) >> 48); + u16[6] = (uint16_t)((hi & 0x0000FFFF00000000ULL) >> 32); + u16[5] = (uint16_t)((hi & 0x00000000FFFF0000ULL) >> 16); + u16[4] = (uint16_t) (hi & 0x000000000000FFFFULL); + + u16[3] = (uint16_t)((lo & 0xFFFF000000000000ULL) >> 48); + u16[2] = (uint16_t)((lo & 0x0000FFFF00000000ULL) >> 32); + u16[1] = (uint16_t)((lo & 0x00000000FFFF0000ULL) >> 16); + u16[0] = (uint16_t) (lo & 0x000000000000FFFFULL); + + return (mpd_ssize_t)_uint_from_u16(data, len, u16, 8); +} +#endif + +static int +_set_uint128_coeff_exp(mpd_t *result, uint64_t hi, uint64_t lo, mpd_ssize_t exp) +{ + mpd_uint_t data[5] = {0}; + uint32_t status = 0; + mpd_ssize_t len; + +#if defined(CONFIG_64) && defined(__SIZEOF_INT128__) + len = _set_coeff(data, hi, lo); +#else + len = _set_coeff(data, 5, hi, lo); +#endif + + if (!mpd_qresize(result, len, &status)) { + return -1; + } + + for (mpd_ssize_t i = 0; i < len; i++) { + result->data[i] = data[i]; + } + + result->exp = exp; + result->len = len; + mpd_setdigits(result); + + return 0; +} + +int +mpd_from_uint128_triple(mpd_t *result, const mpd_uint128_triple_t *triple, uint32_t *status) +{ + static const mpd_context_t maxcontext = { + .prec=MPD_MAX_PREC, + .emax=MPD_MAX_EMAX, + .emin=MPD_MIN_EMIN, + .round=MPD_ROUND_HALF_EVEN, + .traps=MPD_Traps, + .status=0, + .newtrap=0, + .clamp=0, + .allcr=1, + }; + const enum mpd_triple_class tag = triple->tag; + const uint8_t sign = triple->sign; + const uint64_t hi = triple->hi; + const uint64_t lo = triple->lo; + mpd_ssize_t exp; + +#ifdef CONFIG_32 + if (triple->exp < MPD_SSIZE_MIN || triple->exp > MPD_SSIZE_MAX) { + goto conversion_error; + } +#endif + exp = (mpd_ssize_t)triple->exp; + + switch (tag) { + case MPD_TRIPLE_QNAN: case MPD_TRIPLE_SNAN: { + if (sign > 1 || exp != 0) { + goto conversion_error; + } + + const uint8_t flags = tag == MPD_TRIPLE_QNAN ? MPD_NAN : MPD_SNAN; + mpd_setspecial(result, sign, flags); + + if (hi == 0 && lo == 0) { /* no payload */ + return 0; + } + + if (_set_uint128_coeff_exp(result, hi, lo, exp) < 0) { + goto malloc_error; + } + + return 0; + } + + case MPD_TRIPLE_INF: { + if (sign > 1 || hi != 0 || lo != 0 || exp != 0) { + goto conversion_error; + } + + mpd_setspecial(result, sign, MPD_INF); + + return 0; + } + + case MPD_TRIPLE_NORMAL: { + if (sign > 1) { + goto conversion_error; + } + + const uint8_t flags = sign ? MPD_NEG : MPD_POS; + mpd_set_flags(result, flags); + + if (exp > MPD_EXP_INF) { + exp = MPD_EXP_INF; + } + if (exp == MPD_SSIZE_MIN) { + exp = MPD_SSIZE_MIN+1; + } + + if (_set_uint128_coeff_exp(result, hi, lo, exp) < 0) { + goto malloc_error; + } + + uint32_t workstatus = 0; + mpd_qfinalize(result, &maxcontext, &workstatus); + if (workstatus & (MPD_Inexact|MPD_Rounded|MPD_Clamped)) { + goto conversion_error; + } + + return 0; + } + + default: + goto conversion_error; + } + +conversion_error: + mpd_seterror(result, MPD_Conversion_syntax, status); + return -1; + +malloc_error: + mpd_seterror(result, MPD_Malloc_error, status); + return -1; +} + + +/******************************************************************************/ +/* As triple */ +/******************************************************************************/ + +#if defined(CONFIG_64) && defined(__SIZEOF_INT128__) +static void +_get_coeff(uint64_t *hi, uint64_t *lo, const mpd_t *a) +{ + __uint128_t u128 = 0; + + switch (a->len) { + case 3: + u128 = a->data[2]; /* fall through */ + case 2: + u128 = u128 * MPD_RADIX + a->data[1]; /* fall through */ + case 1: + u128 = u128 * MPD_RADIX + a->data[0]; + break; + default: + abort(); /* GCOV_NOT_REACHED */ + } + + *hi = u128 >> 64; + *lo = (uint64_t)u128; +} +#else +static size_t +_uint_to_u16(uint16_t w[8], mpd_uint_t *u, mpd_ssize_t ulen) +{ + const mpd_uint_t wbase = 1U<<16; + size_t n = 0; + + assert(ulen > 0); + + do { + if (n >= 8) { + abort(); /* GCOV_NOT_REACHED */ + } + w[n++] = (uint16_t)_mpd_shortdiv(u, u, ulen, wbase); + /* ulen is at least 1. u[ulen-1] can only be zero if ulen == 1. */ + ulen = _mpd_real_size(u, ulen); + + } while (u[ulen-1] != 0); + + return n; +} + +static void +_get_coeff(uint64_t *hi, uint64_t *lo, const mpd_t *a) +{ + uint16_t u16[8] = {0}; + mpd_uint_t data[5] = {0}; + + switch (a->len) { + case 5: + data[4] = a->data[4]; /* fall through */ + case 4: + data[3] = a->data[3]; /* fall through */ + case 3: + data[2] = a->data[2]; /* fall through */ + case 2: + data[1] = a->data[1]; /* fall through */ + case 1: + data[0] = a->data[0]; + break; + default: + abort(); /* GCOV_NOT_REACHED */ + } + + _uint_to_u16(u16, data, a->len); + + *hi = (uint64_t)u16[7] << 48; + *hi |= (uint64_t)u16[6] << 32; + *hi |= (uint64_t)u16[5] << 16; + *hi |= (uint64_t)u16[4]; + + *lo = (uint64_t)u16[3] << 48; + *lo |= (uint64_t)u16[2] << 32; + *lo |= (uint64_t)u16[1] << 16; + *lo |= (uint64_t)u16[0]; +} +#endif + +static enum mpd_triple_class +_coeff_as_uint128(uint64_t *hi, uint64_t *lo, const mpd_t *a) +{ +#ifdef CONFIG_64 + static mpd_uint_t uint128_max_data[3] = { 3374607431768211455ULL, 4028236692093846346ULL, 3ULL }; + static const mpd_t uint128_max = { MPD_STATIC|MPD_CONST_DATA, 0, 39, 3, 3, uint128_max_data }; +#else + static mpd_uint_t uint128_max_data[5] = { 768211455U, 374607431U, 938463463U, 282366920U, 340U }; + static const mpd_t uint128_max = { MPD_STATIC|MPD_CONST_DATA, 0, 39, 5, 5, uint128_max_data }; +#endif + enum mpd_triple_class ret = MPD_TRIPLE_NORMAL; + uint32_t status = 0; + mpd_t coeff; + + *hi = *lo = 0ULL; + + if (mpd_isspecial(a)) { + if (mpd_isinfinite(a)) { + return MPD_TRIPLE_INF; + } + + ret = mpd_isqnan(a) ? MPD_TRIPLE_QNAN : MPD_TRIPLE_SNAN; + if (a->len == 0) { /* no payload */ + return ret; + } + } + else if (mpd_iszero(a)) { + return ret; + } + + _mpd_copy_shared(&coeff, a); + mpd_set_flags(&coeff, 0); + coeff.exp = 0; + + if (mpd_qcmp(&coeff, &uint128_max, &status) > 0) { + return MPD_TRIPLE_ERROR; + } + + _get_coeff(hi, lo, &coeff); + return ret; +} + +mpd_uint128_triple_t +mpd_as_uint128_triple(const mpd_t *a) +{ + mpd_uint128_triple_t triple = { MPD_TRIPLE_ERROR, 0, 0, 0, 0 }; + + triple.tag = _coeff_as_uint128(&triple.hi, &triple.lo, a); + if (triple.tag == MPD_TRIPLE_ERROR) { + return triple; + } + + triple.sign = !!mpd_isnegative(a); + if (triple.tag == MPD_TRIPLE_NORMAL) { + triple.exp = a->exp; + } + + return triple; +} diff --git a/Modules/_decimal/libmpdec/mpdecimal.h b/Modules/_decimal/libmpdec/mpdecimal.h index 35ce429f60124a9..9c9f1ca44340213 100644 --- a/Modules/_decimal/libmpdec/mpdecimal.h +++ b/Modules/_decimal/libmpdec/mpdecimal.h @@ -61,12 +61,6 @@ extern "C" { #define MPD_HIDE_SYMBOLS_END #endif -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) - #define UNUSED __attribute__((unused)) -#else - #define UNUSED -#endif - #if defined(_MSC_VER) #include "vccompat.h" #define EXTINLINE extern inline @@ -377,6 +371,31 @@ typedef struct mpd_t { typedef unsigned char uchar; +/******************************************************************************/ +/* Triple */ +/******************************************************************************/ + +/* status cases for getting a triple */ +enum mpd_triple_class { + MPD_TRIPLE_NORMAL, + MPD_TRIPLE_INF, + MPD_TRIPLE_QNAN, + MPD_TRIPLE_SNAN, + MPD_TRIPLE_ERROR, +}; + +typedef struct { + enum mpd_triple_class tag; + uint8_t sign; + uint64_t hi; + uint64_t lo; + int64_t exp; +} mpd_uint128_triple_t; + +int mpd_from_uint128_triple(mpd_t *result, const mpd_uint128_triple_t *triple, uint32_t *status); +mpd_uint128_triple_t mpd_as_uint128_triple(const mpd_t *a); + + /******************************************************************************/ /* Quiet, thread-safe functions */ /******************************************************************************/ diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py index 3726db194e032f2..88fd7b5ae0be381 100644 --- a/Modules/_decimal/tests/bench.py +++ b/Modules/_decimal/tests/bench.py @@ -7,13 +7,10 @@ import time -try: - from test.support import import_fresh_module -except ImportError: - from test.test_support import import_fresh_module -C = import_fresh_module('decimal', fresh=['_decimal']) -P = import_fresh_module('decimal', blocked=['_decimal']) +import _decimal as C +import _pydecimal as P + # # NOTE: This is the pi function from the decimal documentation, modified diff --git a/Modules/_decimal/tests/deccheck.py b/Modules/_decimal/tests/deccheck.py index 5d9179e61689d00..5de57d1f875a2d4 100644 --- a/Modules/_decimal/tests/deccheck.py +++ b/Modules/_decimal/tests/deccheck.py @@ -30,10 +30,14 @@ # +import random +import time + +RANDSEED = int(time.time()) +random.seed(RANDSEED) + import sys import os -import time -import random from copy import copy from collections import defaultdict @@ -43,14 +47,18 @@ from queue import Queue, Empty from threading import Thread, Event, Lock -from test.support import import_fresh_module from randdec import randfloat, all_unary, all_binary, all_ternary from randdec import unary_optarg, binary_optarg, ternary_optarg from formathelper import rand_format, rand_locale from _pydecimal import _dec_from_triple -C = import_fresh_module('decimal', fresh=['_decimal']) -P = import_fresh_module('decimal', blocked=['_decimal']) +from _testcapi import decimal_as_triple +from _testcapi import decimal_from_triple + +import _decimal as C +import _pydecimal as P + + EXIT_STATUS = 0 @@ -153,6 +161,45 @@ TernaryRestricted = ['__pow__', 'context.power'] +# ====================================================================== +# Triple tests +# ====================================================================== + +def c_as_triple(dec): + sign, hi, lo, exp = decimal_as_triple(dec) + + coeff = hi * 2**64 + lo + return (sign, coeff, exp) + +def c_from_triple(triple): + sign, coeff, exp = triple + + hi = coeff // 2**64 + lo = coeff % 2**64 + return decimal_from_triple((sign, hi, lo, exp)) + +def p_as_triple(dec): + sign, digits, exp = dec.as_tuple() + + s = "".join(str(d) for d in digits) + coeff = int(s) if s else 0 + + if coeff < 0 or coeff >= 2**128: + raise ValueError("value out of bounds for a uint128 triple") + + return (sign, coeff, exp) + +def p_from_triple(triple): + sign, coeff, exp = triple + + if coeff < 0 or coeff >= 2**128: + raise ValueError("value out of bounds for a uint128 triple") + + digits = tuple(int(c) for c in str(coeff)) + + return P.Decimal((sign, digits, exp)) + + # ====================================================================== # Unified Context # ====================================================================== @@ -846,12 +893,44 @@ def verify(t, stat): t.presults.append(str(t.rp.imag)) t.presults.append(str(t.rp.real)) + ctriple = None + if str(t.rc) == str(t.rp): # see skip handler + try: + ctriple = c_as_triple(t.rc) + except ValueError: + try: + ptriple = p_as_triple(t.rp) + except ValueError: + pass + else: + raise RuntimeError("ValueError not raised") + else: + cres = c_from_triple(ctriple) + t.cresults.append(ctriple) + t.cresults.append(str(cres)) + + ptriple = p_as_triple(t.rp) + pres = p_from_triple(ptriple) + t.presults.append(ptriple) + t.presults.append(str(pres)) + if t.with_maxcontext and isinstance(t.rmax, C.Decimal): t.maxresults.append(t.rmax.to_eng_string()) t.maxresults.append(t.rmax.as_tuple()) t.maxresults.append(str(t.rmax.imag)) t.maxresults.append(str(t.rmax.real)) + if ctriple is not None: + # NaN payloads etc. depend on precision and clamp. + if all_nan(t.rc) and all_nan(t.rmax): + t.maxresults.append(ctriple) + t.maxresults.append(str(cres)) + else: + maxtriple = c_as_triple(t.rmax) + maxres = c_from_triple(maxtriple) + t.maxresults.append(maxtriple) + t.maxresults.append(str(maxres)) + nc = t.rc.number_class().lstrip('+-s') stat[nc] += 1 else: @@ -1160,10 +1239,6 @@ def check_untested(funcdict, c_cls, p_cls): args.single = args.single[0] - randseed = int(time.time()) - random.seed(randseed) - - # Set up the testspecs list. A testspec is simply a dictionary # that determines the amount of different contexts that 'test_method' # will generate. @@ -1231,9 +1306,9 @@ def check_untested(funcdict, c_cls, p_cls): if args.multicore: q = Queue() elif args.single: - log("Random seed: %d", randseed) + log("Random seed: %d", RANDSEED) else: - log("\n\nRandom seed: %d\n\n", randseed) + log("\n\nRandom seed: %d\n\n", RANDSEED) FOUND_METHOD = False diff --git a/Modules/_decimal/tests/formathelper.py b/Modules/_decimal/tests/formathelper.py index 19b2aad4a503b1e..482e02a25c2a8c7 100644 --- a/Modules/_decimal/tests/formathelper.py +++ b/Modules/_decimal/tests/formathelper.py @@ -31,11 +31,10 @@ import os, sys, locale, random import platform, subprocess -from test.support import import_fresh_module from distutils.spawn import find_executable -C = import_fresh_module('decimal', fresh=['_decimal']) -P = import_fresh_module('decimal', blocked=['_decimal']) +import _decimal as C +import _pydecimal as P windows_lang_strings = [ diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index 2c92a8aedb5a884..85fdfa7e5ed42cf 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -2040,7 +2040,7 @@ element_attrib_setter(ElementObject *self, PyObject *value, void *closure) if (!PyDict_Check(value)) { PyErr_Format(PyExc_TypeError, "attrib must be dict, not %.200s", - value->ob_type->tp_name); + Py_TYPE(value)->tp_name); return -1; } if (!self->extra) { diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 7c8ba37c4fe9409..b9856b3b6316570 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -270,7 +270,14 @@ _io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode, if (!PyUnicode_FSDecoder(nameobj, &stringobj)) { return -1; } +#if USE_UNICODE_WCHAR_CACHE +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS widename = PyUnicode_AsUnicode(stringobj); +_Py_COMP_DIAG_POP +#else /* USE_UNICODE_WCHAR_CACHE */ + widename = PyUnicode_AsWideCharString(stringobj, NULL); +#endif /* USE_UNICODE_WCHAR_CACHE */ if (widename == NULL) return -1; #else @@ -491,6 +498,11 @@ _io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode, internal_close(self); done: +#ifdef MS_WINDOWS +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(widename); +#endif /* USE_UNICODE_WCHAR_CACHE */ +#endif Py_CLEAR(stringobj); return ret; } diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index 0819d0e1924087f..0fe2e08b41f9f6d 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -53,10 +53,14 @@ get_locale_state(PyObject *m) return (_locale_state *)state; } -/* support functions for formatting floating point numbers */ +#include "clinic/_localemodule.c.h" + +/*[clinic input] +module _locale +[clinic start generated code]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=ed98569b726feada]*/ -PyDoc_STRVAR(setlocale__doc__, -"(integer,string=None) -> string. Activates/queries locale processing."); +/* support functions for formatting floating point numbers */ /* the grouping is terminated by either 0 or CHAR_MAX */ static PyObject* @@ -91,20 +95,27 @@ copy_grouping(const char* s) return result; } -static PyObject* -PyLocale_setlocale(PyObject* self, PyObject* args) +/*[clinic input] +_locale.setlocale + + category: int + locale: str(accept={str, NoneType}) = NULL + / + +Activates/queries locale processing. +[clinic start generated code]*/ + +static PyObject * +_locale_setlocale_impl(PyObject *module, int category, const char *locale) +/*[clinic end generated code: output=a0e777ae5d2ff117 input=dbe18f1d66c57a6a]*/ { - int category; - char *locale = NULL, *result; + char *result; PyObject *result_object; - if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale)) - return NULL; - #if defined(MS_WINDOWS) if (category < LC_MIN || category > LC_MAX) { - PyErr_SetString(get_locale_state(self)->Error, + PyErr_SetString(get_locale_state(module)->Error, "invalid locale category"); return NULL; } @@ -115,7 +126,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args) result = setlocale(category, locale); if (!result) { /* operation failed, no setting was changed */ - PyErr_SetString(get_locale_state(self)->Error, + PyErr_SetString(get_locale_state(module)->Error, "unsupported locale setting"); return NULL; } @@ -126,7 +137,7 @@ PyLocale_setlocale(PyObject* self, PyObject* args) /* get locale */ result = setlocale(category, NULL); if (!result) { - PyErr_SetString(get_locale_state(self)->Error, + PyErr_SetString(get_locale_state(module)->Error, "locale query failed"); return NULL; } @@ -211,11 +222,15 @@ locale_decode_monetary(PyObject *dict, struct lconv *lc) return res; } -PyDoc_STRVAR(localeconv__doc__, -"() -> dict. Returns numeric and monetary locale-specific parameters."); +/*[clinic input] +_locale.localeconv -static PyObject* -PyLocale_localeconv(PyObject* self, PyObject *Py_UNUSED(ignored)) +Returns numeric and monetary locale-specific parameters. +[clinic start generated code]*/ + +static PyObject * +_locale_localeconv_impl(PyObject *module) +/*[clinic end generated code: output=43a54515e0a2aef5 input=f1132d15accf4444]*/ { PyObject* result; struct lconv *lc; @@ -307,17 +322,24 @@ PyLocale_localeconv(PyObject* self, PyObject *Py_UNUSED(ignored)) } #if defined(HAVE_WCSCOLL) -PyDoc_STRVAR(strcoll__doc__, -"string,string -> int. Compares two strings according to the locale."); -static PyObject* -PyLocale_strcoll(PyObject* self, PyObject* args) +/*[clinic input] +_locale.strcoll + + os1: unicode + os2: unicode + / + +Compares two strings according to the locale. +[clinic start generated code]*/ + +static PyObject * +_locale_strcoll_impl(PyObject *module, PyObject *os1, PyObject *os2) +/*[clinic end generated code: output=82ddc6d62c76d618 input=693cd02bcbf38dd8]*/ { - PyObject *os1, *os2, *result = NULL; + PyObject *result = NULL; wchar_t *ws1 = NULL, *ws2 = NULL; - if (!PyArg_ParseTuple(args, "UU:strcoll", &os1, &os2)) - return NULL; /* Convert the unicode strings to wchar[]. */ ws1 = PyUnicode_AsWideCharString(os1, NULL); if (ws1 == NULL) @@ -336,23 +358,25 @@ PyLocale_strcoll(PyObject* self, PyObject* args) #endif #ifdef HAVE_WCSXFRM -PyDoc_STRVAR(strxfrm__doc__, -"strxfrm(string) -> string.\n\ -\n\ -Return a string that can be used as a key for locale-aware comparisons."); -static PyObject* -PyLocale_strxfrm(PyObject* self, PyObject* args) +/*[clinic input] +_locale.strxfrm + + string as str: unicode + / + +Return a string that can be used as a key for locale-aware comparisons. +[clinic start generated code]*/ + +static PyObject * +_locale_strxfrm_impl(PyObject *module, PyObject *str) +/*[clinic end generated code: output=3081866ebffc01af input=1378bbe6a88b4780]*/ { - PyObject *str; Py_ssize_t n1; wchar_t *s = NULL, *buf = NULL; size_t n2; PyObject *result = NULL; - if (!PyArg_ParseTuple(args, "U:strxfrm", &str)) - return NULL; - s = PyUnicode_AsWideCharString(str, &n1); if (s == NULL) goto exit; @@ -399,8 +423,15 @@ PyLocale_strxfrm(PyObject* self, PyObject* args) #endif #if defined(MS_WINDOWS) -static PyObject* -PyLocale_getdefaultlocale(PyObject* self, PyObject *Py_UNUSED(ignored)) + +/*[clinic input] +_locale._getdefaultlocale + +[clinic start generated code]*/ + +static PyObject * +_locale__getdefaultlocale_impl(PyObject *module) +/*[clinic end generated code: output=e6254088579534c2 input=003ea41acd17f7c7]*/ { char encoding[20]; char locale[100]; @@ -544,16 +575,20 @@ static struct langinfo_constant{ {0, 0} }; -PyDoc_STRVAR(nl_langinfo__doc__, -"nl_langinfo(key) -> string\n" -"Return the value for the locale information associated with key."); +/*[clinic input] +_locale.nl_langinfo -static PyObject* -PyLocale_nl_langinfo(PyObject* self, PyObject* args) + key as item: int + / + +Return the value for the locale information associated with key. +[clinic start generated code]*/ + +static PyObject * +_locale_nl_langinfo_impl(PyObject *module, int item) +/*[clinic end generated code: output=6aea457b47e077a3 input=00798143eecfeddc]*/ { - int item, i; - if (!PyArg_ParseTuple(args, "i:nl_langinfo", &item)) - return NULL; + int i; /* Check whether this is a supported constant. GNU libc sometimes returns numeric values in the char* return value, which would crash PyUnicode_FromString. */ @@ -572,56 +607,75 @@ PyLocale_nl_langinfo(PyObject* self, PyObject* args) #ifdef HAVE_LIBINTL_H -PyDoc_STRVAR(gettext__doc__, -"gettext(msg) -> string\n" -"Return translation of msg."); +/*[clinic input] +_locale.gettext -static PyObject* -PyIntl_gettext(PyObject* self, PyObject *args) + msg as in: str + / + +gettext(msg) -> string + +Return translation of msg. +[clinic start generated code]*/ + +static PyObject * +_locale_gettext_impl(PyObject *module, const char *in) +/*[clinic end generated code: output=493bb4b38a4704fe input=949fc8efc2bb3bc3]*/ { - char *in; - if (!PyArg_ParseTuple(args, "s", &in)) - return 0; return PyUnicode_DecodeLocale(gettext(in), NULL); } -PyDoc_STRVAR(dgettext__doc__, -"dgettext(domain, msg) -> string\n" -"Return translation of msg in domain."); +/*[clinic input] +_locale.dgettext -static PyObject* -PyIntl_dgettext(PyObject* self, PyObject *args) + domain: str(accept={str, NoneType}) + msg as in: str + / + +dgettext(domain, msg) -> string + +Return translation of msg in domain. +[clinic start generated code]*/ + +static PyObject * +_locale_dgettext_impl(PyObject *module, const char *domain, const char *in) +/*[clinic end generated code: output=3c0cd5287b972c8f input=a277388a635109d8]*/ { - char *domain, *in; - if (!PyArg_ParseTuple(args, "zs", &domain, &in)) - return 0; return PyUnicode_DecodeLocale(dgettext(domain, in), NULL); } -PyDoc_STRVAR(dcgettext__doc__, -"dcgettext(domain, msg, category) -> string\n" -"Return translation of msg in domain and category."); +/*[clinic input] +_locale.dcgettext -static PyObject* -PyIntl_dcgettext(PyObject *self, PyObject *args) + domain: str(accept={str, NoneType}) + msg as msgid: str + category: int + / + +Return translation of msg in domain and category. +[clinic start generated code]*/ + +static PyObject * +_locale_dcgettext_impl(PyObject *module, const char *domain, + const char *msgid, int category) +/*[clinic end generated code: output=0f4cc4fce0aa283f input=ec5f8fed4336de67]*/ { - char *domain, *msgid; - int category; - if (!PyArg_ParseTuple(args, "zsi", &domain, &msgid, &category)) - return 0; return PyUnicode_DecodeLocale(dcgettext(domain,msgid,category), NULL); } -PyDoc_STRVAR(textdomain__doc__, -"textdomain(domain) -> string\n" -"Set the C library's textdmain to domain, returning the new domain."); +/*[clinic input] +_locale.textdomain -static PyObject* -PyIntl_textdomain(PyObject* self, PyObject* args) + domain: str(accept={str, NoneType}) + / + +Set the C library's textdmain to domain, returning the new domain. +[clinic start generated code]*/ + +static PyObject * +_locale_textdomain_impl(PyObject *module, const char *domain) +/*[clinic end generated code: output=7992df06aadec313 input=66359716f5eb1d38]*/ { - char *domain; - if (!PyArg_ParseTuple(args, "z", &domain)) - return 0; domain = textdomain(domain); if (!domain) { PyErr_SetFromErrno(PyExc_OSError); @@ -630,20 +684,26 @@ PyIntl_textdomain(PyObject* self, PyObject* args) return PyUnicode_DecodeLocale(domain, NULL); } -PyDoc_STRVAR(bindtextdomain__doc__, -"bindtextdomain(domain, dir) -> string\n" -"Bind the C library's domain to dir."); +/*[clinic input] +_locale.bindtextdomain -static PyObject* -PyIntl_bindtextdomain(PyObject* self, PyObject*args) + domain: str + dir as dirname_obj: object + / + +Bind the C library's domain to dir. +[clinic start generated code]*/ + +static PyObject * +_locale_bindtextdomain_impl(PyObject *module, const char *domain, + PyObject *dirname_obj) +/*[clinic end generated code: output=6d6f3c7b345d785c input=c0dff085acfe272b]*/ { - const char *domain, *dirname, *current_dirname; - PyObject *dirname_obj, *dirname_bytes = NULL, *result; + const char *dirname, *current_dirname; + PyObject *dirname_bytes = NULL, *result; - if (!PyArg_ParseTuple(args, "sO", &domain, &dirname_obj)) - return 0; if (!strlen(domain)) { - PyErr_SetString(get_locale_state(self)->Error, + PyErr_SetString(get_locale_state(module)->Error, "domain must be a non-empty string"); return 0; } @@ -667,16 +727,22 @@ PyIntl_bindtextdomain(PyObject* self, PyObject*args) } #ifdef HAVE_BIND_TEXTDOMAIN_CODESET -PyDoc_STRVAR(bind_textdomain_codeset__doc__, -"bind_textdomain_codeset(domain, codeset) -> string\n" -"Bind the C library's domain to codeset."); -static PyObject* -PyIntl_bind_textdomain_codeset(PyObject* self,PyObject*args) +/*[clinic input] +_locale.bind_textdomain_codeset + + domain: str + codeset: str(accept={str, NoneType}) + / + +Bind the C library's domain to codeset. +[clinic start generated code]*/ + +static PyObject * +_locale_bind_textdomain_codeset_impl(PyObject *module, const char *domain, + const char *codeset) +/*[clinic end generated code: output=fa452f9c8b1b9e89 input=23fbe3540400f259]*/ { - char *domain,*codeset; - if (!PyArg_ParseTuple(args, "sz", &domain, &codeset)) - return NULL; codeset = bind_textdomain_codeset(domain, codeset); if (codeset) { return PyUnicode_DecodeLocale(codeset, NULL); @@ -688,38 +754,28 @@ PyIntl_bind_textdomain_codeset(PyObject* self,PyObject*args) #endif static struct PyMethodDef PyLocale_Methods[] = { - {"setlocale", (PyCFunction) PyLocale_setlocale, - METH_VARARGS, setlocale__doc__}, - {"localeconv", PyLocale_localeconv, METH_NOARGS, localeconv__doc__}, + _LOCALE_SETLOCALE_METHODDEF + _LOCALE_LOCALECONV_METHODDEF #ifdef HAVE_WCSCOLL - {"strcoll", (PyCFunction) PyLocale_strcoll, - METH_VARARGS, strcoll__doc__}, + _LOCALE_STRCOLL_METHODDEF #endif #ifdef HAVE_WCSXFRM - {"strxfrm", (PyCFunction) PyLocale_strxfrm, - METH_VARARGS, strxfrm__doc__}, + _LOCALE_STRXFRM_METHODDEF #endif #if defined(MS_WINDOWS) - {"_getdefaultlocale", PyLocale_getdefaultlocale, METH_NOARGS}, + _LOCALE__GETDEFAULTLOCALE_METHODDEF #endif #ifdef HAVE_LANGINFO_H - {"nl_langinfo", (PyCFunction) PyLocale_nl_langinfo, - METH_VARARGS, nl_langinfo__doc__}, + _LOCALE_NL_LANGINFO_METHODDEF #endif #ifdef HAVE_LIBINTL_H - {"gettext",(PyCFunction)PyIntl_gettext,METH_VARARGS, - gettext__doc__}, - {"dgettext",(PyCFunction)PyIntl_dgettext,METH_VARARGS, - dgettext__doc__}, - {"dcgettext",(PyCFunction)PyIntl_dcgettext,METH_VARARGS, - dcgettext__doc__}, - {"textdomain",(PyCFunction)PyIntl_textdomain,METH_VARARGS, - textdomain__doc__}, - {"bindtextdomain",(PyCFunction)PyIntl_bindtextdomain,METH_VARARGS, - bindtextdomain__doc__}, + _LOCALE_GETTEXT_METHODDEF + _LOCALE_DGETTEXT_METHODDEF + _LOCALE_DCGETTEXT_METHODDEF + _LOCALE_TEXTDOMAIN_METHODDEF + _LOCALE_BINDTEXTDOMAIN_METHODDEF #ifdef HAVE_BIND_TEXTDOMAIN_CODESET - {"bind_textdomain_codeset",(PyCFunction)PyIntl_bind_textdomain_codeset, - METH_VARARGS, bind_textdomain_codeset__doc__}, + _LOCALE_BIND_TEXTDOMAIN_CODESET_METHODDEF #endif #endif {NULL, NULL} diff --git a/Modules/_multiprocessing/clinic/multiprocessing.c.h b/Modules/_multiprocessing/clinic/multiprocessing.c.h new file mode 100644 index 000000000000000..7096442bd0b52a3 --- /dev/null +++ b/Modules/_multiprocessing/clinic/multiprocessing.c.h @@ -0,0 +1,151 @@ +/*[clinic input] +preserve +[clinic start generated code]*/ + +#if defined(MS_WINDOWS) + +PyDoc_STRVAR(_multiprocessing_closesocket__doc__, +"closesocket($module, handle, /)\n" +"--\n" +"\n"); + +#define _MULTIPROCESSING_CLOSESOCKET_METHODDEF \ + {"closesocket", (PyCFunction)_multiprocessing_closesocket, METH_O, _multiprocessing_closesocket__doc__}, + +static PyObject * +_multiprocessing_closesocket_impl(PyObject *module, HANDLE handle); + +static PyObject * +_multiprocessing_closesocket(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + HANDLE handle; + + if (!PyArg_Parse(arg, ""F_HANDLE":closesocket", &handle)) { + goto exit; + } + return_value = _multiprocessing_closesocket_impl(module, handle); + +exit: + return return_value; +} + +#endif /* defined(MS_WINDOWS) */ + +#if defined(MS_WINDOWS) + +PyDoc_STRVAR(_multiprocessing_recv__doc__, +"recv($module, handle, size, /)\n" +"--\n" +"\n"); + +#define _MULTIPROCESSING_RECV_METHODDEF \ + {"recv", (PyCFunction)(void(*)(void))_multiprocessing_recv, METH_FASTCALL, _multiprocessing_recv__doc__}, + +static PyObject * +_multiprocessing_recv_impl(PyObject *module, HANDLE handle, int size); + +static PyObject * +_multiprocessing_recv(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + int size; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"i:recv", + &handle, &size)) { + goto exit; + } + return_value = _multiprocessing_recv_impl(module, handle, size); + +exit: + return return_value; +} + +#endif /* defined(MS_WINDOWS) */ + +#if defined(MS_WINDOWS) + +PyDoc_STRVAR(_multiprocessing_send__doc__, +"send($module, handle, buf, /)\n" +"--\n" +"\n"); + +#define _MULTIPROCESSING_SEND_METHODDEF \ + {"send", (PyCFunction)(void(*)(void))_multiprocessing_send, METH_FASTCALL, _multiprocessing_send__doc__}, + +static PyObject * +_multiprocessing_send_impl(PyObject *module, HANDLE handle, Py_buffer *buf); + +static PyObject * +_multiprocessing_send(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + Py_buffer buf = {NULL, NULL}; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"y*:send", + &handle, &buf)) { + goto exit; + } + return_value = _multiprocessing_send_impl(module, handle, &buf); + +exit: + /* Cleanup for buf */ + if (buf.obj) { + PyBuffer_Release(&buf); + } + + return return_value; +} + +#endif /* defined(MS_WINDOWS) */ + +PyDoc_STRVAR(_multiprocessing_sem_unlink__doc__, +"sem_unlink($module, name, /)\n" +"--\n" +"\n"); + +#define _MULTIPROCESSING_SEM_UNLINK_METHODDEF \ + {"sem_unlink", (PyCFunction)_multiprocessing_sem_unlink, METH_O, _multiprocessing_sem_unlink__doc__}, + +static PyObject * +_multiprocessing_sem_unlink_impl(PyObject *module, const char *name); + +static PyObject * +_multiprocessing_sem_unlink(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + const char *name; + + if (!PyUnicode_Check(arg)) { + _PyArg_BadArgument("sem_unlink", "argument", "str", arg); + goto exit; + } + Py_ssize_t name_length; + name = PyUnicode_AsUTF8AndSize(arg, &name_length); + if (name == NULL) { + goto exit; + } + if (strlen(name) != (size_t)name_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + return_value = _multiprocessing_sem_unlink_impl(module, name); + +exit: + return return_value; +} + +#ifndef _MULTIPROCESSING_CLOSESOCKET_METHODDEF + #define _MULTIPROCESSING_CLOSESOCKET_METHODDEF +#endif /* !defined(_MULTIPROCESSING_CLOSESOCKET_METHODDEF) */ + +#ifndef _MULTIPROCESSING_RECV_METHODDEF + #define _MULTIPROCESSING_RECV_METHODDEF +#endif /* !defined(_MULTIPROCESSING_RECV_METHODDEF) */ + +#ifndef _MULTIPROCESSING_SEND_METHODDEF + #define _MULTIPROCESSING_SEND_METHODDEF +#endif /* !defined(_MULTIPROCESSING_SEND_METHODDEF) */ +/*[clinic end generated code: output=418191c446cd5751 input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/semaphore.c.h b/Modules/_multiprocessing/clinic/semaphore.c.h new file mode 100644 index 000000000000000..e1b9309e9f280b2 --- /dev/null +++ b/Modules/_multiprocessing/clinic/semaphore.c.h @@ -0,0 +1,402 @@ +/*[clinic input] +preserve +[clinic start generated code]*/ + +#if defined(MS_WINDOWS) + +PyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__, +"acquire($self, /, block=True, timeout=None)\n" +"--\n" +"\n" +"Acquire the semaphore/lock."); + +#define _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF \ + {"acquire", (PyCFunction)(void(*)(void))_multiprocessing_SemLock_acquire, METH_FASTCALL|METH_KEYWORDS, _multiprocessing_SemLock_acquire__doc__}, + +static PyObject * +_multiprocessing_SemLock_acquire_impl(SemLockObject *self, int blocking, + PyObject *timeout_obj); + +static PyObject * +_multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"block", "timeout", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "acquire", 0}; + PyObject *argsbuf[2]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; + int blocking = 1; + PyObject *timeout_obj = Py_None; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + if (!args) { + goto exit; + } + if (!noptargs) { + goto skip_optional_pos; + } + if (args[0]) { + blocking = _PyLong_AsInt(args[0]); + if (blocking == -1 && PyErr_Occurred()) { + goto exit; + } + if (!--noptargs) { + goto skip_optional_pos; + } + } + timeout_obj = args[1]; +skip_optional_pos: + return_value = _multiprocessing_SemLock_acquire_impl(self, blocking, timeout_obj); + +exit: + return return_value; +} + +#endif /* defined(MS_WINDOWS) */ + +#if defined(MS_WINDOWS) + +PyDoc_STRVAR(_multiprocessing_SemLock_release__doc__, +"release($self, /)\n" +"--\n" +"\n" +"Release the semaphore/lock."); + +#define _MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF \ + {"release", (PyCFunction)_multiprocessing_SemLock_release, METH_NOARGS, _multiprocessing_SemLock_release__doc__}, + +static PyObject * +_multiprocessing_SemLock_release_impl(SemLockObject *self); + +static PyObject * +_multiprocessing_SemLock_release(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +{ + return _multiprocessing_SemLock_release_impl(self); +} + +#endif /* defined(MS_WINDOWS) */ + +#if !defined(MS_WINDOWS) + +PyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__, +"acquire($self, /, block=True, timeout=None)\n" +"--\n" +"\n" +"Acquire the semaphore/lock."); + +#define _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF \ + {"acquire", (PyCFunction)(void(*)(void))_multiprocessing_SemLock_acquire, METH_FASTCALL|METH_KEYWORDS, _multiprocessing_SemLock_acquire__doc__}, + +static PyObject * +_multiprocessing_SemLock_acquire_impl(SemLockObject *self, int blocking, + PyObject *timeout_obj); + +static PyObject * +_multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"block", "timeout", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "acquire", 0}; + PyObject *argsbuf[2]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; + int blocking = 1; + PyObject *timeout_obj = Py_None; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + if (!args) { + goto exit; + } + if (!noptargs) { + goto skip_optional_pos; + } + if (args[0]) { + blocking = _PyLong_AsInt(args[0]); + if (blocking == -1 && PyErr_Occurred()) { + goto exit; + } + if (!--noptargs) { + goto skip_optional_pos; + } + } + timeout_obj = args[1]; +skip_optional_pos: + return_value = _multiprocessing_SemLock_acquire_impl(self, blocking, timeout_obj); + +exit: + return return_value; +} + +#endif /* !defined(MS_WINDOWS) */ + +#if !defined(MS_WINDOWS) + +PyDoc_STRVAR(_multiprocessing_SemLock_release__doc__, +"release($self, /)\n" +"--\n" +"\n" +"Release the semaphore/lock."); + +#define _MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF \ + {"release", (PyCFunction)_multiprocessing_SemLock_release, METH_NOARGS, _multiprocessing_SemLock_release__doc__}, + +static PyObject * +_multiprocessing_SemLock_release_impl(SemLockObject *self); + +static PyObject * +_multiprocessing_SemLock_release(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +{ + return _multiprocessing_SemLock_release_impl(self); +} + +#endif /* !defined(MS_WINDOWS) */ + +static PyObject * +_multiprocessing_SemLock_impl(PyTypeObject *type, int kind, int value, + int maxvalue, const char *name, int unlink); + +static PyObject * +_multiprocessing_SemLock(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"kind", "value", "maxvalue", "name", "unlink", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "SemLock", 0}; + PyObject *argsbuf[5]; + PyObject * const *fastargs; + Py_ssize_t nargs = PyTuple_GET_SIZE(args); + int kind; + int value; + int maxvalue; + const char *name; + int unlink; + + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 5, 5, 0, argsbuf); + if (!fastargs) { + goto exit; + } + kind = _PyLong_AsInt(fastargs[0]); + if (kind == -1 && PyErr_Occurred()) { + goto exit; + } + value = _PyLong_AsInt(fastargs[1]); + if (value == -1 && PyErr_Occurred()) { + goto exit; + } + maxvalue = _PyLong_AsInt(fastargs[2]); + if (maxvalue == -1 && PyErr_Occurred()) { + goto exit; + } + if (!PyUnicode_Check(fastargs[3])) { + _PyArg_BadArgument("SemLock", "argument 'name'", "str", fastargs[3]); + goto exit; + } + Py_ssize_t name_length; + name = PyUnicode_AsUTF8AndSize(fastargs[3], &name_length); + if (name == NULL) { + goto exit; + } + if (strlen(name) != (size_t)name_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + unlink = _PyLong_AsInt(fastargs[4]); + if (unlink == -1 && PyErr_Occurred()) { + goto exit; + } + return_value = _multiprocessing_SemLock_impl(type, kind, value, maxvalue, name, unlink); + +exit: + return return_value; +} + +PyDoc_STRVAR(_multiprocessing_SemLock__rebuild__doc__, +"_rebuild($type, handle, kind, maxvalue, name, /)\n" +"--\n" +"\n"); + +#define _MULTIPROCESSING_SEMLOCK__REBUILD_METHODDEF \ + {"_rebuild", (PyCFunction)(void(*)(void))_multiprocessing_SemLock__rebuild, METH_FASTCALL|METH_CLASS, _multiprocessing_SemLock__rebuild__doc__}, + +static PyObject * +_multiprocessing_SemLock__rebuild_impl(PyTypeObject *type, SEM_HANDLE handle, + int kind, int maxvalue, + const char *name); + +static PyObject * +_multiprocessing_SemLock__rebuild(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + SEM_HANDLE handle; + int kind; + int maxvalue; + const char *name; + + if (!_PyArg_ParseStack(args, nargs, ""F_SEM_HANDLE"iiz:_rebuild", + &handle, &kind, &maxvalue, &name)) { + goto exit; + } + return_value = _multiprocessing_SemLock__rebuild_impl(type, handle, kind, maxvalue, name); + +exit: + return return_value; +} + +PyDoc_STRVAR(_multiprocessing_SemLock__count__doc__, +"_count($self, /)\n" +"--\n" +"\n" +"Num of `acquire()`s minus num of `release()`s for this process."); + +#define _MULTIPROCESSING_SEMLOCK__COUNT_METHODDEF \ + {"_count", (PyCFunction)_multiprocessing_SemLock__count, METH_NOARGS, _multiprocessing_SemLock__count__doc__}, + +static PyObject * +_multiprocessing_SemLock__count_impl(SemLockObject *self); + +static PyObject * +_multiprocessing_SemLock__count(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +{ + return _multiprocessing_SemLock__count_impl(self); +} + +PyDoc_STRVAR(_multiprocessing_SemLock__is_mine__doc__, +"_is_mine($self, /)\n" +"--\n" +"\n" +"Whether the lock is owned by this thread."); + +#define _MULTIPROCESSING_SEMLOCK__IS_MINE_METHODDEF \ + {"_is_mine", (PyCFunction)_multiprocessing_SemLock__is_mine, METH_NOARGS, _multiprocessing_SemLock__is_mine__doc__}, + +static PyObject * +_multiprocessing_SemLock__is_mine_impl(SemLockObject *self); + +static PyObject * +_multiprocessing_SemLock__is_mine(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +{ + return _multiprocessing_SemLock__is_mine_impl(self); +} + +PyDoc_STRVAR(_multiprocessing_SemLock__get_value__doc__, +"_get_value($self, /)\n" +"--\n" +"\n" +"Get the value of the semaphore."); + +#define _MULTIPROCESSING_SEMLOCK__GET_VALUE_METHODDEF \ + {"_get_value", (PyCFunction)_multiprocessing_SemLock__get_value, METH_NOARGS, _multiprocessing_SemLock__get_value__doc__}, + +static PyObject * +_multiprocessing_SemLock__get_value_impl(SemLockObject *self); + +static PyObject * +_multiprocessing_SemLock__get_value(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +{ + return _multiprocessing_SemLock__get_value_impl(self); +} + +PyDoc_STRVAR(_multiprocessing_SemLock__is_zero__doc__, +"_is_zero($self, /)\n" +"--\n" +"\n" +"Return whether semaphore has value zero."); + +#define _MULTIPROCESSING_SEMLOCK__IS_ZERO_METHODDEF \ + {"_is_zero", (PyCFunction)_multiprocessing_SemLock__is_zero, METH_NOARGS, _multiprocessing_SemLock__is_zero__doc__}, + +static PyObject * +_multiprocessing_SemLock__is_zero_impl(SemLockObject *self); + +static PyObject * +_multiprocessing_SemLock__is_zero(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +{ + return _multiprocessing_SemLock__is_zero_impl(self); +} + +PyDoc_STRVAR(_multiprocessing_SemLock__after_fork__doc__, +"_after_fork($self, /)\n" +"--\n" +"\n" +"Rezero the net acquisition count after fork()."); + +#define _MULTIPROCESSING_SEMLOCK__AFTER_FORK_METHODDEF \ + {"_after_fork", (PyCFunction)_multiprocessing_SemLock__after_fork, METH_NOARGS, _multiprocessing_SemLock__after_fork__doc__}, + +static PyObject * +_multiprocessing_SemLock__after_fork_impl(SemLockObject *self); + +static PyObject * +_multiprocessing_SemLock__after_fork(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +{ + return _multiprocessing_SemLock__after_fork_impl(self); +} + +PyDoc_STRVAR(_multiprocessing_SemLock___enter____doc__, +"__enter__($self, /)\n" +"--\n" +"\n" +"Enter the semaphore/lock."); + +#define _MULTIPROCESSING_SEMLOCK___ENTER___METHODDEF \ + {"__enter__", (PyCFunction)_multiprocessing_SemLock___enter__, METH_NOARGS, _multiprocessing_SemLock___enter____doc__}, + +static PyObject * +_multiprocessing_SemLock___enter___impl(SemLockObject *self); + +static PyObject * +_multiprocessing_SemLock___enter__(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +{ + return _multiprocessing_SemLock___enter___impl(self); +} + +PyDoc_STRVAR(_multiprocessing_SemLock___exit____doc__, +"__exit__($self, exc_type=None, exc_value=None, exc_tb=None, /)\n" +"--\n" +"\n" +"Exit the semaphore/lock."); + +#define _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF \ + {"__exit__", (PyCFunction)(void(*)(void))_multiprocessing_SemLock___exit__, METH_FASTCALL, _multiprocessing_SemLock___exit____doc__}, + +static PyObject * +_multiprocessing_SemLock___exit___impl(SemLockObject *self, + PyObject *exc_type, + PyObject *exc_value, PyObject *exc_tb); + +static PyObject * +_multiprocessing_SemLock___exit__(SemLockObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *exc_type = Py_None; + PyObject *exc_value = Py_None; + PyObject *exc_tb = Py_None; + + if (!_PyArg_CheckPositional("__exit__", nargs, 0, 3)) { + goto exit; + } + if (nargs < 1) { + goto skip_optional; + } + exc_type = args[0]; + if (nargs < 2) { + goto skip_optional; + } + exc_value = args[1]; + if (nargs < 3) { + goto skip_optional; + } + exc_tb = args[2]; +skip_optional: + return_value = _multiprocessing_SemLock___exit___impl(self, exc_type, exc_value, exc_tb); + +exit: + return return_value; +} + +#ifndef _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF + #define _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF +#endif /* !defined(_MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF) */ + +#ifndef _MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF + #define _MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF +#endif /* !defined(_MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF) */ +/*[clinic end generated code: output=e7fd938150601fe5 input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/multiprocessing.c b/Modules/_multiprocessing/multiprocessing.c index 806e638340f7af0..25b8dc3967a4fb6 100644 --- a/Modules/_multiprocessing/multiprocessing.c +++ b/Modules/_multiprocessing/multiprocessing.c @@ -9,6 +9,20 @@ #include "multiprocessing.h" +/*[python input] +class HANDLE_converter(CConverter): + type = "HANDLE" + format_unit = '"F_HANDLE"' + +[python start generated code]*/ +/*[python end generated code: output=da39a3ee5e6b4b0d input=9fad6080b79ace91]*/ + +/*[clinic input] +module _multiprocessing +[clinic start generated code]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=01e0745f380ac6e3]*/ + +#include "clinic/multiprocessing.c.h" /* * Function which raises exceptions based on error codes @@ -50,15 +64,20 @@ _PyMp_SetError(PyObject *Type, int num) } #ifdef MS_WINDOWS +/*[clinic input] +_multiprocessing.closesocket + + handle: HANDLE + / + +[clinic start generated code]*/ + static PyObject * -multiprocessing_closesocket(PyObject *self, PyObject *args) +_multiprocessing_closesocket_impl(PyObject *module, HANDLE handle) +/*[clinic end generated code: output=214f359f900966f4 input=8a20706dd386c6cc]*/ { - HANDLE handle; int ret; - if (!PyArg_ParseTuple(args, F_HANDLE ":closesocket" , &handle)) - return NULL; - Py_BEGIN_ALLOW_THREADS ret = closesocket((SOCKET) handle); Py_END_ALLOW_THREADS @@ -68,16 +87,22 @@ multiprocessing_closesocket(PyObject *self, PyObject *args) Py_RETURN_NONE; } +/*[clinic input] +_multiprocessing.recv + + handle: HANDLE + size: int + / + +[clinic start generated code]*/ + static PyObject * -multiprocessing_recv(PyObject *self, PyObject *args) +_multiprocessing_recv_impl(PyObject *module, HANDLE handle, int size) +/*[clinic end generated code: output=92322781ba9ff598 input=6a5b0834372cee5b]*/ { - HANDLE handle; - int size, nread; + int nread; PyObject *buf; - if (!PyArg_ParseTuple(args, F_HANDLE "i:recv" , &handle, &size)) - return NULL; - buf = PyBytes_FromStringAndSize(NULL, size); if (!buf) return NULL; @@ -94,23 +119,27 @@ multiprocessing_recv(PyObject *self, PyObject *args) return buf; } +/*[clinic input] +_multiprocessing.send + + handle: HANDLE + buf: Py_buffer + / + +[clinic start generated code]*/ + static PyObject * -multiprocessing_send(PyObject *self, PyObject *args) +_multiprocessing_send_impl(PyObject *module, HANDLE handle, Py_buffer *buf) +/*[clinic end generated code: output=52d7df0519c596cb input=41dce742f98d2210]*/ { - HANDLE handle; - Py_buffer buf; int ret, length; - if (!PyArg_ParseTuple(args, F_HANDLE "y*:send" , &handle, &buf)) - return NULL; - - length = (int)Py_MIN(buf.len, INT_MAX); + length = (int)Py_MIN(buf->len, INT_MAX); Py_BEGIN_ALLOW_THREADS - ret = send((SOCKET) handle, buf.buf, length, 0); + ret = send((SOCKET) handle, buf->buf, length, 0); Py_END_ALLOW_THREADS - PyBuffer_Release(&buf); if (ret < 0) return PyErr_SetExcFromWindowsErr(PyExc_OSError, WSAGetLastError()); return PyLong_FromLong(ret); @@ -118,18 +147,33 @@ multiprocessing_send(PyObject *self, PyObject *args) #endif +/*[clinic input] +_multiprocessing.sem_unlink + + name: str + / + +[clinic start generated code]*/ + +static PyObject * +_multiprocessing_sem_unlink_impl(PyObject *module, const char *name) +/*[clinic end generated code: output=fcbfeb1ed255e647 input=bf939aff9564f1d5]*/ +{ + return _PyMp_sem_unlink(name); +} + /* * Function table */ static PyMethodDef module_methods[] = { #ifdef MS_WINDOWS - {"closesocket", multiprocessing_closesocket, METH_VARARGS, ""}, - {"recv", multiprocessing_recv, METH_VARARGS, ""}, - {"send", multiprocessing_send, METH_VARARGS, ""}, + _MULTIPROCESSING_CLOSESOCKET_METHODDEF + _MULTIPROCESSING_RECV_METHODDEF + _MULTIPROCESSING_SEND_METHODDEF #endif #if !defined(POSIX_SEMAPHORES_NOT_ENABLED) && !defined(__ANDROID__) - {"sem_unlink", _PyMp_sem_unlink, METH_VARARGS, ""}, + _MULTIPROCESSING_SEM_UNLINK_METHODDEF #endif {NULL} }; @@ -139,35 +183,17 @@ static PyMethodDef module_methods[] = { * Initialize */ -static struct PyModuleDef multiprocessing_module = { - PyModuleDef_HEAD_INIT, - "_multiprocessing", - NULL, - -1, - module_methods, - NULL, - NULL, - NULL, - NULL -}; - - -PyMODINIT_FUNC -PyInit__multiprocessing(void) +static int +multiprocessing_exec(PyObject *module) { - PyObject *module, *temp, *value = NULL; - - /* Initialize module */ - module = PyModule_Create(&multiprocessing_module); - if (!module) - return NULL; - #if defined(MS_WINDOWS) || \ (defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED)) + /* Add _PyMp_SemLock type to module */ - if (PyType_Ready(&_PyMp_SemLockType) < 0) - return NULL; - Py_INCREF(&_PyMp_SemLockType); + if (PyModule_AddType(module, &_PyMp_SemLockType) < 0) { + return -1; + } + { PyObject *py_sem_value_max; /* Some systems define SEM_VALUE_MAX as an unsigned value that @@ -179,25 +205,41 @@ PyInit__multiprocessing(void) py_sem_value_max = PyLong_FromLong(INT_MAX); else py_sem_value_max = PyLong_FromLong(SEM_VALUE_MAX); - if (py_sem_value_max == NULL) - return NULL; - PyDict_SetItemString(_PyMp_SemLockType.tp_dict, "SEM_VALUE_MAX", - py_sem_value_max); + + if (py_sem_value_max == NULL) { + Py_DECREF(py_sem_value_max); + return -1; + } + if (PyDict_SetItemString(_PyMp_SemLockType.tp_dict, "SEM_VALUE_MAX", + py_sem_value_max) < 0) { + Py_DECREF(py_sem_value_max); + return -1; + } + Py_DECREF(py_sem_value_max); } - PyModule_AddObject(module, "SemLock", (PyObject*)&_PyMp_SemLockType); + #endif /* Add configuration macros */ - temp = PyDict_New(); - if (!temp) - return NULL; + PyObject *flags = PyDict_New(); + if (!flags) { + return -1; + } -#define ADD_FLAG(name) \ - value = Py_BuildValue("i", name); \ - if (value == NULL) { Py_DECREF(temp); return NULL; } \ - if (PyDict_SetItemString(temp, #name, value) < 0) { \ - Py_DECREF(temp); Py_DECREF(value); return NULL; } \ - Py_DECREF(value) +#define ADD_FLAG(name) \ + do { \ + PyObject *value = PyLong_FromLong(name); \ + if (value == NULL) { \ + Py_DECREF(flags); \ + return -1; \ + } \ + if (PyDict_SetItemString(flags, #name, value) < 0) { \ + Py_DECREF(flags); \ + Py_DECREF(value); \ + return -1; \ + } \ + Py_DECREF(value); \ + } while (0) #if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED) ADD_FLAG(HAVE_SEM_OPEN); @@ -212,8 +254,28 @@ PyInit__multiprocessing(void) ADD_FLAG(HAVE_BROKEN_SEM_UNLINK); #endif - if (PyModule_AddObject(module, "flags", temp) < 0) - return NULL; + if (PyModule_AddObject(module, "flags", flags) < 0) { + Py_DECREF(flags); + return -1; + } + + return 0; +} + +static PyModuleDef_Slot multiprocessing_slots[] = { + {Py_mod_exec, multiprocessing_exec}, + {0, NULL} +}; - return module; +static struct PyModuleDef multiprocessing_module = { + PyModuleDef_HEAD_INIT, + .m_name = "_multiprocessing", + .m_methods = module_methods, + .m_slots = multiprocessing_slots, +}; + +PyMODINIT_FUNC +PyInit__multiprocessing(void) +{ + return PyModuleDef_Init(&multiprocessing_module); } diff --git a/Modules/_multiprocessing/multiprocessing.h b/Modules/_multiprocessing/multiprocessing.h index fe78135d4669ece..277963bc1575bb4 100644 --- a/Modules/_multiprocessing/multiprocessing.h +++ b/Modules/_multiprocessing/multiprocessing.h @@ -88,6 +88,6 @@ PyObject *_PyMp_SetError(PyObject *Type, int num); */ extern PyTypeObject _PyMp_SemLockType; -extern PyObject *_PyMp_sem_unlink(PyObject *ignore, PyObject *args); +extern PyObject *_PyMp_sem_unlink(const char *name); #endif /* MULTIPROCESSING_H */ diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c index ee490256d2a27e1..8732750e11be8c3 100644 --- a/Modules/_multiprocessing/semaphore.c +++ b/Modules/_multiprocessing/semaphore.c @@ -21,6 +21,22 @@ typedef struct { char *name; } SemLockObject; +/*[python input] +class SEM_HANDLE_converter(CConverter): + type = "SEM_HANDLE" + format_unit = '"F_SEM_HANDLE"' + +[python start generated code]*/ +/*[python end generated code: output=da39a3ee5e6b4b0d input=3e0ad43e482d8716]*/ + +/*[clinic input] +module _multiprocessing +class _multiprocessing.SemLock "SemLockObject *" "&_PyMp_SemLockType" +[clinic start generated code]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=935fb41b7d032599]*/ + +#include "clinic/semaphore.c.h" + #define ISMINE(o) (o->count > 0 && PyThread_get_thread_ident() == o->last_tid) @@ -58,21 +74,24 @@ _GetSemaphoreValue(HANDLE handle, long *value) } } +/*[clinic input] +_multiprocessing.SemLock.acquire + + block as blocking: bool(accept={int}) = True + timeout as timeout_obj: object = None + +Acquire the semaphore/lock. +[clinic start generated code]*/ + static PyObject * -semlock_acquire(SemLockObject *self, PyObject *args, PyObject *kwds) +_multiprocessing_SemLock_acquire_impl(SemLockObject *self, int blocking, + PyObject *timeout_obj) +/*[clinic end generated code: output=f9998f0b6b0b0872 input=86f05662cf753eb4]*/ { - int blocking = 1; double timeout; - PyObject *timeout_obj = Py_None; DWORD res, full_msecs, nhandles; HANDLE handles[2], sigint_event; - static char *kwlist[] = {"block", "timeout", NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iO", kwlist, - &blocking, &timeout_obj)) - return NULL; - /* calculate timeout */ if (!blocking) { full_msecs = 0; @@ -146,8 +165,15 @@ semlock_acquire(SemLockObject *self, PyObject *args, PyObject *kwds) } } +/*[clinic input] +_multiprocessing.SemLock.release + +Release the semaphore/lock. +[clinic start generated code]*/ + static PyObject * -semlock_release(SemLockObject *self, PyObject *args) +_multiprocessing_SemLock_release_impl(SemLockObject *self) +/*[clinic end generated code: output=b22f53ba96b0d1db input=ba7e63a961885d3d]*/ { if (self->kind == RECURSIVE_MUTEX) { if (!ISMINE(self)) { @@ -264,19 +290,23 @@ sem_timedwait_save(sem_t *sem, struct timespec *deadline, PyThreadState *_save) #endif /* !HAVE_SEM_TIMEDWAIT */ +/*[clinic input] +_multiprocessing.SemLock.acquire + + block as blocking: bool(accept={int}) = True + timeout as timeout_obj: object = None + +Acquire the semaphore/lock. +[clinic start generated code]*/ + static PyObject * -semlock_acquire(SemLockObject *self, PyObject *args, PyObject *kwds) +_multiprocessing_SemLock_acquire_impl(SemLockObject *self, int blocking, + PyObject *timeout_obj) +/*[clinic end generated code: output=f9998f0b6b0b0872 input=86f05662cf753eb4]*/ { - int blocking = 1, res, err = 0; - PyObject *timeout_obj = Py_None; + int res, err = 0; struct timespec deadline = {0}; - static char *kwlist[] = {"block", "timeout", NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iO", kwlist, - &blocking, &timeout_obj)) - return NULL; - if (self->kind == RECURSIVE_MUTEX && ISMINE(self)) { ++self->count; Py_RETURN_TRUE; @@ -345,8 +375,15 @@ semlock_acquire(SemLockObject *self, PyObject *args, PyObject *kwds) Py_RETURN_TRUE; } +/*[clinic input] +_multiprocessing.SemLock.release + +Release the semaphore/lock. +[clinic start generated code]*/ + static PyObject * -semlock_release(SemLockObject *self, PyObject *args) +_multiprocessing_SemLock_release_impl(SemLockObject *self) +/*[clinic end generated code: output=b22f53ba96b0d1db input=ba7e63a961885d3d]*/ { if (self->kind == RECURSIVE_MUTEX) { if (!ISMINE(self)) { @@ -429,19 +466,26 @@ newsemlockobject(PyTypeObject *type, SEM_HANDLE handle, int kind, int maxvalue, return (PyObject*)self; } +/*[clinic input] +@classmethod +_multiprocessing.SemLock.__new__ + + kind: int + value: int + maxvalue: int + name: str + unlink: bool(accept={int}) + +[clinic start generated code]*/ + static PyObject * -semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +_multiprocessing_SemLock_impl(PyTypeObject *type, int kind, int value, + int maxvalue, const char *name, int unlink) +/*[clinic end generated code: output=30727e38f5f7577a input=b378c3ee27d3a0fa]*/ { SEM_HANDLE handle = SEM_FAILED; - int kind, maxvalue, value, unlink; PyObject *result; - char *name, *name_copy = NULL; - static char *kwlist[] = {"kind", "value", "maxvalue", "name", "unlink", - NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "iiisi", kwlist, - &kind, &value, &maxvalue, &name, &unlink)) - return NULL; + char *name_copy = NULL; if (kind != RECURSIVE_MUTEX && kind != SEMAPHORE) { PyErr_SetString(PyExc_ValueError, "unrecognized kind"); @@ -481,16 +525,25 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return NULL; } +/*[clinic input] +@classmethod +_multiprocessing.SemLock._rebuild + + handle: SEM_HANDLE + kind: int + maxvalue: int + name: str(accept={str, NoneType}) + / + +[clinic start generated code]*/ + static PyObject * -semlock_rebuild(PyTypeObject *type, PyObject *args) +_multiprocessing_SemLock__rebuild_impl(PyTypeObject *type, SEM_HANDLE handle, + int kind, int maxvalue, + const char *name) +/*[clinic end generated code: output=2aaee14f063f3bd9 input=f7040492ac6d9962]*/ { - SEM_HANDLE handle; - int kind, maxvalue; - char *name, *name_copy = NULL; - - if (!PyArg_ParseTuple(args, F_SEM_HANDLE "iiz", - &handle, &kind, &maxvalue, &name)) - return NULL; + char *name_copy = NULL; if (name != NULL) { name_copy = PyMem_Malloc(strlen(name) + 1); @@ -521,21 +574,42 @@ semlock_dealloc(SemLockObject* self) PyObject_Del(self); } +/*[clinic input] +_multiprocessing.SemLock._count + +Num of `acquire()`s minus num of `release()`s for this process. +[clinic start generated code]*/ + static PyObject * -semlock_count(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +_multiprocessing_SemLock__count_impl(SemLockObject *self) +/*[clinic end generated code: output=5ba8213900e517bb input=36fc59b1cd1025ab]*/ { return PyLong_FromLong((long)self->count); } +/*[clinic input] +_multiprocessing.SemLock._is_mine + +Whether the lock is owned by this thread. +[clinic start generated code]*/ + static PyObject * -semlock_ismine(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +_multiprocessing_SemLock__is_mine_impl(SemLockObject *self) +/*[clinic end generated code: output=92dc98863f4303be input=a96664cb2f0093ba]*/ { /* only makes sense for a lock */ return PyBool_FromLong(ISMINE(self)); } +/*[clinic input] +_multiprocessing.SemLock._get_value + +Get the value of the semaphore. +[clinic start generated code]*/ + static PyObject * -semlock_getvalue(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +_multiprocessing_SemLock__get_value_impl(SemLockObject *self) +/*[clinic end generated code: output=64bc1b89bda05e36 input=cb10f9a769836203]*/ { #ifdef HAVE_BROKEN_SEM_GETVALUE PyErr_SetNone(PyExc_NotImplementedError); @@ -552,8 +626,15 @@ semlock_getvalue(SemLockObject *self, PyObject *Py_UNUSED(ignored)) #endif } +/*[clinic input] +_multiprocessing.SemLock._is_zero + +Return whether semaphore has value zero. +[clinic start generated code]*/ + static PyObject * -semlock_iszero(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +_multiprocessing_SemLock__is_zero_impl(SemLockObject *self) +/*[clinic end generated code: output=815d4c878c806ed7 input=294a446418d31347]*/ { #ifdef HAVE_BROKEN_SEM_GETVALUE if (sem_trywait(self->handle) < 0) { @@ -573,38 +654,68 @@ semlock_iszero(SemLockObject *self, PyObject *Py_UNUSED(ignored)) #endif } +/*[clinic input] +_multiprocessing.SemLock._after_fork + +Rezero the net acquisition count after fork(). +[clinic start generated code]*/ + static PyObject * -semlock_afterfork(SemLockObject *self, PyObject *Py_UNUSED(ignored)) +_multiprocessing_SemLock__after_fork_impl(SemLockObject *self) +/*[clinic end generated code: output=718bb27914c6a6c1 input=190991008a76621e]*/ { self->count = 0; Py_RETURN_NONE; } +/*[clinic input] +_multiprocessing.SemLock.__enter__ + +Enter the semaphore/lock. +[clinic start generated code]*/ + +static PyObject * +_multiprocessing_SemLock___enter___impl(SemLockObject *self) +/*[clinic end generated code: output=beeb2f07c858511f input=c5e27d594284690b]*/ +{ + return _multiprocessing_SemLock_acquire_impl(self, 1, Py_None); +} + +/*[clinic input] +_multiprocessing.SemLock.__exit__ + + exc_type: object = None + exc_value: object = None + exc_tb: object = None + / + +Exit the semaphore/lock. +[clinic start generated code]*/ + +static PyObject * +_multiprocessing_SemLock___exit___impl(SemLockObject *self, + PyObject *exc_type, + PyObject *exc_value, PyObject *exc_tb) +/*[clinic end generated code: output=3b37c1a9f8b91a03 input=7d644b64a89903f8]*/ +{ + return _multiprocessing_SemLock_release_impl(self); +} + /* * Semaphore methods */ static PyMethodDef semlock_methods[] = { - {"acquire", (PyCFunction)(void(*)(void))semlock_acquire, METH_VARARGS | METH_KEYWORDS, - "acquire the semaphore/lock"}, - {"release", (PyCFunction)semlock_release, METH_NOARGS, - "release the semaphore/lock"}, - {"__enter__", (PyCFunction)(void(*)(void))semlock_acquire, METH_VARARGS | METH_KEYWORDS, - "enter the semaphore/lock"}, - {"__exit__", (PyCFunction)semlock_release, METH_VARARGS, - "exit the semaphore/lock"}, - {"_count", (PyCFunction)semlock_count, METH_NOARGS, - "num of `acquire()`s minus num of `release()`s for this process"}, - {"_is_mine", (PyCFunction)semlock_ismine, METH_NOARGS, - "whether the lock is owned by this thread"}, - {"_get_value", (PyCFunction)semlock_getvalue, METH_NOARGS, - "get the value of the semaphore"}, - {"_is_zero", (PyCFunction)semlock_iszero, METH_NOARGS, - "returns whether semaphore has value zero"}, - {"_rebuild", (PyCFunction)semlock_rebuild, METH_VARARGS | METH_CLASS, - ""}, - {"_after_fork", (PyCFunction)semlock_afterfork, METH_NOARGS, - "rezero the net acquisition count after fork()"}, + _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF + _MULTIPROCESSING_SEMLOCK_RELEASE_METHODDEF + _MULTIPROCESSING_SEMLOCK___ENTER___METHODDEF + _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF + _MULTIPROCESSING_SEMLOCK__COUNT_METHODDEF + _MULTIPROCESSING_SEMLOCK__IS_MINE_METHODDEF + _MULTIPROCESSING_SEMLOCK__GET_VALUE_METHODDEF + _MULTIPROCESSING_SEMLOCK__IS_ZERO_METHODDEF + _MULTIPROCESSING_SEMLOCK__REBUILD_METHODDEF + _MULTIPROCESSING_SEMLOCK__AFTER_FORK_METHODDEF {NULL} }; @@ -666,7 +777,7 @@ PyTypeObject _PyMp_SemLockType = { /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, - /* tp_new */ semlock_new, + /* tp_new */ _multiprocessing_SemLock, }; /* @@ -674,13 +785,8 @@ PyTypeObject _PyMp_SemLockType = { */ PyObject * -_PyMp_sem_unlink(PyObject *ignore, PyObject *args) +_PyMp_sem_unlink(const char *name) { - char *name; - - if (!PyArg_ParseTuple(args, "s", &name)) - return NULL; - if (SEM_UNLINK(name) < 0) { _PyMp_SetError(NULL, MP_STANDARD_ERROR); return NULL; diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 25e888db19c2358..bddd8f46f0e40f4 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -5912,108 +5912,78 @@ load_inst(UnpicklerObject *self) return 0; } -static int -load_newobj(UnpicklerObject *self) +static void +newobj_unpickling_error(const char * msg, int use_kwargs, PyObject *arg) { - PyObject *args = NULL; - PyObject *clsraw = NULL; - PyTypeObject *cls; /* clsraw cast to its true type */ - PyObject *obj; PickleState *st = _Pickle_GetGlobalState(); - - /* Stack is ... cls argtuple, and we want to call - * cls.__new__(cls, *argtuple). - */ - PDATA_POP(self->stack, args); - if (args == NULL) - goto error; - if (!PyTuple_Check(args)) { - PyErr_SetString(st->UnpicklingError, - "NEWOBJ expected an arg " "tuple."); - goto error; - } - - PDATA_POP(self->stack, clsraw); - cls = (PyTypeObject *)clsraw; - if (cls == NULL) - goto error; - if (!PyType_Check(cls)) { - PyErr_SetString(st->UnpicklingError, "NEWOBJ class argument " - "isn't a type object"); - goto error; - } - if (cls->tp_new == NULL) { - PyErr_SetString(st->UnpicklingError, "NEWOBJ class argument " - "has NULL tp_new"); - goto error; - } - - /* Call __new__. */ - obj = cls->tp_new(cls, args, NULL); - if (obj == NULL) - goto error; - - Py_DECREF(args); - Py_DECREF(clsraw); - PDATA_PUSH(self->stack, obj, -1); - return 0; - - error: - Py_XDECREF(args); - Py_XDECREF(clsraw); - return -1; + PyErr_Format(st->UnpicklingError, msg, + use_kwargs ? "NEWOBJ_EX" : "NEWOBJ", + Py_TYPE(arg)->tp_name); } static int -load_newobj_ex(UnpicklerObject *self) +load_newobj(UnpicklerObject *self, int use_kwargs) { - PyObject *cls, *args, *kwargs; + PyObject *cls, *args, *kwargs = NULL; PyObject *obj; - PickleState *st = _Pickle_GetGlobalState(); - PDATA_POP(self->stack, kwargs); - if (kwargs == NULL) { - return -1; + /* Stack is ... cls args [kwargs], and we want to call + * cls.__new__(cls, *args, **kwargs). + */ + if (use_kwargs) { + PDATA_POP(self->stack, kwargs); + if (kwargs == NULL) { + return -1; + } } PDATA_POP(self->stack, args); if (args == NULL) { - Py_DECREF(kwargs); + Py_XDECREF(kwargs); return -1; } PDATA_POP(self->stack, cls); if (cls == NULL) { - Py_DECREF(kwargs); + Py_XDECREF(kwargs); Py_DECREF(args); return -1; } if (!PyType_Check(cls)) { - Py_DECREF(kwargs); - Py_DECREF(args); - PyErr_Format(st->UnpicklingError, - "NEWOBJ_EX class argument must be a type, not %.200s", - Py_TYPE(cls)->tp_name); - Py_DECREF(cls); - return -1; + newobj_unpickling_error("%s class argument must be a type, not %.200s", + use_kwargs, cls); + goto error; } - if (((PyTypeObject *)cls)->tp_new == NULL) { - Py_DECREF(kwargs); - Py_DECREF(args); - Py_DECREF(cls); - PyErr_SetString(st->UnpicklingError, - "NEWOBJ_EX class argument doesn't have __new__"); - return -1; + newobj_unpickling_error("%s class argument '%.200s' doesn't have __new__", + use_kwargs, cls); + goto error; + } + if (!PyTuple_Check(args)) { + newobj_unpickling_error("%s args argument must be a tuple, not %.200s", + use_kwargs, args); + goto error; + } + if (use_kwargs && !PyDict_Check(kwargs)) { + newobj_unpickling_error("%s kwargs argument must be a dict, not %.200s", + use_kwargs, kwargs); + goto error; } + obj = ((PyTypeObject *)cls)->tp_new((PyTypeObject *)cls, args, kwargs); - Py_DECREF(kwargs); - Py_DECREF(args); - Py_DECREF(cls); if (obj == NULL) { - return -1; + goto error; } + Py_XDECREF(kwargs); + Py_DECREF(args); + Py_DECREF(cls); PDATA_PUSH(self->stack, obj, -1); return 0; + +error: + Py_XDECREF(kwargs); + Py_DECREF(args); + Py_DECREF(cls); + return -1; } static int @@ -6943,8 +6913,8 @@ load(UnpicklerObject *self) OP(FROZENSET, load_frozenset) OP(OBJ, load_obj) OP(INST, load_inst) - OP(NEWOBJ, load_newobj) - OP(NEWOBJ_EX, load_newobj_ex) + OP_ARG(NEWOBJ, load_newobj, 0) + OP_ARG(NEWOBJ_EX, load_newobj, 1) OP(GLOBAL, load_global) OP(STACK_GLOBAL, load_stack_global) OP(APPEND, load_append) diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 5e82fe41a76ec29..cb8f04a900a06e8 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -805,10 +805,11 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) errno = err.c; return PyErr_SetFromErrno(PyExc_OSError); } - Py_INCREF(s); - s->errorhandler(); - Py_DECREF(s); - return NULL; + else { + p = PY_SSL_ERROR_EOF; + type = PySSLEOFErrorObject; + errstr = "EOF occurred in violation of protocol"; + } } else { /* possible? */ p = PY_SSL_ERROR_SYSCALL; type = PySSLSyscallErrorObject; @@ -3746,6 +3747,15 @@ PyDoc_STRVAR(PySSLContext_num_tickets_doc, "Control the number of TLSv1.3 session tickets"); #endif /* OpenSSL 1.1.1 */ +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) +static PyObject * +get_security_level(PySSLContext *self, void *c) +{ + return PyLong_FromLong(SSL_CTX_get_security_level(self->ctx)); +} +PyDoc_STRVAR(PySSLContext_security_level_doc, "The current security level"); +#endif /* OpenSSL 1.1.0 */ + static PyObject * get_options(PySSLContext *self, void *c) { @@ -4309,8 +4319,10 @@ _ssl__SSLContext_load_dh_params(PySSLContext *self, PyObject *filepath) } return NULL; } - if (SSL_CTX_set_tmp_dh(self->ctx, dh) == 0) - _setSSLError(NULL, 0, __FILE__, __LINE__); + if (!SSL_CTX_set_tmp_dh(self->ctx, dh)) { + DH_free(dh); + return _setSSLError(NULL, 0, __FILE__, __LINE__); + } DH_free(dh); Py_RETURN_NONE; } @@ -4543,11 +4555,12 @@ _servername_callback(SSL *s, int *al, void *args) * back into a str object, but still as an A-label (bpo-28414) */ servername_str = PyUnicode_FromEncodedObject(servername_bytes, "ascii", NULL); - Py_DECREF(servername_bytes); if (servername_str == NULL) { PyErr_WriteUnraisable(servername_bytes); + Py_DECREF(servername_bytes); goto error; } + Py_DECREF(servername_bytes); result = PyObject_CallFunctionObjArgs( ssl_ctx->set_sni_cb, ssl_socket, servername_str, ssl_ctx, NULL); @@ -4790,6 +4803,10 @@ static PyGetSetDef context_getsetlist[] = { (setter) set_verify_flags, NULL}, {"verify_mode", (getter) get_verify_mode, (setter) set_verify_mode, NULL}, +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) + {"security_level", (getter) get_security_level, + NULL, PySSLContext_security_level_doc}, +#endif {NULL}, /* sentinel */ }; diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 1e4c31fefb206f1..07338b101e18ca2 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -19,6 +19,7 @@ #include "Python.h" #include "datetime.h" +#include "pydecimal.h" #include "marshal.h" #include "structmember.h" // PyMemberDef #include @@ -1017,6 +1018,35 @@ test_buildvalue_N(PyObject *self, PyObject *Py_UNUSED(ignored)) } +static PyObject * +test_get_statictype_slots(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + char *tp_name = PyType_GetSlot(&PyLong_Type, Py_tp_name); + assert(strcmp(tp_name, "int") == 0); + + newfunc tp_new = PyType_GetSlot(&PyLong_Type, Py_tp_new); + PyObject *args = PyTuple_New(0); + PyObject *object = tp_new(&PyLong_Type, args, NULL); + assert(object); + + reprfunc tp_repr = PyType_GetSlot(&PyLong_Type, Py_tp_repr); + PyObject *decimal_str = tp_repr(object); + assert(decimal_str); + + PyNumberMethods *tp_as_number = PyType_GetSlot(&PyLong_Type, + Py_tp_as_number); + PyObject *object2 = tp_new(&PyLong_Type, args, NULL); + PyObject *res = tp_as_number->nb_add(object, object2); + assert(res); + + Py_DECREF(res); + Py_DECREF(decimal_str); + Py_DECREF(args); + Py_DECREF(object); + Py_RETURN_NONE; +} + + static PyObject * get_args(PyObject *self, PyObject *args) { @@ -1668,6 +1698,7 @@ parse_tuple_and_keywords(PyObject *self, PyObject *args) static volatile int x; +#if USE_UNICODE_WCHAR_CACHE /* Ignore use of deprecated APIs */ _Py_COMP_DIAG_PUSH _Py_COMP_DIAG_IGNORE_DEPR_DECLS @@ -1772,6 +1803,8 @@ test_Z_code(PyObject *self, PyObject *Py_UNUSED(ignored)) Py_DECREF(tuple); Py_RETURN_NONE; } +_Py_COMP_DIAG_POP +#endif /* USE_UNICODE_WCHAR_CACHE */ static PyObject * test_widechar(PyObject *self, PyObject *Py_UNUSED(ignored)) @@ -1824,6 +1857,10 @@ test_widechar(PyObject *self, PyObject *Py_UNUSED(ignored)) return raiseTestError("test_widechar", "PyUnicode_FromWideChar(L\"\\U00110000\", 1) didn't fail"); +#if USE_UNICODE_WCHAR_CACHE +/* Ignore use of deprecated APIs */ +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS wide = PyUnicode_FromUnicode(invalid, 1); if (wide == NULL) PyErr_Clear(); @@ -1844,11 +1881,12 @@ test_widechar(PyObject *self, PyObject *Py_UNUSED(ignored)) return raiseTestError("test_widechar", "PyUnicode_Ready() didn't fail"); } +_Py_COMP_DIAG_POP +#endif /* USE_UNICODE_WCHAR_CACHE */ #endif Py_RETURN_NONE; } -_Py_COMP_DIAG_POP static PyObject * unicode_aswidechar(PyObject *self, PyObject *args) @@ -2024,6 +2062,7 @@ unicode_copycharacters(PyObject *self, PyObject *args) return Py_BuildValue("(Nn)", to_copy, copied); } +#if USE_UNICODE_WCHAR_CACHE /* Ignore use of deprecated APIs */ _Py_COMP_DIAG_PUSH _Py_COMP_DIAG_IGNORE_DEPR_DECLS @@ -2096,6 +2135,7 @@ unicode_legacy_string(PyObject *self, PyObject *args) return u; } _Py_COMP_DIAG_POP +#endif /* USE_UNICODE_WCHAR_CACHE */ static PyObject * getargs_w_star(PyObject *self, PyObject *args) @@ -2695,6 +2735,252 @@ test_PyDateTime_DELTA_GET(PyObject *self, PyObject *obj) return Py_BuildValue("(lll)", days, seconds, microseconds); } +/* Test decimal API */ +static int decimal_initialized = 0; +static PyObject * +decimal_is_special(PyObject *module, PyObject *dec) +{ + int is_special; + + (void)module; + if (!decimal_initialized) { + if (import_decimal() < 0) { + return NULL; + } + + decimal_initialized = 1; + } + + is_special = PyDec_IsSpecial(dec); + if (is_special < 0) { + return NULL; + } + + return PyBool_FromLong(is_special); +} + +static PyObject * +decimal_is_nan(PyObject *module, PyObject *dec) +{ + int is_nan; + + (void)module; + if (!decimal_initialized) { + if (import_decimal() < 0) { + return NULL; + } + + decimal_initialized = 1; + } + + is_nan = PyDec_IsNaN(dec); + if (is_nan < 0) { + return NULL; + } + + return PyBool_FromLong(is_nan); +} + +static PyObject * +decimal_is_infinite(PyObject *module, PyObject *dec) +{ + int is_infinite; + + (void)module; + if (!decimal_initialized) { + if (import_decimal() < 0) { + return NULL; + } + + decimal_initialized = 1; + } + + is_infinite = PyDec_IsInfinite(dec); + if (is_infinite < 0) { + return NULL; + } + + return PyBool_FromLong(is_infinite); +} + +static PyObject * +decimal_get_digits(PyObject *module, PyObject *dec) +{ + int64_t digits; + + (void)module; + if (!decimal_initialized) { + if (import_decimal() < 0) { + return NULL; + } + + decimal_initialized = 1; + } + + digits = PyDec_GetDigits(dec); + if (digits < 0) { + return NULL; + } + + return PyLong_FromLongLong(digits); +} + +static PyObject * +decimal_as_triple(PyObject *module, PyObject *dec) +{ + PyObject *tuple = NULL; + PyObject *sign, *hi, *lo; + mpd_uint128_triple_t triple; + + (void)module; + if (!decimal_initialized) { + if (import_decimal() < 0) { + return NULL; + } + + decimal_initialized = 1; + } + + triple = PyDec_AsUint128Triple(dec); + if (triple.tag == MPD_TRIPLE_ERROR && PyErr_Occurred()) { + return NULL; + } + + sign = PyLong_FromUnsignedLong(triple.sign); + if (sign == NULL) { + return NULL; + } + + hi = PyLong_FromUnsignedLongLong(triple.hi); + if (hi == NULL) { + Py_DECREF(sign); + return NULL; + } + + lo = PyLong_FromUnsignedLongLong(triple.lo); + if (lo == NULL) { + Py_DECREF(hi); + Py_DECREF(sign); + return NULL; + } + + switch (triple.tag) { + case MPD_TRIPLE_QNAN: + assert(triple.exp == 0); + tuple = Py_BuildValue("(OOOs)", sign, hi, lo, "n"); + break; + + case MPD_TRIPLE_SNAN: + assert(triple.exp == 0); + tuple = Py_BuildValue("(OOOs)", sign, hi, lo, "N"); + break; + + case MPD_TRIPLE_INF: + assert(triple.hi == 0); + assert(triple.lo == 0); + assert(triple.exp == 0); + tuple = Py_BuildValue("(OOOs)", sign, hi, lo, "F"); + break; + + case MPD_TRIPLE_NORMAL: + tuple = Py_BuildValue("(OOOL)", sign, hi, lo, triple.exp); + break; + + case MPD_TRIPLE_ERROR: + PyErr_SetString(PyExc_ValueError, + "value out of bounds for a uint128 triple"); + break; + + default: + PyErr_SetString(PyExc_RuntimeError, + "decimal_as_triple: internal error: unexpected tag"); + break; + } + + Py_DECREF(lo); + Py_DECREF(hi); + Py_DECREF(sign); + + return tuple; +} + +static PyObject * +decimal_from_triple(PyObject *module, PyObject *tuple) +{ + mpd_uint128_triple_t triple = { MPD_TRIPLE_ERROR, 0, 0, 0, 0 }; + PyObject *exp; + unsigned long sign; + + (void)module; + if (!decimal_initialized) { + if (import_decimal() < 0) { + return NULL; + } + + decimal_initialized = 1; + } + + if (!PyTuple_Check(tuple)) { + PyErr_SetString(PyExc_TypeError, "argument must be a tuple"); + return NULL; + } + + if (PyTuple_GET_SIZE(tuple) != 4) { + PyErr_SetString(PyExc_ValueError, "tuple size must be 4"); + return NULL; + } + + sign = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(tuple, 0)); + if (sign == (unsigned long)-1 && PyErr_Occurred()) { + return NULL; + } + if (sign > UINT8_MAX) { + PyErr_SetString(PyExc_ValueError, "sign must be 0 or 1"); + return NULL; + } + triple.sign = (uint8_t)sign; + + triple.hi = PyLong_AsUnsignedLongLong(PyTuple_GET_ITEM(tuple, 1)); + if (triple.hi == (unsigned long long)-1 && PyErr_Occurred()) { + return NULL; + } + + triple.lo = PyLong_AsUnsignedLongLong(PyTuple_GET_ITEM(tuple, 2)); + if (triple.lo == (unsigned long long)-1 && PyErr_Occurred()) { + return NULL; + } + + exp = PyTuple_GET_ITEM(tuple, 3); + if (PyLong_Check(exp)) { + triple.tag = MPD_TRIPLE_NORMAL; + triple.exp = PyLong_AsLongLong(exp); + if (triple.exp == -1 && PyErr_Occurred()) { + return NULL; + } + } + else if (PyUnicode_Check(exp)) { + if (PyUnicode_CompareWithASCIIString(exp, "F") == 0) { + triple.tag = MPD_TRIPLE_INF; + } + else if (PyUnicode_CompareWithASCIIString(exp, "n") == 0) { + triple.tag = MPD_TRIPLE_QNAN; + } + else if (PyUnicode_CompareWithASCIIString(exp, "N") == 0) { + triple.tag = MPD_TRIPLE_SNAN; + } + else { + PyErr_SetString(PyExc_ValueError, "not a valid exponent"); + return NULL; + } + } + else { + PyErr_SetString(PyExc_TypeError, "exponent must be int or string"); + return NULL; + } + + return PyDec_FromUint128Triple(&triple); +} + /* test_thread_state spawns a thread of its own, and that thread releases * `thread_done` when it's finished. The driver code has to know when the * thread finishes, because the thread uses a PyObject (the callable) that @@ -5304,6 +5590,12 @@ static PyMethodDef TestMethods[] = { {"PyDateTime_DATE_GET", test_PyDateTime_DATE_GET, METH_O}, {"PyDateTime_TIME_GET", test_PyDateTime_TIME_GET, METH_O}, {"PyDateTime_DELTA_GET", test_PyDateTime_DELTA_GET, METH_O}, + {"decimal_is_special", decimal_is_special, METH_O}, + {"decimal_is_nan", decimal_is_nan, METH_O}, + {"decimal_is_infinite", decimal_is_infinite, METH_O}, + {"decimal_get_digits", decimal_get_digits, METH_O}, + {"decimal_as_triple", decimal_as_triple, METH_O}, + {"decimal_from_triple", decimal_from_triple, METH_O}, {"test_list_api", test_list_api, METH_NOARGS}, {"test_dict_iteration", test_dict_iteration, METH_NOARGS}, {"dict_getitem_knownhash", dict_getitem_knownhash, METH_VARARGS}, @@ -5343,6 +5635,7 @@ static PyMethodDef TestMethods[] = { {"test_buildvalue_N", test_buildvalue_N, METH_NOARGS}, {"test_buildvalue_issue38913", test_buildvalue_issue38913, METH_NOARGS}, {"get_args", get_args, METH_VARARGS}, + {"test_get_statictype_slots", test_get_statictype_slots, METH_NOARGS}, {"get_kwargs", (PyCFunction)(void(*)(void))get_kwargs, METH_VARARGS|METH_KEYWORDS}, {"getargs_tuple", getargs_tuple, METH_VARARGS}, {"getargs_keywords", (PyCFunction)(void(*)(void))getargs_keywords, @@ -5398,8 +5691,10 @@ static PyMethodDef TestMethods[] = { {"codec_incrementaldecoder", (PyCFunction)codec_incrementaldecoder, METH_VARARGS}, {"test_s_code", test_s_code, METH_NOARGS}, +#if USE_UNICODE_WCHAR_CACHE {"test_u_code", test_u_code, METH_NOARGS}, {"test_Z_code", test_Z_code, METH_NOARGS}, +#endif /* USE_UNICODE_WCHAR_CACHE */ {"test_widechar", test_widechar, METH_NOARGS}, {"unicode_aswidechar", unicode_aswidechar, METH_VARARGS}, {"unicode_aswidecharstring",unicode_aswidecharstring, METH_VARARGS}, @@ -5408,9 +5703,11 @@ static PyMethodDef TestMethods[] = { {"unicode_asutf8andsize", unicode_asutf8andsize, METH_VARARGS}, {"unicode_findchar", unicode_findchar, METH_VARARGS}, {"unicode_copycharacters", unicode_copycharacters, METH_VARARGS}, +#if USE_UNICODE_WCHAR_CACHE {"unicode_encodedecimal", unicode_encodedecimal, METH_VARARGS}, {"unicode_transformdecimaltoascii", unicode_transformdecimaltoascii, METH_VARARGS}, {"unicode_legacy_string", unicode_legacy_string, METH_VARARGS}, +#endif /* USE_UNICODE_WCHAR_CACHE */ {"_test_thread_state", test_thread_state, METH_VARARGS}, {"_pending_threadfunc", pending_threadfunc, METH_VARARGS}, #ifdef HAVE_GETTIMEOFDAY diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index f08bf8d83d47439..ad74af8363ef45e 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -18,53 +18,10 @@ #include "pycore_gc.h" // PyGC_Head -#ifdef MS_WINDOWS -#include - -static int -_add_windows_config(PyObject *configs) -{ - HMODULE hPython3; - wchar_t py3path[MAX_PATH]; - PyObject *dict = PyDict_New(); - PyObject *obj = NULL; - if (!dict) { - return -1; - } - - hPython3 = GetModuleHandleW(PY3_DLLNAME); - if (hPython3 && GetModuleFileNameW(hPython3, py3path, MAX_PATH)) { - obj = PyUnicode_FromWideChar(py3path, -1); - } else { - obj = Py_None; - Py_INCREF(obj); - } - if (obj && - !PyDict_SetItemString(dict, "python3_dll", obj) && - !PyDict_SetItemString(configs, "windows", dict)) { - Py_DECREF(obj); - Py_DECREF(dict); - return 0; - } - Py_DECREF(obj); - Py_DECREF(dict); - return -1; -} -#endif - - static PyObject * get_configs(PyObject *self, PyObject *Py_UNUSED(args)) { - PyObject *dict = _Py_GetConfigsAsDict(); -#ifdef MS_WINDOWS - if (dict) { - if (_add_windows_config(dict) < 0) { - Py_CLEAR(dict); - } - } -#endif - return dict; + return _Py_GetConfigsAsDict(); } diff --git a/Modules/_winapi.c b/Modules/_winapi.c index e1672c478522e87..7ba14095c96e194 100644 --- a/Modules/_winapi.c +++ b/Modules/_winapi.c @@ -35,8 +35,10 @@ /* See http://www.python.org/2.4/license for licensing details. */ #include "Python.h" +#include "moduleobject.h" // PyModuleDef_Slot #include "structmember.h" // PyMemberDef + #define WINDOWS_LEAN_AND_MEAN #include "windows.h" #include @@ -78,6 +80,17 @@ check_CancelIoEx() return has_CancelIoEx; } +typedef struct { + PyTypeObject *overlapped_type; +} WinApiState; + +static inline WinApiState* +winapi_get_state(PyObject *module) +{ + void *state = PyModule_GetState(module); + assert(state != NULL); + return (WinApiState *)state; +} /* * A Python object wrapping an OVERLAPPED structure and other useful data @@ -140,7 +153,9 @@ overlapped_dealloc(OverlappedObject *self) if (self->write_buffer.obj) PyBuffer_Release(&self->write_buffer); Py_CLEAR(self->read_buffer); - PyObject_Del(self); + PyTypeObject *tp = Py_TYPE(self); + tp->tp_free(self); + Py_DECREF(tp); } /*[clinic input] @@ -164,10 +179,11 @@ create_converter('LPCVOID', '" F_POINTER "') create_converter('BOOL', 'i') # F_BOOL used previously (always 'i') create_converter('DWORD', 'k') # F_DWORD is always "k" (which is much shorter) create_converter('LPCTSTR', 's') -create_converter('LPCWSTR', 'u') -create_converter('LPWSTR', 'u') create_converter('UINT', 'I') # F_UINT used previously (always 'I') +class LPCWSTR_converter(Py_UNICODE_converter): + type = 'LPCWSTR' + class HANDLE_return_converter(CReturnConverter): type = 'HANDLE' @@ -197,7 +213,7 @@ class LPVOID_return_converter(CReturnConverter): data.return_conversion.append( 'return_value = HANDLE_TO_PYNUM(_return_value);\n') [python start generated code]*/ -/*[python end generated code: output=da39a3ee5e6b4b0d input=79464c61a31ae932]*/ +/*[python end generated code: output=da39a3ee5e6b4b0d input=011ee0c3a2244bfe]*/ #include "clinic/_winapi.c.h" @@ -304,55 +320,29 @@ static PyMemberDef overlapped_members[] = { {NULL} }; -PyTypeObject OverlappedType = { - PyVarObject_HEAD_INIT(NULL, 0) - /* tp_name */ "_winapi.Overlapped", - /* tp_basicsize */ sizeof(OverlappedObject), - /* tp_itemsize */ 0, - /* tp_dealloc */ (destructor) overlapped_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 */ "OVERLAPPED structure wrapper", - /* tp_traverse */ 0, - /* tp_clear */ 0, - /* tp_richcompare */ 0, - /* tp_weaklistoffset */ 0, - /* tp_iter */ 0, - /* tp_iternext */ 0, - /* tp_methods */ overlapped_methods, - /* tp_members */ overlapped_members, - /* tp_getset */ 0, - /* tp_base */ 0, - /* tp_dict */ 0, - /* tp_descr_get */ 0, - /* tp_descr_set */ 0, - /* tp_dictoffset */ 0, - /* tp_init */ 0, - /* tp_alloc */ 0, - /* tp_new */ 0, +static PyType_Slot winapi_overlapped_type_slots[] = { + {Py_tp_dealloc, overlapped_dealloc}, + {Py_tp_doc, "OVERLAPPED structure wrapper"}, + {Py_tp_methods, overlapped_methods}, + {Py_tp_members, overlapped_members}, + {0,0} +}; + +static PyType_Spec winapi_overlapped_type_spec = { + .name = "_winapi.Overlapped", + .basicsize = sizeof(OverlappedObject), + .flags = Py_TPFLAGS_DEFAULT, + .slots = winapi_overlapped_type_slots, }; static OverlappedObject * -new_overlapped(HANDLE handle) +new_overlapped(PyObject *module, HANDLE handle) { - OverlappedObject *self; - - self = PyObject_New(OverlappedObject, &OverlappedType); + WinApiState *st = winapi_get_state(module); + OverlappedObject *self = PyObject_New(OverlappedObject, st->overlapped_type); if (!self) return NULL; + self->handle = handle; self->read_buffer = NULL; self->pending = 0; @@ -408,7 +398,7 @@ _winapi_ConnectNamedPipe_impl(PyObject *module, HANDLE handle, OverlappedObject *overlapped = NULL; if (use_overlapped) { - overlapped = new_overlapped(handle); + overlapped = new_overlapped(module, handle); if (!overlapped) return NULL; } @@ -520,15 +510,15 @@ _winapi_CreateFileMapping_impl(PyObject *module, HANDLE file_handle, /*[clinic input] _winapi.CreateJunction - src_path: LPWSTR - dst_path: LPWSTR + src_path: LPCWSTR + dst_path: LPCWSTR / [clinic start generated code]*/ static PyObject * -_winapi_CreateJunction_impl(PyObject *module, LPWSTR src_path, - LPWSTR dst_path) -/*[clinic end generated code: output=66b7eb746e1dfa25 input=8cd1f9964b6e3d36]*/ +_winapi_CreateJunction_impl(PyObject *module, LPCWSTR src_path, + LPCWSTR dst_path) +/*[clinic end generated code: output=44b3f5e9bbcc4271 input=963d29b44b9384a7]*/ { /* Privilege adjustment */ HANDLE token = NULL; @@ -1526,7 +1516,7 @@ _winapi_ReadFile_impl(PyObject *module, HANDLE handle, DWORD size, if (!buf) return NULL; if (use_overlapped) { - overlapped = new_overlapped(handle); + overlapped = new_overlapped(module, handle); if (!overlapped) { Py_DECREF(buf); return NULL; @@ -1809,7 +1799,7 @@ _winapi_WriteFile_impl(PyObject *module, HANDLE handle, PyObject *buffer, OverlappedObject *overlapped = NULL; if (use_overlapped) { - overlapped = new_overlapped(handle); + overlapped = new_overlapped(module, handle); if (!overlapped) return NULL; buf = &overlapped->write_buffer; @@ -1920,36 +1910,33 @@ static PyMethodDef winapi_functions[] = { {NULL, NULL} }; -static struct PyModuleDef winapi_module = { - PyModuleDef_HEAD_INIT, - "_winapi", - NULL, - -1, - winapi_functions, - NULL, - NULL, - NULL, - NULL -}; - #define WINAPI_CONSTANT(fmt, con) \ - PyDict_SetItemString(d, #con, Py_BuildValue(fmt, con)) - -PyMODINIT_FUNC -PyInit__winapi(void) + do { \ + PyObject *value = Py_BuildValue(fmt, con); \ + if (value == NULL) { \ + return -1; \ + } \ + if (PyDict_SetItemString(d, #con, value) < 0) { \ + Py_DECREF(value); \ + return -1; \ + } \ + Py_DECREF(value); \ + } while (0) + +static int winapi_exec(PyObject *m) { - PyObject *d; - PyObject *m; + WinApiState *st = winapi_get_state(m); - if (PyType_Ready(&OverlappedType) < 0) - return NULL; + st->overlapped_type = (PyTypeObject *)PyType_FromModuleAndSpec(m, &winapi_overlapped_type_spec, NULL); + if (st->overlapped_type == NULL) { + return -1; + } - m = PyModule_Create(&winapi_module); - if (m == NULL) - return NULL; - d = PyModule_GetDict(m); + if (PyModule_AddType(m, st->overlapped_type) < 0) { + return -1; + } - PyDict_SetItemString(d, "Overlapped", (PyObject *) &OverlappedType); + PyObject *d = PyModule_GetDict(m); /* constants */ WINAPI_CONSTANT(F_DWORD, CREATE_NEW_CONSOLE); @@ -2048,5 +2035,24 @@ PyInit__winapi(void) WINAPI_CONSTANT("i", NULL); - return m; + return 0; +} + +static PyModuleDef_Slot winapi_slots[] = { + {Py_mod_exec, winapi_exec}, + {0, NULL} +}; + +static struct PyModuleDef winapi_module = { + PyModuleDef_HEAD_INIT, + .m_name = "_winapi", + .m_size = sizeof(WinApiState), + .m_methods = winapi_functions, + .m_slots = winapi_slots, +}; + +PyMODINIT_FUNC +PyInit__winapi(void) +{ + return PyModuleDef_Init(&winapi_module); } diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c index 8a6fce9e0b4bd9f..8943ebf455df4b6 100644 --- a/Modules/_xxsubinterpretersmodule.c +++ b/Modules/_xxsubinterpretersmodule.c @@ -1847,7 +1847,7 @@ _is_running(PyInterpreterState *interp) return 0; } - int executing = (int)(frame->f_executing); + int executing = _PyFrame_IsExecuting(frame); Py_DECREF(frame); return executing; diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index a2883495fe7fddd..2cee65fac6dd042 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -224,8 +224,14 @@ zoneinfo_new_instance(PyTypeObject *type, PyObject *key) self = NULL; cleanup: if (file_obj != NULL) { + PyObject *exc, *val, *tb; + PyErr_Fetch(&exc, &val, &tb); PyObject *tmp = PyObject_CallMethod(file_obj, "close", NULL); - Py_DECREF(tmp); + _PyErr_ChainExceptions(exc, val, tb); + if (tmp == NULL) { + Py_CLEAR(self); + } + Py_XDECREF(tmp); Py_DECREF(file_obj); } Py_DECREF(file_path); @@ -406,7 +412,6 @@ zoneinfo_clear_cache(PyObject *cls, PyObject *args, PyObject *kwargs) } clear_strong_cache(type); - ZONEINFO_STRONG_CACHE = NULL; } else { PyObject *item = NULL; @@ -2465,10 +2470,11 @@ clear_strong_cache(const PyTypeObject *const type) } strong_cache_free(ZONEINFO_STRONG_CACHE); + ZONEINFO_STRONG_CACHE = NULL; } static PyObject * -new_weak_cache() +new_weak_cache(void) { PyObject *weakref_module = PyImport_ImportModule("weakref"); if (weakref_module == NULL) { @@ -2482,7 +2488,7 @@ new_weak_cache() } static int -initialize_caches() +initialize_caches(void) { // TODO: Move to a PyModule_GetState / PEP 573 based caching system. if (TIMEDELTA_CACHE == NULL) { @@ -2519,6 +2525,7 @@ zoneinfo_init_subclass(PyTypeObject *cls, PyObject *args, PyObject **kwargs) } PyObject_SetAttrString((PyObject *)cls, "_weak_cache", weak_cache); + Py_DECREF(weak_cache); Py_RETURN_NONE; } @@ -2551,7 +2558,7 @@ static PyMethodDef zoneinfo_methods[] = { {"_unpickle", (PyCFunction)zoneinfo__unpickle, METH_VARARGS | METH_CLASS, PyDoc_STR("Private method used in unpickling.")}, {"__init_subclass__", (PyCFunction)(void (*)(void))zoneinfo_init_subclass, - METH_VARARGS | METH_KEYWORDS, + METH_VARARGS | METH_KEYWORDS | METH_CLASS, PyDoc_STR("Function to initialize subclasses.")}, {NULL} /* Sentinel */ }; @@ -2610,8 +2617,7 @@ module_free() Py_CLEAR(ZONEINFO_WEAK_CACHE); } - strong_cache_free(ZONEINFO_STRONG_CACHE); - ZONEINFO_STRONG_CACHE = NULL; + clear_strong_cache(&PyZoneInfo_ZoneInfoType); } static int diff --git a/Modules/atexitmodule.c b/Modules/atexitmodule.c index 8cef64ceb9b6bff..fd47ddd7731c5d8 100644 --- a/Modules/atexitmodule.c +++ b/Modules/atexitmodule.c @@ -309,7 +309,7 @@ static PyMethodDef atexit_methods[] = { /* Initialization function. */ PyDoc_STRVAR(atexit__doc__, -"allow programmer to define multiple exit functions to be executed\ +"allow programmer to define multiple exit functions to be executed\n\ upon normal program termination.\n\ \n\ Two public functions, register and unregister, are defined.\n\ diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index f686ded51976c65..c4c2b71e4cc223c 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -1967,32 +1967,16 @@ PyDoc_STRVAR(_curses_color_content__doc__, {"color_content", (PyCFunction)_curses_color_content, METH_O, _curses_color_content__doc__}, static PyObject * -_curses_color_content_impl(PyObject *module, short color_number); +_curses_color_content_impl(PyObject *module, int color_number); static PyObject * _curses_color_content(PyObject *module, PyObject *arg) { PyObject *return_value = NULL; - short color_number; + int color_number; - { - long ival = PyLong_AsLong(arg); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - color_number = (short) ival; - } + if (!color_converter(arg, &color_number)) { + goto exit; } return_value = _curses_color_content_impl(module, color_number); @@ -2016,32 +2000,16 @@ PyDoc_STRVAR(_curses_color_pair__doc__, {"color_pair", (PyCFunction)_curses_color_pair, METH_O, _curses_color_pair__doc__}, static PyObject * -_curses_color_pair_impl(PyObject *module, short color_number); +_curses_color_pair_impl(PyObject *module, int color_number); static PyObject * _curses_color_pair(PyObject *module, PyObject *arg) { PyObject *return_value = NULL; - short color_number; + int color_number; - { - long ival = PyLong_AsLong(arg); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - color_number = (short) ival; - } + if (!color_converter(arg, &color_number)) { + goto exit; } return_value = _curses_color_pair_impl(module, color_number); @@ -2590,14 +2558,14 @@ PyDoc_STRVAR(_curses_init_color__doc__, {"init_color", (PyCFunction)(void(*)(void))_curses_init_color, METH_FASTCALL, _curses_init_color__doc__}, static PyObject * -_curses_init_color_impl(PyObject *module, short color_number, short r, - short g, short b); +_curses_init_color_impl(PyObject *module, int color_number, short r, short g, + short b); static PyObject * _curses_init_color(PyObject *module, PyObject *const *args, Py_ssize_t nargs) { PyObject *return_value = NULL; - short color_number; + int color_number; short r; short g; short b; @@ -2605,81 +2573,17 @@ _curses_init_color(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("init_color", nargs, 4, 4)) { goto exit; } - { - long ival = PyLong_AsLong(args[0]); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - color_number = (short) ival; - } + if (!color_converter(args[0], &color_number)) { + goto exit; } - { - long ival = PyLong_AsLong(args[1]); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - r = (short) ival; - } + if (!component_converter(args[1], &r)) { + goto exit; } - { - long ival = PyLong_AsLong(args[2]); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - g = (short) ival; - } + if (!component_converter(args[2], &g)) { + goto exit; } - { - long ival = PyLong_AsLong(args[3]); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - b = (short) ival; - } + if (!component_converter(args[3], &b)) { + goto exit; } return_value = _curses_init_color_impl(module, color_number, r, g, b); @@ -2707,76 +2611,27 @@ PyDoc_STRVAR(_curses_init_pair__doc__, {"init_pair", (PyCFunction)(void(*)(void))_curses_init_pair, METH_FASTCALL, _curses_init_pair__doc__}, static PyObject * -_curses_init_pair_impl(PyObject *module, short pair_number, short fg, - short bg); +_curses_init_pair_impl(PyObject *module, int pair_number, int fg, int bg); static PyObject * _curses_init_pair(PyObject *module, PyObject *const *args, Py_ssize_t nargs) { PyObject *return_value = NULL; - short pair_number; - short fg; - short bg; + int pair_number; + int fg; + int bg; if (!_PyArg_CheckPositional("init_pair", nargs, 3, 3)) { goto exit; } - { - long ival = PyLong_AsLong(args[0]); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - pair_number = (short) ival; - } + if (!pair_converter(args[0], &pair_number)) { + goto exit; } - { - long ival = PyLong_AsLong(args[1]); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - fg = (short) ival; - } + if (!color_converter(args[1], &fg)) { + goto exit; } - { - long ival = PyLong_AsLong(args[2]); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - bg = (short) ival; - } + if (!color_converter(args[2], &bg)) { + goto exit; } return_value = _curses_init_pair_impl(module, pair_number, fg, bg); @@ -3554,32 +3409,16 @@ PyDoc_STRVAR(_curses_pair_content__doc__, {"pair_content", (PyCFunction)_curses_pair_content, METH_O, _curses_pair_content__doc__}, static PyObject * -_curses_pair_content_impl(PyObject *module, short pair_number); +_curses_pair_content_impl(PyObject *module, int pair_number); static PyObject * _curses_pair_content(PyObject *module, PyObject *arg) { PyObject *return_value = NULL; - short pair_number; + int pair_number; - { - long ival = PyLong_AsLong(arg); - if (ival == -1 && PyErr_Occurred()) { - goto exit; - } - else if (ival < SHRT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is less than minimum"); - goto exit; - } - else if (ival > SHRT_MAX) { - PyErr_SetString(PyExc_OverflowError, - "signed short integer is greater than maximum"); - goto exit; - } - else { - pair_number = (short) ival; - } + if (!pair_converter(arg, &pair_number)) { + goto exit; } return_value = _curses_pair_content_impl(module, pair_number); @@ -4337,6 +4176,27 @@ _curses_use_default_colors(PyObject *module, PyObject *Py_UNUSED(ignored)) #endif /* !defined(STRICT_SYSV_CURSES) */ +PyDoc_STRVAR(_curses_has_extended_color_support__doc__, +"has_extended_color_support($module, /)\n" +"--\n" +"\n" +"Return True if the module supports extended colors; otherwise, return False.\n" +"\n" +"Extended color support allows more than 256 color-pairs for terminals\n" +"that support more than 16 colors (e.g. xterm-256color)."); + +#define _CURSES_HAS_EXTENDED_COLOR_SUPPORT_METHODDEF \ + {"has_extended_color_support", (PyCFunction)_curses_has_extended_color_support, METH_NOARGS, _curses_has_extended_color_support__doc__}, + +static PyObject * +_curses_has_extended_color_support_impl(PyObject *module); + +static PyObject * +_curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return _curses_has_extended_color_support_impl(module); +} + #ifndef _CURSES_WINDOW_ENCLOSE_METHODDEF #define _CURSES_WINDOW_ENCLOSE_METHODDEF #endif /* !defined(_CURSES_WINDOW_ENCLOSE_METHODDEF) */ @@ -4428,4 +4288,4 @@ _curses_use_default_colors(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=478d93f7692385eb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=38b2531d17f119e1 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_localemodule.c.h b/Modules/clinic/_localemodule.c.h new file mode 100644 index 000000000000000..5d1db3ece796d86 --- /dev/null +++ b/Modules/clinic/_localemodule.c.h @@ -0,0 +1,587 @@ +/*[clinic input] +preserve +[clinic start generated code]*/ + +PyDoc_STRVAR(_locale_setlocale__doc__, +"setlocale($module, category, locale=, /)\n" +"--\n" +"\n" +"Activates/queries locale processing."); + +#define _LOCALE_SETLOCALE_METHODDEF \ + {"setlocale", (PyCFunction)(void(*)(void))_locale_setlocale, METH_FASTCALL, _locale_setlocale__doc__}, + +static PyObject * +_locale_setlocale_impl(PyObject *module, int category, const char *locale); + +static PyObject * +_locale_setlocale(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + int category; + const char *locale = NULL; + + if (!_PyArg_CheckPositional("setlocale", nargs, 1, 2)) { + goto exit; + } + category = _PyLong_AsInt(args[0]); + if (category == -1 && PyErr_Occurred()) { + goto exit; + } + if (nargs < 2) { + goto skip_optional; + } + if (args[1] == Py_None) { + locale = NULL; + } + else if (PyUnicode_Check(args[1])) { + Py_ssize_t locale_length; + locale = PyUnicode_AsUTF8AndSize(args[1], &locale_length); + if (locale == NULL) { + goto exit; + } + if (strlen(locale) != (size_t)locale_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + } + else { + _PyArg_BadArgument("setlocale", "argument 2", "str or None", args[1]); + goto exit; + } +skip_optional: + return_value = _locale_setlocale_impl(module, category, locale); + +exit: + return return_value; +} + +PyDoc_STRVAR(_locale_localeconv__doc__, +"localeconv($module, /)\n" +"--\n" +"\n" +"Returns numeric and monetary locale-specific parameters."); + +#define _LOCALE_LOCALECONV_METHODDEF \ + {"localeconv", (PyCFunction)_locale_localeconv, METH_NOARGS, _locale_localeconv__doc__}, + +static PyObject * +_locale_localeconv_impl(PyObject *module); + +static PyObject * +_locale_localeconv(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return _locale_localeconv_impl(module); +} + +#if defined(HAVE_WCSCOLL) + +PyDoc_STRVAR(_locale_strcoll__doc__, +"strcoll($module, os1, os2, /)\n" +"--\n" +"\n" +"Compares two strings according to the locale."); + +#define _LOCALE_STRCOLL_METHODDEF \ + {"strcoll", (PyCFunction)(void(*)(void))_locale_strcoll, METH_FASTCALL, _locale_strcoll__doc__}, + +static PyObject * +_locale_strcoll_impl(PyObject *module, PyObject *os1, PyObject *os2); + +static PyObject * +_locale_strcoll(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *os1; + PyObject *os2; + + if (!_PyArg_CheckPositional("strcoll", nargs, 2, 2)) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("strcoll", "argument 1", "str", args[0]); + goto exit; + } + if (PyUnicode_READY(args[0]) == -1) { + goto exit; + } + os1 = args[0]; + if (!PyUnicode_Check(args[1])) { + _PyArg_BadArgument("strcoll", "argument 2", "str", args[1]); + goto exit; + } + if (PyUnicode_READY(args[1]) == -1) { + goto exit; + } + os2 = args[1]; + return_value = _locale_strcoll_impl(module, os1, os2); + +exit: + return return_value; +} + +#endif /* defined(HAVE_WCSCOLL) */ + +#if defined(HAVE_WCSXFRM) + +PyDoc_STRVAR(_locale_strxfrm__doc__, +"strxfrm($module, string, /)\n" +"--\n" +"\n" +"Return a string that can be used as a key for locale-aware comparisons."); + +#define _LOCALE_STRXFRM_METHODDEF \ + {"strxfrm", (PyCFunction)_locale_strxfrm, METH_O, _locale_strxfrm__doc__}, + +static PyObject * +_locale_strxfrm_impl(PyObject *module, PyObject *str); + +static PyObject * +_locale_strxfrm(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + PyObject *str; + + if (!PyUnicode_Check(arg)) { + _PyArg_BadArgument("strxfrm", "argument", "str", arg); + goto exit; + } + if (PyUnicode_READY(arg) == -1) { + goto exit; + } + str = arg; + return_value = _locale_strxfrm_impl(module, str); + +exit: + return return_value; +} + +#endif /* defined(HAVE_WCSXFRM) */ + +#if defined(MS_WINDOWS) + +PyDoc_STRVAR(_locale__getdefaultlocale__doc__, +"_getdefaultlocale($module, /)\n" +"--\n" +"\n"); + +#define _LOCALE__GETDEFAULTLOCALE_METHODDEF \ + {"_getdefaultlocale", (PyCFunction)_locale__getdefaultlocale, METH_NOARGS, _locale__getdefaultlocale__doc__}, + +static PyObject * +_locale__getdefaultlocale_impl(PyObject *module); + +static PyObject * +_locale__getdefaultlocale(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return _locale__getdefaultlocale_impl(module); +} + +#endif /* defined(MS_WINDOWS) */ + +#if defined(HAVE_LANGINFO_H) + +PyDoc_STRVAR(_locale_nl_langinfo__doc__, +"nl_langinfo($module, key, /)\n" +"--\n" +"\n" +"Return the value for the locale information associated with key."); + +#define _LOCALE_NL_LANGINFO_METHODDEF \ + {"nl_langinfo", (PyCFunction)_locale_nl_langinfo, METH_O, _locale_nl_langinfo__doc__}, + +static PyObject * +_locale_nl_langinfo_impl(PyObject *module, int item); + +static PyObject * +_locale_nl_langinfo(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + int item; + + item = _PyLong_AsInt(arg); + if (item == -1 && PyErr_Occurred()) { + goto exit; + } + return_value = _locale_nl_langinfo_impl(module, item); + +exit: + return return_value; +} + +#endif /* defined(HAVE_LANGINFO_H) */ + +#if defined(HAVE_LIBINTL_H) + +PyDoc_STRVAR(_locale_gettext__doc__, +"gettext($module, msg, /)\n" +"--\n" +"\n" +"gettext(msg) -> string\n" +"\n" +"Return translation of msg."); + +#define _LOCALE_GETTEXT_METHODDEF \ + {"gettext", (PyCFunction)_locale_gettext, METH_O, _locale_gettext__doc__}, + +static PyObject * +_locale_gettext_impl(PyObject *module, const char *in); + +static PyObject * +_locale_gettext(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + const char *in; + + if (!PyUnicode_Check(arg)) { + _PyArg_BadArgument("gettext", "argument", "str", arg); + goto exit; + } + Py_ssize_t in_length; + in = PyUnicode_AsUTF8AndSize(arg, &in_length); + if (in == NULL) { + goto exit; + } + if (strlen(in) != (size_t)in_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + return_value = _locale_gettext_impl(module, in); + +exit: + return return_value; +} + +#endif /* defined(HAVE_LIBINTL_H) */ + +#if defined(HAVE_LIBINTL_H) + +PyDoc_STRVAR(_locale_dgettext__doc__, +"dgettext($module, domain, msg, /)\n" +"--\n" +"\n" +"dgettext(domain, msg) -> string\n" +"\n" +"Return translation of msg in domain."); + +#define _LOCALE_DGETTEXT_METHODDEF \ + {"dgettext", (PyCFunction)(void(*)(void))_locale_dgettext, METH_FASTCALL, _locale_dgettext__doc__}, + +static PyObject * +_locale_dgettext_impl(PyObject *module, const char *domain, const char *in); + +static PyObject * +_locale_dgettext(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + const char *domain; + const char *in; + + if (!_PyArg_CheckPositional("dgettext", nargs, 2, 2)) { + goto exit; + } + if (args[0] == Py_None) { + domain = NULL; + } + else if (PyUnicode_Check(args[0])) { + Py_ssize_t domain_length; + domain = PyUnicode_AsUTF8AndSize(args[0], &domain_length); + if (domain == NULL) { + goto exit; + } + if (strlen(domain) != (size_t)domain_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + } + else { + _PyArg_BadArgument("dgettext", "argument 1", "str or None", args[0]); + goto exit; + } + if (!PyUnicode_Check(args[1])) { + _PyArg_BadArgument("dgettext", "argument 2", "str", args[1]); + goto exit; + } + Py_ssize_t in_length; + in = PyUnicode_AsUTF8AndSize(args[1], &in_length); + if (in == NULL) { + goto exit; + } + if (strlen(in) != (size_t)in_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + return_value = _locale_dgettext_impl(module, domain, in); + +exit: + return return_value; +} + +#endif /* defined(HAVE_LIBINTL_H) */ + +#if defined(HAVE_LIBINTL_H) + +PyDoc_STRVAR(_locale_dcgettext__doc__, +"dcgettext($module, domain, msg, category, /)\n" +"--\n" +"\n" +"Return translation of msg in domain and category."); + +#define _LOCALE_DCGETTEXT_METHODDEF \ + {"dcgettext", (PyCFunction)(void(*)(void))_locale_dcgettext, METH_FASTCALL, _locale_dcgettext__doc__}, + +static PyObject * +_locale_dcgettext_impl(PyObject *module, const char *domain, + const char *msgid, int category); + +static PyObject * +_locale_dcgettext(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + const char *domain; + const char *msgid; + int category; + + if (!_PyArg_CheckPositional("dcgettext", nargs, 3, 3)) { + goto exit; + } + if (args[0] == Py_None) { + domain = NULL; + } + else if (PyUnicode_Check(args[0])) { + Py_ssize_t domain_length; + domain = PyUnicode_AsUTF8AndSize(args[0], &domain_length); + if (domain == NULL) { + goto exit; + } + if (strlen(domain) != (size_t)domain_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + } + else { + _PyArg_BadArgument("dcgettext", "argument 1", "str or None", args[0]); + goto exit; + } + if (!PyUnicode_Check(args[1])) { + _PyArg_BadArgument("dcgettext", "argument 2", "str", args[1]); + goto exit; + } + Py_ssize_t msgid_length; + msgid = PyUnicode_AsUTF8AndSize(args[1], &msgid_length); + if (msgid == NULL) { + goto exit; + } + if (strlen(msgid) != (size_t)msgid_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + category = _PyLong_AsInt(args[2]); + if (category == -1 && PyErr_Occurred()) { + goto exit; + } + return_value = _locale_dcgettext_impl(module, domain, msgid, category); + +exit: + return return_value; +} + +#endif /* defined(HAVE_LIBINTL_H) */ + +#if defined(HAVE_LIBINTL_H) + +PyDoc_STRVAR(_locale_textdomain__doc__, +"textdomain($module, domain, /)\n" +"--\n" +"\n" +"Set the C library\'s textdmain to domain, returning the new domain."); + +#define _LOCALE_TEXTDOMAIN_METHODDEF \ + {"textdomain", (PyCFunction)_locale_textdomain, METH_O, _locale_textdomain__doc__}, + +static PyObject * +_locale_textdomain_impl(PyObject *module, const char *domain); + +static PyObject * +_locale_textdomain(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + const char *domain; + + if (arg == Py_None) { + domain = NULL; + } + else if (PyUnicode_Check(arg)) { + Py_ssize_t domain_length; + domain = PyUnicode_AsUTF8AndSize(arg, &domain_length); + if (domain == NULL) { + goto exit; + } + if (strlen(domain) != (size_t)domain_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + } + else { + _PyArg_BadArgument("textdomain", "argument", "str or None", arg); + goto exit; + } + return_value = _locale_textdomain_impl(module, domain); + +exit: + return return_value; +} + +#endif /* defined(HAVE_LIBINTL_H) */ + +#if defined(HAVE_LIBINTL_H) + +PyDoc_STRVAR(_locale_bindtextdomain__doc__, +"bindtextdomain($module, domain, dir, /)\n" +"--\n" +"\n" +"Bind the C library\'s domain to dir."); + +#define _LOCALE_BINDTEXTDOMAIN_METHODDEF \ + {"bindtextdomain", (PyCFunction)(void(*)(void))_locale_bindtextdomain, METH_FASTCALL, _locale_bindtextdomain__doc__}, + +static PyObject * +_locale_bindtextdomain_impl(PyObject *module, const char *domain, + PyObject *dirname_obj); + +static PyObject * +_locale_bindtextdomain(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + const char *domain; + PyObject *dirname_obj; + + if (!_PyArg_CheckPositional("bindtextdomain", nargs, 2, 2)) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("bindtextdomain", "argument 1", "str", args[0]); + goto exit; + } + Py_ssize_t domain_length; + domain = PyUnicode_AsUTF8AndSize(args[0], &domain_length); + if (domain == NULL) { + goto exit; + } + if (strlen(domain) != (size_t)domain_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + dirname_obj = args[1]; + return_value = _locale_bindtextdomain_impl(module, domain, dirname_obj); + +exit: + return return_value; +} + +#endif /* defined(HAVE_LIBINTL_H) */ + +#if defined(HAVE_LIBINTL_H) && defined(HAVE_BIND_TEXTDOMAIN_CODESET) + +PyDoc_STRVAR(_locale_bind_textdomain_codeset__doc__, +"bind_textdomain_codeset($module, domain, codeset, /)\n" +"--\n" +"\n" +"Bind the C library\'s domain to codeset."); + +#define _LOCALE_BIND_TEXTDOMAIN_CODESET_METHODDEF \ + {"bind_textdomain_codeset", (PyCFunction)(void(*)(void))_locale_bind_textdomain_codeset, METH_FASTCALL, _locale_bind_textdomain_codeset__doc__}, + +static PyObject * +_locale_bind_textdomain_codeset_impl(PyObject *module, const char *domain, + const char *codeset); + +static PyObject * +_locale_bind_textdomain_codeset(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + const char *domain; + const char *codeset; + + if (!_PyArg_CheckPositional("bind_textdomain_codeset", nargs, 2, 2)) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("bind_textdomain_codeset", "argument 1", "str", args[0]); + goto exit; + } + Py_ssize_t domain_length; + domain = PyUnicode_AsUTF8AndSize(args[0], &domain_length); + if (domain == NULL) { + goto exit; + } + if (strlen(domain) != (size_t)domain_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + if (args[1] == Py_None) { + codeset = NULL; + } + else if (PyUnicode_Check(args[1])) { + Py_ssize_t codeset_length; + codeset = PyUnicode_AsUTF8AndSize(args[1], &codeset_length); + if (codeset == NULL) { + goto exit; + } + if (strlen(codeset) != (size_t)codeset_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + } + else { + _PyArg_BadArgument("bind_textdomain_codeset", "argument 2", "str or None", args[1]); + goto exit; + } + return_value = _locale_bind_textdomain_codeset_impl(module, domain, codeset); + +exit: + return return_value; +} + +#endif /* defined(HAVE_LIBINTL_H) && defined(HAVE_BIND_TEXTDOMAIN_CODESET) */ + +#ifndef _LOCALE_STRCOLL_METHODDEF + #define _LOCALE_STRCOLL_METHODDEF +#endif /* !defined(_LOCALE_STRCOLL_METHODDEF) */ + +#ifndef _LOCALE_STRXFRM_METHODDEF + #define _LOCALE_STRXFRM_METHODDEF +#endif /* !defined(_LOCALE_STRXFRM_METHODDEF) */ + +#ifndef _LOCALE__GETDEFAULTLOCALE_METHODDEF + #define _LOCALE__GETDEFAULTLOCALE_METHODDEF +#endif /* !defined(_LOCALE__GETDEFAULTLOCALE_METHODDEF) */ + +#ifndef _LOCALE_NL_LANGINFO_METHODDEF + #define _LOCALE_NL_LANGINFO_METHODDEF +#endif /* !defined(_LOCALE_NL_LANGINFO_METHODDEF) */ + +#ifndef _LOCALE_GETTEXT_METHODDEF + #define _LOCALE_GETTEXT_METHODDEF +#endif /* !defined(_LOCALE_GETTEXT_METHODDEF) */ + +#ifndef _LOCALE_DGETTEXT_METHODDEF + #define _LOCALE_DGETTEXT_METHODDEF +#endif /* !defined(_LOCALE_DGETTEXT_METHODDEF) */ + +#ifndef _LOCALE_DCGETTEXT_METHODDEF + #define _LOCALE_DCGETTEXT_METHODDEF +#endif /* !defined(_LOCALE_DCGETTEXT_METHODDEF) */ + +#ifndef _LOCALE_TEXTDOMAIN_METHODDEF + #define _LOCALE_TEXTDOMAIN_METHODDEF +#endif /* !defined(_LOCALE_TEXTDOMAIN_METHODDEF) */ + +#ifndef _LOCALE_BINDTEXTDOMAIN_METHODDEF + #define _LOCALE_BINDTEXTDOMAIN_METHODDEF +#endif /* !defined(_LOCALE_BINDTEXTDOMAIN_METHODDEF) */ + +#ifndef _LOCALE_BIND_TEXTDOMAIN_CODESET_METHODDEF + #define _LOCALE_BIND_TEXTDOMAIN_CODESET_METHODDEF +#endif /* !defined(_LOCALE_BIND_TEXTDOMAIN_CODESET_METHODDEF) */ +/*[clinic end generated code: output=fe944779cd572d8e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h index 6022dfe0db4b28d..a9630d55998d3de 100644 --- a/Modules/clinic/_winapi.c.h +++ b/Modules/clinic/_winapi.c.h @@ -195,8 +195,8 @@ _winapi_CreateFileMapping(PyObject *module, PyObject *const *args, Py_ssize_t na LPCWSTR name; HANDLE _return_value; - if (!_PyArg_ParseStack(args, nargs, "" F_HANDLE "" F_POINTER "kkku:CreateFileMapping", - &file_handle, &security_attributes, &protect, &max_size_high, &max_size_low, &name)) { + if (!_PyArg_ParseStack(args, nargs, "" F_HANDLE "" F_POINTER "kkkO&:CreateFileMapping", + &file_handle, &security_attributes, &protect, &max_size_high, &max_size_low, _PyUnicode_WideCharString_Converter, &name)) { goto exit; } _return_value = _winapi_CreateFileMapping_impl(module, file_handle, security_attributes, protect, max_size_high, max_size_low, name); @@ -209,6 +209,11 @@ _winapi_CreateFileMapping(PyObject *module, PyObject *const *args, Py_ssize_t na return_value = HANDLE_TO_PYNUM(_return_value); exit: + /* Cleanup for name */ + #if !USE_UNICODE_WCHAR_CACHE + PyMem_Free((void *)name); + #endif /* USE_UNICODE_WCHAR_CACHE */ + return return_value; } @@ -221,23 +226,55 @@ PyDoc_STRVAR(_winapi_CreateJunction__doc__, {"CreateJunction", (PyCFunction)(void(*)(void))_winapi_CreateJunction, METH_FASTCALL, _winapi_CreateJunction__doc__}, static PyObject * -_winapi_CreateJunction_impl(PyObject *module, LPWSTR src_path, - LPWSTR dst_path); +_winapi_CreateJunction_impl(PyObject *module, LPCWSTR src_path, + LPCWSTR dst_path); static PyObject * _winapi_CreateJunction(PyObject *module, PyObject *const *args, Py_ssize_t nargs) { PyObject *return_value = NULL; - LPWSTR src_path; - LPWSTR dst_path; + LPCWSTR src_path; + LPCWSTR dst_path; - if (!_PyArg_ParseStack(args, nargs, "uu:CreateJunction", - &src_path, &dst_path)) { + if (!_PyArg_CheckPositional("CreateJunction", nargs, 2, 2)) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("CreateJunction", "argument 1", "str", args[0]); + goto exit; + } + #if USE_UNICODE_WCHAR_CACHE + src_path = _PyUnicode_AsUnicode(args[0]); + #else /* USE_UNICODE_WCHAR_CACHE */ + src_path = PyUnicode_AsWideCharString(args[0], NULL); + #endif /* USE_UNICODE_WCHAR_CACHE */ + if (src_path == NULL) { + goto exit; + } + if (!PyUnicode_Check(args[1])) { + _PyArg_BadArgument("CreateJunction", "argument 2", "str", args[1]); + goto exit; + } + #if USE_UNICODE_WCHAR_CACHE + dst_path = _PyUnicode_AsUnicode(args[1]); + #else /* USE_UNICODE_WCHAR_CACHE */ + dst_path = PyUnicode_AsWideCharString(args[1], NULL); + #endif /* USE_UNICODE_WCHAR_CACHE */ + if (dst_path == NULL) { goto exit; } return_value = _winapi_CreateJunction_impl(module, src_path, dst_path); exit: + /* Cleanup for src_path */ + #if !USE_UNICODE_WCHAR_CACHE + PyMem_Free((void *)src_path); + #endif /* USE_UNICODE_WCHAR_CACHE */ + /* Cleanup for dst_path */ + #if !USE_UNICODE_WCHAR_CACHE + PyMem_Free((void *)dst_path); + #endif /* USE_UNICODE_WCHAR_CACHE */ + return return_value; } @@ -715,8 +752,8 @@ _winapi_OpenFileMapping(PyObject *module, PyObject *const *args, Py_ssize_t narg LPCWSTR name; HANDLE _return_value; - if (!_PyArg_ParseStack(args, nargs, "kiu:OpenFileMapping", - &desired_access, &inherit_handle, &name)) { + if (!_PyArg_ParseStack(args, nargs, "kiO&:OpenFileMapping", + &desired_access, &inherit_handle, _PyUnicode_WideCharString_Converter, &name)) { goto exit; } _return_value = _winapi_OpenFileMapping_impl(module, desired_access, inherit_handle, name); @@ -729,6 +766,11 @@ _winapi_OpenFileMapping(PyObject *module, PyObject *const *args, Py_ssize_t narg return_value = HANDLE_TO_PYNUM(_return_value); exit: + /* Cleanup for name */ + #if !USE_UNICODE_WCHAR_CACHE + PyMem_Free((void *)name); + #endif /* USE_UNICODE_WCHAR_CACHE */ + return return_value; } @@ -1106,4 +1148,4 @@ _winapi_GetFileType(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P exit: return return_value; } -/*[clinic end generated code: output=db87076a32fa7abe input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1f10e03f64ff9777 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h new file mode 100644 index 000000000000000..efecd9028b77600 --- /dev/null +++ b/Modules/clinic/overlapped.c.h @@ -0,0 +1,908 @@ +/*[clinic input] +preserve +[clinic start generated code]*/ + +PyDoc_STRVAR(_overlapped_CreateIoCompletionPort__doc__, +"CreateIoCompletionPort($module, handle, port, key, concurrency, /)\n" +"--\n" +"\n" +"Create a completion port or register a handle with a port."); + +#define _OVERLAPPED_CREATEIOCOMPLETIONPORT_METHODDEF \ + {"CreateIoCompletionPort", (PyCFunction)(void(*)(void))_overlapped_CreateIoCompletionPort, METH_FASTCALL, _overlapped_CreateIoCompletionPort__doc__}, + +static PyObject * +_overlapped_CreateIoCompletionPort_impl(PyObject *module, HANDLE FileHandle, + HANDLE ExistingCompletionPort, + ULONG_PTR CompletionKey, + DWORD NumberOfConcurrentThreads); + +static PyObject * +_overlapped_CreateIoCompletionPort(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE FileHandle; + HANDLE ExistingCompletionPort; + ULONG_PTR CompletionKey; + DWORD NumberOfConcurrentThreads; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE""F_HANDLE""F_ULONG_PTR"k:CreateIoCompletionPort", + &FileHandle, &ExistingCompletionPort, &CompletionKey, &NumberOfConcurrentThreads)) { + goto exit; + } + return_value = _overlapped_CreateIoCompletionPort_impl(module, FileHandle, ExistingCompletionPort, CompletionKey, NumberOfConcurrentThreads); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_GetQueuedCompletionStatus__doc__, +"GetQueuedCompletionStatus($module, port, msecs, /)\n" +"--\n" +"\n" +"Get a message from completion port.\n" +"\n" +"Wait for up to msecs milliseconds."); + +#define _OVERLAPPED_GETQUEUEDCOMPLETIONSTATUS_METHODDEF \ + {"GetQueuedCompletionStatus", (PyCFunction)(void(*)(void))_overlapped_GetQueuedCompletionStatus, METH_FASTCALL, _overlapped_GetQueuedCompletionStatus__doc__}, + +static PyObject * +_overlapped_GetQueuedCompletionStatus_impl(PyObject *module, + HANDLE CompletionPort, + DWORD Milliseconds); + +static PyObject * +_overlapped_GetQueuedCompletionStatus(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE CompletionPort; + DWORD Milliseconds; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"k:GetQueuedCompletionStatus", + &CompletionPort, &Milliseconds)) { + goto exit; + } + return_value = _overlapped_GetQueuedCompletionStatus_impl(module, CompletionPort, Milliseconds); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_PostQueuedCompletionStatus__doc__, +"PostQueuedCompletionStatus($module, port, bytes, key, address, /)\n" +"--\n" +"\n" +"Post a message to completion port."); + +#define _OVERLAPPED_POSTQUEUEDCOMPLETIONSTATUS_METHODDEF \ + {"PostQueuedCompletionStatus", (PyCFunction)(void(*)(void))_overlapped_PostQueuedCompletionStatus, METH_FASTCALL, _overlapped_PostQueuedCompletionStatus__doc__}, + +static PyObject * +_overlapped_PostQueuedCompletionStatus_impl(PyObject *module, + HANDLE CompletionPort, + DWORD NumberOfBytes, + ULONG_PTR CompletionKey, + OVERLAPPED *Overlapped); + +static PyObject * +_overlapped_PostQueuedCompletionStatus(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE CompletionPort; + DWORD NumberOfBytes; + ULONG_PTR CompletionKey; + OVERLAPPED *Overlapped; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"k"F_ULONG_PTR""F_POINTER":PostQueuedCompletionStatus", + &CompletionPort, &NumberOfBytes, &CompletionKey, &Overlapped)) { + goto exit; + } + return_value = _overlapped_PostQueuedCompletionStatus_impl(module, CompletionPort, NumberOfBytes, CompletionKey, Overlapped); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_RegisterWaitWithQueue__doc__, +"RegisterWaitWithQueue($module, Object, CompletionPort, Overlapped,\n" +" Timeout, /)\n" +"--\n" +"\n" +"Register wait for Object; when complete CompletionPort is notified."); + +#define _OVERLAPPED_REGISTERWAITWITHQUEUE_METHODDEF \ + {"RegisterWaitWithQueue", (PyCFunction)(void(*)(void))_overlapped_RegisterWaitWithQueue, METH_FASTCALL, _overlapped_RegisterWaitWithQueue__doc__}, + +static PyObject * +_overlapped_RegisterWaitWithQueue_impl(PyObject *module, HANDLE Object, + HANDLE CompletionPort, + OVERLAPPED *Overlapped, + DWORD Milliseconds); + +static PyObject * +_overlapped_RegisterWaitWithQueue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE Object; + HANDLE CompletionPort; + OVERLAPPED *Overlapped; + DWORD Milliseconds; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE""F_HANDLE""F_POINTER"k:RegisterWaitWithQueue", + &Object, &CompletionPort, &Overlapped, &Milliseconds)) { + goto exit; + } + return_value = _overlapped_RegisterWaitWithQueue_impl(module, Object, CompletionPort, Overlapped, Milliseconds); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_UnregisterWait__doc__, +"UnregisterWait($module, WaitHandle, /)\n" +"--\n" +"\n" +"Unregister wait handle."); + +#define _OVERLAPPED_UNREGISTERWAIT_METHODDEF \ + {"UnregisterWait", (PyCFunction)_overlapped_UnregisterWait, METH_O, _overlapped_UnregisterWait__doc__}, + +static PyObject * +_overlapped_UnregisterWait_impl(PyObject *module, HANDLE WaitHandle); + +static PyObject * +_overlapped_UnregisterWait(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + HANDLE WaitHandle; + + if (!PyArg_Parse(arg, ""F_HANDLE":UnregisterWait", &WaitHandle)) { + goto exit; + } + return_value = _overlapped_UnregisterWait_impl(module, WaitHandle); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_UnregisterWaitEx__doc__, +"UnregisterWaitEx($module, WaitHandle, Event, /)\n" +"--\n" +"\n" +"Unregister wait handle."); + +#define _OVERLAPPED_UNREGISTERWAITEX_METHODDEF \ + {"UnregisterWaitEx", (PyCFunction)(void(*)(void))_overlapped_UnregisterWaitEx, METH_FASTCALL, _overlapped_UnregisterWaitEx__doc__}, + +static PyObject * +_overlapped_UnregisterWaitEx_impl(PyObject *module, HANDLE WaitHandle, + HANDLE Event); + +static PyObject * +_overlapped_UnregisterWaitEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE WaitHandle; + HANDLE Event; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE""F_HANDLE":UnregisterWaitEx", + &WaitHandle, &Event)) { + goto exit; + } + return_value = _overlapped_UnregisterWaitEx_impl(module, WaitHandle, Event); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_CreateEvent__doc__, +"CreateEvent($module, EventAttributes, ManualReset, InitialState, Name,\n" +" /)\n" +"--\n" +"\n" +"Create an event.\n" +"\n" +"EventAttributes must be None."); + +#define _OVERLAPPED_CREATEEVENT_METHODDEF \ + {"CreateEvent", (PyCFunction)(void(*)(void))_overlapped_CreateEvent, METH_FASTCALL, _overlapped_CreateEvent__doc__}, + +static PyObject * +_overlapped_CreateEvent_impl(PyObject *module, PyObject *EventAttributes, + BOOL ManualReset, BOOL InitialState, + const Py_UNICODE *Name); + +static PyObject * +_overlapped_CreateEvent(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *EventAttributes; + BOOL ManualReset; + BOOL InitialState; + const Py_UNICODE *Name; + + if (!_PyArg_ParseStack(args, nargs, "OiiO&:CreateEvent", + &EventAttributes, &ManualReset, &InitialState, _PyUnicode_WideCharString_Opt_Converter, &Name)) { + goto exit; + } + return_value = _overlapped_CreateEvent_impl(module, EventAttributes, ManualReset, InitialState, Name); + +exit: + /* Cleanup for Name */ + #if !USE_UNICODE_WCHAR_CACHE + PyMem_Free((void *)Name); + #endif /* USE_UNICODE_WCHAR_CACHE */ + + return return_value; +} + +PyDoc_STRVAR(_overlapped_SetEvent__doc__, +"SetEvent($module, Handle, /)\n" +"--\n" +"\n" +"Set event."); + +#define _OVERLAPPED_SETEVENT_METHODDEF \ + {"SetEvent", (PyCFunction)_overlapped_SetEvent, METH_O, _overlapped_SetEvent__doc__}, + +static PyObject * +_overlapped_SetEvent_impl(PyObject *module, HANDLE Handle); + +static PyObject * +_overlapped_SetEvent(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + HANDLE Handle; + + if (!PyArg_Parse(arg, ""F_HANDLE":SetEvent", &Handle)) { + goto exit; + } + return_value = _overlapped_SetEvent_impl(module, Handle); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_ResetEvent__doc__, +"ResetEvent($module, Handle, /)\n" +"--\n" +"\n" +"Reset event."); + +#define _OVERLAPPED_RESETEVENT_METHODDEF \ + {"ResetEvent", (PyCFunction)_overlapped_ResetEvent, METH_O, _overlapped_ResetEvent__doc__}, + +static PyObject * +_overlapped_ResetEvent_impl(PyObject *module, HANDLE Handle); + +static PyObject * +_overlapped_ResetEvent(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + HANDLE Handle; + + if (!PyArg_Parse(arg, ""F_HANDLE":ResetEvent", &Handle)) { + goto exit; + } + return_value = _overlapped_ResetEvent_impl(module, Handle); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_BindLocal__doc__, +"BindLocal($module, handle, family, /)\n" +"--\n" +"\n" +"Bind a socket handle to an arbitrary local port.\n" +"\n" +"family should be AF_INET or AF_INET6."); + +#define _OVERLAPPED_BINDLOCAL_METHODDEF \ + {"BindLocal", (PyCFunction)(void(*)(void))_overlapped_BindLocal, METH_FASTCALL, _overlapped_BindLocal__doc__}, + +static PyObject * +_overlapped_BindLocal_impl(PyObject *module, HANDLE Socket, int Family); + +static PyObject * +_overlapped_BindLocal(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE Socket; + int Family; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"i:BindLocal", + &Socket, &Family)) { + goto exit; + } + return_value = _overlapped_BindLocal_impl(module, Socket, Family); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_FormatMessage__doc__, +"FormatMessage($module, error_code, /)\n" +"--\n" +"\n" +"Return error message for an error code."); + +#define _OVERLAPPED_FORMATMESSAGE_METHODDEF \ + {"FormatMessage", (PyCFunction)_overlapped_FormatMessage, METH_O, _overlapped_FormatMessage__doc__}, + +static PyObject * +_overlapped_FormatMessage_impl(PyObject *module, DWORD code); + +static PyObject * +_overlapped_FormatMessage(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + DWORD code; + + if (!PyArg_Parse(arg, "k:FormatMessage", &code)) { + goto exit; + } + return_value = _overlapped_FormatMessage_impl(module, code); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped__doc__, +"Overlapped(event=_overlapped.INVALID_HANDLE_VALUE)\n" +"--\n" +"\n" +"OVERLAPPED structure wrapper."); + +static PyObject * +_overlapped_Overlapped_impl(PyTypeObject *type, HANDLE event); + +static PyObject * +_overlapped_Overlapped(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"event", NULL}; + static _PyArg_Parser _parser = {"|"F_HANDLE":Overlapped", _keywords, 0}; + HANDLE event = INVALID_HANDLE_VALUE; + + if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser, + &event)) { + goto exit; + } + return_value = _overlapped_Overlapped_impl(type, event); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_cancel__doc__, +"cancel($self, /)\n" +"--\n" +"\n" +"Cancel overlapped operation."); + +#define _OVERLAPPED_OVERLAPPED_CANCEL_METHODDEF \ + {"cancel", (PyCFunction)_overlapped_Overlapped_cancel, METH_NOARGS, _overlapped_Overlapped_cancel__doc__}, + +static PyObject * +_overlapped_Overlapped_cancel_impl(OverlappedObject *self); + +static PyObject * +_overlapped_Overlapped_cancel(OverlappedObject *self, PyObject *Py_UNUSED(ignored)) +{ + return _overlapped_Overlapped_cancel_impl(self); +} + +PyDoc_STRVAR(_overlapped_Overlapped_getresult__doc__, +"getresult($self, wait=False, /)\n" +"--\n" +"\n" +"Retrieve result of operation.\n" +"\n" +"If wait is true then it blocks until the operation is finished. If wait\n" +"is false and the operation is still pending then an error is raised."); + +#define _OVERLAPPED_OVERLAPPED_GETRESULT_METHODDEF \ + {"getresult", (PyCFunction)(void(*)(void))_overlapped_Overlapped_getresult, METH_FASTCALL, _overlapped_Overlapped_getresult__doc__}, + +static PyObject * +_overlapped_Overlapped_getresult_impl(OverlappedObject *self, BOOL wait); + +static PyObject * +_overlapped_Overlapped_getresult(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + BOOL wait = FALSE; + + if (!_PyArg_ParseStack(args, nargs, "|i:getresult", + &wait)) { + goto exit; + } + return_value = _overlapped_Overlapped_getresult_impl(self, wait); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_ReadFile__doc__, +"ReadFile($self, handle, size, /)\n" +"--\n" +"\n" +"Start overlapped read."); + +#define _OVERLAPPED_OVERLAPPED_READFILE_METHODDEF \ + {"ReadFile", (PyCFunction)(void(*)(void))_overlapped_Overlapped_ReadFile, METH_FASTCALL, _overlapped_Overlapped_ReadFile__doc__}, + +static PyObject * +_overlapped_Overlapped_ReadFile_impl(OverlappedObject *self, HANDLE handle, + DWORD size); + +static PyObject * +_overlapped_Overlapped_ReadFile(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + DWORD size; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"k:ReadFile", + &handle, &size)) { + goto exit; + } + return_value = _overlapped_Overlapped_ReadFile_impl(self, handle, size); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_ReadFileInto__doc__, +"ReadFileInto($self, handle, buf, /)\n" +"--\n" +"\n" +"Start overlapped receive."); + +#define _OVERLAPPED_OVERLAPPED_READFILEINTO_METHODDEF \ + {"ReadFileInto", (PyCFunction)(void(*)(void))_overlapped_Overlapped_ReadFileInto, METH_FASTCALL, _overlapped_Overlapped_ReadFileInto__doc__}, + +static PyObject * +_overlapped_Overlapped_ReadFileInto_impl(OverlappedObject *self, + HANDLE handle, PyObject *bufobj); + +static PyObject * +_overlapped_Overlapped_ReadFileInto(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + PyObject *bufobj; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"O:ReadFileInto", + &handle, &bufobj)) { + goto exit; + } + return_value = _overlapped_Overlapped_ReadFileInto_impl(self, handle, bufobj); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_WSARecv__doc__, +"WSARecv($self, handle, size, flags=0, /)\n" +"--\n" +"\n" +"Start overlapped receive."); + +#define _OVERLAPPED_OVERLAPPED_WSARECV_METHODDEF \ + {"WSARecv", (PyCFunction)(void(*)(void))_overlapped_Overlapped_WSARecv, METH_FASTCALL, _overlapped_Overlapped_WSARecv__doc__}, + +static PyObject * +_overlapped_Overlapped_WSARecv_impl(OverlappedObject *self, HANDLE handle, + DWORD size, DWORD flags); + +static PyObject * +_overlapped_Overlapped_WSARecv(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + DWORD size; + DWORD flags = 0; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"k|k:WSARecv", + &handle, &size, &flags)) { + goto exit; + } + return_value = _overlapped_Overlapped_WSARecv_impl(self, handle, size, flags); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_WSARecvInto__doc__, +"WSARecvInto($self, handle, buf, flags, /)\n" +"--\n" +"\n" +"Start overlapped receive."); + +#define _OVERLAPPED_OVERLAPPED_WSARECVINTO_METHODDEF \ + {"WSARecvInto", (PyCFunction)(void(*)(void))_overlapped_Overlapped_WSARecvInto, METH_FASTCALL, _overlapped_Overlapped_WSARecvInto__doc__}, + +static PyObject * +_overlapped_Overlapped_WSARecvInto_impl(OverlappedObject *self, + HANDLE handle, PyObject *bufobj, + DWORD flags); + +static PyObject * +_overlapped_Overlapped_WSARecvInto(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + PyObject *bufobj; + DWORD flags; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"Ok:WSARecvInto", + &handle, &bufobj, &flags)) { + goto exit; + } + return_value = _overlapped_Overlapped_WSARecvInto_impl(self, handle, bufobj, flags); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_WriteFile__doc__, +"WriteFile($self, handle, buf, /)\n" +"--\n" +"\n" +"Start overlapped write."); + +#define _OVERLAPPED_OVERLAPPED_WRITEFILE_METHODDEF \ + {"WriteFile", (PyCFunction)(void(*)(void))_overlapped_Overlapped_WriteFile, METH_FASTCALL, _overlapped_Overlapped_WriteFile__doc__}, + +static PyObject * +_overlapped_Overlapped_WriteFile_impl(OverlappedObject *self, HANDLE handle, + PyObject *bufobj); + +static PyObject * +_overlapped_Overlapped_WriteFile(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + PyObject *bufobj; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"O:WriteFile", + &handle, &bufobj)) { + goto exit; + } + return_value = _overlapped_Overlapped_WriteFile_impl(self, handle, bufobj); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_WSASend__doc__, +"WSASend($self, handle, buf, flags, /)\n" +"--\n" +"\n" +"Start overlapped send."); + +#define _OVERLAPPED_OVERLAPPED_WSASEND_METHODDEF \ + {"WSASend", (PyCFunction)(void(*)(void))_overlapped_Overlapped_WSASend, METH_FASTCALL, _overlapped_Overlapped_WSASend__doc__}, + +static PyObject * +_overlapped_Overlapped_WSASend_impl(OverlappedObject *self, HANDLE handle, + PyObject *bufobj, DWORD flags); + +static PyObject * +_overlapped_Overlapped_WSASend(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + PyObject *bufobj; + DWORD flags; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"Ok:WSASend", + &handle, &bufobj, &flags)) { + goto exit; + } + return_value = _overlapped_Overlapped_WSASend_impl(self, handle, bufobj, flags); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_AcceptEx__doc__, +"AcceptEx($self, listen_handle, accept_handle, /)\n" +"--\n" +"\n" +"Start overlapped wait for client to connect."); + +#define _OVERLAPPED_OVERLAPPED_ACCEPTEX_METHODDEF \ + {"AcceptEx", (PyCFunction)(void(*)(void))_overlapped_Overlapped_AcceptEx, METH_FASTCALL, _overlapped_Overlapped_AcceptEx__doc__}, + +static PyObject * +_overlapped_Overlapped_AcceptEx_impl(OverlappedObject *self, + HANDLE ListenSocket, + HANDLE AcceptSocket); + +static PyObject * +_overlapped_Overlapped_AcceptEx(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE ListenSocket; + HANDLE AcceptSocket; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE""F_HANDLE":AcceptEx", + &ListenSocket, &AcceptSocket)) { + goto exit; + } + return_value = _overlapped_Overlapped_AcceptEx_impl(self, ListenSocket, AcceptSocket); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_ConnectEx__doc__, +"ConnectEx($self, client_handle, address_as_bytes, /)\n" +"--\n" +"\n" +"Start overlapped connect.\n" +"\n" +"client_handle should be unbound."); + +#define _OVERLAPPED_OVERLAPPED_CONNECTEX_METHODDEF \ + {"ConnectEx", (PyCFunction)(void(*)(void))_overlapped_Overlapped_ConnectEx, METH_FASTCALL, _overlapped_Overlapped_ConnectEx__doc__}, + +static PyObject * +_overlapped_Overlapped_ConnectEx_impl(OverlappedObject *self, + HANDLE ConnectSocket, + PyObject *AddressObj); + +static PyObject * +_overlapped_Overlapped_ConnectEx(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE ConnectSocket; + PyObject *AddressObj; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"O!:ConnectEx", + &ConnectSocket, &PyTuple_Type, &AddressObj)) { + goto exit; + } + return_value = _overlapped_Overlapped_ConnectEx_impl(self, ConnectSocket, AddressObj); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_DisconnectEx__doc__, +"DisconnectEx($self, handle, flags, /)\n" +"--\n" +"\n"); + +#define _OVERLAPPED_OVERLAPPED_DISCONNECTEX_METHODDEF \ + {"DisconnectEx", (PyCFunction)(void(*)(void))_overlapped_Overlapped_DisconnectEx, METH_FASTCALL, _overlapped_Overlapped_DisconnectEx__doc__}, + +static PyObject * +_overlapped_Overlapped_DisconnectEx_impl(OverlappedObject *self, + HANDLE Socket, DWORD flags); + +static PyObject * +_overlapped_Overlapped_DisconnectEx(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE Socket; + DWORD flags; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"k:DisconnectEx", + &Socket, &flags)) { + goto exit; + } + return_value = _overlapped_Overlapped_DisconnectEx_impl(self, Socket, flags); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_TransmitFile__doc__, +"TransmitFile($self, socket, file, offset, offset_high, count_to_write,\n" +" count_per_send, flags, /)\n" +"--\n" +"\n" +"Transmit file data over a connected socket."); + +#define _OVERLAPPED_OVERLAPPED_TRANSMITFILE_METHODDEF \ + {"TransmitFile", (PyCFunction)(void(*)(void))_overlapped_Overlapped_TransmitFile, METH_FASTCALL, _overlapped_Overlapped_TransmitFile__doc__}, + +static PyObject * +_overlapped_Overlapped_TransmitFile_impl(OverlappedObject *self, + HANDLE Socket, HANDLE File, + DWORD offset, DWORD offset_high, + DWORD count_to_write, + DWORD count_per_send, DWORD flags); + +static PyObject * +_overlapped_Overlapped_TransmitFile(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE Socket; + HANDLE File; + DWORD offset; + DWORD offset_high; + DWORD count_to_write; + DWORD count_per_send; + DWORD flags; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE""F_HANDLE"kkkkk:TransmitFile", + &Socket, &File, &offset, &offset_high, &count_to_write, &count_per_send, &flags)) { + goto exit; + } + return_value = _overlapped_Overlapped_TransmitFile_impl(self, Socket, File, offset, offset_high, count_to_write, count_per_send, flags); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_ConnectNamedPipe__doc__, +"ConnectNamedPipe($self, handle, /)\n" +"--\n" +"\n" +"Start overlapped wait for a client to connect."); + +#define _OVERLAPPED_OVERLAPPED_CONNECTNAMEDPIPE_METHODDEF \ + {"ConnectNamedPipe", (PyCFunction)_overlapped_Overlapped_ConnectNamedPipe, METH_O, _overlapped_Overlapped_ConnectNamedPipe__doc__}, + +static PyObject * +_overlapped_Overlapped_ConnectNamedPipe_impl(OverlappedObject *self, + HANDLE Pipe); + +static PyObject * +_overlapped_Overlapped_ConnectNamedPipe(OverlappedObject *self, PyObject *arg) +{ + PyObject *return_value = NULL; + HANDLE Pipe; + + if (!PyArg_Parse(arg, ""F_HANDLE":ConnectNamedPipe", &Pipe)) { + goto exit; + } + return_value = _overlapped_Overlapped_ConnectNamedPipe_impl(self, Pipe); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_ConnectPipe__doc__, +"ConnectPipe($self, addr, /)\n" +"--\n" +"\n" +"Connect to the pipe for asynchronous I/O (overlapped)."); + +#define _OVERLAPPED_OVERLAPPED_CONNECTPIPE_METHODDEF \ + {"ConnectPipe", (PyCFunction)_overlapped_Overlapped_ConnectPipe, METH_O, _overlapped_Overlapped_ConnectPipe__doc__}, + +static PyObject * +_overlapped_Overlapped_ConnectPipe_impl(OverlappedObject *self, + const Py_UNICODE *Address); + +static PyObject * +_overlapped_Overlapped_ConnectPipe(OverlappedObject *self, PyObject *arg) +{ + PyObject *return_value = NULL; + const Py_UNICODE *Address; + + if (!PyUnicode_Check(arg)) { + _PyArg_BadArgument("ConnectPipe", "argument", "str", arg); + goto exit; + } + #if USE_UNICODE_WCHAR_CACHE + Address = _PyUnicode_AsUnicode(arg); + #else /* USE_UNICODE_WCHAR_CACHE */ + Address = PyUnicode_AsWideCharString(arg, NULL); + #endif /* USE_UNICODE_WCHAR_CACHE */ + if (Address == NULL) { + goto exit; + } + return_value = _overlapped_Overlapped_ConnectPipe_impl(self, Address); + +exit: + /* Cleanup for Address */ + #if !USE_UNICODE_WCHAR_CACHE + PyMem_Free((void *)Address); + #endif /* USE_UNICODE_WCHAR_CACHE */ + + return return_value; +} + +PyDoc_STRVAR(_overlapped_WSAConnect__doc__, +"WSAConnect($module, client_handle, address_as_bytes, /)\n" +"--\n" +"\n" +"Bind a remote address to a connectionless (UDP) socket."); + +#define _OVERLAPPED_WSACONNECT_METHODDEF \ + {"WSAConnect", (PyCFunction)(void(*)(void))_overlapped_WSAConnect, METH_FASTCALL, _overlapped_WSAConnect__doc__}, + +static PyObject * +_overlapped_WSAConnect_impl(PyObject *module, HANDLE ConnectSocket, + PyObject *AddressObj); + +static PyObject * +_overlapped_WSAConnect(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE ConnectSocket; + PyObject *AddressObj; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"O:WSAConnect", + &ConnectSocket, &AddressObj)) { + goto exit; + } + return_value = _overlapped_WSAConnect_impl(module, ConnectSocket, AddressObj); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_WSASendTo__doc__, +"WSASendTo($self, handle, buf, flags, address_as_bytes, /)\n" +"--\n" +"\n" +"Start overlapped sendto over a connectionless (UDP) socket."); + +#define _OVERLAPPED_OVERLAPPED_WSASENDTO_METHODDEF \ + {"WSASendTo", (PyCFunction)(void(*)(void))_overlapped_Overlapped_WSASendTo, METH_FASTCALL, _overlapped_Overlapped_WSASendTo__doc__}, + +static PyObject * +_overlapped_Overlapped_WSASendTo_impl(OverlappedObject *self, HANDLE handle, + PyObject *bufobj, DWORD flags, + PyObject *AddressObj); + +static PyObject * +_overlapped_Overlapped_WSASendTo(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + PyObject *bufobj; + DWORD flags; + PyObject *AddressObj; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"OkO:WSASendTo", + &handle, &bufobj, &flags, &AddressObj)) { + goto exit; + } + return_value = _overlapped_Overlapped_WSASendTo_impl(self, handle, bufobj, flags, AddressObj); + +exit: + return return_value; +} + +PyDoc_STRVAR(_overlapped_Overlapped_WSARecvFrom__doc__, +"WSARecvFrom($self, handle, size, flags=0, /)\n" +"--\n" +"\n" +"Start overlapped receive."); + +#define _OVERLAPPED_OVERLAPPED_WSARECVFROM_METHODDEF \ + {"WSARecvFrom", (PyCFunction)(void(*)(void))_overlapped_Overlapped_WSARecvFrom, METH_FASTCALL, _overlapped_Overlapped_WSARecvFrom__doc__}, + +static PyObject * +_overlapped_Overlapped_WSARecvFrom_impl(OverlappedObject *self, + HANDLE handle, DWORD size, + DWORD flags); + +static PyObject * +_overlapped_Overlapped_WSARecvFrom(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + HANDLE handle; + DWORD size; + DWORD flags = 0; + + if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"k|k:WSARecvFrom", + &handle, &size, &flags)) { + goto exit; + } + return_value = _overlapped_Overlapped_WSARecvFrom_impl(self, handle, size, flags); + +exit: + return return_value; +} +/*[clinic end generated code: output=ee2ec2f93c8d334b input=a9049054013a1b77]*/ diff --git a/Modules/clinic/readline.c.h b/Modules/clinic/readline.c.h new file mode 100644 index 000000000000000..80207caf0711002 --- /dev/null +++ b/Modules/clinic/readline.c.h @@ -0,0 +1,686 @@ +/*[clinic input] +preserve +[clinic start generated code]*/ + +PyDoc_STRVAR(readline_parse_and_bind__doc__, +"parse_and_bind($module, string, /)\n" +"--\n" +"\n" +"Execute the init line provided in the string argument."); + +#define READLINE_PARSE_AND_BIND_METHODDEF \ + {"parse_and_bind", (PyCFunction)readline_parse_and_bind, METH_O, readline_parse_and_bind__doc__}, + +PyDoc_STRVAR(readline_read_init_file__doc__, +"read_init_file($module, filename=None, /)\n" +"--\n" +"\n" +"Execute a readline initialization file.\n" +"\n" +"The default filename is the last filename used."); + +#define READLINE_READ_INIT_FILE_METHODDEF \ + {"read_init_file", (PyCFunction)(void(*)(void))readline_read_init_file, METH_FASTCALL, readline_read_init_file__doc__}, + +static PyObject * +readline_read_init_file_impl(PyObject *module, PyObject *filename_obj); + +static PyObject * +readline_read_init_file(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *filename_obj = Py_None; + + if (!_PyArg_CheckPositional("read_init_file", nargs, 0, 1)) { + goto exit; + } + if (nargs < 1) { + goto skip_optional; + } + filename_obj = args[0]; +skip_optional: + return_value = readline_read_init_file_impl(module, filename_obj); + +exit: + return return_value; +} + +PyDoc_STRVAR(readline_read_history_file__doc__, +"read_history_file($module, filename=None, /)\n" +"--\n" +"\n" +"Load a readline history file.\n" +"\n" +"The default filename is ~/.history."); + +#define READLINE_READ_HISTORY_FILE_METHODDEF \ + {"read_history_file", (PyCFunction)(void(*)(void))readline_read_history_file, METH_FASTCALL, readline_read_history_file__doc__}, + +static PyObject * +readline_read_history_file_impl(PyObject *module, PyObject *filename_obj); + +static PyObject * +readline_read_history_file(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *filename_obj = Py_None; + + if (!_PyArg_CheckPositional("read_history_file", nargs, 0, 1)) { + goto exit; + } + if (nargs < 1) { + goto skip_optional; + } + filename_obj = args[0]; +skip_optional: + return_value = readline_read_history_file_impl(module, filename_obj); + +exit: + return return_value; +} + +PyDoc_STRVAR(readline_write_history_file__doc__, +"write_history_file($module, filename=None, /)\n" +"--\n" +"\n" +"Save a readline history file.\n" +"\n" +"The default filename is ~/.history."); + +#define READLINE_WRITE_HISTORY_FILE_METHODDEF \ + {"write_history_file", (PyCFunction)(void(*)(void))readline_write_history_file, METH_FASTCALL, readline_write_history_file__doc__}, + +static PyObject * +readline_write_history_file_impl(PyObject *module, PyObject *filename_obj); + +static PyObject * +readline_write_history_file(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *filename_obj = Py_None; + + if (!_PyArg_CheckPositional("write_history_file", nargs, 0, 1)) { + goto exit; + } + if (nargs < 1) { + goto skip_optional; + } + filename_obj = args[0]; +skip_optional: + return_value = readline_write_history_file_impl(module, filename_obj); + +exit: + return return_value; +} + +#if defined(HAVE_RL_APPEND_HISTORY) + +PyDoc_STRVAR(readline_append_history_file__doc__, +"append_history_file($module, nelements, filename=None, /)\n" +"--\n" +"\n" +"Append the last nelements items of the history list to file.\n" +"\n" +"The default filename is ~/.history."); + +#define READLINE_APPEND_HISTORY_FILE_METHODDEF \ + {"append_history_file", (PyCFunction)(void(*)(void))readline_append_history_file, METH_FASTCALL, readline_append_history_file__doc__}, + +static PyObject * +readline_append_history_file_impl(PyObject *module, int nelements, + PyObject *filename_obj); + +static PyObject * +readline_append_history_file(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + int nelements; + PyObject *filename_obj = Py_None; + + if (!_PyArg_CheckPositional("append_history_file", nargs, 1, 2)) { + goto exit; + } + nelements = _PyLong_AsInt(args[0]); + if (nelements == -1 && PyErr_Occurred()) { + goto exit; + } + if (nargs < 2) { + goto skip_optional; + } + filename_obj = args[1]; +skip_optional: + return_value = readline_append_history_file_impl(module, nelements, filename_obj); + +exit: + return return_value; +} + +#endif /* defined(HAVE_RL_APPEND_HISTORY) */ + +PyDoc_STRVAR(readline_set_history_length__doc__, +"set_history_length($module, length, /)\n" +"--\n" +"\n" +"Set the maximal number of lines which will be written to the history file.\n" +"\n" +"A negative length is used to inhibit history truncation."); + +#define READLINE_SET_HISTORY_LENGTH_METHODDEF \ + {"set_history_length", (PyCFunction)readline_set_history_length, METH_O, readline_set_history_length__doc__}, + +static PyObject * +readline_set_history_length_impl(PyObject *module, int length); + +static PyObject * +readline_set_history_length(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + int length; + + length = _PyLong_AsInt(arg); + if (length == -1 && PyErr_Occurred()) { + goto exit; + } + return_value = readline_set_history_length_impl(module, length); + +exit: + return return_value; +} + +PyDoc_STRVAR(readline_get_history_length__doc__, +"get_history_length($module, /)\n" +"--\n" +"\n" +"Return the maximum number of lines that will be written to the history file."); + +#define READLINE_GET_HISTORY_LENGTH_METHODDEF \ + {"get_history_length", (PyCFunction)readline_get_history_length, METH_NOARGS, readline_get_history_length__doc__}, + +static PyObject * +readline_get_history_length_impl(PyObject *module); + +static PyObject * +readline_get_history_length(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_get_history_length_impl(module); +} + +PyDoc_STRVAR(readline_set_completion_display_matches_hook__doc__, +"set_completion_display_matches_hook($module, function=None, /)\n" +"--\n" +"\n" +"Set or remove the completion display function.\n" +"\n" +"The function is called as\n" +" function(substitution, [matches], longest_match_length)\n" +"once each time matches need to be displayed."); + +#define READLINE_SET_COMPLETION_DISPLAY_MATCHES_HOOK_METHODDEF \ + {"set_completion_display_matches_hook", (PyCFunction)(void(*)(void))readline_set_completion_display_matches_hook, METH_FASTCALL, readline_set_completion_display_matches_hook__doc__}, + +static PyObject * +readline_set_completion_display_matches_hook_impl(PyObject *module, + PyObject *function); + +static PyObject * +readline_set_completion_display_matches_hook(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *function = Py_None; + + if (!_PyArg_CheckPositional("set_completion_display_matches_hook", nargs, 0, 1)) { + goto exit; + } + if (nargs < 1) { + goto skip_optional; + } + function = args[0]; +skip_optional: + return_value = readline_set_completion_display_matches_hook_impl(module, function); + +exit: + return return_value; +} + +PyDoc_STRVAR(readline_set_startup_hook__doc__, +"set_startup_hook($module, function=None, /)\n" +"--\n" +"\n" +"Set or remove the function invoked by the rl_startup_hook callback.\n" +"\n" +"The function is called with no arguments just\n" +"before readline prints the first prompt."); + +#define READLINE_SET_STARTUP_HOOK_METHODDEF \ + {"set_startup_hook", (PyCFunction)(void(*)(void))readline_set_startup_hook, METH_FASTCALL, readline_set_startup_hook__doc__}, + +static PyObject * +readline_set_startup_hook_impl(PyObject *module, PyObject *function); + +static PyObject * +readline_set_startup_hook(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *function = Py_None; + + if (!_PyArg_CheckPositional("set_startup_hook", nargs, 0, 1)) { + goto exit; + } + if (nargs < 1) { + goto skip_optional; + } + function = args[0]; +skip_optional: + return_value = readline_set_startup_hook_impl(module, function); + +exit: + return return_value; +} + +#if defined(HAVE_RL_PRE_INPUT_HOOK) + +PyDoc_STRVAR(readline_set_pre_input_hook__doc__, +"set_pre_input_hook($module, function=None, /)\n" +"--\n" +"\n" +"Set or remove the function invoked by the rl_pre_input_hook callback.\n" +"\n" +"The function is called with no arguments after the first prompt\n" +"has been printed and just before readline starts reading input\n" +"characters."); + +#define READLINE_SET_PRE_INPUT_HOOK_METHODDEF \ + {"set_pre_input_hook", (PyCFunction)(void(*)(void))readline_set_pre_input_hook, METH_FASTCALL, readline_set_pre_input_hook__doc__}, + +static PyObject * +readline_set_pre_input_hook_impl(PyObject *module, PyObject *function); + +static PyObject * +readline_set_pre_input_hook(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *function = Py_None; + + if (!_PyArg_CheckPositional("set_pre_input_hook", nargs, 0, 1)) { + goto exit; + } + if (nargs < 1) { + goto skip_optional; + } + function = args[0]; +skip_optional: + return_value = readline_set_pre_input_hook_impl(module, function); + +exit: + return return_value; +} + +#endif /* defined(HAVE_RL_PRE_INPUT_HOOK) */ + +PyDoc_STRVAR(readline_get_completion_type__doc__, +"get_completion_type($module, /)\n" +"--\n" +"\n" +"Get the type of completion being attempted."); + +#define READLINE_GET_COMPLETION_TYPE_METHODDEF \ + {"get_completion_type", (PyCFunction)readline_get_completion_type, METH_NOARGS, readline_get_completion_type__doc__}, + +static PyObject * +readline_get_completion_type_impl(PyObject *module); + +static PyObject * +readline_get_completion_type(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_get_completion_type_impl(module); +} + +PyDoc_STRVAR(readline_get_begidx__doc__, +"get_begidx($module, /)\n" +"--\n" +"\n" +"Get the beginning index of the completion scope."); + +#define READLINE_GET_BEGIDX_METHODDEF \ + {"get_begidx", (PyCFunction)readline_get_begidx, METH_NOARGS, readline_get_begidx__doc__}, + +static PyObject * +readline_get_begidx_impl(PyObject *module); + +static PyObject * +readline_get_begidx(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_get_begidx_impl(module); +} + +PyDoc_STRVAR(readline_get_endidx__doc__, +"get_endidx($module, /)\n" +"--\n" +"\n" +"Get the ending index of the completion scope."); + +#define READLINE_GET_ENDIDX_METHODDEF \ + {"get_endidx", (PyCFunction)readline_get_endidx, METH_NOARGS, readline_get_endidx__doc__}, + +static PyObject * +readline_get_endidx_impl(PyObject *module); + +static PyObject * +readline_get_endidx(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_get_endidx_impl(module); +} + +PyDoc_STRVAR(readline_set_completer_delims__doc__, +"set_completer_delims($module, string, /)\n" +"--\n" +"\n" +"Set the word delimiters for completion."); + +#define READLINE_SET_COMPLETER_DELIMS_METHODDEF \ + {"set_completer_delims", (PyCFunction)readline_set_completer_delims, METH_O, readline_set_completer_delims__doc__}, + +PyDoc_STRVAR(readline_remove_history_item__doc__, +"remove_history_item($module, pos, /)\n" +"--\n" +"\n" +"Remove history item given by its position."); + +#define READLINE_REMOVE_HISTORY_ITEM_METHODDEF \ + {"remove_history_item", (PyCFunction)readline_remove_history_item, METH_O, readline_remove_history_item__doc__}, + +static PyObject * +readline_remove_history_item_impl(PyObject *module, int entry_number); + +static PyObject * +readline_remove_history_item(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + int entry_number; + + entry_number = _PyLong_AsInt(arg); + if (entry_number == -1 && PyErr_Occurred()) { + goto exit; + } + return_value = readline_remove_history_item_impl(module, entry_number); + +exit: + return return_value; +} + +PyDoc_STRVAR(readline_replace_history_item__doc__, +"replace_history_item($module, pos, line, /)\n" +"--\n" +"\n" +"Replaces history item given by its position with contents of line."); + +#define READLINE_REPLACE_HISTORY_ITEM_METHODDEF \ + {"replace_history_item", (PyCFunction)(void(*)(void))readline_replace_history_item, METH_FASTCALL, readline_replace_history_item__doc__}, + +static PyObject * +readline_replace_history_item_impl(PyObject *module, int entry_number, + PyObject *line); + +static PyObject * +readline_replace_history_item(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + int entry_number; + PyObject *line; + + if (!_PyArg_CheckPositional("replace_history_item", nargs, 2, 2)) { + goto exit; + } + entry_number = _PyLong_AsInt(args[0]); + if (entry_number == -1 && PyErr_Occurred()) { + goto exit; + } + if (!PyUnicode_Check(args[1])) { + _PyArg_BadArgument("replace_history_item", "argument 2", "str", args[1]); + goto exit; + } + if (PyUnicode_READY(args[1]) == -1) { + goto exit; + } + line = args[1]; + return_value = readline_replace_history_item_impl(module, entry_number, line); + +exit: + return return_value; +} + +PyDoc_STRVAR(readline_add_history__doc__, +"add_history($module, string, /)\n" +"--\n" +"\n" +"Add an item to the history buffer."); + +#define READLINE_ADD_HISTORY_METHODDEF \ + {"add_history", (PyCFunction)readline_add_history, METH_O, readline_add_history__doc__}, + +PyDoc_STRVAR(readline_set_auto_history__doc__, +"set_auto_history($module, enabled, /)\n" +"--\n" +"\n" +"Enables or disables automatic history."); + +#define READLINE_SET_AUTO_HISTORY_METHODDEF \ + {"set_auto_history", (PyCFunction)readline_set_auto_history, METH_O, readline_set_auto_history__doc__}, + +static PyObject * +readline_set_auto_history_impl(PyObject *module, + int _should_auto_add_history); + +static PyObject * +readline_set_auto_history(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + int _should_auto_add_history; + + _should_auto_add_history = PyObject_IsTrue(arg); + if (_should_auto_add_history < 0) { + goto exit; + } + return_value = readline_set_auto_history_impl(module, _should_auto_add_history); + +exit: + return return_value; +} + +PyDoc_STRVAR(readline_get_completer_delims__doc__, +"get_completer_delims($module, /)\n" +"--\n" +"\n" +"Get the word delimiters for completion."); + +#define READLINE_GET_COMPLETER_DELIMS_METHODDEF \ + {"get_completer_delims", (PyCFunction)readline_get_completer_delims, METH_NOARGS, readline_get_completer_delims__doc__}, + +static PyObject * +readline_get_completer_delims_impl(PyObject *module); + +static PyObject * +readline_get_completer_delims(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_get_completer_delims_impl(module); +} + +PyDoc_STRVAR(readline_set_completer__doc__, +"set_completer($module, function=None, /)\n" +"--\n" +"\n" +"Set or remove the completer function.\n" +"\n" +"The function is called as function(text, state),\n" +"for state in 0, 1, 2, ..., until it returns a non-string.\n" +"It should return the next possible completion starting with \'text\'."); + +#define READLINE_SET_COMPLETER_METHODDEF \ + {"set_completer", (PyCFunction)(void(*)(void))readline_set_completer, METH_FASTCALL, readline_set_completer__doc__}, + +static PyObject * +readline_set_completer_impl(PyObject *module, PyObject *function); + +static PyObject * +readline_set_completer(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *function = Py_None; + + if (!_PyArg_CheckPositional("set_completer", nargs, 0, 1)) { + goto exit; + } + if (nargs < 1) { + goto skip_optional; + } + function = args[0]; +skip_optional: + return_value = readline_set_completer_impl(module, function); + +exit: + return return_value; +} + +PyDoc_STRVAR(readline_get_completer__doc__, +"get_completer($module, /)\n" +"--\n" +"\n" +"Get the current completer function."); + +#define READLINE_GET_COMPLETER_METHODDEF \ + {"get_completer", (PyCFunction)readline_get_completer, METH_NOARGS, readline_get_completer__doc__}, + +static PyObject * +readline_get_completer_impl(PyObject *module); + +static PyObject * +readline_get_completer(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_get_completer_impl(module); +} + +PyDoc_STRVAR(readline_get_history_item__doc__, +"get_history_item($module, index, /)\n" +"--\n" +"\n" +"Return the current contents of history item at index."); + +#define READLINE_GET_HISTORY_ITEM_METHODDEF \ + {"get_history_item", (PyCFunction)readline_get_history_item, METH_O, readline_get_history_item__doc__}, + +static PyObject * +readline_get_history_item_impl(PyObject *module, int idx); + +static PyObject * +readline_get_history_item(PyObject *module, PyObject *arg) +{ + PyObject *return_value = NULL; + int idx; + + idx = _PyLong_AsInt(arg); + if (idx == -1 && PyErr_Occurred()) { + goto exit; + } + return_value = readline_get_history_item_impl(module, idx); + +exit: + return return_value; +} + +PyDoc_STRVAR(readline_get_current_history_length__doc__, +"get_current_history_length($module, /)\n" +"--\n" +"\n" +"Return the current (not the maximum) length of history."); + +#define READLINE_GET_CURRENT_HISTORY_LENGTH_METHODDEF \ + {"get_current_history_length", (PyCFunction)readline_get_current_history_length, METH_NOARGS, readline_get_current_history_length__doc__}, + +static PyObject * +readline_get_current_history_length_impl(PyObject *module); + +static PyObject * +readline_get_current_history_length(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_get_current_history_length_impl(module); +} + +PyDoc_STRVAR(readline_get_line_buffer__doc__, +"get_line_buffer($module, /)\n" +"--\n" +"\n" +"Return the current contents of the line buffer."); + +#define READLINE_GET_LINE_BUFFER_METHODDEF \ + {"get_line_buffer", (PyCFunction)readline_get_line_buffer, METH_NOARGS, readline_get_line_buffer__doc__}, + +static PyObject * +readline_get_line_buffer_impl(PyObject *module); + +static PyObject * +readline_get_line_buffer(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_get_line_buffer_impl(module); +} + +#if defined(HAVE_RL_COMPLETION_APPEND_CHARACTER) + +PyDoc_STRVAR(readline_clear_history__doc__, +"clear_history($module, /)\n" +"--\n" +"\n" +"Clear the current readline history."); + +#define READLINE_CLEAR_HISTORY_METHODDEF \ + {"clear_history", (PyCFunction)readline_clear_history, METH_NOARGS, readline_clear_history__doc__}, + +static PyObject * +readline_clear_history_impl(PyObject *module); + +static PyObject * +readline_clear_history(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_clear_history_impl(module); +} + +#endif /* defined(HAVE_RL_COMPLETION_APPEND_CHARACTER) */ + +PyDoc_STRVAR(readline_insert_text__doc__, +"insert_text($module, string, /)\n" +"--\n" +"\n" +"Insert text into the line buffer at the cursor position."); + +#define READLINE_INSERT_TEXT_METHODDEF \ + {"insert_text", (PyCFunction)readline_insert_text, METH_O, readline_insert_text__doc__}, + +PyDoc_STRVAR(readline_redisplay__doc__, +"redisplay($module, /)\n" +"--\n" +"\n" +"Change what\'s displayed on the screen to reflect contents of the line buffer."); + +#define READLINE_REDISPLAY_METHODDEF \ + {"redisplay", (PyCFunction)readline_redisplay, METH_NOARGS, readline_redisplay__doc__}, + +static PyObject * +readline_redisplay_impl(PyObject *module); + +static PyObject * +readline_redisplay(PyObject *module, PyObject *Py_UNUSED(ignored)) +{ + return readline_redisplay_impl(module); +} + +#ifndef READLINE_APPEND_HISTORY_FILE_METHODDEF + #define READLINE_APPEND_HISTORY_FILE_METHODDEF +#endif /* !defined(READLINE_APPEND_HISTORY_FILE_METHODDEF) */ + +#ifndef READLINE_SET_PRE_INPUT_HOOK_METHODDEF + #define READLINE_SET_PRE_INPUT_HOOK_METHODDEF +#endif /* !defined(READLINE_SET_PRE_INPUT_HOOK_METHODDEF) */ + +#ifndef READLINE_CLEAR_HISTORY_METHODDEF + #define READLINE_CLEAR_HISTORY_METHODDEF +#endif /* !defined(READLINE_CLEAR_HISTORY_METHODDEF) */ +/*[clinic end generated code: output=cb44f391ccbfb565 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/signalmodule.c.h b/Modules/clinic/signalmodule.c.h index 33a278e488f9439..4713bab7486acb9 100644 --- a/Modules/clinic/signalmodule.c.h +++ b/Modules/clinic/signalmodule.c.h @@ -2,6 +2,42 @@ preserve [clinic start generated code]*/ +PyDoc_STRVAR(signal_default_int_handler__doc__, +"default_int_handler($module, signalnum, frame, /)\n" +"--\n" +"\n" +"The default handler for SIGINT installed by Python.\n" +"\n" +"It raises KeyboardInterrupt."); + +#define SIGNAL_DEFAULT_INT_HANDLER_METHODDEF \ + {"default_int_handler", (PyCFunction)(void(*)(void))signal_default_int_handler, METH_FASTCALL, signal_default_int_handler__doc__}, + +static PyObject * +signal_default_int_handler_impl(PyObject *module, int signalnum, + PyObject *frame); + +static PyObject * +signal_default_int_handler(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + int signalnum; + PyObject *frame; + + if (!_PyArg_CheckPositional("default_int_handler", nargs, 2, 2)) { + goto exit; + } + signalnum = _PyLong_AsInt(args[0]); + if (signalnum == -1 && PyErr_Occurred()) { + goto exit; + } + frame = args[1]; + return_value = signal_default_int_handler_impl(module, signalnum, frame); + +exit: + return return_value; +} + #if defined(HAVE_ALARM) PyDoc_STRVAR(signal_alarm__doc__, @@ -662,4 +698,4 @@ signal_pidfd_send_signal(PyObject *module, PyObject *const *args, Py_ssize_t nar #ifndef SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #define SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #endif /* !defined(SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF) */ -/*[clinic end generated code: output=dff93c869101f043 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=59c33f0af42aebb5 input=a9049054013a1b77]*/ diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 411c6eb1935fab1..489802cc3674509 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -2406,6 +2406,13 @@ math_fmod_impl(PyObject *module, double x, double y) /* Given an *n* length *vec* of values and a value *max*, compute: + sqrt(sum((x * scale) ** 2 for x in vec)) / scale + + where scale is the first power of two + greater than max. + +or compute: + max * sqrt(sum((x / max) ** 2 for x in vec)) The value of the *max* variable must be non-negative and @@ -2425,19 +2432,25 @@ The *csum* variable tracks the cumulative sum and *frac* tracks the cumulative fractional errors at each step. Since this variant assumes that |csum| >= |x| at each step, we establish the precondition by starting the accumulation from 1.0 which -represents the largest possible value of (x/max)**2. +represents the largest possible value of (x*scale)**2 or (x/max)**2. After the loop is finished, the initial 1.0 is subtracted out for a net zero effect on the final sum. Since *csum* will be greater than 1.0, the subtraction of 1.0 will not cause fractional digits to be dropped from *csum*. +To get the full benefit from compensated summation, the +largest addend should be in the range: 0.5 <= x <= 1.0. +Accordingly, scaling or division by *max* should not be skipped +even if not otherwise needed to prevent overflow or loss of precision. + */ static inline double vector_norm(Py_ssize_t n, double *vec, double max, int found_nan) { - double x, csum = 1.0, oldcsum, frac = 0.0; + double x, csum = 1.0, oldcsum, frac = 0.0, scale; + int max_e; Py_ssize_t i; if (Py_IS_INFINITY(max)) { @@ -2449,14 +2462,36 @@ vector_norm(Py_ssize_t n, double *vec, double max, int found_nan) if (max == 0.0 || n <= 1) { return max; } + frexp(max, &max_e); + if (max_e >= -1023) { + scale = ldexp(1.0, -max_e); + assert(max * scale >= 0.5); + assert(max * scale < 1.0); + for (i=0 ; i < n ; i++) { + x = vec[i]; + assert(Py_IS_FINITE(x) && fabs(x) <= max); + x *= scale; + x = x*x; + assert(x <= 1.0); + assert(csum >= x); + oldcsum = csum; + csum += x; + frac += (oldcsum - csum) + x; + } + return sqrt(csum - 1.0 + frac) / scale; + } + /* When max_e < -1023, ldexp(1.0, -max_e) overflows. + So instead of multiplying by a scale, we just divide by *max*. + */ for (i=0 ; i < n ; i++) { x = vec[i]; assert(Py_IS_FINITE(x) && fabs(x) <= max); x /= max; x = x*x; + assert(x <= 1.0); + assert(csum >= x); oldcsum = csum; csum += x; - assert(csum >= x); frac += (oldcsum - csum) + x; } return max * sqrt(csum - 1.0 + frac); diff --git a/Modules/overlapped.c b/Modules/overlapped.c index eed8fbf0393002a..5e7a1bbba76787c 100644 --- a/Modules/overlapped.c +++ b/Modules/overlapped.c @@ -37,6 +37,36 @@ #define T_HANDLE T_POINTER +/*[python input] +class OVERLAPPED_converter(CConverter): + type = 'OVERLAPPED *' + format_unit = '"F_POINTER"' + +class HANDLE_converter(CConverter): + type = 'HANDLE' + format_unit = '"F_HANDLE"' + +class ULONG_PTR_converter(CConverter): + type = 'ULONG_PTR' + format_unit = '"F_ULONG_PTR"' + +class DWORD_converter(CConverter): + type = 'DWORD' + format_unit = 'k' + +class BOOL_converter(CConverter): + type = 'BOOL' + format_unit = 'i' +[python start generated code]*/ +/*[python end generated code: output=da39a3ee5e6b4b0d input=83bb8c2c2514f2a8]*/ + +/*[clinic input] +module _overlapped +class _overlapped.Overlapped "OverlappedObject *" "&OverlappedType" +[clinic start generated code]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=92e5a799db35b96c]*/ + + enum {TYPE_NONE, TYPE_NOT_STARTED, TYPE_READ, TYPE_READINTO, TYPE_WRITE, TYPE_ACCEPT, TYPE_CONNECT, TYPE_DISCONNECT, TYPE_CONNECT_NAMED_PIPE, TYPE_WAIT_NAMED_PIPE_AND_CONNECT, TYPE_TRANSMIT_FILE, TYPE_READ_FROM, @@ -150,25 +180,27 @@ initialize_function_pointers(void) * Completion port stuff */ -PyDoc_STRVAR( - CreateIoCompletionPort_doc, - "CreateIoCompletionPort(handle, port, key, concurrency) -> port\n\n" - "Create a completion port or register a handle with a port."); +/*[clinic input] +_overlapped.CreateIoCompletionPort + + handle as FileHandle: HANDLE + port as ExistingCompletionPort: HANDLE + key as CompletionKey: ULONG_PTR + concurrency as NumberOfConcurrentThreads: DWORD + / + +Create a completion port or register a handle with a port. +[clinic start generated code]*/ static PyObject * -overlapped_CreateIoCompletionPort(PyObject *self, PyObject *args) +_overlapped_CreateIoCompletionPort_impl(PyObject *module, HANDLE FileHandle, + HANDLE ExistingCompletionPort, + ULONG_PTR CompletionKey, + DWORD NumberOfConcurrentThreads) +/*[clinic end generated code: output=24ede2b0f05e5433 input=847bae4d0efe1976]*/ { - HANDLE FileHandle; - HANDLE ExistingCompletionPort; - ULONG_PTR CompletionKey; - DWORD NumberOfConcurrentThreads; HANDLE ret; - if (!PyArg_ParseTuple(args, F_HANDLE F_HANDLE F_ULONG_PTR F_DWORD, - &FileHandle, &ExistingCompletionPort, &CompletionKey, - &NumberOfConcurrentThreads)) - return NULL; - Py_BEGIN_ALLOW_THREADS ret = CreateIoCompletionPort(FileHandle, ExistingCompletionPort, CompletionKey, NumberOfConcurrentThreads); @@ -179,26 +211,30 @@ overlapped_CreateIoCompletionPort(PyObject *self, PyObject *args) return Py_BuildValue(F_HANDLE, ret); } -PyDoc_STRVAR( - GetQueuedCompletionStatus_doc, - "GetQueuedCompletionStatus(port, msecs) -> (err, bytes, key, address)\n\n" - "Get a message from completion port. Wait for up to msecs milliseconds."); +/*[clinic input] +_overlapped.GetQueuedCompletionStatus + + port as CompletionPort: HANDLE + msecs as Milliseconds: DWORD + / + +Get a message from completion port. + +Wait for up to msecs milliseconds. +[clinic start generated code]*/ static PyObject * -overlapped_GetQueuedCompletionStatus(PyObject *self, PyObject *args) +_overlapped_GetQueuedCompletionStatus_impl(PyObject *module, + HANDLE CompletionPort, + DWORD Milliseconds) +/*[clinic end generated code: output=68314171628dddb7 input=94a042d14c4f6410]*/ { - HANDLE CompletionPort = NULL; DWORD NumberOfBytes = 0; ULONG_PTR CompletionKey = 0; OVERLAPPED *Overlapped = NULL; - DWORD Milliseconds; DWORD err; BOOL ret; - if (!PyArg_ParseTuple(args, F_HANDLE F_DWORD, - &CompletionPort, &Milliseconds)) - return NULL; - Py_BEGIN_ALLOW_THREADS ret = GetQueuedCompletionStatus(CompletionPort, &NumberOfBytes, &CompletionKey, &Overlapped, Milliseconds); @@ -215,25 +251,28 @@ overlapped_GetQueuedCompletionStatus(PyObject *self, PyObject *args) err, NumberOfBytes, CompletionKey, Overlapped); } -PyDoc_STRVAR( - PostQueuedCompletionStatus_doc, - "PostQueuedCompletionStatus(port, bytes, key, address) -> None\n\n" - "Post a message to completion port."); +/*[clinic input] +_overlapped.PostQueuedCompletionStatus + + port as CompletionPort: HANDLE + bytes as NumberOfBytes: DWORD + key as CompletionKey: ULONG_PTR + address as Overlapped: OVERLAPPED + / + +Post a message to completion port. +[clinic start generated code]*/ static PyObject * -overlapped_PostQueuedCompletionStatus(PyObject *self, PyObject *args) +_overlapped_PostQueuedCompletionStatus_impl(PyObject *module, + HANDLE CompletionPort, + DWORD NumberOfBytes, + ULONG_PTR CompletionKey, + OVERLAPPED *Overlapped) +/*[clinic end generated code: output=93e73f2933a43e9e input=e936202d87937aca]*/ { - HANDLE CompletionPort; - DWORD NumberOfBytes; - ULONG_PTR CompletionKey; - OVERLAPPED *Overlapped; BOOL ret; - if (!PyArg_ParseTuple(args, F_HANDLE F_DWORD F_ULONG_PTR F_POINTER, - &CompletionPort, &NumberOfBytes, &CompletionKey, - &Overlapped)) - return NULL; - Py_BEGIN_ALLOW_THREADS ret = PostQueuedCompletionStatus(CompletionPort, NumberOfBytes, CompletionKey, Overlapped); @@ -254,7 +293,7 @@ struct PostCallbackData { }; static VOID CALLBACK -PostToQueueCallback(PVOID lpParameter, BOOL TimerOrWaitFired) +PostToQueueCallback(PVOID lpParameter, BOOLEAN TimerOrWaitFired) { struct PostCallbackData *p = (struct PostCallbackData*) lpParameter; @@ -264,26 +303,27 @@ PostToQueueCallback(PVOID lpParameter, BOOL TimerOrWaitFired) PyMem_RawFree(p); } -PyDoc_STRVAR( - RegisterWaitWithQueue_doc, - "RegisterWaitWithQueue(Object, CompletionPort, Overlapped, Timeout)\n" - " -> WaitHandle\n\n" - "Register wait for Object; when complete CompletionPort is notified.\n"); +/*[clinic input] +_overlapped.RegisterWaitWithQueue + + Object: HANDLE + CompletionPort: HANDLE + Overlapped: OVERLAPPED + Timeout as Milliseconds: DWORD + / + +Register wait for Object; when complete CompletionPort is notified. +[clinic start generated code]*/ static PyObject * -overlapped_RegisterWaitWithQueue(PyObject *self, PyObject *args) +_overlapped_RegisterWaitWithQueue_impl(PyObject *module, HANDLE Object, + HANDLE CompletionPort, + OVERLAPPED *Overlapped, + DWORD Milliseconds) +/*[clinic end generated code: output=c2ace732e447fe45 input=2dd4efee44abe8ee]*/ { HANDLE NewWaitObject; - HANDLE Object; - ULONG Milliseconds; - struct PostCallbackData data, *pdata; - - if (!PyArg_ParseTuple(args, F_HANDLE F_HANDLE F_POINTER F_DWORD, - &Object, - &data.CompletionPort, - &data.Overlapped, - &Milliseconds)) - return NULL; + struct PostCallbackData data = {CompletionPort, Overlapped}, *pdata; /* Use PyMem_RawMalloc() rather than PyMem_Malloc(), since PostToQueueCallback() will call PyMem_Free() from a new C thread @@ -295,8 +335,7 @@ overlapped_RegisterWaitWithQueue(PyObject *self, PyObject *args) *pdata = data; if (!RegisterWaitForSingleObject( - &NewWaitObject, Object, (WAITORTIMERCALLBACK)PostToQueueCallback, - pdata, Milliseconds, + &NewWaitObject, Object, PostToQueueCallback, pdata, Milliseconds, WT_EXECUTEINWAITTHREAD | WT_EXECUTEONLYONCE)) { PyMem_RawFree(pdata); @@ -306,20 +345,21 @@ overlapped_RegisterWaitWithQueue(PyObject *self, PyObject *args) return Py_BuildValue(F_HANDLE, NewWaitObject); } -PyDoc_STRVAR( - UnregisterWait_doc, - "UnregisterWait(WaitHandle) -> None\n\n" - "Unregister wait handle.\n"); +/*[clinic input] +_overlapped.UnregisterWait + + WaitHandle: HANDLE + / + +Unregister wait handle. +[clinic start generated code]*/ static PyObject * -overlapped_UnregisterWait(PyObject *self, PyObject *args) +_overlapped_UnregisterWait_impl(PyObject *module, HANDLE WaitHandle) +/*[clinic end generated code: output=ec90cd955a9a617d input=a56709544cb2df0f]*/ { - HANDLE WaitHandle; BOOL ret; - if (!PyArg_ParseTuple(args, F_HANDLE, &WaitHandle)) - return NULL; - Py_BEGIN_ALLOW_THREADS ret = UnregisterWait(WaitHandle); Py_END_ALLOW_THREADS @@ -329,20 +369,23 @@ overlapped_UnregisterWait(PyObject *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR( - UnregisterWaitEx_doc, - "UnregisterWaitEx(WaitHandle, Event) -> None\n\n" - "Unregister wait handle.\n"); +/*[clinic input] +_overlapped.UnregisterWaitEx + + WaitHandle: HANDLE + Event: HANDLE + / + +Unregister wait handle. +[clinic start generated code]*/ static PyObject * -overlapped_UnregisterWaitEx(PyObject *self, PyObject *args) +_overlapped_UnregisterWaitEx_impl(PyObject *module, HANDLE WaitHandle, + HANDLE Event) +/*[clinic end generated code: output=2e3d84c1d5f65b92 input=953cddc1de50fab9]*/ { - HANDLE WaitHandle, Event; BOOL ret; - if (!PyArg_ParseTuple(args, F_HANDLE F_HANDLE, &WaitHandle, &Event)) - return NULL; - Py_BEGIN_ALLOW_THREADS ret = UnregisterWaitEx(WaitHandle, Event); Py_END_ALLOW_THREADS @@ -356,26 +399,28 @@ overlapped_UnregisterWaitEx(PyObject *self, PyObject *args) * Event functions -- currently only used by tests */ -PyDoc_STRVAR( - CreateEvent_doc, - "CreateEvent(EventAttributes, ManualReset, InitialState, Name)" - " -> Handle\n\n" - "Create an event. EventAttributes must be None.\n"); +/*[clinic input] +_overlapped.CreateEvent + + EventAttributes: object + ManualReset: BOOL + InitialState: BOOL + Name: Py_UNICODE(accept={str, NoneType}) + / + +Create an event. + +EventAttributes must be None. +[clinic start generated code]*/ static PyObject * -overlapped_CreateEvent(PyObject *self, PyObject *args) +_overlapped_CreateEvent_impl(PyObject *module, PyObject *EventAttributes, + BOOL ManualReset, BOOL InitialState, + const Py_UNICODE *Name) +/*[clinic end generated code: output=8e04f0916c17b13d input=dbc36ae14375ba24]*/ { - PyObject *EventAttributes; - BOOL ManualReset; - BOOL InitialState; - Py_UNICODE *Name; HANDLE Event; - if (!PyArg_ParseTuple(args, "O" F_BOOL F_BOOL "Z", - &EventAttributes, &ManualReset, - &InitialState, &Name)) - return NULL; - if (EventAttributes != Py_None) { PyErr_SetString(PyExc_ValueError, "EventAttributes must be None"); return NULL; @@ -390,20 +435,21 @@ overlapped_CreateEvent(PyObject *self, PyObject *args) return Py_BuildValue(F_HANDLE, Event); } -PyDoc_STRVAR( - SetEvent_doc, - "SetEvent(Handle) -> None\n\n" - "Set event.\n"); +/*[clinic input] +_overlapped.SetEvent + + Handle: HANDLE + / + +Set event. +[clinic start generated code]*/ static PyObject * -overlapped_SetEvent(PyObject *self, PyObject *args) +_overlapped_SetEvent_impl(PyObject *module, HANDLE Handle) +/*[clinic end generated code: output=5b8d974216b0e569 input=d8b0d26eb7391e80]*/ { - HANDLE Handle; BOOL ret; - if (!PyArg_ParseTuple(args, F_HANDLE, &Handle)) - return NULL; - Py_BEGIN_ALLOW_THREADS ret = SetEvent(Handle); Py_END_ALLOW_THREADS @@ -413,20 +459,21 @@ overlapped_SetEvent(PyObject *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR( - ResetEvent_doc, - "ResetEvent(Handle) -> None\n\n" - "Reset event.\n"); +/*[clinic input] +_overlapped.ResetEvent + + Handle: HANDLE + / + +Reset event. +[clinic start generated code]*/ static PyObject * -overlapped_ResetEvent(PyObject *self, PyObject *args) +_overlapped_ResetEvent_impl(PyObject *module, HANDLE Handle) +/*[clinic end generated code: output=066537a8405cddb2 input=d4e089c9ba84ff2f]*/ { - HANDLE Handle; BOOL ret; - if (!PyArg_ParseTuple(args, F_HANDLE, &Handle)) - return NULL; - Py_BEGIN_ALLOW_THREADS ret = ResetEvent(Handle); Py_END_ALLOW_THREADS @@ -440,36 +487,40 @@ overlapped_ResetEvent(PyObject *self, PyObject *args) * Bind socket handle to local port without doing slow getaddrinfo() */ -PyDoc_STRVAR( - BindLocal_doc, - "BindLocal(handle, family) -> None\n\n" - "Bind a socket handle to an arbitrary local port.\n" - "family should AF_INET or AF_INET6.\n"); +/*[clinic input] +_overlapped.BindLocal + + handle as Socket: HANDLE + family as Family: int + / + +Bind a socket handle to an arbitrary local port. + +family should be AF_INET or AF_INET6. +[clinic start generated code]*/ static PyObject * -overlapped_BindLocal(PyObject *self, PyObject *args) +_overlapped_BindLocal_impl(PyObject *module, HANDLE Socket, int Family) +/*[clinic end generated code: output=edb93862697aed9c input=a0e7b5c2f541170c]*/ { - SOCKET Socket; - int Family; BOOL ret; - if (!PyArg_ParseTuple(args, F_HANDLE "i", &Socket, &Family)) - return NULL; - if (Family == AF_INET) { struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = 0; addr.sin_addr.S_un.S_addr = INADDR_ANY; - ret = bind(Socket, (SOCKADDR*)&addr, sizeof(addr)) != SOCKET_ERROR; + ret = bind((SOCKET)Socket, (SOCKADDR*)&addr, sizeof(addr)) + != SOCKET_ERROR; } else if (Family == AF_INET6) { struct sockaddr_in6 addr; memset(&addr, 0, sizeof(addr)); addr.sin6_family = AF_INET6; addr.sin6_port = 0; addr.sin6_addr = in6addr_any; - ret = bind(Socket, (SOCKADDR*)&addr, sizeof(addr)) != SOCKET_ERROR; + ret = bind((SOCKET)Socket, (SOCKADDR*)&addr, sizeof(addr)) + != SOCKET_ERROR; } else { PyErr_SetString(PyExc_ValueError, "expected tuple of length 2 or 4"); return NULL; @@ -484,21 +535,23 @@ overlapped_BindLocal(PyObject *self, PyObject *args) * Windows equivalent of os.strerror() -- compare _ctypes/callproc.c */ -PyDoc_STRVAR( - FormatMessage_doc, - "FormatMessage(error_code) -> error_message\n\n" - "Return error message for an error code."); +/*[clinic input] +_overlapped.FormatMessage + + error_code as code: DWORD + / + +Return error message for an error code. +[clinic start generated code]*/ static PyObject * -overlapped_FormatMessage(PyObject *ignore, PyObject *args) +_overlapped_FormatMessage_impl(PyObject *module, DWORD code) +/*[clinic end generated code: output=02c964ff22407c6b input=644bb5b80326179e]*/ { - DWORD code, n; + DWORD n; WCHAR *lpMsgBuf; PyObject *res; - if (!PyArg_ParseTuple(args, F_DWORD, &code)) - return NULL; - n = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, @@ -538,19 +591,20 @@ mark_as_completed(OVERLAPPED *ov) * for overlapped I/O */ -PyDoc_STRVAR( - Overlapped_doc, - "Overlapped object"); +/*[clinic input] +@classmethod +_overlapped.Overlapped.__new__ + + event: HANDLE(c_default='INVALID_HANDLE_VALUE') = _overlapped.INVALID_HANDLE_VALUE + +OVERLAPPED structure wrapper. +[clinic start generated code]*/ static PyObject * -Overlapped_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +_overlapped_Overlapped_impl(PyTypeObject *type, HANDLE event) +/*[clinic end generated code: output=6da60504a18eb421 input=26b8a7429e629e95]*/ { OverlappedObject *self; - HANDLE event = INVALID_HANDLE_VALUE; - static char *kwlist[] = {"event", NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|" F_HANDLE, kwlist, &event)) - return NULL; if (event == INVALID_HANDLE_VALUE) { event = CreateEvent(NULL, TRUE, FALSE, NULL); @@ -720,13 +774,15 @@ unparse_address(LPSOCKADDR Address, DWORD Length) } } -PyDoc_STRVAR( - Overlapped_cancel_doc, - "cancel() -> None\n\n" - "Cancel overlapped operation"); +/*[clinic input] +_overlapped.Overlapped.cancel + +Cancel overlapped operation. +[clinic start generated code]*/ static PyObject * -Overlapped_cancel(OverlappedObject *self, PyObject *Py_UNUSED(ignored)) +_overlapped_Overlapped_cancel_impl(OverlappedObject *self) +/*[clinic end generated code: output=54ad7aeece89901c input=80eb67c7b57dbcf1]*/ { BOOL ret = TRUE; @@ -749,25 +805,27 @@ Overlapped_cancel(OverlappedObject *self, PyObject *Py_UNUSED(ignored)) Py_RETURN_NONE; } -PyDoc_STRVAR( - Overlapped_getresult_doc, - "getresult(wait=False) -> result\n\n" - "Retrieve result of operation. If wait is true then it blocks\n" - "until the operation is finished. If wait is false and the\n" - "operation is still pending then an error is raised."); +/*[clinic input] +_overlapped.Overlapped.getresult + + wait: BOOL(c_default='FALSE') = False + / + +Retrieve result of operation. + +If wait is true then it blocks until the operation is finished. If wait +is false and the operation is still pending then an error is raised. +[clinic start generated code]*/ static PyObject * -Overlapped_getresult(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_getresult_impl(OverlappedObject *self, BOOL wait) +/*[clinic end generated code: output=8c9bd04d08994f6c input=aa5b03e9897ca074]*/ { - BOOL wait = FALSE; DWORD transferred = 0; BOOL ret; DWORD err; PyObject *addr; - if (!PyArg_ParseTuple(args, "|" F_BOOL, &wait)) - return NULL; - if (self->type == TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation not yet attempted"); return NULL; @@ -879,21 +937,23 @@ do_ReadFile(OverlappedObject *self, HANDLE handle, } } -PyDoc_STRVAR( - Overlapped_ReadFile_doc, - "ReadFile(handle, size) -> Overlapped[message]\n\n" - "Start overlapped read"); +/*[clinic input] +_overlapped.Overlapped.ReadFile + + handle: HANDLE + size: DWORD + / + +Start overlapped read. +[clinic start generated code]*/ static PyObject * -Overlapped_ReadFile(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_ReadFile_impl(OverlappedObject *self, HANDLE handle, + DWORD size) +/*[clinic end generated code: output=4c8557e16941e4ae input=98c495baa0342425]*/ { - HANDLE handle; - DWORD size; PyObject *buf; - if (!PyArg_ParseTuple(args, F_HANDLE F_DWORD, &handle, &size)) - return NULL; - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -913,20 +973,21 @@ Overlapped_ReadFile(OverlappedObject *self, PyObject *args) return do_ReadFile(self, handle, PyBytes_AS_STRING(buf), size); } -PyDoc_STRVAR( - Overlapped_ReadFileInto_doc, - "ReadFileInto(handle, buf) -> Overlapped[bytes_transferred]\n\n" - "Start overlapped receive"); +/*[clinic input] +_overlapped.Overlapped.ReadFileInto -static PyObject * -Overlapped_ReadFileInto(OverlappedObject *self, PyObject *args) -{ - HANDLE handle; - PyObject *bufobj; + handle: HANDLE + buf as bufobj: object + / - if (!PyArg_ParseTuple(args, F_HANDLE "O", &handle, &bufobj)) - return NULL; +Start overlapped receive. +[clinic start generated code]*/ +static PyObject * +_overlapped_Overlapped_ReadFileInto_impl(OverlappedObject *self, + HANDLE handle, PyObject *bufobj) +/*[clinic end generated code: output=1e9e712e742e5b2a input=16f6cc268d1d0387]*/ +{ if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -982,23 +1043,24 @@ do_WSARecv(OverlappedObject *self, HANDLE handle, } } -PyDoc_STRVAR( - Overlapped_WSARecv_doc, - "RecvFile(handle, size, flags) -> Overlapped[message]\n\n" - "Start overlapped receive"); +/*[clinic input] +_overlapped.Overlapped.WSARecv + + handle: HANDLE + size: DWORD + flags: DWORD = 0 + / + +Start overlapped receive. +[clinic start generated code]*/ static PyObject * -Overlapped_WSARecv(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_WSARecv_impl(OverlappedObject *self, HANDLE handle, + DWORD size, DWORD flags) +/*[clinic end generated code: output=3a5e9c61ff040906 input=8c04e506cc3d741a]*/ { - HANDLE handle; - DWORD size; - DWORD flags = 0; PyObject *buf; - if (!PyArg_ParseTuple(args, F_HANDLE F_DWORD "|" F_DWORD, - &handle, &size, &flags)) - return NULL; - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -1018,22 +1080,23 @@ Overlapped_WSARecv(OverlappedObject *self, PyObject *args) return do_WSARecv(self, handle, PyBytes_AS_STRING(buf), size, flags); } -PyDoc_STRVAR( - Overlapped_WSARecvInto_doc, - "WSARecvInto(handle, buf, flags) -> Overlapped[bytes_transferred]\n\n" - "Start overlapped receive"); +/*[clinic input] +_overlapped.Overlapped.WSARecvInto -static PyObject * -Overlapped_WSARecvInto(OverlappedObject *self, PyObject *args) -{ - HANDLE handle; - PyObject *bufobj; - DWORD flags; + handle: HANDLE + buf as bufobj: object + flags: DWORD + / - if (!PyArg_ParseTuple(args, F_HANDLE "O" F_DWORD, - &handle, &bufobj, &flags)) - return NULL; +Start overlapped receive. +[clinic start generated code]*/ +static PyObject * +_overlapped_Overlapped_WSARecvInto_impl(OverlappedObject *self, + HANDLE handle, PyObject *bufobj, + DWORD flags) +/*[clinic end generated code: output=9a438abc436fe87c input=4f87c38fc381d525]*/ +{ if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -1057,23 +1120,25 @@ Overlapped_WSARecvInto(OverlappedObject *self, PyObject *args) (DWORD)self->user_buffer.len, flags); } -PyDoc_STRVAR( - Overlapped_WriteFile_doc, - "WriteFile(handle, buf) -> Overlapped[bytes_transferred]\n\n" - "Start overlapped write"); +/*[clinic input] +_overlapped.Overlapped.WriteFile + + handle: HANDLE + buf as bufobj: object + / + +Start overlapped write. +[clinic start generated code]*/ static PyObject * -Overlapped_WriteFile(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_WriteFile_impl(OverlappedObject *self, HANDLE handle, + PyObject *bufobj) +/*[clinic end generated code: output=c376230b6120d877 input=b8d9a7608d8a1e72]*/ { - HANDLE handle; - PyObject *bufobj; DWORD written; BOOL ret; DWORD err; - if (!PyArg_ParseTuple(args, F_HANDLE "O", &handle, &bufobj)) - return NULL; - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -1110,26 +1175,27 @@ Overlapped_WriteFile(OverlappedObject *self, PyObject *args) } } -PyDoc_STRVAR( - Overlapped_WSASend_doc, - "WSASend(handle, buf, flags) -> Overlapped[bytes_transferred]\n\n" - "Start overlapped send"); +/*[clinic input] +_overlapped.Overlapped.WSASend + + handle: HANDLE + buf as bufobj: object + flags: DWORD + / + +Start overlapped send. +[clinic start generated code]*/ static PyObject * -Overlapped_WSASend(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_WSASend_impl(OverlappedObject *self, HANDLE handle, + PyObject *bufobj, DWORD flags) +/*[clinic end generated code: output=316031c7467040cc input=932e7cba6d18f708]*/ { - HANDLE handle; - PyObject *bufobj; - DWORD flags; DWORD written; WSABUF wsabuf; int ret; DWORD err; - if (!PyArg_ParseTuple(args, F_HANDLE "O" F_DWORD, - &handle, &bufobj, &flags)) - return NULL; - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -1167,26 +1233,28 @@ Overlapped_WSASend(OverlappedObject *self, PyObject *args) } } -PyDoc_STRVAR( - Overlapped_AcceptEx_doc, - "AcceptEx(listen_handle, accept_handle) -> Overlapped[address_as_bytes]\n\n" - "Start overlapped wait for client to connect"); +/*[clinic input] +_overlapped.Overlapped.AcceptEx + + listen_handle as ListenSocket: HANDLE + accept_handle as AcceptSocket: HANDLE + / + +Start overlapped wait for client to connect. +[clinic start generated code]*/ static PyObject * -Overlapped_AcceptEx(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_AcceptEx_impl(OverlappedObject *self, + HANDLE ListenSocket, + HANDLE AcceptSocket) +/*[clinic end generated code: output=9a7381d4232af889 input=b83473224fc3a1c5]*/ { - SOCKET ListenSocket; - SOCKET AcceptSocket; DWORD BytesReceived; DWORD size; PyObject *buf; BOOL ret; DWORD err; - if (!PyArg_ParseTuple(args, F_HANDLE F_HANDLE, - &ListenSocket, &AcceptSocket)) - return NULL; - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -1198,12 +1266,13 @@ Overlapped_AcceptEx(OverlappedObject *self, PyObject *args) return NULL; self->type = TYPE_ACCEPT; - self->handle = (HANDLE)ListenSocket; + self->handle = ListenSocket; self->allocated_buffer = buf; Py_BEGIN_ALLOW_THREADS - ret = Py_AcceptEx(ListenSocket, AcceptSocket, PyBytes_AS_STRING(buf), - 0, size, size, &BytesReceived, &self->overlapped); + ret = Py_AcceptEx((SOCKET)ListenSocket, (SOCKET)AcceptSocket, + PyBytes_AS_STRING(buf), 0, size, size, &BytesReceived, + &self->overlapped); Py_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : WSAGetLastError(); @@ -1221,6 +1290,7 @@ Overlapped_AcceptEx(OverlappedObject *self, PyObject *args) static int parse_address(PyObject *obj, SOCKADDR *Address, int Length) { + PyObject *Host_obj; Py_UNICODE *Host; unsigned short Port; unsigned long FlowInfo; @@ -1228,57 +1298,92 @@ parse_address(PyObject *obj, SOCKADDR *Address, int Length) memset(Address, 0, Length); - if (PyArg_ParseTuple(obj, "uH", &Host, &Port)) - { + switch (PyTuple_GET_SIZE(obj)) { + case 2: { + if (!PyArg_ParseTuple(obj, "UH", &Host_obj, &Port)) { + return -1; + } +#if USE_UNICODE_WCHAR_CACHE + Host = (wchar_t *)_PyUnicode_AsUnicode(Host_obj); +#else /* USE_UNICODE_WCHAR_CACHE */ + Host = PyUnicode_AsWideCharString(Host_obj, NULL); +#endif /* USE_UNICODE_WCHAR_CACHE */ + if (Host == NULL) { + return -1; + } Address->sa_family = AF_INET; if (WSAStringToAddressW(Host, AF_INET, NULL, Address, &Length) < 0) { SetFromWindowsErr(WSAGetLastError()); - return -1; + Length = -1; } - ((SOCKADDR_IN*)Address)->sin_port = htons(Port); + else { + ((SOCKADDR_IN*)Address)->sin_port = htons(Port); + } +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(Host); +#endif /* USE_UNICODE_WCHAR_CACHE */ return Length; } - else if (PyArg_ParseTuple(obj, - "uHkk;ConnectEx(): illegal address_as_bytes " - "argument", &Host, &Port, &FlowInfo, &ScopeId)) - { - PyErr_Clear(); + case 4: { + if (!PyArg_ParseTuple(obj, + "UHkk;ConnectEx(): illegal address_as_bytes argument", + &Host_obj, &Port, &FlowInfo, &ScopeId)) + { + return -1; + } +#if USE_UNICODE_WCHAR_CACHE + Host = (wchar_t *)_PyUnicode_AsUnicode(Host_obj); +#else /* USE_UNICODE_WCHAR_CACHE */ + Host = PyUnicode_AsWideCharString(Host_obj, NULL); +#endif /* USE_UNICODE_WCHAR_CACHE */ + if (Host == NULL) { + return -1; + } Address->sa_family = AF_INET6; if (WSAStringToAddressW(Host, AF_INET6, NULL, Address, &Length) < 0) { SetFromWindowsErr(WSAGetLastError()); - return -1; + Length = -1; + } + else { + ((SOCKADDR_IN6*)Address)->sin6_port = htons(Port); + ((SOCKADDR_IN6*)Address)->sin6_flowinfo = FlowInfo; + ((SOCKADDR_IN6*)Address)->sin6_scope_id = ScopeId; } - ((SOCKADDR_IN6*)Address)->sin6_port = htons(Port); - ((SOCKADDR_IN6*)Address)->sin6_flowinfo = FlowInfo; - ((SOCKADDR_IN6*)Address)->sin6_scope_id = ScopeId; +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(Host); +#endif /* USE_UNICODE_WCHAR_CACHE */ return Length; } - - return -1; + default: + PyErr_SetString(PyExc_ValueError, "illegal address_as_bytes argument"); + return -1; + } } -PyDoc_STRVAR( - Overlapped_ConnectEx_doc, - "ConnectEx(client_handle, address_as_bytes) -> Overlapped[None]\n\n" - "Start overlapped connect. client_handle should be unbound."); +/*[clinic input] +_overlapped.Overlapped.ConnectEx + + client_handle as ConnectSocket: HANDLE + address_as_bytes as AddressObj: object(subclass_of='&PyTuple_Type') + / + +Start overlapped connect. + +client_handle should be unbound. +[clinic start generated code]*/ static PyObject * -Overlapped_ConnectEx(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_ConnectEx_impl(OverlappedObject *self, + HANDLE ConnectSocket, + PyObject *AddressObj) +/*[clinic end generated code: output=5aebbbdb4f022833 input=d6bbd2d84b156fc1]*/ { - SOCKET ConnectSocket; - PyObject *AddressObj; char AddressBuf[sizeof(struct sockaddr_in6)]; SOCKADDR *Address = (SOCKADDR*)AddressBuf; int Length; BOOL ret; DWORD err; - if (!PyArg_ParseTuple(args, F_HANDLE "O!:ConnectEx", - &ConnectSocket, &PyTuple_Type, &AddressObj)) - { - return NULL; - } - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -1290,10 +1395,10 @@ Overlapped_ConnectEx(OverlappedObject *self, PyObject *args) return NULL; self->type = TYPE_CONNECT; - self->handle = (HANDLE)ConnectSocket; + self->handle = ConnectSocket; Py_BEGIN_ALLOW_THREADS - ret = Py_ConnectEx(ConnectSocket, Address, Length, + ret = Py_ConnectEx((SOCKET)ConnectSocket, Address, Length, NULL, 0, NULL, &self->overlapped); Py_END_ALLOW_THREADS @@ -1308,32 +1413,33 @@ Overlapped_ConnectEx(OverlappedObject *self, PyObject *args) } } -PyDoc_STRVAR( - Overlapped_DisconnectEx_doc, - "DisconnectEx(handle, flags) -> Overlapped[None]\n\n" - "Start overlapped connect. client_handle should be unbound."); +/*[clinic input] +_overlapped.Overlapped.DisconnectEx + + handle as Socket: HANDLE + flags: DWORD + / + +[clinic start generated code]*/ static PyObject * -Overlapped_DisconnectEx(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_DisconnectEx_impl(OverlappedObject *self, + HANDLE Socket, DWORD flags) +/*[clinic end generated code: output=8d64ddb8c93c2126 input=680845cdcdf820eb]*/ { - SOCKET Socket; - DWORD flags; BOOL ret; DWORD err; - if (!PyArg_ParseTuple(args, F_HANDLE F_DWORD, &Socket, &flags)) - return NULL; - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; } self->type = TYPE_DISCONNECT; - self->handle = (HANDLE)Socket; + self->handle = Socket; Py_BEGIN_ALLOW_THREADS - ret = Py_DisconnectEx(Socket, &self->overlapped, flags, 0); + ret = Py_DisconnectEx((SOCKET)Socket, &self->overlapped, flags, 0); Py_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : WSAGetLastError(); @@ -1347,48 +1453,45 @@ Overlapped_DisconnectEx(OverlappedObject *self, PyObject *args) } } -PyDoc_STRVAR( - Overlapped_TransmitFile_doc, - "TransmitFile(socket, file, offset, offset_high, " - "count_to_write, count_per_send, flags) " - "-> Overlapped[None]\n\n" - "Transmit file data over a connected socket."); +/*[clinic input] +_overlapped.Overlapped.TransmitFile + + socket as Socket: HANDLE + file as File: HANDLE + offset: DWORD + offset_high: DWORD + count_to_write: DWORD + count_per_send: DWORD + flags: DWORD + / + +Transmit file data over a connected socket. +[clinic start generated code]*/ static PyObject * -Overlapped_TransmitFile(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_TransmitFile_impl(OverlappedObject *self, + HANDLE Socket, HANDLE File, + DWORD offset, DWORD offset_high, + DWORD count_to_write, + DWORD count_per_send, DWORD flags) +/*[clinic end generated code: output=03f3ca5512e678fd input=7e6f97b391f60e8c]*/ { - SOCKET Socket; - HANDLE File; - DWORD offset; - DWORD offset_high; - DWORD count_to_write; - DWORD count_per_send; - DWORD flags; BOOL ret; DWORD err; - if (!PyArg_ParseTuple(args, - F_HANDLE F_HANDLE F_DWORD F_DWORD - F_DWORD F_DWORD F_DWORD, - &Socket, &File, &offset, &offset_high, - &count_to_write, &count_per_send, - &flags)) - return NULL; - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; } self->type = TYPE_TRANSMIT_FILE; - self->handle = (HANDLE)Socket; + self->handle = Socket; self->overlapped.Offset = offset; self->overlapped.OffsetHigh = offset_high; Py_BEGIN_ALLOW_THREADS - ret = Py_TransmitFile(Socket, File, count_to_write, count_per_send, - &self->overlapped, - NULL, flags); + ret = Py_TransmitFile((SOCKET)Socket, File, count_to_write, + count_per_send, &self->overlapped, NULL, flags); Py_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : WSAGetLastError(); @@ -1402,21 +1505,23 @@ Overlapped_TransmitFile(OverlappedObject *self, PyObject *args) } } -PyDoc_STRVAR( - Overlapped_ConnectNamedPipe_doc, - "ConnectNamedPipe(handle) -> Overlapped[None]\n\n" - "Start overlapped wait for a client to connect."); +/*[clinic input] +_overlapped.Overlapped.ConnectNamedPipe + + handle as Pipe: HANDLE + / + +Start overlapped wait for a client to connect. +[clinic start generated code]*/ static PyObject * -Overlapped_ConnectNamedPipe(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_ConnectNamedPipe_impl(OverlappedObject *self, + HANDLE Pipe) +/*[clinic end generated code: output=3e69adfe55818abe input=8b0d4cef8a72f7bc]*/ { - HANDLE Pipe; BOOL ret; DWORD err; - if (!PyArg_ParseTuple(args, F_HANDLE, &Pipe)) - return NULL; - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -1443,25 +1548,22 @@ Overlapped_ConnectNamedPipe(OverlappedObject *self, PyObject *args) } } -PyDoc_STRVAR( - ConnectPipe_doc, - "ConnectPipe(addr) -> pipe_handle\n\n" - "Connect to the pipe for asynchronous I/O (overlapped)."); +/*[clinic input] +_overlapped.Overlapped.ConnectPipe + + addr as Address: Py_UNICODE + / + +Connect to the pipe for asynchronous I/O (overlapped). +[clinic start generated code]*/ static PyObject * -overlapped_ConnectPipe(PyObject *self, PyObject *args) +_overlapped_Overlapped_ConnectPipe_impl(OverlappedObject *self, + const Py_UNICODE *Address) +/*[clinic end generated code: output=3cc9661667d459d4 input=167c06a274efcefc]*/ { - PyObject *AddressObj; - wchar_t *Address; HANDLE PipeHandle; - if (!PyArg_ParseTuple(args, "U", &AddressObj)) - return NULL; - - Address = PyUnicode_AsWideCharString(AddressObj, NULL); - if (Address == NULL) - return NULL; - Py_BEGIN_ALLOW_THREADS PipeHandle = CreateFileW(Address, GENERIC_READ | GENERIC_WRITE, @@ -1469,7 +1571,6 @@ overlapped_ConnectPipe(PyObject *self, PyObject *args) FILE_FLAG_OVERLAPPED, NULL); Py_END_ALLOW_THREADS - PyMem_Free(Address); if (PipeHandle == INVALID_HANDLE_VALUE) return SetFromWindowsErr(0); return Py_BuildValue(F_HANDLE, PipeHandle); @@ -1512,29 +1613,31 @@ Overlapped_traverse(OverlappedObject *self, visitproc visit, void *arg) // UDP functions -PyDoc_STRVAR( - WSAConnect_doc, - "WSAConnect(client_handle, address_as_bytes) -> Overlapped[None]\n\n" - "Bind a remote address to a connectionless (UDP) socket"); - /* * Note: WSAConnect does not support Overlapped I/O so this function should * _only_ be used for connectionless sockets (UDP). */ + +/*[clinic input] +_overlapped.WSAConnect + + client_handle as ConnectSocket: HANDLE + address_as_bytes as AddressObj: object + / + +Bind a remote address to a connectionless (UDP) socket. +[clinic start generated code]*/ + static PyObject * -overlapped_WSAConnect(PyObject *self, PyObject *args) +_overlapped_WSAConnect_impl(PyObject *module, HANDLE ConnectSocket, + PyObject *AddressObj) +/*[clinic end generated code: output=ea0b4391e94dad63 input=169f8075e9ae7fa4]*/ { - SOCKET ConnectSocket; - PyObject *AddressObj; char AddressBuf[sizeof(struct sockaddr_in6)]; SOCKADDR *Address = (SOCKADDR*)AddressBuf; int Length; int err; - if (!PyArg_ParseTuple(args, F_HANDLE "O", &ConnectSocket, &AddressObj)) { - return NULL; - } - Length = sizeof(AddressBuf); Length = parse_address(AddressObj, Address, Length); if (Length < 0) { @@ -1544,7 +1647,7 @@ overlapped_WSAConnect(PyObject *self, PyObject *args) Py_BEGIN_ALLOW_THREADS // WSAConnect does not support overlapped I/O so this call will // successfully complete immediately. - err = WSAConnect(ConnectSocket, Address, Length, + err = WSAConnect((SOCKET)ConnectSocket, Address, Length, NULL, NULL, NULL, NULL); Py_END_ALLOW_THREADS @@ -1556,19 +1659,24 @@ overlapped_WSAConnect(PyObject *self, PyObject *args) } } -PyDoc_STRVAR( - Overlapped_WSASendTo_doc, - "WSASendTo(handle, buf, flags, address_as_bytes) -> " - "Overlapped[bytes_transferred]\n\n" - "Start overlapped sendto over a connectionless (UDP) socket"); +/*[clinic input] +_overlapped.Overlapped.WSASendTo + + handle: HANDLE + buf as bufobj: object + flags: DWORD + address_as_bytes as AddressObj: object + / + +Start overlapped sendto over a connectionless (UDP) socket. +[clinic start generated code]*/ static PyObject * -Overlapped_WSASendTo(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_WSASendTo_impl(OverlappedObject *self, HANDLE handle, + PyObject *bufobj, DWORD flags, + PyObject *AddressObj) +/*[clinic end generated code: output=fe0ff55eb60d65e1 input=f709e6ecebd9bc18]*/ { - HANDLE handle; - PyObject *bufobj; - DWORD flags; - PyObject *AddressObj; char AddressBuf[sizeof(struct sockaddr_in6)]; SOCKADDR *Address = (SOCKADDR*)AddressBuf; int AddressLength; @@ -1577,12 +1685,6 @@ Overlapped_WSASendTo(OverlappedObject *self, PyObject *args) int ret; DWORD err; - if (!PyArg_ParseTuple(args, F_HANDLE "O" F_DWORD "O", - &handle, &bufobj, &flags, &AddressObj)) - { - return NULL; - } - // Parse the "to" address AddressLength = sizeof(AddressBuf); AddressLength = parse_address(AddressObj, Address, AddressLength); @@ -1637,24 +1739,29 @@ PyDoc_STRVAR( "RecvFile(handle, size, flags) -> Overlapped[(message, (host, port))]\n\n" "Start overlapped receive"); +/*[clinic input] +_overlapped.Overlapped.WSARecvFrom + + handle: HANDLE + size: DWORD + flags: DWORD = 0 + / + +Start overlapped receive. +[clinic start generated code]*/ + static PyObject * -Overlapped_WSARecvFrom(OverlappedObject *self, PyObject *args) +_overlapped_Overlapped_WSARecvFrom_impl(OverlappedObject *self, + HANDLE handle, DWORD size, + DWORD flags) +/*[clinic end generated code: output=13832a2025b86860 input=1b2663fa130e0286]*/ { - HANDLE handle; - DWORD size; - DWORD flags = 0; DWORD nread; PyObject *buf; WSABUF wsabuf; int ret; DWORD err; - if (!PyArg_ParseTuple(args, F_HANDLE F_DWORD "|" F_DWORD, - &handle, &size, &flags)) - { - return NULL; - } - if (self->type != TYPE_NONE) { PyErr_SetString(PyExc_ValueError, "operation already attempted"); return NULL; @@ -1700,38 +1807,24 @@ Overlapped_WSARecvFrom(OverlappedObject *self, PyObject *args) } } +#include "clinic/overlapped.c.h" static PyMethodDef Overlapped_methods[] = { - {"getresult", (PyCFunction) Overlapped_getresult, - METH_VARARGS, Overlapped_getresult_doc}, - {"cancel", (PyCFunction) Overlapped_cancel, - METH_NOARGS, Overlapped_cancel_doc}, - {"ReadFile", (PyCFunction) Overlapped_ReadFile, - METH_VARARGS, Overlapped_ReadFile_doc}, - {"ReadFileInto", (PyCFunction) Overlapped_ReadFileInto, - METH_VARARGS, Overlapped_ReadFileInto_doc}, - {"WSARecv", (PyCFunction) Overlapped_WSARecv, - METH_VARARGS, Overlapped_WSARecv_doc}, - {"WSARecvInto", (PyCFunction) Overlapped_WSARecvInto, - METH_VARARGS, Overlapped_WSARecvInto_doc}, - {"WriteFile", (PyCFunction) Overlapped_WriteFile, - METH_VARARGS, Overlapped_WriteFile_doc}, - {"WSASend", (PyCFunction) Overlapped_WSASend, - METH_VARARGS, Overlapped_WSASend_doc}, - {"AcceptEx", (PyCFunction) Overlapped_AcceptEx, - METH_VARARGS, Overlapped_AcceptEx_doc}, - {"ConnectEx", (PyCFunction) Overlapped_ConnectEx, - METH_VARARGS, Overlapped_ConnectEx_doc}, - {"DisconnectEx", (PyCFunction) Overlapped_DisconnectEx, - METH_VARARGS, Overlapped_DisconnectEx_doc}, - {"TransmitFile", (PyCFunction) Overlapped_TransmitFile, - METH_VARARGS, Overlapped_TransmitFile_doc}, - {"ConnectNamedPipe", (PyCFunction) Overlapped_ConnectNamedPipe, - METH_VARARGS, Overlapped_ConnectNamedPipe_doc}, - {"WSARecvFrom", (PyCFunction) Overlapped_WSARecvFrom, - METH_VARARGS, Overlapped_WSARecvFrom_doc }, - {"WSASendTo", (PyCFunction) Overlapped_WSASendTo, - METH_VARARGS, Overlapped_WSASendTo_doc }, + _OVERLAPPED_OVERLAPPED_GETRESULT_METHODDEF + _OVERLAPPED_OVERLAPPED_CANCEL_METHODDEF + _OVERLAPPED_OVERLAPPED_READFILE_METHODDEF + _OVERLAPPED_OVERLAPPED_READFILEINTO_METHODDEF + _OVERLAPPED_OVERLAPPED_WSARECV_METHODDEF + _OVERLAPPED_OVERLAPPED_WSARECVINTO_METHODDEF + _OVERLAPPED_OVERLAPPED_WRITEFILE_METHODDEF + _OVERLAPPED_OVERLAPPED_WSASEND_METHODDEF + _OVERLAPPED_OVERLAPPED_ACCEPTEX_METHODDEF + _OVERLAPPED_OVERLAPPED_CONNECTEX_METHODDEF + _OVERLAPPED_OVERLAPPED_DISCONNECTEX_METHODDEF + _OVERLAPPED_OVERLAPPED_TRANSMITFILE_METHODDEF + _OVERLAPPED_OVERLAPPED_CONNECTNAMEDPIPE_METHODDEF + _OVERLAPPED_OVERLAPPED_WSARECVFROM_METHODDEF + _OVERLAPPED_OVERLAPPED_WSASENDTO_METHODDEF {NULL} }; @@ -1774,7 +1867,7 @@ PyTypeObject OverlappedType = { /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ Py_TPFLAGS_DEFAULT, - /* tp_doc */ "OVERLAPPED structure wrapper", + /* tp_doc */ _overlapped_Overlapped__doc__, /* tp_traverse */ (traverseproc)Overlapped_traverse, /* tp_clear */ 0, /* tp_richcompare */ 0, @@ -1791,36 +1884,23 @@ PyTypeObject OverlappedType = { /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, - /* tp_new */ Overlapped_new, + /* tp_new */ _overlapped_Overlapped, }; static PyMethodDef overlapped_functions[] = { - {"CreateIoCompletionPort", overlapped_CreateIoCompletionPort, - METH_VARARGS, CreateIoCompletionPort_doc}, - {"GetQueuedCompletionStatus", overlapped_GetQueuedCompletionStatus, - METH_VARARGS, GetQueuedCompletionStatus_doc}, - {"PostQueuedCompletionStatus", overlapped_PostQueuedCompletionStatus, - METH_VARARGS, PostQueuedCompletionStatus_doc}, - {"FormatMessage", overlapped_FormatMessage, - METH_VARARGS, FormatMessage_doc}, - {"BindLocal", overlapped_BindLocal, - METH_VARARGS, BindLocal_doc}, - {"RegisterWaitWithQueue", overlapped_RegisterWaitWithQueue, - METH_VARARGS, RegisterWaitWithQueue_doc}, - {"UnregisterWait", overlapped_UnregisterWait, - METH_VARARGS, UnregisterWait_doc}, - {"UnregisterWaitEx", overlapped_UnregisterWaitEx, - METH_VARARGS, UnregisterWaitEx_doc}, - {"CreateEvent", overlapped_CreateEvent, - METH_VARARGS, CreateEvent_doc}, - {"SetEvent", overlapped_SetEvent, - METH_VARARGS, SetEvent_doc}, - {"ResetEvent", overlapped_ResetEvent, - METH_VARARGS, ResetEvent_doc}, - {"ConnectPipe", overlapped_ConnectPipe, - METH_VARARGS, ConnectPipe_doc}, - {"WSAConnect", overlapped_WSAConnect, - METH_VARARGS, WSAConnect_doc}, + _OVERLAPPED_CREATEIOCOMPLETIONPORT_METHODDEF + _OVERLAPPED_GETQUEUEDCOMPLETIONSTATUS_METHODDEF + _OVERLAPPED_POSTQUEUEDCOMPLETIONSTATUS_METHODDEF + _OVERLAPPED_FORMATMESSAGE_METHODDEF + _OVERLAPPED_BINDLOCAL_METHODDEF + _OVERLAPPED_REGISTERWAITWITHQUEUE_METHODDEF + _OVERLAPPED_UNREGISTERWAIT_METHODDEF + _OVERLAPPED_UNREGISTERWAITEX_METHODDEF + _OVERLAPPED_CREATEEVENT_METHODDEF + _OVERLAPPED_SETEVENT_METHODDEF + _OVERLAPPED_RESETEVENT_METHODDEF + _OVERLAPPED_OVERLAPPED_CONNECTPIPE_METHODDEF + _OVERLAPPED_WSACONNECT_METHODDEF {NULL} }; diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index a411f28987ee717..a6a4b9f012f009a 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -32,6 +32,9 @@ # include #endif +#ifdef __VXWORKS__ +# include "pycore_bitutils.h" // _Py_popcount32() +#endif #include "pycore_ceval.h" // _PyEval_ReInitThreads() #include "pycore_import.h" // _PyImport_ReInitLock() #include "pycore_initconfig.h" // _PyStatus_EXCEPTION() @@ -988,6 +991,11 @@ typedef struct { static void path_cleanup(path_t *path) { +#if !USE_UNICODE_WCHAR_CACHE + wchar_t *wide = (wchar_t *)path->wide; + path->wide = NULL; + PyMem_Free(wide); +#endif /* USE_UNICODE_WCHAR_CACHE */ Py_CLEAR(path->object); Py_CLEAR(path->cleanup); } @@ -1002,7 +1010,7 @@ path_converter(PyObject *o, void *p) const char *narrow; #ifdef MS_WINDOWS PyObject *wo = NULL; - const wchar_t *wide; + wchar_t *wide = NULL; #endif #define FORMAT_EXCEPTION(exc, fmt) \ @@ -1075,7 +1083,14 @@ path_converter(PyObject *o, void *p) if (is_unicode) { #ifdef MS_WINDOWS +#if USE_UNICODE_WCHAR_CACHE +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS wide = PyUnicode_AsUnicodeAndSize(o, &length); +_Py_COMP_DIAG_POP +#else /* USE_UNICODE_WCHAR_CACHE */ + wide = PyUnicode_AsWideCharString(o, &length); +#endif /* USE_UNICODE_WCHAR_CACHE */ if (!wide) { goto error_exit; } @@ -1091,6 +1106,9 @@ path_converter(PyObject *o, void *p) path->wide = wide; path->narrow = FALSE; path->fd = -1; +#if !USE_UNICODE_WCHAR_CACHE + wide = NULL; +#endif /* USE_UNICODE_WCHAR_CACHE */ goto success_exit; #else if (!PyUnicode_FSConverter(o, &bytes)) { @@ -1166,7 +1184,15 @@ path_converter(PyObject *o, void *p) goto error_exit; } +#if USE_UNICODE_WCHAR_CACHE +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS wide = PyUnicode_AsUnicodeAndSize(wo, &length); +_Py_COMP_DIAG_POP +#else /* USE_UNICODE_WCHAR_CACHE */ + wide = PyUnicode_AsWideCharString(wo, &length); + Py_DECREF(wo); +#endif /* USE_UNICODE_WCHAR_CACHE */ if (!wide) { goto error_exit; } @@ -1180,8 +1206,12 @@ path_converter(PyObject *o, void *p) } path->wide = wide; path->narrow = TRUE; - path->cleanup = wo; Py_DECREF(bytes); +#if USE_UNICODE_WCHAR_CACHE + path->cleanup = wo; +#else /* USE_UNICODE_WCHAR_CACHE */ + wide = NULL; +#endif /* USE_UNICODE_WCHAR_CACHE */ #else path->wide = NULL; path->narrow = narrow; @@ -1205,7 +1235,11 @@ path_converter(PyObject *o, void *p) Py_XDECREF(o); Py_XDECREF(bytes); #ifdef MS_WINDOWS +#if USE_UNICODE_WCHAR_CACHE Py_XDECREF(wo); +#else /* USE_UNICODE_WCHAR_CACHE */ + PyMem_Free(wide); +#endif /* USE_UNICODE_WCHAR_CACHE */ #endif return 0; } @@ -12576,6 +12610,8 @@ os_cpu_count_impl(PyObject *module) ncpu = mpctl(MPC_GETNUMSPUS, NULL, NULL); #elif defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN) ncpu = sysconf(_SC_NPROCESSORS_ONLN); +#elif defined(__VXWORKS__) + ncpu = _Py_popcount32(vxCpuEnabledGet()); #elif defined(__DragonFly__) || \ defined(__OpenBSD__) || \ defined(__FreeBSD__) || \ @@ -12824,7 +12860,15 @@ DirEntry_fetch_stat(PyObject *module, DirEntry *self, int follow_symlinks) #ifdef MS_WINDOWS if (!PyUnicode_FSDecoder(self->path, &ub)) return NULL; +#if USE_UNICODE_WCHAR_CACHE +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS const wchar_t *path = PyUnicode_AsUnicode(ub); +_Py_COMP_DIAG_POP +#else /* USE_UNICODE_WCHAR_CACHE */ + wchar_t *path = PyUnicode_AsWideCharString(ub, NULL); + Py_DECREF(ub); +#endif /* USE_UNICODE_WCHAR_CACHE */ #else /* POSIX */ if (!PyUnicode_FSConverter(self->path, &ub)) return NULL; @@ -12834,6 +12878,7 @@ DirEntry_fetch_stat(PyObject *module, DirEntry *self, int follow_symlinks) result = fstatat(self->dir_fd, path, &st, follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW); #else + Py_DECREF(ub); PyErr_SetString(PyExc_NotImplementedError, "can't fetch stat"); return NULL; #endif /* HAVE_FSTATAT */ @@ -12846,7 +12891,11 @@ DirEntry_fetch_stat(PyObject *module, DirEntry *self, int follow_symlinks) else result = LSTAT(path, &st); } +#if defined(MS_WINDOWS) && !USE_UNICODE_WCHAR_CACHE + PyMem_Free(path); +#else /* USE_UNICODE_WCHAR_CACHE */ Py_DECREF(ub); +#endif /* USE_UNICODE_WCHAR_CACHE */ if (result != 0) return path_object_error(self->path); @@ -13035,15 +13084,24 @@ os_DirEntry_inode_impl(DirEntry *self) #ifdef MS_WINDOWS if (!self->got_file_index) { PyObject *unicode; - const wchar_t *path; STRUCT_STAT stat; int result; if (!PyUnicode_FSDecoder(self->path, &unicode)) return NULL; - path = PyUnicode_AsUnicode(unicode); +#if USE_UNICODE_WCHAR_CACHE +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS + const wchar_t *path = PyUnicode_AsUnicode(unicode); result = LSTAT(path, &stat); Py_DECREF(unicode); +_Py_COMP_DIAG_POP +#else /* USE_UNICODE_WCHAR_CACHE */ + wchar_t *path = PyUnicode_AsWideCharString(unicode, NULL); + Py_DECREF(unicode); + result = LSTAT(path, &stat); + PyMem_Free(path); +#endif /* USE_UNICODE_WCHAR_CACHE */ if (result != 0) return path_object_error(self->path); @@ -13597,10 +13655,9 @@ os_scandir_impl(PyObject *module, path_t *path) iterator->dirp = NULL; #endif - memcpy(&iterator->path, path, sizeof(path_t)); /* Move the ownership to iterator->path */ - path->object = NULL; - path->cleanup = NULL; + memcpy(&iterator->path, path, sizeof(path_t)); + memset(path, 0, sizeof(path_t)); #ifdef MS_WINDOWS iterator->first_time = 1; @@ -13622,9 +13679,9 @@ os_scandir_impl(PyObject *module, path_t *path) #else /* POSIX */ errno = 0; #ifdef HAVE_FDOPENDIR - if (path->fd != -1) { + if (iterator->path.fd != -1) { /* closedir() closes the FD, so we duplicate it */ - fd = _Py_dup(path->fd); + fd = _Py_dup(iterator->path.fd); if (fd == -1) goto error; diff --git a/Modules/readline.c b/Modules/readline.c index 12d6cc78e38a774..bbab0f882e3f163 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -94,6 +94,11 @@ get_readline_state(PyObject *module) return (readlinestate *)state; } +/*[clinic input] +module readline +[clinic start generated code]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=ad49da781b9c8721]*/ + static int readline_clear(PyObject *m) { @@ -148,8 +153,18 @@ decode(const char *s) /* Exported function to send one line to readline's init file parser */ +/*[clinic input] +readline.parse_and_bind + + string: object + / + +Execute the init line provided in the string argument. +[clinic start generated code]*/ + static PyObject * -parse_and_bind(PyObject *self, PyObject *string) +readline_parse_and_bind(PyObject *module, PyObject *string) +/*[clinic end generated code: output=1a1ede8afb9546c1 input=8a28a00bb4d61eec]*/ { char *copy; PyObject *encoded = encode(string); @@ -170,23 +185,28 @@ parse_and_bind(PyObject *self, PyObject *string) Py_RETURN_NONE; } -PyDoc_STRVAR(doc_parse_and_bind, -"parse_and_bind(string) -> None\n\ -Execute the init line provided in the string argument."); +/* Exported function to parse a readline init file */ +/*[clinic input] +readline.read_init_file -/* Exported function to parse a readline init file */ + filename as filename_obj: object = None + / + +Execute a readline initialization file. + +The default filename is the last filename used. +[clinic start generated code]*/ static PyObject * -read_init_file(PyObject *self, PyObject *args) +readline_read_init_file_impl(PyObject *module, PyObject *filename_obj) +/*[clinic end generated code: output=8e059b676142831e input=4c80c473e448139d]*/ { - PyObject *filename_obj = Py_None, *filename_bytes; - if (!PyArg_ParseTuple(args, "|O:read_init_file", &filename_obj)) - return NULL; + PyObject *filename_bytes; if (filename_obj != Py_None) { if (!PyUnicode_FSConverter(filename_obj, &filename_bytes)) return NULL; - errno = rl_read_init_file(PyBytes_AsString(filename_bytes)); + errno = rl_read_init_file(PyBytes_AS_STRING(filename_bytes)); Py_DECREF(filename_bytes); } else errno = rl_read_init_file(NULL); @@ -195,24 +215,28 @@ read_init_file(PyObject *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(doc_read_init_file, -"read_init_file([filename]) -> None\n\ -Execute a readline initialization file.\n\ -The default filename is the last filename used."); +/* Exported function to load a readline history file */ +/*[clinic input] +readline.read_history_file -/* Exported function to load a readline history file */ + filename as filename_obj: object = None + / + +Load a readline history file. + +The default filename is ~/.history. +[clinic start generated code]*/ static PyObject * -read_history_file(PyObject *self, PyObject *args) +readline_read_history_file_impl(PyObject *module, PyObject *filename_obj) +/*[clinic end generated code: output=66a951836fb54fbb input=3d29d755b7e6932e]*/ { - PyObject *filename_obj = Py_None, *filename_bytes; - if (!PyArg_ParseTuple(args, "|O:read_history_file", &filename_obj)) - return NULL; + PyObject *filename_bytes; if (filename_obj != Py_None) { if (!PyUnicode_FSConverter(filename_obj, &filename_bytes)) return NULL; - errno = read_history(PyBytes_AsString(filename_bytes)); + errno = read_history(PyBytes_AS_STRING(filename_bytes)); Py_DECREF(filename_bytes); } else errno = read_history(NULL); @@ -222,26 +246,31 @@ read_history_file(PyObject *self, PyObject *args) } static int _history_length = -1; /* do not truncate history by default */ -PyDoc_STRVAR(doc_read_history_file, -"read_history_file([filename]) -> None\n\ -Load a readline history file.\n\ -The default filename is ~/.history."); - /* Exported function to save a readline history file */ +/*[clinic input] +readline.write_history_file + + filename as filename_obj: object = None + / + +Save a readline history file. + +The default filename is ~/.history. +[clinic start generated code]*/ + static PyObject * -write_history_file(PyObject *self, PyObject *args) +readline_write_history_file_impl(PyObject *module, PyObject *filename_obj) +/*[clinic end generated code: output=fbcad13d8ef59ae6 input=28a8e062fe363703]*/ { - PyObject *filename_obj = Py_None, *filename_bytes; + PyObject *filename_bytes; const char *filename; int err; - if (!PyArg_ParseTuple(args, "|O:write_history_file", &filename_obj)) - return NULL; if (filename_obj != Py_None) { if (!PyUnicode_FSConverter(filename_obj, &filename_bytes)) return NULL; - filename = PyBytes_AsString(filename_bytes); + filename = PyBytes_AS_STRING(filename_bytes); } else { filename_bytes = NULL; filename = NULL; @@ -256,28 +285,33 @@ write_history_file(PyObject *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(doc_write_history_file, -"write_history_file([filename]) -> None\n\ -Save a readline history file.\n\ -The default filename is ~/.history."); - - #ifdef HAVE_RL_APPEND_HISTORY /* Exported function to save part of a readline history file */ +/*[clinic input] +readline.append_history_file + + nelements: int + filename as filename_obj: object = None + / + +Append the last nelements items of the history list to file. + +The default filename is ~/.history. +[clinic start generated code]*/ + static PyObject * -append_history_file(PyObject *self, PyObject *args) +readline_append_history_file_impl(PyObject *module, int nelements, + PyObject *filename_obj) +/*[clinic end generated code: output=5df06fc9da56e4e4 input=784b774db3a4b7c5]*/ { - int nelements; - PyObject *filename_obj = Py_None, *filename_bytes; + PyObject *filename_bytes; const char *filename; int err; - if (!PyArg_ParseTuple(args, "i|O:append_history_file", &nelements, &filename_obj)) - return NULL; if (filename_obj != Py_None) { if (!PyUnicode_FSConverter(filename_obj, &filename_bytes)) return NULL; - filename = PyBytes_AsString(filename_bytes); + filename = PyBytes_AS_STRING(filename_bytes); } else { filename_bytes = NULL; filename = NULL; @@ -291,57 +325,50 @@ append_history_file(PyObject *self, PyObject *args) return PyErr_SetFromErrno(PyExc_OSError); Py_RETURN_NONE; } - -PyDoc_STRVAR(doc_append_history_file, -"append_history_file(nelements[, filename]) -> None\n\ -Append the last nelements items of the history list to file.\n\ -The default filename is ~/.history."); #endif /* Set history length */ -static PyObject* -set_history_length(PyObject *self, PyObject *args) +/*[clinic input] +readline.set_history_length + + length: int + / + +Set the maximal number of lines which will be written to the history file. + +A negative length is used to inhibit history truncation. +[clinic start generated code]*/ + +static PyObject * +readline_set_history_length_impl(PyObject *module, int length) +/*[clinic end generated code: output=e161a53e45987dc7 input=b8901bf16488b760]*/ { - int length = _history_length; - if (!PyArg_ParseTuple(args, "i:set_history_length", &length)) - return NULL; _history_length = length; Py_RETURN_NONE; } -PyDoc_STRVAR(set_history_length_doc, -"set_history_length(length) -> None\n\ -set the maximal number of lines which will be written to\n\ -the history file. A negative length is used to inhibit\n\ -history truncation."); +/* Get history length */ +/*[clinic input] +readline.get_history_length -/* Get history length */ +Return the maximum number of lines that will be written to the history file. +[clinic start generated code]*/ -static PyObject* -get_history_length(PyObject *self, PyObject *noarg) +static PyObject * +readline_get_history_length_impl(PyObject *module) +/*[clinic end generated code: output=83a2eeae35b6d2b9 input=5dce2eeba4327817]*/ { return PyLong_FromLong(_history_length); } -PyDoc_STRVAR(get_history_length_doc, -"get_history_length() -> int\n\ -return the maximum number of lines that will be written to\n\ -the history file."); - - /* Generic hook function setter */ static PyObject * -set_hook(const char *funcname, PyObject **hook_var, PyObject *args) +set_hook(const char *funcname, PyObject **hook_var, PyObject *function) { - PyObject *function = Py_None; - char buf[80]; - PyOS_snprintf(buf, sizeof(buf), "|O:set_%.50s", funcname); - if (!PyArg_ParseTuple(args, buf, &function)) - return NULL; if (function == Py_None) { Py_CLEAR(*hook_var); } @@ -358,12 +385,27 @@ set_hook(const char *funcname, PyObject **hook_var, PyObject *args) Py_RETURN_NONE; } +/*[clinic input] +readline.set_completion_display_matches_hook + + function: object = None + / + +Set or remove the completion display function. + +The function is called as + function(substitution, [matches], longest_match_length) +once each time matches need to be displayed. +[clinic start generated code]*/ static PyObject * -set_completion_display_matches_hook(PyObject *self, PyObject *args) +readline_set_completion_display_matches_hook_impl(PyObject *module, + PyObject *function) +/*[clinic end generated code: output=516e5cb8db75a328 input=4f0bfd5ab0179a26]*/ { PyObject *result = set_hook("completion_display_matches_hook", - &readlinestate_global->completion_display_matches_hook, args); + &readlinestate_global->completion_display_matches_hook, + function); #ifdef HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK /* We cannot set this hook globally, since it replaces the default completion display. */ @@ -379,90 +421,114 @@ set_completion_display_matches_hook(PyObject *self, PyObject *args) } -PyDoc_STRVAR(doc_set_completion_display_matches_hook, -"set_completion_display_matches_hook([function]) -> None\n\ -Set or remove the completion display function.\n\ -The function is called as\n\ - function(substitution, [matches], longest_match_length)\n\ -once each time matches need to be displayed."); +/*[clinic input] +readline.set_startup_hook + + function: object = None + / + +Set or remove the function invoked by the rl_startup_hook callback. + +The function is called with no arguments just +before readline prints the first prompt. +[clinic start generated code]*/ static PyObject * -set_startup_hook(PyObject *self, PyObject *args) +readline_set_startup_hook_impl(PyObject *module, PyObject *function) +/*[clinic end generated code: output=02cd0e0c4fa082ad input=7783b4334b26d16d]*/ { - return set_hook("startup_hook", &readlinestate_global->startup_hook, args); + return set_hook("startup_hook", &readlinestate_global->startup_hook, + function); } -PyDoc_STRVAR(doc_set_startup_hook, -"set_startup_hook([function]) -> None\n\ -Set or remove the function invoked by the rl_startup_hook callback.\n\ -The function is called with no arguments just\n\ -before readline prints the first prompt."); - - #ifdef HAVE_RL_PRE_INPUT_HOOK /* Set pre-input hook */ +/*[clinic input] +readline.set_pre_input_hook + + function: object = None + / + +Set or remove the function invoked by the rl_pre_input_hook callback. + +The function is called with no arguments after the first prompt +has been printed and just before readline starts reading input +characters. +[clinic start generated code]*/ + static PyObject * -set_pre_input_hook(PyObject *self, PyObject *args) +readline_set_pre_input_hook_impl(PyObject *module, PyObject *function) +/*[clinic end generated code: output=fe1a96505096f464 input=4f3eaeaf7ce1fdbe]*/ { - return set_hook("pre_input_hook", &readlinestate_global->pre_input_hook, args); + return set_hook("pre_input_hook", &readlinestate_global->pre_input_hook, + function); } - -PyDoc_STRVAR(doc_set_pre_input_hook, -"set_pre_input_hook([function]) -> None\n\ -Set or remove the function invoked by the rl_pre_input_hook callback.\n\ -The function is called with no arguments after the first prompt\n\ -has been printed and just before readline starts reading input\n\ -characters."); - #endif /* Get the completion type for the scope of the tab-completion */ + +/*[clinic input] +readline.get_completion_type + +Get the type of completion being attempted. +[clinic start generated code]*/ + static PyObject * -get_completion_type(PyObject *self, PyObject *noarg) +readline_get_completion_type_impl(PyObject *module) +/*[clinic end generated code: output=5c54d58a04997c07 input=04b92bc7a82dac91]*/ { return PyLong_FromLong(rl_completion_type); } -PyDoc_STRVAR(doc_get_completion_type, -"get_completion_type() -> int\n\ -Get the type of completion being attempted."); +/* Get the beginning index for the scope of the tab-completion */ +/*[clinic input] +readline.get_begidx -/* Get the beginning index for the scope of the tab-completion */ +Get the beginning index of the completion scope. +[clinic start generated code]*/ static PyObject * -get_begidx(PyObject *self, PyObject *noarg) +readline_get_begidx_impl(PyObject *module) +/*[clinic end generated code: output=362616ee8ed1b2b1 input=e083b81c8eb4bac3]*/ { Py_INCREF(readlinestate_global->begidx); return readlinestate_global->begidx; } -PyDoc_STRVAR(doc_get_begidx, -"get_begidx() -> int\n\ -get the beginning index of the completion scope"); +/* Get the ending index for the scope of the tab-completion */ +/*[clinic input] +readline.get_endidx -/* Get the ending index for the scope of the tab-completion */ +Get the ending index of the completion scope. +[clinic start generated code]*/ static PyObject * -get_endidx(PyObject *self, PyObject *noarg) +readline_get_endidx_impl(PyObject *module) +/*[clinic end generated code: output=7f763350b12d7517 input=d4c7e34a625fd770]*/ { Py_INCREF(readlinestate_global->endidx); return readlinestate_global->endidx; } -PyDoc_STRVAR(doc_get_endidx, -"get_endidx() -> int\n\ -get the ending index of the completion scope"); +/* Set the tab-completion word-delimiters that readline uses */ + +/*[clinic input] +readline.set_completer_delims + string: object + / -/* Set the tab-completion word-delimiters that readline uses */ +Set the word delimiters for completion. +[clinic start generated code]*/ static PyObject * -set_completer_delims(PyObject *self, PyObject *string) +readline_set_completer_delims(PyObject *module, PyObject *string) +/*[clinic end generated code: output=4305b266106c4f1f input=ae945337ebd01e20]*/ { char *break_chars; PyObject *encoded = encode(string); @@ -484,10 +550,6 @@ set_completer_delims(PyObject *self, PyObject *string) return PyErr_NoMemory(); } -PyDoc_STRVAR(doc_set_completer_delims, -"set_completer_delims(string) -> None\n\ -set the word delimiters for completion"); - /* _py_free_history_entry: Utility function to free a history entry. */ #if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0500 @@ -520,14 +582,21 @@ _py_free_history_entry(HIST_ENTRY *entry) #endif +/*[clinic input] +readline.remove_history_item + + pos as entry_number: int + / + +Remove history item given by its position. +[clinic start generated code]*/ + static PyObject * -py_remove_history(PyObject *self, PyObject *args) +readline_remove_history_item_impl(PyObject *module, int entry_number) +/*[clinic end generated code: output=ab114f029208c7e8 input=c8520ac3da50224e]*/ { - int entry_number; HIST_ENTRY *entry; - if (!PyArg_ParseTuple(args, "i:remove_history_item", &entry_number)) - return NULL; if (entry_number < 0) { PyErr_SetString(PyExc_ValueError, "History index cannot be negative"); @@ -545,22 +614,24 @@ py_remove_history(PyObject *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(doc_remove_history, -"remove_history_item(pos) -> None\n\ -remove history item given by its position"); +/*[clinic input] +readline.replace_history_item + + pos as entry_number: int + line: unicode + / + +Replaces history item given by its position with contents of line. +[clinic start generated code]*/ static PyObject * -py_replace_history(PyObject *self, PyObject *args) +readline_replace_history_item_impl(PyObject *module, int entry_number, + PyObject *line) +/*[clinic end generated code: output=f8cec2770ca125eb input=b7ccef0780ae041b]*/ { - int entry_number; - PyObject *line; PyObject *encoded; HIST_ENTRY *old_entry; - if (!PyArg_ParseTuple(args, "iU:replace_history_item", &entry_number, - &line)) { - return NULL; - } if (entry_number < 0) { PyErr_SetString(PyExc_ValueError, "History index cannot be negative"); @@ -583,14 +654,20 @@ py_replace_history(PyObject *self, PyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(doc_replace_history, -"replace_history_item(pos, line) -> None\n\ -replaces history item given by its position with contents of line"); - /* Add a line to the history buffer */ +/*[clinic input] +readline.add_history + + string: object + / + +Add an item to the history buffer. +[clinic start generated code]*/ + static PyObject * -py_add_history(PyObject *self, PyObject *string) +readline_add_history(PyObject *module, PyObject *string) +/*[clinic end generated code: output=b107b7e8106e803d input=e57c1cf6bc68d7e3]*/ { PyObject *encoded = encode(string); if (encoded == NULL) { @@ -601,60 +678,75 @@ py_add_history(PyObject *self, PyObject *string) Py_RETURN_NONE; } -PyDoc_STRVAR(doc_add_history, -"add_history(string) -> None\n\ -add an item to the history buffer"); - static int should_auto_add_history = 1; /* Enable or disable automatic history */ +/*[clinic input] +readline.set_auto_history + + enabled as _should_auto_add_history: bool + / + +Enables or disables automatic history. +[clinic start generated code]*/ + static PyObject * -py_set_auto_history(PyObject *self, PyObject *args) +readline_set_auto_history_impl(PyObject *module, + int _should_auto_add_history) +/*[clinic end generated code: output=619c6968246fd82b input=3d413073a1a03355]*/ { - if (!PyArg_ParseTuple(args, "p:set_auto_history", - &should_auto_add_history)) { - return NULL; - } + should_auto_add_history = _should_auto_add_history; Py_RETURN_NONE; } -PyDoc_STRVAR(doc_set_auto_history, -"set_auto_history(enabled) -> None\n\ -Enables or disables automatic history."); - /* Get the tab-completion word-delimiters that readline uses */ +/*[clinic input] +readline.get_completer_delims + +Get the word delimiters for completion. +[clinic start generated code]*/ + static PyObject * -get_completer_delims(PyObject *self, PyObject *noarg) +readline_get_completer_delims_impl(PyObject *module) +/*[clinic end generated code: output=6b060280fa68ef43 input=e36eb14fb8a1f08a]*/ { return decode(rl_completer_word_break_characters); } -PyDoc_STRVAR(doc_get_completer_delims, -"get_completer_delims() -> string\n\ -get the word delimiters for completion"); +/* Set the completer function */ +/*[clinic input] +readline.set_completer -/* Set the completer function */ + function: object = None + / + +Set or remove the completer function. + +The function is called as function(text, state), +for state in 0, 1, 2, ..., until it returns a non-string. +It should return the next possible completion starting with 'text'. +[clinic start generated code]*/ static PyObject * -set_completer(PyObject *self, PyObject *args) +readline_set_completer_impl(PyObject *module, PyObject *function) +/*[clinic end generated code: output=171a2a60f81d3204 input=51e81e13118eb877]*/ { - return set_hook("completer", &readlinestate_global->completer, args); + return set_hook("completer", &readlinestate_global->completer, function); } -PyDoc_STRVAR(doc_set_completer, -"set_completer([function]) -> None\n\ -Set or remove the completer function.\n\ -The function is called as function(text, state),\n\ -for state in 0, 1, 2, ..., until it returns a non-string.\n\ -It should return the next possible completion starting with 'text'."); +/*[clinic input] +readline.get_completer +Get the current completer function. +[clinic start generated code]*/ static PyObject * -get_completer(PyObject *self, PyObject *noargs) +readline_get_completer_impl(PyObject *module) +/*[clinic end generated code: output=6e6bbd8226d14475 input=6457522e56d70d13]*/ { if (readlinestate_global->completer == NULL) { Py_RETURN_NONE; @@ -663,11 +755,6 @@ get_completer(PyObject *self, PyObject *noargs) return readlinestate_global->completer; } -PyDoc_STRVAR(doc_get_completer, -"get_completer() -> function\n\ -\n\ -Returns current completer function."); - /* Private function to get current length of history. XXX It may be * possible to replace this with a direct use of history_length instead, * but it's not clear whether BSD's libedit keeps history_length up to date. @@ -689,14 +776,21 @@ _py_get_history_length(void) /* Exported function to get any element of history */ +/*[clinic input] +readline.get_history_item + + index as idx: int + / + +Return the current contents of history item at index. +[clinic start generated code]*/ + static PyObject * -get_history_item(PyObject *self, PyObject *args) +readline_get_history_item_impl(PyObject *module, int idx) +/*[clinic end generated code: output=83d3e53ea5f34b3d input=63fff0c3c4323269]*/ { - int idx = 0; HIST_ENTRY *hist_ent; - if (!PyArg_ParseTuple(args, "i:get_history_item", &idx)) - return NULL; if (using_libedit_emulation) { /* Older versions of libedit's readline emulation * use 0-based indexes, while readline and newer @@ -723,58 +817,70 @@ get_history_item(PyObject *self, PyObject *args) } } -PyDoc_STRVAR(doc_get_history_item, -"get_history_item() -> string\n\ -return the current contents of history item at index."); +/* Exported function to get current length of history */ +/*[clinic input] +readline.get_current_history_length -/* Exported function to get current length of history */ +Return the current (not the maximum) length of history. +[clinic start generated code]*/ static PyObject * -get_current_history_length(PyObject *self, PyObject *noarg) +readline_get_current_history_length_impl(PyObject *module) +/*[clinic end generated code: output=436b294f12ba1e3f input=9cb3f431a68d071f]*/ { return PyLong_FromLong((long)_py_get_history_length()); } -PyDoc_STRVAR(doc_get_current_history_length, -"get_current_history_length() -> integer\n\ -return the current (not the maximum) length of history."); +/* Exported function to read the current line buffer */ +/*[clinic input] +readline.get_line_buffer -/* Exported function to read the current line buffer */ +Return the current contents of the line buffer. +[clinic start generated code]*/ static PyObject * -get_line_buffer(PyObject *self, PyObject *noarg) +readline_get_line_buffer_impl(PyObject *module) +/*[clinic end generated code: output=d22f9025ecad80e4 input=5f5fbc0d12c69412]*/ { return decode(rl_line_buffer); } -PyDoc_STRVAR(doc_get_line_buffer, -"get_line_buffer() -> string\n\ -return the current contents of the line buffer."); - - #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER /* Exported function to clear the current history */ +/*[clinic input] +readline.clear_history + +Clear the current readline history. +[clinic start generated code]*/ + static PyObject * -py_clear_history(PyObject *self, PyObject *noarg) +readline_clear_history_impl(PyObject *module) +/*[clinic end generated code: output=1f2dbb0dfa5d5ebb input=208962c4393f5d16]*/ { clear_history(); Py_RETURN_NONE; } - -PyDoc_STRVAR(doc_clear_history, -"clear_history() -> None\n\ -Clear the current readline history."); #endif /* Exported function to insert text into the line buffer */ +/*[clinic input] +readline.insert_text + + string: object + / + +Insert text into the line buffer at the cursor position. +[clinic start generated code]*/ + static PyObject * -insert_text(PyObject *self, PyObject *string) +readline_insert_text(PyObject *module, PyObject *string) +/*[clinic end generated code: output=23d792821d320c19 input=bc96c3c848d5ccb5]*/ { PyObject *encoded = encode(string); if (encoded == NULL) { @@ -785,77 +891,60 @@ insert_text(PyObject *self, PyObject *string) Py_RETURN_NONE; } -PyDoc_STRVAR(doc_insert_text, -"insert_text(string) -> None\n\ -Insert text into the line buffer at the cursor position."); +/* Redisplay the line buffer */ +/*[clinic input] +readline.redisplay -/* Redisplay the line buffer */ +Change what's displayed on the screen to reflect contents of the line buffer. +[clinic start generated code]*/ static PyObject * -redisplay(PyObject *self, PyObject *noarg) +readline_redisplay_impl(PyObject *module) +/*[clinic end generated code: output=a8b9725827c3c34b input=b485151058d75edc]*/ { rl_redisplay(); Py_RETURN_NONE; } -PyDoc_STRVAR(doc_redisplay, -"redisplay() -> None\n\ -Change what's displayed on the screen to reflect the current\n\ -contents of the line buffer."); - +#include "clinic/readline.c.h" /* Table of functions exported by the module */ static struct PyMethodDef readline_methods[] = { - {"parse_and_bind", parse_and_bind, METH_O, doc_parse_and_bind}, - {"get_line_buffer", get_line_buffer, METH_NOARGS, doc_get_line_buffer}, - {"insert_text", insert_text, METH_O, doc_insert_text}, - {"redisplay", redisplay, METH_NOARGS, doc_redisplay}, - {"read_init_file", read_init_file, METH_VARARGS, doc_read_init_file}, - {"read_history_file", read_history_file, - METH_VARARGS, doc_read_history_file}, - {"write_history_file", write_history_file, - METH_VARARGS, doc_write_history_file}, + READLINE_PARSE_AND_BIND_METHODDEF + READLINE_GET_LINE_BUFFER_METHODDEF + READLINE_INSERT_TEXT_METHODDEF + READLINE_REDISPLAY_METHODDEF + READLINE_READ_INIT_FILE_METHODDEF + READLINE_READ_HISTORY_FILE_METHODDEF + READLINE_WRITE_HISTORY_FILE_METHODDEF #ifdef HAVE_RL_APPEND_HISTORY - {"append_history_file", append_history_file, - METH_VARARGS, doc_append_history_file}, + READLINE_APPEND_HISTORY_FILE_METHODDEF #endif - {"get_history_item", get_history_item, - METH_VARARGS, doc_get_history_item}, - {"get_current_history_length", (PyCFunction)get_current_history_length, - METH_NOARGS, doc_get_current_history_length}, - {"set_history_length", set_history_length, - METH_VARARGS, set_history_length_doc}, - {"get_history_length", get_history_length, - METH_NOARGS, get_history_length_doc}, - {"set_completer", set_completer, METH_VARARGS, doc_set_completer}, - {"get_completer", get_completer, METH_NOARGS, doc_get_completer}, - {"get_completion_type", get_completion_type, - METH_NOARGS, doc_get_completion_type}, - {"get_begidx", get_begidx, METH_NOARGS, doc_get_begidx}, - {"get_endidx", get_endidx, METH_NOARGS, doc_get_endidx}, - - {"set_completer_delims", set_completer_delims, - METH_O, doc_set_completer_delims}, - {"set_auto_history", py_set_auto_history, METH_VARARGS, doc_set_auto_history}, - {"add_history", py_add_history, METH_O, doc_add_history}, - {"remove_history_item", py_remove_history, METH_VARARGS, doc_remove_history}, - {"replace_history_item", py_replace_history, METH_VARARGS, doc_replace_history}, - {"get_completer_delims", get_completer_delims, - METH_NOARGS, doc_get_completer_delims}, - - {"set_completion_display_matches_hook", set_completion_display_matches_hook, - METH_VARARGS, doc_set_completion_display_matches_hook}, - {"set_startup_hook", set_startup_hook, - METH_VARARGS, doc_set_startup_hook}, + READLINE_GET_HISTORY_ITEM_METHODDEF + READLINE_GET_CURRENT_HISTORY_LENGTH_METHODDEF + READLINE_SET_HISTORY_LENGTH_METHODDEF + READLINE_GET_HISTORY_LENGTH_METHODDEF + READLINE_SET_COMPLETER_METHODDEF + READLINE_GET_COMPLETER_METHODDEF + READLINE_GET_COMPLETION_TYPE_METHODDEF + READLINE_GET_BEGIDX_METHODDEF + READLINE_GET_ENDIDX_METHODDEF + READLINE_SET_COMPLETER_DELIMS_METHODDEF + READLINE_SET_AUTO_HISTORY_METHODDEF + READLINE_ADD_HISTORY_METHODDEF + READLINE_REMOVE_HISTORY_ITEM_METHODDEF + READLINE_REPLACE_HISTORY_ITEM_METHODDEF + READLINE_GET_COMPLETER_DELIMS_METHODDEF + READLINE_SET_COMPLETION_DISPLAY_MATCHES_HOOK_METHODDEF + READLINE_SET_STARTUP_HOOK_METHODDEF #ifdef HAVE_RL_PRE_INPUT_HOOK - {"set_pre_input_hook", set_pre_input_hook, - METH_VARARGS, doc_set_pre_input_hook}, + READLINE_SET_PRE_INPUT_HOOK_METHODDEF #endif #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER - {"clear_history", py_clear_history, METH_NOARGS, doc_clear_history}, + READLINE_CLEAR_HISTORY_METHODDEF #endif {0, 0} }; diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index ef3536a210b04ce..7bc1b535e6e2caa 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -189,19 +189,26 @@ itimer_retval(struct itimerval *iv) } #endif +/*[clinic input] +signal.default_int_handler + signalnum: int + frame: object + / + +The default handler for SIGINT installed by Python. + +It raises KeyboardInterrupt. +[clinic start generated code]*/ + static PyObject * -signal_default_int_handler(PyObject *self, PyObject *args) +signal_default_int_handler_impl(PyObject *module, int signalnum, + PyObject *frame) +/*[clinic end generated code: output=bb11c2eb115ace4e input=efcd4a56a207acfd]*/ { PyErr_SetNone(PyExc_KeyboardInterrupt); return NULL; } -PyDoc_STRVAR(default_int_handler_doc, -"default_int_handler(...)\n\ -\n\ -The default handler for SIGINT installed by Python.\n\ -It raises KeyboardInterrupt."); - static int report_wakeup_write_error(void *data) @@ -1297,7 +1304,7 @@ signal_pidfd_send_signal_impl(PyObject *module, int pidfd, int signalnum, /* List of functions defined in the module -- some of the methoddefs are defined to nothing if the corresponding C function is not available. */ static PyMethodDef signal_methods[] = { - {"default_int_handler", signal_default_int_handler, METH_VARARGS, default_int_handler_doc}, + SIGNAL_DEFAULT_INT_HANDLER_METHODDEF SIGNAL_ALARM_METHODDEF SIGNAL_SETITIMER_METHODDEF SIGNAL_GETITIMER_METHODDEF diff --git a/Modules/termios.c b/Modules/termios.c index 75e5e523206f418..178ae4ee6e41dd2 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -1,4 +1,4 @@ -/* termiosmodule.c -- POSIX terminal I/O module implementation. */ +/* termios.c -- POSIX terminal I/O module implementation. */ #include "Python.h" diff --git a/Objects/abstract.c b/Objects/abstract.c index 3494f33ce380ca0..7bd72c9b5dcc269 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -1382,7 +1382,7 @@ PyNumber_Long(PyObject *o) if (!PyLong_Check(result)) { PyErr_Format(PyExc_TypeError, "__int__ returned non-int (type %.200s)", - result->ob_type->tp_name); + Py_TYPE(result)->tp_name); Py_DECREF(result); return NULL; } @@ -1391,7 +1391,7 @@ PyNumber_Long(PyObject *o) "__int__ returned non-int (type %.200s). " "The ability to return an instance of a strict subclass of int " "is deprecated, and may be removed in a future version of Python.", - result->ob_type->tp_name)) { + Py_TYPE(result)->tp_name)) { Py_DECREF(result); return NULL; } diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 83c79b200a0a130..8b57fb679d31dc4 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -266,7 +266,9 @@ PyByteArray_Concat(PyObject *a, PyObject *b) result = (PyByteArrayObject *) \ PyByteArray_FromStringAndSize(NULL, va.len + vb.len); - if (result != NULL) { + // result->ob_bytes is NULL if result is an empty string: + // if va.len + vb.len equals zero. + if (result != NULL && result->ob_bytes != NULL) { memcpy(result->ob_bytes, va.buf, va.len); memcpy(result->ob_bytes + va.len, vb.buf, vb.len); } @@ -736,13 +738,20 @@ bytearray_ass_subscript(PyByteArrayObject *self, PyObject *index, PyObject *valu } } +/*[clinic input] +bytearray.__init__ + + source as arg: object = NULL + encoding: str = NULL + errors: str = NULL + +[clinic start generated code]*/ + static int -bytearray_init(PyByteArrayObject *self, PyObject *args, PyObject *kwds) +bytearray___init___impl(PyByteArrayObject *self, PyObject *arg, + const char *encoding, const char *errors) +/*[clinic end generated code: output=4ce1304649c2f8b3 input=1141a7122eefd7b9]*/ { - static char *kwlist[] = {"source", "encoding", "errors", 0}; - PyObject *arg = NULL; - const char *encoding = NULL; - const char *errors = NULL; Py_ssize_t count; PyObject *it; PyObject *(*iternext)(PyObject *); @@ -753,11 +762,6 @@ bytearray_init(PyByteArrayObject *self, PyObject *args, PyObject *kwds) return -1; } - /* Parse arguments */ - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oss:bytearray", kwlist, - &arg, &encoding, &errors)) - return -1; - /* Make a quick exit if no first argument */ if (arg == NULL) { if (encoding != NULL || errors != NULL) { @@ -2352,7 +2356,7 @@ PyTypeObject PyByteArray_Type = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)bytearray_init, /* tp_init */ + (initproc)bytearray___init__, /* tp_init */ PyType_GenericAlloc, /* tp_alloc */ PyType_GenericNew, /* tp_new */ PyObject_Del, /* tp_free */ diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 7632cb5e4ddd9bd..836a736037ba438 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -2580,24 +2580,27 @@ static PyNumberMethods bytes_as_number = { }; static PyObject * -bytes_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds); +bytes_subtype_new(PyTypeObject *, PyObject *); + +/*[clinic input] +@classmethod +bytes.__new__ as bytes_new + + source as x: object = NULL + encoding: str = NULL + errors: str = NULL + +[clinic start generated code]*/ static PyObject * -bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +bytes_new_impl(PyTypeObject *type, PyObject *x, const char *encoding, + const char *errors) +/*[clinic end generated code: output=1e0c471be311a425 input=f0a966d19b7262b4]*/ { - PyObject *x = NULL; - const char *encoding = NULL; - const char *errors = NULL; - PyObject *new = NULL; + PyObject *bytes; PyObject *func; Py_ssize_t size; - static char *kwlist[] = {"source", "encoding", "errors", 0}; - if (type != &PyBytes_Type) - return bytes_subtype_new(type, args, kwds); - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oss:bytes", kwlist, &x, - &encoding, &errors)) - return NULL; if (x == NULL) { if (encoding != NULL || errors != NULL) { PyErr_SetString(PyExc_TypeError, @@ -2606,78 +2609,73 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds) "errors without a string argument"); return NULL; } - return PyBytes_FromStringAndSize(NULL, 0); + bytes = PyBytes_FromStringAndSize(NULL, 0); } - - if (encoding != NULL) { + else if (encoding != NULL) { /* Encode via the codec registry */ if (!PyUnicode_Check(x)) { PyErr_SetString(PyExc_TypeError, "encoding without a string argument"); return NULL; } - new = PyUnicode_AsEncodedString(x, encoding, errors); - if (new == NULL) - return NULL; - assert(PyBytes_Check(new)); - return new; + bytes = PyUnicode_AsEncodedString(x, encoding, errors); } - - if (errors != NULL) { + else if (errors != NULL) { PyErr_SetString(PyExc_TypeError, PyUnicode_Check(x) ? "string argument without an encoding" : "errors without a string argument"); return NULL; } - /* We'd like to call PyObject_Bytes here, but we need to check for an integer argument before deferring to PyBytes_FromObject, something PyObject_Bytes doesn't do. */ - func = _PyObject_LookupSpecial(x, &PyId___bytes__); - if (func != NULL) { - new = _PyObject_CallNoArg(func); + else if ((func = _PyObject_LookupSpecial(x, &PyId___bytes__)) != NULL) { + bytes = _PyObject_CallNoArg(func); Py_DECREF(func); - if (new == NULL) + if (bytes == NULL) return NULL; - if (!PyBytes_Check(new)) { + if (!PyBytes_Check(bytes)) { PyErr_Format(PyExc_TypeError, - "__bytes__ returned non-bytes (type %.200s)", - Py_TYPE(new)->tp_name); - Py_DECREF(new); + "__bytes__ returned non-bytes (type %.200s)", + Py_TYPE(bytes)->tp_name); + Py_DECREF(bytes); return NULL; } - return new; } else if (PyErr_Occurred()) return NULL; - - if (PyUnicode_Check(x)) { + else if (PyUnicode_Check(x)) { PyErr_SetString(PyExc_TypeError, "string argument without an encoding"); return NULL; } /* Is it an integer? */ - if (_PyIndex_Check(x)) { + else if (_PyIndex_Check(x)) { size = PyNumber_AsSsize_t(x, PyExc_OverflowError); if (size == -1 && PyErr_Occurred()) { if (!PyErr_ExceptionMatches(PyExc_TypeError)) return NULL; PyErr_Clear(); /* fall through */ + bytes = PyBytes_FromObject(x); } else { if (size < 0) { PyErr_SetString(PyExc_ValueError, "negative count"); return NULL; } - new = _PyBytes_FromSize(size, 1); - if (new == NULL) - return NULL; - return new; + bytes = _PyBytes_FromSize(size, 1); } } + else { + bytes = PyBytes_FromObject(x); + } - return PyBytes_FromObject(x); + if (bytes != NULL && type != &PyBytes_Type) { + Py_SETREF(bytes, bytes_subtype_new(type, bytes)); + } + + return bytes; } static PyObject* @@ -2889,15 +2887,12 @@ PyBytes_FromObject(PyObject *x) } static PyObject * -bytes_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +bytes_subtype_new(PyTypeObject *type, PyObject *tmp) { - PyObject *tmp, *pnew; + PyObject *pnew; Py_ssize_t n; assert(PyType_IsSubtype(type, &PyBytes_Type)); - tmp = bytes_new(&PyBytes_Type, args, kwds); - if (tmp == NULL) - return NULL; assert(PyBytes_Check(tmp)); n = PyBytes_GET_SIZE(tmp); pnew = type->tp_alloc(type, n); @@ -2907,7 +2902,6 @@ bytes_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) ((PyBytesObject *)pnew)->ob_shash = ((PyBytesObject *)tmp)->ob_shash; } - Py_DECREF(tmp); return pnew; } @@ -3145,7 +3139,6 @@ static PyObject * striter_next(striterobject *it) { PyBytesObject *seq; - PyObject *item; assert(it != NULL); seq = it->it_seq; @@ -3154,11 +3147,8 @@ striter_next(striterobject *it) assert(PyBytes_Check(seq)); if (it->it_index < PyBytes_GET_SIZE(seq)) { - item = PyLong_FromLong( - (unsigned char)seq->ob_sval[it->it_index]); - if (item != NULL) - ++it->it_index; - return item; + return PyLong_FromLong( + (unsigned char)seq->ob_sval[it->it_index++]); } it->it_seq = NULL; diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index cbe6f20344e8c95..3452b241740345d 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -2,6 +2,75 @@ preserve [clinic start generated code]*/ +static int +bytearray___init___impl(PyByteArrayObject *self, PyObject *arg, + const char *encoding, const char *errors); + +static int +bytearray___init__(PyObject *self, PyObject *args, PyObject *kwargs) +{ + int return_value = -1; + static const char * const _keywords[] = {"source", "encoding", "errors", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "bytearray", 0}; + PyObject *argsbuf[3]; + PyObject * const *fastargs; + Py_ssize_t nargs = PyTuple_GET_SIZE(args); + Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; + PyObject *arg = NULL; + const char *encoding = NULL; + const char *errors = NULL; + + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); + if (!fastargs) { + goto exit; + } + if (!noptargs) { + goto skip_optional_pos; + } + if (fastargs[0]) { + arg = fastargs[0]; + if (!--noptargs) { + goto skip_optional_pos; + } + } + if (fastargs[1]) { + if (!PyUnicode_Check(fastargs[1])) { + _PyArg_BadArgument("bytearray", "argument 'encoding'", "str", fastargs[1]); + goto exit; + } + Py_ssize_t encoding_length; + encoding = PyUnicode_AsUTF8AndSize(fastargs[1], &encoding_length); + if (encoding == NULL) { + goto exit; + } + if (strlen(encoding) != (size_t)encoding_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + if (!--noptargs) { + goto skip_optional_pos; + } + } + if (!PyUnicode_Check(fastargs[2])) { + _PyArg_BadArgument("bytearray", "argument 'errors'", "str", fastargs[2]); + goto exit; + } + Py_ssize_t errors_length; + errors = PyUnicode_AsUTF8AndSize(fastargs[2], &errors_length); + if (errors == NULL) { + goto exit; + } + if (strlen(errors) != (size_t)errors_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } +skip_optional_pos: + return_value = bytearray___init___impl((PyByteArrayObject *)self, arg, encoding, errors); + +exit: + return return_value; +} + PyDoc_STRVAR(bytearray_clear__doc__, "clear($self, /)\n" "--\n" @@ -1051,4 +1120,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=0cd59180c7d5dce5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=47cd9ad3fdc3ac0c input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 201627eee23e537..27ac6b106748ab7 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -809,4 +809,73 @@ bytes_hex(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject exit: return return_value; } -/*[clinic end generated code: output=dc1bc13e6990e452 input=a9049054013a1b77]*/ + +static PyObject * +bytes_new_impl(PyTypeObject *type, PyObject *x, const char *encoding, + const char *errors); + +static PyObject * +bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"source", "encoding", "errors", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "bytes", 0}; + PyObject *argsbuf[3]; + PyObject * const *fastargs; + Py_ssize_t nargs = PyTuple_GET_SIZE(args); + Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; + PyObject *x = NULL; + const char *encoding = NULL; + const char *errors = NULL; + + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); + if (!fastargs) { + goto exit; + } + if (!noptargs) { + goto skip_optional_pos; + } + if (fastargs[0]) { + x = fastargs[0]; + if (!--noptargs) { + goto skip_optional_pos; + } + } + if (fastargs[1]) { + if (!PyUnicode_Check(fastargs[1])) { + _PyArg_BadArgument("bytes", "argument 'encoding'", "str", fastargs[1]); + goto exit; + } + Py_ssize_t encoding_length; + encoding = PyUnicode_AsUTF8AndSize(fastargs[1], &encoding_length); + if (encoding == NULL) { + goto exit; + } + if (strlen(encoding) != (size_t)encoding_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + if (!--noptargs) { + goto skip_optional_pos; + } + } + if (!PyUnicode_Check(fastargs[2])) { + _PyArg_BadArgument("bytes", "argument 'errors'", "str", fastargs[2]); + goto exit; + } + Py_ssize_t errors_length; + errors = PyUnicode_AsUTF8AndSize(fastargs[2], &errors_length); + if (errors == NULL) { + goto exit; + } + if (strlen(errors) != (size_t)errors_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } +skip_optional_pos: + return_value = bytes_new_impl(type, x, encoding, errors); + +exit: + return return_value; +} +/*[clinic end generated code: output=6101b417d6a6a717 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index aef505ffc3f612e..c7395375e64692b 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -2,6 +2,142 @@ preserve [clinic start generated code]*/ +PyDoc_STRVAR(code_new__doc__, +"code(argcount, posonlyargcount, kwonlyargcount, nlocals, stacksize,\n" +" flags, codestring, constants, names, varnames, filename, name,\n" +" firstlineno, lnotab, freevars=(), cellvars=(), /)\n" +"--\n" +"\n" +"Create a code object. Not for the faint of heart."); + +static PyObject * +code_new_impl(PyTypeObject *type, int argcount, int posonlyargcount, + int kwonlyargcount, int nlocals, int stacksize, int flags, + PyObject *code, PyObject *consts, PyObject *names, + PyObject *varnames, PyObject *filename, PyObject *name, + int firstlineno, PyObject *lnotab, PyObject *freevars, + PyObject *cellvars); + +static PyObject * +code_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + int argcount; + int posonlyargcount; + int kwonlyargcount; + int nlocals; + int stacksize; + int flags; + PyObject *code; + PyObject *consts; + PyObject *names; + PyObject *varnames; + PyObject *filename; + PyObject *name; + int firstlineno; + PyObject *lnotab; + PyObject *freevars = NULL; + PyObject *cellvars = NULL; + + if ((type == &PyCode_Type) && + !_PyArg_NoKeywords("code", kwargs)) { + goto exit; + } + if (!_PyArg_CheckPositional("code", PyTuple_GET_SIZE(args), 14, 16)) { + goto exit; + } + argcount = _PyLong_AsInt(PyTuple_GET_ITEM(args, 0)); + if (argcount == -1 && PyErr_Occurred()) { + goto exit; + } + posonlyargcount = _PyLong_AsInt(PyTuple_GET_ITEM(args, 1)); + if (posonlyargcount == -1 && PyErr_Occurred()) { + goto exit; + } + kwonlyargcount = _PyLong_AsInt(PyTuple_GET_ITEM(args, 2)); + if (kwonlyargcount == -1 && PyErr_Occurred()) { + goto exit; + } + nlocals = _PyLong_AsInt(PyTuple_GET_ITEM(args, 3)); + if (nlocals == -1 && PyErr_Occurred()) { + goto exit; + } + stacksize = _PyLong_AsInt(PyTuple_GET_ITEM(args, 4)); + if (stacksize == -1 && PyErr_Occurred()) { + goto exit; + } + flags = _PyLong_AsInt(PyTuple_GET_ITEM(args, 5)); + if (flags == -1 && PyErr_Occurred()) { + goto exit; + } + if (!PyBytes_Check(PyTuple_GET_ITEM(args, 6))) { + _PyArg_BadArgument("code", "argument 7", "bytes", PyTuple_GET_ITEM(args, 6)); + goto exit; + } + code = PyTuple_GET_ITEM(args, 6); + if (!PyTuple_Check(PyTuple_GET_ITEM(args, 7))) { + _PyArg_BadArgument("code", "argument 8", "tuple", PyTuple_GET_ITEM(args, 7)); + goto exit; + } + consts = PyTuple_GET_ITEM(args, 7); + if (!PyTuple_Check(PyTuple_GET_ITEM(args, 8))) { + _PyArg_BadArgument("code", "argument 9", "tuple", PyTuple_GET_ITEM(args, 8)); + goto exit; + } + names = PyTuple_GET_ITEM(args, 8); + if (!PyTuple_Check(PyTuple_GET_ITEM(args, 9))) { + _PyArg_BadArgument("code", "argument 10", "tuple", PyTuple_GET_ITEM(args, 9)); + goto exit; + } + varnames = PyTuple_GET_ITEM(args, 9); + if (!PyUnicode_Check(PyTuple_GET_ITEM(args, 10))) { + _PyArg_BadArgument("code", "argument 11", "str", PyTuple_GET_ITEM(args, 10)); + goto exit; + } + if (PyUnicode_READY(PyTuple_GET_ITEM(args, 10)) == -1) { + goto exit; + } + filename = PyTuple_GET_ITEM(args, 10); + if (!PyUnicode_Check(PyTuple_GET_ITEM(args, 11))) { + _PyArg_BadArgument("code", "argument 12", "str", PyTuple_GET_ITEM(args, 11)); + goto exit; + } + if (PyUnicode_READY(PyTuple_GET_ITEM(args, 11)) == -1) { + goto exit; + } + name = PyTuple_GET_ITEM(args, 11); + firstlineno = _PyLong_AsInt(PyTuple_GET_ITEM(args, 12)); + if (firstlineno == -1 && PyErr_Occurred()) { + goto exit; + } + if (!PyBytes_Check(PyTuple_GET_ITEM(args, 13))) { + _PyArg_BadArgument("code", "argument 14", "bytes", PyTuple_GET_ITEM(args, 13)); + goto exit; + } + lnotab = PyTuple_GET_ITEM(args, 13); + if (PyTuple_GET_SIZE(args) < 15) { + goto skip_optional; + } + if (!PyTuple_Check(PyTuple_GET_ITEM(args, 14))) { + _PyArg_BadArgument("code", "argument 15", "tuple", PyTuple_GET_ITEM(args, 14)); + goto exit; + } + freevars = PyTuple_GET_ITEM(args, 14); + if (PyTuple_GET_SIZE(args) < 16) { + goto skip_optional; + } + if (!PyTuple_Check(PyTuple_GET_ITEM(args, 15))) { + _PyArg_BadArgument("code", "argument 16", "tuple", PyTuple_GET_ITEM(args, 15)); + goto exit; + } + cellvars = PyTuple_GET_ITEM(args, 15); +skip_optional: + return_value = code_new_impl(type, argcount, posonlyargcount, kwonlyargcount, nlocals, stacksize, flags, code, consts, names, varnames, filename, name, firstlineno, lnotab, freevars, cellvars); + +exit: + return return_value; +} + PyDoc_STRVAR(code_replace__doc__, "replace($self, /, *, co_argcount=-1, co_posonlyargcount=-1,\n" " co_kwonlyargcount=-1, co_nlocals=-1, co_stacksize=-1,\n" @@ -218,4 +354,4 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje exit: return return_value; } -/*[clinic end generated code: output=f9f23e912a3955b9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=18c31941ec09e9ca input=a9049054013a1b77]*/ diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h index 8caa910d037dae3..4c8191fa8312307 100644 --- a/Objects/clinic/complexobject.c.h +++ b/Objects/clinic/complexobject.c.h @@ -2,6 +2,73 @@ preserve [clinic start generated code]*/ +PyDoc_STRVAR(complex_conjugate__doc__, +"conjugate($self, /)\n" +"--\n" +"\n" +"Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j."); + +#define COMPLEX_CONJUGATE_METHODDEF \ + {"conjugate", (PyCFunction)complex_conjugate, METH_NOARGS, complex_conjugate__doc__}, + +static PyObject * +complex_conjugate_impl(PyComplexObject *self); + +static PyObject * +complex_conjugate(PyComplexObject *self, PyObject *Py_UNUSED(ignored)) +{ + return complex_conjugate_impl(self); +} + +PyDoc_STRVAR(complex___getnewargs____doc__, +"__getnewargs__($self, /)\n" +"--\n" +"\n"); + +#define COMPLEX___GETNEWARGS___METHODDEF \ + {"__getnewargs__", (PyCFunction)complex___getnewargs__, METH_NOARGS, complex___getnewargs____doc__}, + +static PyObject * +complex___getnewargs___impl(PyComplexObject *self); + +static PyObject * +complex___getnewargs__(PyComplexObject *self, PyObject *Py_UNUSED(ignored)) +{ + return complex___getnewargs___impl(self); +} + +PyDoc_STRVAR(complex___format____doc__, +"__format__($self, format_spec, /)\n" +"--\n" +"\n" +"Convert to a string according to format_spec."); + +#define COMPLEX___FORMAT___METHODDEF \ + {"__format__", (PyCFunction)complex___format__, METH_O, complex___format____doc__}, + +static PyObject * +complex___format___impl(PyComplexObject *self, PyObject *format_spec); + +static PyObject * +complex___format__(PyComplexObject *self, PyObject *arg) +{ + PyObject *return_value = NULL; + PyObject *format_spec; + + if (!PyUnicode_Check(arg)) { + _PyArg_BadArgument("__format__", "argument", "str", arg); + goto exit; + } + if (PyUnicode_READY(arg) == -1) { + goto exit; + } + format_spec = arg; + return_value = complex___format___impl(self, format_spec); + +exit: + return return_value; +} + PyDoc_STRVAR(complex_new__doc__, "complex(real=0, imag=0)\n" "--\n" @@ -46,4 +113,4 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=a0fe23fdbdc9b06b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=193a37aebaaa5f89 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/dictobject.c.h b/Objects/clinic/dictobject.c.h index 7395e3bcebba8ac..beb3f360f8634ab 100644 --- a/Objects/clinic/dictobject.c.h +++ b/Objects/clinic/dictobject.c.h @@ -122,7 +122,8 @@ PyDoc_STRVAR(dict_pop__doc__, "\n" "D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n" "\n" -"If key is not found, default is returned if given, otherwise KeyError is raised"); +"If the key is not found, return the default if given; otherwise,\n" +"raise a KeyError."); #define DICT_POP_METHODDEF \ {"pop", (PyCFunction)(void(*)(void))dict_pop, METH_FASTCALL, dict_pop__doc__}, @@ -190,4 +191,4 @@ dict___reversed__(PyDictObject *self, PyObject *Py_UNUSED(ignored)) { return dict___reversed___impl(self); } -/*[clinic end generated code: output=4d98145508da8fa3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7b77c16e43d6735a input=a9049054013a1b77]*/ diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index cf388c50f5a6ac6..4bd47b116f883c6 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -87,6 +87,40 @@ int___format__(PyObject *self, PyObject *arg) return return_value; } +PyDoc_STRVAR(int___round____doc__, +"__round__($self, ndigits=, /)\n" +"--\n" +"\n" +"Rounding an Integral returns itself.\n" +"\n" +"Rounding with an ndigits argument also returns an integer."); + +#define INT___ROUND___METHODDEF \ + {"__round__", (PyCFunction)(void(*)(void))int___round__, METH_FASTCALL, int___round____doc__}, + +static PyObject * +int___round___impl(PyObject *self, PyObject *o_ndigits); + +static PyObject * +int___round__(PyObject *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *o_ndigits = NULL; + + if (!_PyArg_CheckPositional("__round__", nargs, 0, 1)) { + goto exit; + } + if (nargs < 1) { + goto skip_optional; + } + o_ndigits = args[0]; +skip_optional: + return_value = int___round___impl(self, o_ndigits); + +exit: + return return_value; +} + PyDoc_STRVAR(int___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" @@ -333,4 +367,4 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb exit: return return_value; } -/*[clinic end generated code: output=4257cfdb155efd00 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ea18e51af5b53591 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h index 8227f0edfbab44b..4a682f69d6573e3 100644 --- a/Objects/clinic/memoryobject.c.h +++ b/Objects/clinic/memoryobject.c.h @@ -2,6 +2,198 @@ preserve [clinic start generated code]*/ +PyDoc_STRVAR(memoryview__doc__, +"memoryview(object)\n" +"--\n" +"\n" +"Create a new memoryview object which references the given object."); + +static PyObject * +memoryview_impl(PyTypeObject *type, PyObject *object); + +static PyObject * +memoryview(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"object", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "memoryview", 0}; + PyObject *argsbuf[1]; + PyObject * const *fastargs; + Py_ssize_t nargs = PyTuple_GET_SIZE(args); + PyObject *object; + + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); + if (!fastargs) { + goto exit; + } + object = fastargs[0]; + return_value = memoryview_impl(type, object); + +exit: + return return_value; +} + +PyDoc_STRVAR(memoryview_release__doc__, +"release($self, /)\n" +"--\n" +"\n" +"Release the underlying buffer exposed by the memoryview object."); + +#define MEMORYVIEW_RELEASE_METHODDEF \ + {"release", (PyCFunction)memoryview_release, METH_NOARGS, memoryview_release__doc__}, + +static PyObject * +memoryview_release_impl(PyMemoryViewObject *self); + +static PyObject * +memoryview_release(PyMemoryViewObject *self, PyObject *Py_UNUSED(ignored)) +{ + return memoryview_release_impl(self); +} + +PyDoc_STRVAR(memoryview_cast__doc__, +"cast($self, /, format, shape=)\n" +"--\n" +"\n" +"Cast a memoryview to a new format or shape."); + +#define MEMORYVIEW_CAST_METHODDEF \ + {"cast", (PyCFunction)(void(*)(void))memoryview_cast, METH_FASTCALL|METH_KEYWORDS, memoryview_cast__doc__}, + +static PyObject * +memoryview_cast_impl(PyMemoryViewObject *self, PyObject *format, + PyObject *shape); + +static PyObject * +memoryview_cast(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"format", "shape", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "cast", 0}; + PyObject *argsbuf[2]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1; + PyObject *format; + PyObject *shape = NULL; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + if (!args) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("cast", "argument 'format'", "str", args[0]); + goto exit; + } + if (PyUnicode_READY(args[0]) == -1) { + goto exit; + } + format = args[0]; + if (!noptargs) { + goto skip_optional_pos; + } + shape = args[1]; +skip_optional_pos: + return_value = memoryview_cast_impl(self, format, shape); + +exit: + return return_value; +} + +PyDoc_STRVAR(memoryview_toreadonly__doc__, +"toreadonly($self, /)\n" +"--\n" +"\n" +"Return a readonly version of the memoryview."); + +#define MEMORYVIEW_TOREADONLY_METHODDEF \ + {"toreadonly", (PyCFunction)memoryview_toreadonly, METH_NOARGS, memoryview_toreadonly__doc__}, + +static PyObject * +memoryview_toreadonly_impl(PyMemoryViewObject *self); + +static PyObject * +memoryview_toreadonly(PyMemoryViewObject *self, PyObject *Py_UNUSED(ignored)) +{ + return memoryview_toreadonly_impl(self); +} + +PyDoc_STRVAR(memoryview_tolist__doc__, +"tolist($self, /)\n" +"--\n" +"\n" +"Return the data in the buffer as a list of elements."); + +#define MEMORYVIEW_TOLIST_METHODDEF \ + {"tolist", (PyCFunction)memoryview_tolist, METH_NOARGS, memoryview_tolist__doc__}, + +static PyObject * +memoryview_tolist_impl(PyMemoryViewObject *self); + +static PyObject * +memoryview_tolist(PyMemoryViewObject *self, PyObject *Py_UNUSED(ignored)) +{ + return memoryview_tolist_impl(self); +} + +PyDoc_STRVAR(memoryview_tobytes__doc__, +"tobytes($self, /, order=\'C\')\n" +"--\n" +"\n" +"Return the data in the buffer as a byte string.\n" +"\n" +"Order can be {\'C\', \'F\', \'A\'}. When order is \'C\' or \'F\', the data of the\n" +"original array is converted to C or Fortran order. For contiguous views,\n" +"\'A\' returns an exact copy of the physical memory. In particular, in-memory\n" +"Fortran order is preserved. For non-contiguous views, the data is converted\n" +"to C first. order=None is the same as order=\'C\'."); + +#define MEMORYVIEW_TOBYTES_METHODDEF \ + {"tobytes", (PyCFunction)(void(*)(void))memoryview_tobytes, METH_FASTCALL|METH_KEYWORDS, memoryview_tobytes__doc__}, + +static PyObject * +memoryview_tobytes_impl(PyMemoryViewObject *self, const char *order); + +static PyObject * +memoryview_tobytes(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"order", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "tobytes", 0}; + PyObject *argsbuf[1]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; + const char *order = NULL; + + 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] == Py_None) { + order = NULL; + } + else if (PyUnicode_Check(args[0])) { + Py_ssize_t order_length; + order = PyUnicode_AsUTF8AndSize(args[0], &order_length); + if (order == NULL) { + goto exit; + } + if (strlen(order) != (size_t)order_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + } + else { + _PyArg_BadArgument("tobytes", "argument 'order'", "str or None", args[0]); + goto exit; + } +skip_optional_pos: + return_value = memoryview_tobytes_impl(self, order); + +exit: + return return_value; +} + PyDoc_STRVAR(memoryview_hex__doc__, "hex($self, /, sep=, bytes_per_sep=1)\n" "--\n" @@ -66,4 +258,4 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs exit: return return_value; } -/*[clinic end generated code: output=91106ef704134b19 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1b879bb934d18c66 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h index f43bc14ce1b623f..a3ab9ea507f44f1 100644 --- a/Objects/clinic/odictobject.c.h +++ b/Objects/clinic/odictobject.c.h @@ -83,6 +83,49 @@ OrderedDict_setdefault(PyODictObject *self, PyObject *const *args, Py_ssize_t na return return_value; } +PyDoc_STRVAR(OrderedDict_pop__doc__, +"pop($self, /, key, default=)\n" +"--\n" +"\n" +"od.pop(key[,default]) -> v, remove specified key and return the corresponding value.\n" +"\n" +"If the key is not found, return the default if given; otherwise,\n" +"raise a KeyError."); + +#define ORDEREDDICT_POP_METHODDEF \ + {"pop", (PyCFunction)(void(*)(void))OrderedDict_pop, METH_FASTCALL|METH_KEYWORDS, OrderedDict_pop__doc__}, + +static PyObject * +OrderedDict_pop_impl(PyODictObject *self, PyObject *key, + PyObject *default_value); + +static PyObject * +OrderedDict_pop(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"key", "default", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "pop", 0}; + PyObject *argsbuf[2]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1; + PyObject *key; + PyObject *default_value = NULL; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + if (!args) { + goto exit; + } + key = args[0]; + if (!noptargs) { + goto skip_optional_pos; + } + default_value = args[1]; +skip_optional_pos: + return_value = OrderedDict_pop_impl(self, key, default_value); + +exit: + return return_value; +} + PyDoc_STRVAR(OrderedDict_popitem__doc__, "popitem($self, /, last=True)\n" "--\n" @@ -168,4 +211,4 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=8eb1296df9142908 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e0afaad5b4bb47fe input=a9049054013a1b77]*/ diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index ecd409e84cb7756..9ef8ce2e35364c7 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -1258,4 +1258,73 @@ unicode_sizeof(PyObject *self, PyObject *Py_UNUSED(ignored)) { return unicode_sizeof_impl(self); } -/*[clinic end generated code: output=c5eb21e314da78b8 input=a9049054013a1b77]*/ + +static PyObject * +unicode_new_impl(PyTypeObject *type, PyObject *x, const char *encoding, + const char *errors); + +static PyObject * +unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"object", "encoding", "errors", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "str", 0}; + PyObject *argsbuf[3]; + PyObject * const *fastargs; + Py_ssize_t nargs = PyTuple_GET_SIZE(args); + Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; + PyObject *x = NULL; + const char *encoding = NULL; + const char *errors = NULL; + + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); + if (!fastargs) { + goto exit; + } + if (!noptargs) { + goto skip_optional_pos; + } + if (fastargs[0]) { + x = fastargs[0]; + if (!--noptargs) { + goto skip_optional_pos; + } + } + if (fastargs[1]) { + if (!PyUnicode_Check(fastargs[1])) { + _PyArg_BadArgument("str", "argument 'encoding'", "str", fastargs[1]); + goto exit; + } + Py_ssize_t encoding_length; + encoding = PyUnicode_AsUTF8AndSize(fastargs[1], &encoding_length); + if (encoding == NULL) { + goto exit; + } + if (strlen(encoding) != (size_t)encoding_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } + if (!--noptargs) { + goto skip_optional_pos; + } + } + if (!PyUnicode_Check(fastargs[2])) { + _PyArg_BadArgument("str", "argument 'errors'", "str", fastargs[2]); + goto exit; + } + Py_ssize_t errors_length; + errors = PyUnicode_AsUTF8AndSize(fastargs[2], &errors_length); + if (errors == NULL) { + goto exit; + } + if (strlen(errors) != (size_t)errors_length) { + PyErr_SetString(PyExc_ValueError, "embedded null character"); + goto exit; + } +skip_optional_pos: + return_value = unicode_new_impl(type, x, encoding, errors); + +exit: + return return_value; +} +/*[clinic end generated code: output=f10cf85d3935b3b7 input=a9049054013a1b77]*/ diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 49011db1014e7db..4ca22fc5029b82a 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -442,46 +442,45 @@ validate_and_copy_tuple(PyObject *tup) return newtuple; } -PyDoc_STRVAR(code_doc, -"code(argcount, posonlyargcount, kwonlyargcount, nlocals, stacksize,\n\ - flags, codestring, constants, names, varnames, filename, name,\n\ - firstlineno, lnotab[, freevars[, cellvars]])\n\ -\n\ -Create a code object. Not for the faint of heart."); +/*[clinic input] +@classmethod +code.__new__ as code_new + + argcount: int + posonlyargcount: int + kwonlyargcount: int + nlocals: int + stacksize: int + flags: int + codestring as code: object(subclass_of="&PyBytes_Type") + constants as consts: object(subclass_of="&PyTuple_Type") + names: object(subclass_of="&PyTuple_Type") + varnames: object(subclass_of="&PyTuple_Type") + filename: unicode + name: unicode + firstlineno: int + lnotab: object(subclass_of="&PyBytes_Type") + freevars: object(subclass_of="&PyTuple_Type", c_default="NULL") = () + cellvars: object(subclass_of="&PyTuple_Type", c_default="NULL") = () + / + +Create a code object. Not for the faint of heart. +[clinic start generated code]*/ static PyObject * -code_new(PyTypeObject *type, PyObject *args, PyObject *kw) +code_new_impl(PyTypeObject *type, int argcount, int posonlyargcount, + int kwonlyargcount, int nlocals, int stacksize, int flags, + PyObject *code, PyObject *consts, PyObject *names, + PyObject *varnames, PyObject *filename, PyObject *name, + int firstlineno, PyObject *lnotab, PyObject *freevars, + PyObject *cellvars) +/*[clinic end generated code: output=612aac5395830184 input=85e678ea4178f234]*/ { - int argcount; - int posonlyargcount; - int kwonlyargcount; - int nlocals; - int stacksize; - int flags; PyObject *co = NULL; - PyObject *code; - PyObject *consts; - PyObject *names, *ournames = NULL; - PyObject *varnames, *ourvarnames = NULL; - PyObject *freevars = NULL, *ourfreevars = NULL; - PyObject *cellvars = NULL, *ourcellvars = NULL; - PyObject *filename; - PyObject *name; - int firstlineno; - PyObject *lnotab; - - if (!PyArg_ParseTuple(args, "iiiiiiSO!O!O!UUiS|O!O!:code", - &argcount, &posonlyargcount, &kwonlyargcount, - &nlocals, &stacksize, &flags, - &code, - &PyTuple_Type, &consts, - &PyTuple_Type, &names, - &PyTuple_Type, &varnames, - &filename, &name, - &firstlineno, &lnotab, - &PyTuple_Type, &freevars, - &PyTuple_Type, &cellvars)) - return NULL; + PyObject *ournames = NULL; + PyObject *ourvarnames = NULL; + PyObject *ourfreevars = NULL; + PyObject *ourcellvars = NULL; if (PySys_Audit("code.__new__", "OOOiiiiii", code, filename, name, argcount, posonlyargcount, @@ -963,7 +962,7 @@ PyTypeObject PyCode_Type = { 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ - code_doc, /* tp_doc */ + code_new__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ code_richcompare, /* tp_richcompare */ diff --git a/Objects/complexobject.c b/Objects/complexobject.c index d983a30901d9e67..69f6c17b4a49cd0 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -684,46 +684,54 @@ complex_float(PyObject *v) return NULL; } +/*[clinic input] +complex.conjugate + +Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j. +[clinic start generated code]*/ + static PyObject * -complex_conjugate(PyObject *self, PyObject *Py_UNUSED(ignored)) +complex_conjugate_impl(PyComplexObject *self) +/*[clinic end generated code: output=5059ef162edfc68e input=5fea33e9747ec2c4]*/ { - Py_complex c; - c = ((PyComplexObject *)self)->cval; + Py_complex c = self->cval; c.imag = -c.imag; return PyComplex_FromCComplex(c); } -PyDoc_STRVAR(complex_conjugate_doc, -"complex.conjugate() -> complex\n" -"\n" -"Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j."); +/*[clinic input] +complex.__getnewargs__ + +[clinic start generated code]*/ static PyObject * -complex_getnewargs(PyComplexObject *v, PyObject *Py_UNUSED(ignored)) +complex___getnewargs___impl(PyComplexObject *self) +/*[clinic end generated code: output=689b8206e8728934 input=539543e0a50533d7]*/ { - Py_complex c = v->cval; + Py_complex c = self->cval; return Py_BuildValue("(dd)", c.real, c.imag); } -PyDoc_STRVAR(complex__format__doc, -"complex.__format__() -> str\n" -"\n" -"Convert to a string according to format_spec."); + +/*[clinic input] +complex.__format__ + + format_spec: unicode + / + +Convert to a string according to format_spec. +[clinic start generated code]*/ static PyObject * -complex__format__(PyObject* self, PyObject* args) +complex___format___impl(PyComplexObject *self, PyObject *format_spec) +/*[clinic end generated code: output=bfcb60df24cafea0 input=014ef5488acbe1d5]*/ { - PyObject *format_spec; _PyUnicodeWriter writer; int ret; - - if (!PyArg_ParseTuple(args, "U:__format__", &format_spec)) - return NULL; - _PyUnicodeWriter_Init(&writer); ret = _PyComplex_FormatAdvancedWriter( &writer, - self, + (PyObject *)self, format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); if (ret == -1) { _PyUnicodeWriter_Dealloc(&writer); @@ -733,11 +741,9 @@ complex__format__(PyObject* self, PyObject* args) } static PyMethodDef complex_methods[] = { - {"conjugate", (PyCFunction)complex_conjugate, METH_NOARGS, - complex_conjugate_doc}, - {"__getnewargs__", (PyCFunction)complex_getnewargs, METH_NOARGS}, - {"__format__", (PyCFunction)complex__format__, - METH_VARARGS, complex__format__doc}, + COMPLEX_CONJUGATE_METHODDEF + COMPLEX___GETNEWARGS___METHODDEF + COMPLEX___FORMAT___METHODDEF {NULL, NULL} /* sentinel */ }; diff --git a/Objects/dictobject.c b/Objects/dictobject.c index b1f11b3e695bb32..6c3fc62d2ecc7ee 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -111,6 +111,7 @@ converting the dict to the combined table. #define PyDict_MINSIZE 8 #include "Python.h" +#include "pycore_bitutils.h" // _Py_bit_length #include "pycore_gc.h" // _PyObject_GC_IS_TRACKED() #include "pycore_object.h" // _PyObject_GC_TRACK() #include "pycore_pyerrors.h" // _PyErr_Fetch() @@ -236,7 +237,7 @@ lookdict_unicode_nodummy(PyDictObject *mp, PyObject *key, static Py_ssize_t lookdict_split(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject **value_addr); -static int dictresize(PyDictObject *mp, Py_ssize_t minused); +static int dictresize(PyDictObject *mp, Py_ssize_t newsize); static PyObject* dict_iter(PyDictObject *dict); @@ -411,18 +412,40 @@ dictkeys_set_index(PyDictKeysObject *keys, Py_ssize_t i, Py_ssize_t ix) */ #define USABLE_FRACTION(n) (((n) << 1)/3) -/* ESTIMATE_SIZE is reverse function of USABLE_FRACTION. +/* Find the smallest dk_size >= minsize. */ +static inline Py_ssize_t +calculate_keysize(Py_ssize_t minsize) +{ +#if SIZEOF_LONG == SIZEOF_SIZE_T + minsize = (minsize | PyDict_MINSIZE) - 1; + return 1LL << _Py_bit_length(minsize | (PyDict_MINSIZE-1)); +#elif defined(_MSC_VER) + // On 64bit Windows, sizeof(long) == 4. + minsize = (minsize | PyDict_MINSIZE) - 1; + unsigned long msb; + _BitScanReverse64(&msb, (uint64_t)minsize); + return 1LL << (msb + 1); +#else + Py_ssize_t size; + for (size = PyDict_MINSIZE; + size < minsize && size > 0; + size <<= 1) + ; + return size; +#endif +} + +/* estimate_keysize is reverse function of USABLE_FRACTION. + * * This can be used to reserve enough size to insert n entries without * resizing. */ -#define ESTIMATE_SIZE(n) (((n)*3+1) >> 1) +static inline Py_ssize_t +estimate_keysize(Py_ssize_t n) +{ + return calculate_keysize((n*3 + 1) / 2); +} -/* Alternative fraction that is otherwise close enough to 2n/3 to make - * little difference. 8 * 2/3 == 8 * 5/8 == 5. 16 * 2/3 == 16 * 5/8 == 10. - * 32 * 2/3 = 21, 32 * 5/8 = 20. - * Its advantage is that it is faster to compute on machines with slow division. - * #define USABLE_FRACTION(n) (((n) >> 1) + ((n) >> 2) - ((n) >> 3)) - */ /* GROWTH_RATE. Growth rate upon hitting maximum load. * Currently set to used*3. @@ -674,10 +697,11 @@ new_dict_with_shared_keys(PyDictKeysObject *keys) } -static PyObject * -clone_combined_dict(PyDictObject *orig) +static PyDictKeysObject * +clone_combined_dict_keys(PyDictObject *orig) { - assert(PyDict_CheckExact(orig)); + assert(PyDict_Check(orig)); + assert(Py_TYPE(orig)->tp_iter == (getiterfunc)dict_iter); assert(orig->ma_values == NULL); assert(orig->ma_keys->dk_refcnt == 1); @@ -704,19 +728,6 @@ clone_combined_dict(PyDictObject *orig) } } - PyDictObject *new = (PyDictObject *)new_dict(keys, NULL); - if (new == NULL) { - /* In case of an error, `new_dict()` takes care of - cleaning up `keys`. */ - return NULL; - } - new->ma_used = orig->ma_used; - ASSERT_CONSISTENT(new); - if (_PyObject_GC_IS_TRACKED(orig)) { - /* Maintain tracking. */ - _PyObject_GC_TRACK(new); - } - /* Since we copied the keys table we now have an extra reference in the system. Manually call increment _Py_RefTotal to signal that we have it now; calling dictkeys_incref would be an error as @@ -724,8 +735,7 @@ clone_combined_dict(PyDictObject *orig) #ifdef Py_REF_DEBUG _Py_RefTotal++; #endif - - return (PyObject *)new; + return keys; } PyObject * @@ -1049,7 +1059,7 @@ find_empty_slot(PyDictKeysObject *keys, Py_hash_t hash) static int insertion_resize(PyDictObject *mp) { - return dictresize(mp, GROWTH_RATE(mp)); + return dictresize(mp, calculate_keysize(GROWTH_RATE(mp))); } /* @@ -1207,22 +1217,19 @@ After resizing a table is always combined, but can be resplit by make_keys_shared(). */ static int -dictresize(PyDictObject *mp, Py_ssize_t minsize) +dictresize(PyDictObject *mp, Py_ssize_t newsize) { - Py_ssize_t newsize, numentries; + Py_ssize_t numentries; PyDictKeysObject *oldkeys; PyObject **oldvalues; PyDictKeyEntry *oldentries, *newentries; - /* Find the smallest table size > minused. */ - for (newsize = PyDict_MINSIZE; - newsize < minsize && newsize > 0; - newsize <<= 1) - ; if (newsize <= 0) { PyErr_NoMemory(); return -1; } + assert(IS_POWER_OF_2(newsize)); + assert(newsize >= PyDict_MINSIZE); oldkeys = mp->ma_keys; @@ -1368,13 +1375,8 @@ _PyDict_NewPresized(Py_ssize_t minused) newsize = max_presize; } else { - Py_ssize_t minsize = ESTIMATE_SIZE(minused); - newsize = PyDict_MINSIZE*2; - while (newsize < minsize) { - newsize <<= 1; - } + newsize = estimate_keysize(minused); } - assert(IS_POWER_OF_2(newsize)); new_keys = new_keys_object(newsize); if (new_keys == NULL) @@ -1943,7 +1945,7 @@ _PyDict_FromKeys(PyObject *cls, PyObject *iterable, PyObject *value) PyObject *key; Py_hash_t hash; - if (dictresize(mp, ESTIMATE_SIZE(PyDict_GET_SIZE(iterable)))) { + if (dictresize(mp, estimate_keysize(PyDict_GET_SIZE(iterable)))) { Py_DECREF(d); return NULL; } @@ -1962,7 +1964,7 @@ _PyDict_FromKeys(PyObject *cls, PyObject *iterable, PyObject *value) PyObject *key; Py_hash_t hash; - if (dictresize(mp, ESTIMATE_SIZE(PySet_GET_SIZE(iterable)))) { + if (dictresize(mp, estimate_keysize(PySet_GET_SIZE(iterable)))) { Py_DECREF(d); return NULL; } @@ -2527,18 +2529,51 @@ dict_merge(PyObject *a, PyObject *b, int override) if (other == mp || other->ma_used == 0) /* a.update(a) or a.update({}); nothing to do */ return 0; - if (mp->ma_used == 0) + if (mp->ma_used == 0) { /* Since the target dict is empty, PyDict_GetItem() * always returns NULL. Setting override to 1 * skips the unnecessary test. */ override = 1; + PyDictKeysObject *okeys = other->ma_keys; + + // If other is clean, combined, and just allocated, just clone it. + if (other->ma_values == NULL && + other->ma_used == okeys->dk_nentries && + (okeys->dk_size == PyDict_MINSIZE || + USABLE_FRACTION(okeys->dk_size/2) < other->ma_used)) { + PyDictKeysObject *keys = clone_combined_dict_keys(other); + if (keys == NULL) { + return -1; + } + + dictkeys_decref(mp->ma_keys); + mp->ma_keys = keys; + if (mp->ma_values != NULL) { + if (mp->ma_values != empty_values) { + free_values(mp->ma_values); + } + mp->ma_values = NULL; + } + + mp->ma_used = other->ma_used; + mp->ma_version_tag = DICT_NEXT_VERSION(); + ASSERT_CONSISTENT(mp); + + if (_PyObject_GC_IS_TRACKED(other) && !_PyObject_GC_IS_TRACKED(mp)) { + /* Maintain tracking. */ + _PyObject_GC_TRACK(mp); + } + + return 0; + } + } /* Do one big resize at the start, rather than * incrementally resizing as we insert new items. Expect * that there will be no (or few) overlapping keys. */ if (USABLE_FRACTION(mp->ma_keys->dk_size) < other->ma_used) { - if (dictresize(mp, ESTIMATE_SIZE(mp->ma_used + other->ma_used))) { + if (dictresize(mp, estimate_keysize(mp->ma_used + other->ma_used))) { return -1; } } @@ -2718,12 +2753,13 @@ PyDict_Copy(PyObject *o) return (PyObject *)split_copy; } - if (PyDict_CheckExact(mp) && mp->ma_values == NULL && + if (Py_TYPE(mp)->tp_iter == (getiterfunc)dict_iter && + mp->ma_values == NULL && (mp->ma_used >= (mp->ma_keys->dk_nentries * 2) / 3)) { /* Use fast-copy if: - (1) 'mp' is an instance of a subclassed dict; and + (1) type(mp) doesn't override tp_iter; and (2) 'mp' is not a split-dict; and @@ -2735,13 +2771,31 @@ PyDict_Copy(PyObject *o) operations and copied after that. In cases like this, we defer to PyDict_Merge, which produces a compacted copy. */ - return clone_combined_dict(mp); + PyDictKeysObject *keys = clone_combined_dict_keys(mp); + if (keys == NULL) { + return NULL; + } + PyDictObject *new = (PyDictObject *)new_dict(keys, NULL); + if (new == NULL) { + /* In case of an error, `new_dict()` takes care of + cleaning up `keys`. */ + return NULL; + } + + new->ma_used = mp->ma_used; + ASSERT_CONSISTENT(new); + if (_PyObject_GC_IS_TRACKED(mp)) { + /* Maintain tracking. */ + _PyObject_GC_TRACK(new); + } + + return (PyObject *)new; } copy = PyDict_New(); if (copy == NULL) return NULL; - if (PyDict_Merge(copy, o, 1) == 0) + if (dict_merge(copy, o, 1) == 0) return copy; Py_DECREF(copy); return NULL; @@ -3054,12 +3108,13 @@ dict.pop D.pop(k[,d]) -> v, remove specified key and return the corresponding value. -If key is not found, default is returned if given, otherwise KeyError is raised +If the key is not found, return the default if given; otherwise, +raise a KeyError. [clinic start generated code]*/ static PyObject * dict_pop_impl(PyDictObject *self, PyObject *key, PyObject *default_value) -/*[clinic end generated code: output=3abb47b89f24c21c input=eeebec7812190348]*/ +/*[clinic end generated code: output=3abb47b89f24c21c input=e221baa01044c44c]*/ { return _PyDict_Pop((PyObject*)self, key, default_value); } @@ -3358,16 +3413,15 @@ dict_new(PyTypeObject *type, PyObject *args, PyObject *kwds) d = (PyDictObject *)self; /* The object has been implicitly tracked by tp_alloc */ - if (type == &PyDict_Type) + if (type == &PyDict_Type) { _PyObject_GC_UNTRACK(d); + } d->ma_used = 0; d->ma_version_tag = DICT_NEXT_VERSION(); - d->ma_keys = new_keys_object(PyDict_MINSIZE); - if (d->ma_keys == NULL) { - Py_DECREF(self); - return NULL; - } + dictkeys_incref(Py_EMPTY_KEYS); + d->ma_keys = Py_EMPTY_KEYS; + d->ma_values = empty_values; ASSERT_CONSISTENT(d); return self; } diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 7c2bce361586077..8838b807462e4a8 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -300,17 +300,20 @@ first_line_not_before(int *lines, int len, int line) static void frame_stack_pop(PyFrameObject *f) { - PyObject *v = (*--f->f_stacktop); + assert(f->f_stackdepth >= 0); + f->f_stackdepth--; + PyObject *v = f->f_valuestack[f->f_stackdepth]; Py_DECREF(v); } static void frame_block_unwind(PyFrameObject *f) { + assert(f->f_stackdepth >= 0); assert(f->f_iblock > 0); f->f_iblock--; PyTryBlock *b = &f->f_blockstack[f->f_iblock]; - intptr_t delta = (f->f_stacktop - f->f_valuestack) - b->b_level; + intptr_t delta = f->f_stackdepth - b->b_level; while (delta > 0) { frame_stack_pop(f); delta--; @@ -352,33 +355,36 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno, void *Py_UNUSED(ignore return -1; } - /* Upon the 'call' trace event of a new frame, f->f_lasti is -1 and - * f->f_trace is NULL, check first on the first condition. - * Forbidding jumps from the 'call' event of a new frame is a side effect - * of allowing to set f_lineno only from trace functions. */ - if (f->f_lasti == -1) { - PyErr_Format(PyExc_ValueError, + /* + * This code preserves the historical restrictions on + * setting the line number of a frame. + * Jumps are forbidden on a 'return' trace event (except after a yield). + * Jumps from 'call' trace events are also forbidden. + * In addition, jumps are forbidden when not tracing, + * as this is a debugging feature. + */ + switch(f->f_state) { + case FRAME_CREATED: + PyErr_Format(PyExc_ValueError, "can't jump from the 'call' trace event of a new frame"); - return -1; - } - - /* You can only do this from within a trace function, not via - * _getframe or similar hackery. */ - if (!f->f_trace) { - PyErr_Format(PyExc_ValueError, - "f_lineno can only be set by a trace function"); - return -1; - } - - /* Forbid jumps upon a 'return' trace event (except after executing a - * YIELD_VALUE or YIELD_FROM opcode, f_stacktop is not NULL in that case) - * and upon an 'exception' trace event. - * Jumps from 'call' trace events have already been forbidden above for new - * frames, so this check does not change anything for 'call' events. */ - if (f->f_stacktop == NULL) { - PyErr_SetString(PyExc_ValueError, + return -1; + case FRAME_RETURNED: + case FRAME_UNWINDING: + case FRAME_RAISED: + case FRAME_CLEARED: + PyErr_SetString(PyExc_ValueError, "can only jump from a 'line' trace event"); - return -1; + return -1; + case FRAME_EXECUTING: + case FRAME_SUSPENDED: + /* You can only do this from within a trace function, not via + * _getframe or similar hackery. */ + if (!f->f_trace) { + PyErr_Format(PyExc_ValueError, + "f_lineno can only be set by a trace function"); + return -1; + } + break; } int new_lineno; @@ -585,11 +591,10 @@ frame_dealloc(PyFrameObject *f) } /* Free stack */ - if (f->f_stacktop != NULL) { - for (PyObject **p = valuestack; p < f->f_stacktop; p++) { - Py_XDECREF(*p); - } + for (int i = 0; i < f->f_stackdepth; i++) { + Py_XDECREF(f->f_valuestack[i]); } + f->f_stackdepth = 0; Py_XDECREF(f->f_back); Py_DECREF(f->f_builtins); @@ -647,10 +652,8 @@ frame_traverse(PyFrameObject *f, visitproc visit, void *arg) } /* stack */ - if (f->f_stacktop != NULL) { - for (PyObject **p = f->f_valuestack; p < f->f_stacktop; p++) { - Py_VISIT(*p); - } + for (int i = 0; i < f->f_stackdepth; i++) { + Py_VISIT(f->f_valuestack[i]); } return 0; } @@ -663,9 +666,7 @@ frame_tp_clear(PyFrameObject *f) * frame may also point to this frame, believe itself to still be * active, and try cleaning up this frame again. */ - PyObject **oldtop = f->f_stacktop; - f->f_stacktop = NULL; - f->f_executing = 0; + f->f_state = FRAME_CLEARED; Py_CLEAR(f->f_trace); @@ -676,18 +677,17 @@ frame_tp_clear(PyFrameObject *f) } /* stack */ - if (oldtop != NULL) { - for (PyObject **p = f->f_valuestack; p < oldtop; p++) { - Py_CLEAR(*p); - } + for (int i = 0; i < f->f_stackdepth; i++) { + Py_CLEAR(f->f_valuestack[i]); } + f->f_stackdepth = 0; return 0; } static PyObject * frame_clear(PyFrameObject *f, PyObject *Py_UNUSED(ignored)) { - if (f->f_executing) { + if (_PyFrame_IsExecuting(f)) { PyErr_SetString(PyExc_RuntimeError, "cannot clear an executing frame"); return NULL; @@ -898,7 +898,7 @@ _PyFrame_New_NoTrack(PyThreadState *tstate, PyCodeObject *code, return NULL; } - f->f_stacktop = f->f_valuestack; + f->f_stackdepth = 0; f->f_builtins = builtins; Py_XINCREF(back); f->f_back = back; @@ -927,7 +927,7 @@ _PyFrame_New_NoTrack(PyThreadState *tstate, PyCodeObject *code, f->f_lasti = -1; f->f_lineno = code->co_firstlineno; f->f_iblock = 0; - f->f_executing = 0; + f->f_state = FRAME_CREATED; f->f_gen = NULL; f->f_trace_opcodes = 0; f->f_trace_lines = 1; diff --git a/Objects/genericaliasobject.c b/Objects/genericaliasobject.c index 4d511a239063ceb..87bd1ae5c1430b5 100644 --- a/Objects/genericaliasobject.c +++ b/Objects/genericaliasobject.c @@ -20,7 +20,7 @@ ga_dealloc(PyObject *self) Py_XDECREF(alias->origin); Py_XDECREF(alias->args); Py_XDECREF(alias->parameters); - self->ob_type->tp_free(self); + Py_TYPE(self)->tp_free(self); } static int diff --git a/Objects/genobject.c b/Objects/genobject.c index 6a68c9484a6ae95..809838a4cd2f3b5 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -47,7 +47,7 @@ _PyGen_Finalize(PyObject *self) PyObject *res = NULL; PyObject *error_type, *error_value, *error_traceback; - if (gen->gi_frame == NULL || gen->gi_frame->f_stacktop == NULL) { + if (gen->gi_frame == NULL || _PyFrameHasCompleted(gen->gi_frame)) { /* Generator isn't paused, so no need to close */ return; } @@ -143,7 +143,7 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing) PyFrameObject *f = gen->gi_frame; PyObject *result; - if (gen->gi_running) { + if (f != NULL && _PyFrame_IsExecuting(f)) { const char *msg = "generator already executing"; if (PyCoro_CheckExact(gen)) { msg = "coroutine already executing"; @@ -154,7 +154,7 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing) PyErr_SetString(PyExc_ValueError, msg); return NULL; } - if (f == NULL || f->f_stacktop == NULL) { + if (f == NULL || _PyFrameHasCompleted(f)) { if (PyCoro_CheckExact(gen) && !closing) { /* `gen` is an exhausted coroutine: raise an error, except when called from gen_close(), which should @@ -176,6 +176,7 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing) return NULL; } + assert(_PyFrame_IsRunnable(f)); if (f->f_lasti == -1) { if (arg && arg != Py_None) { const char *msg = "can't send non-None value to a " @@ -194,7 +195,8 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing) /* Push arg onto the frame's value stack */ result = arg ? arg : Py_None; Py_INCREF(result); - *(f->f_stacktop++) = result; + gen->gi_frame->f_valuestack[gen->gi_frame->f_stackdepth] = result; + gen->gi_frame->f_stackdepth++; } /* Generators always return to their most recent caller, not @@ -203,7 +205,6 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing) assert(f->f_back == NULL); f->f_back = tstate->frame; - gen->gi_running = 1; gen->gi_exc_state.previous_item = tstate->exc_info; tstate->exc_info = &gen->gi_exc_state; @@ -215,7 +216,6 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing) result = _PyEval_EvalFrame(tstate, f, exc); tstate->exc_info = gen->gi_exc_state.previous_item; gen->gi_exc_state.previous_item = NULL; - gen->gi_running = 0; /* Don't keep the reference to f_back any longer than necessary. It * may keep a chain of frames alive or it could create a reference @@ -225,7 +225,7 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing) /* If the generator just returned (as opposed to yielding), signal * that the generator is exhausted. */ - if (result && f->f_stacktop == NULL) { + if (result && _PyFrameHasCompleted(f)) { if (result == Py_None) { /* Delay exception instantiation if we can */ if (PyAsyncGen_CheckExact(gen)) { @@ -264,7 +264,7 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing) _PyErr_FormatFromCause(PyExc_RuntimeError, "%s", msg); } - if (!result || f->f_stacktop == NULL) { + if (!result || _PyFrameHasCompleted(f)) { /* generator can't be rerun, so release the frame */ /* first clean reference cycle through stored exception traceback */ _PyErr_ClearExcState(&gen->gi_exc_state); @@ -327,7 +327,7 @@ _PyGen_yf(PyGenObject *gen) PyObject *yf = NULL; PyFrameObject *f = gen->gi_frame; - if (f && f->f_stacktop) { + if (f) { PyObject *bytecode = f->f_code->co_code; unsigned char *code = (unsigned char *)PyBytes_AS_STRING(bytecode); @@ -341,7 +341,8 @@ _PyGen_yf(PyGenObject *gen) if (code[f->f_lasti + sizeof(_Py_CODEUNIT)] != YIELD_FROM) return NULL; - yf = f->f_stacktop[-1]; + assert(f->f_stackdepth > 0); + yf = f->f_valuestack[f->f_stackdepth-1]; Py_INCREF(yf); } @@ -356,9 +357,10 @@ gen_close(PyGenObject *gen, PyObject *args) int err = 0; if (yf) { - gen->gi_running = 1; + PyFrameState state = gen->gi_frame->f_state; + gen->gi_frame->f_state = FRAME_EXECUTING; err = gen_close_iter(yf); - gen->gi_running = 0; + gen->gi_frame->f_state = state; Py_DECREF(yf); } if (err == 0) @@ -405,9 +407,10 @@ _gen_throw(PyGenObject *gen, int close_on_genexit, We have to allow some awaits to work it through, hence the `close_on_genexit` parameter here. */ - gen->gi_running = 1; + PyFrameState state = gen->gi_frame->f_state; + gen->gi_frame->f_state = FRAME_EXECUTING; err = gen_close_iter(yf); - gen->gi_running = 0; + gen->gi_frame->f_state = state; Py_DECREF(yf); if (err < 0) return gen_send_ex(gen, Py_None, 1, 0); @@ -415,12 +418,23 @@ _gen_throw(PyGenObject *gen, int close_on_genexit, } if (PyGen_CheckExact(yf) || PyCoro_CheckExact(yf)) { /* `yf` is a generator or a coroutine. */ - gen->gi_running = 1; + PyThreadState *tstate = _PyThreadState_GET(); + PyFrameObject *f = tstate->frame; + + /* Since we are fast-tracking things by skipping the eval loop, + we need to update the current frame so the stack trace + will be reported correctly to the user. */ + /* XXX We should probably be updating the current frame + somewhere in ceval.c. */ + tstate->frame = gen->gi_frame; /* Close the generator that we are currently iterating with 'yield from' or awaiting on with 'await'. */ + PyFrameState state = gen->gi_frame->f_state; + gen->gi_frame->f_state = FRAME_EXECUTING; ret = _gen_throw((PyGenObject *)yf, close_on_genexit, typ, val, tb); - gen->gi_running = 0; + gen->gi_frame->f_state = state; + tstate->frame = f; } else { /* `yf` is an iterator or a coroutine-like object. */ PyObject *meth; @@ -432,16 +446,19 @@ _gen_throw(PyGenObject *gen, int close_on_genexit, Py_DECREF(yf); goto throw_here; } - gen->gi_running = 1; + PyFrameState state = gen->gi_frame->f_state; + gen->gi_frame->f_state = FRAME_EXECUTING; ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL); - gen->gi_running = 0; + gen->gi_frame->f_state = state; Py_DECREF(meth); } Py_DECREF(yf); if (!ret) { PyObject *val; /* Pop subiterator from stack */ - ret = *(--gen->gi_frame->f_stacktop); + assert(gen->gi_frame->f_stackdepth > 0); + gen->gi_frame->f_stackdepth--; + ret = gen->gi_frame->f_valuestack[gen->gi_frame->f_stackdepth]; assert(ret == yf); Py_DECREF(ret); /* Termination repetition of YIELD_FROM */ @@ -691,6 +708,16 @@ gen_getyieldfrom(PyGenObject *gen, void *Py_UNUSED(ignored)) return yf; } + +static PyObject * +gen_getrunning(PyGenObject *gen, void *Py_UNUSED(ignored)) +{ + if (gen->gi_frame == NULL) { + Py_RETURN_FALSE; + } + return PyBool_FromLong(_PyFrame_IsExecuting(gen->gi_frame)); +} + static PyGetSetDef gen_getsetlist[] = { {"__name__", (getter)gen_get_name, (setter)gen_set_name, PyDoc_STR("name of the generator")}, @@ -698,12 +725,12 @@ static PyGetSetDef gen_getsetlist[] = { PyDoc_STR("qualified name of the generator")}, {"gi_yieldfrom", (getter)gen_getyieldfrom, NULL, PyDoc_STR("object being iterated by yield from, or None")}, + {"gi_running", (getter)gen_getrunning, NULL, NULL}, {NULL} /* Sentinel */ }; static PyMemberDef gen_memberlist[] = { {"gi_frame", T_OBJECT, offsetof(PyGenObject, gi_frame), READONLY}, - {"gi_running", T_BOOL, offsetof(PyGenObject, gi_running), READONLY}, {"gi_code", T_OBJECT, offsetof(PyGenObject, gi_code), READONLY}, {NULL} /* Sentinel */ }; @@ -781,7 +808,6 @@ gen_new_with_qualname(PyTypeObject *type, PyFrameObject *f, f->f_gen = (PyObject *) gen; Py_INCREF(f->f_code); gen->gi_code = (PyObject *)(f->f_code); - gen->gi_running = 0; gen->gi_weakreflist = NULL; gen->gi_exc_state.exc_type = NULL; gen->gi_exc_state.exc_value = NULL; @@ -911,6 +937,15 @@ coro_get_cr_await(PyCoroObject *coro, void *Py_UNUSED(ignored)) return yf; } +static PyObject * +cr_getrunning(PyCoroObject *coro, void *Py_UNUSED(ignored)) +{ + if (coro->cr_frame == NULL) { + Py_RETURN_FALSE; + } + return PyBool_FromLong(_PyFrame_IsExecuting(coro->cr_frame)); +} + static PyGetSetDef coro_getsetlist[] = { {"__name__", (getter)gen_get_name, (setter)gen_set_name, PyDoc_STR("name of the coroutine")}, @@ -918,12 +953,12 @@ static PyGetSetDef coro_getsetlist[] = { PyDoc_STR("qualified name of the coroutine")}, {"cr_await", (getter)coro_get_cr_await, NULL, PyDoc_STR("object being awaited on, or None")}, + {"cr_running", (getter)cr_getrunning, NULL, NULL}, {NULL} /* Sentinel */ }; static PyMemberDef coro_memberlist[] = { {"cr_frame", T_OBJECT, offsetof(PyCoroObject, cr_frame), READONLY}, - {"cr_running", T_BOOL, offsetof(PyCoroObject, cr_running), READONLY}, {"cr_code", T_OBJECT, offsetof(PyCoroObject, cr_code), READONLY}, {"cr_origin", T_OBJECT, offsetof(PyCoroObject, cr_origin), READONLY}, {NULL} /* Sentinel */ @@ -1818,7 +1853,7 @@ async_gen_athrow_send(PyAsyncGenAThrow *o, PyObject *arg) return NULL; } - if (f == NULL || f->f_stacktop == NULL) { + if (f == NULL || _PyFrameHasCompleted(f)) { o->agt_state = AWAITABLE_STATE_CLOSED; PyErr_SetNone(PyExc_StopIteration); return NULL; diff --git a/Objects/longobject.c b/Objects/longobject.c index 571f53a3c00eb57..92514d4154e2cbb 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -5155,10 +5155,22 @@ _PyLong_DivmodNear(PyObject *a, PyObject *b) return NULL; } +/*[clinic input] +int.__round__ + + ndigits as o_ndigits: object = NULL + / + +Rounding an Integral returns itself. + +Rounding with an ndigits argument also returns an integer. +[clinic start generated code]*/ + static PyObject * -long_round(PyObject *self, PyObject *args) +int___round___impl(PyObject *self, PyObject *o_ndigits) +/*[clinic end generated code: output=954fda6b18875998 input=1614cf23ec9e18c3]*/ { - PyObject *o_ndigits=NULL, *temp, *result, *ndigits; + PyObject *temp, *result, *ndigits; /* To round an integer m to the nearest 10**n (n positive), we make use of * the divmod_near operation, defined by: @@ -5174,8 +5186,6 @@ long_round(PyObject *self, PyObject *args) * * m - divmod_near(m, 10**n)[1]. */ - if (!PyArg_ParseTuple(args, "|O", &o_ndigits)) - return NULL; if (o_ndigits == NULL) return long_long(self); @@ -5536,9 +5546,7 @@ static PyMethodDef long_methods[] = { "Flooring an Integral returns itself."}, {"__ceil__", long_long_meth, METH_NOARGS, "Ceiling of an Integral returns itself."}, - {"__round__", (PyCFunction)long_round, METH_VARARGS, - "Rounding an Integral returns itself.\n" - "Rounding with an ndigits argument also returns an integer."}, + INT___ROUND___METHODDEF INT___GETNEWARGS___METHODDEF INT___FORMAT___METHODDEF INT___SIZEOF___METHODDEF diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c index e3d3bd6a174ff6b..13d883ae4d35d6c 100644 --- a/Objects/memoryobject.c +++ b/Objects/memoryobject.c @@ -238,12 +238,6 @@ PyTypeObject _PyManagedBuffer_Type = { #define REQ_FORMAT(flags) (flags&PyBUF_FORMAT) -PyDoc_STRVAR(memory_doc, -"memoryview(object)\n--\n\ -\n\ -Create a new memoryview object which references the given object."); - - /**************************************************************************/ /* Copy memoryview buffers */ /**************************************************************************/ @@ -961,18 +955,20 @@ PyMemoryView_GetContiguous(PyObject *obj, int buffertype, char order) } -static PyObject * -memory_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds) -{ - PyObject *obj; - static char *kwlist[] = {"object", NULL}; +/*[clinic input] +@classmethod +memoryview.__new__ - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:memoryview", kwlist, - &obj)) { - return NULL; - } + object: object + +Create a new memoryview object which references the given object. +[clinic start generated code]*/ - return PyMemoryView_FromObject(obj); +static PyObject * +memoryview_impl(PyTypeObject *type, PyObject *object) +/*[clinic end generated code: output=7de78e184ed66db8 input=f04429eb0bdf8c6e]*/ +{ + return PyMemoryView_FromObject(object); } @@ -1062,8 +1058,15 @@ _memory_release(PyMemoryViewObject *self) return -1; } +/*[clinic input] +memoryview.release + +Release the underlying buffer exposed by the memoryview object. +[clinic start generated code]*/ + static PyObject * -memory_release(PyMemoryViewObject *self, PyObject *noargs) +memoryview_release_impl(PyMemoryViewObject *self) +/*[clinic end generated code: output=d0b7e3ba95b7fcb9 input=bc71d1d51f4a52f0]*/ { if (_memory_release(self) < 0) return NULL; @@ -1108,7 +1111,7 @@ memory_enter(PyObject *self, PyObject *args) static PyObject * memory_exit(PyObject *self, PyObject *args) { - return memory_release((PyMemoryViewObject *)self, NULL); + return memoryview_release_impl((PyMemoryViewObject *)self); } @@ -1352,26 +1355,25 @@ zero_in_shape(PyMemoryViewObject *mv) All casts must result in views that will have the exact byte size of the original input. Otherwise, an error is raised. */ +/*[clinic input] +memoryview.cast + + format: unicode + shape: object = NULL + +Cast a memoryview to a new format or shape. +[clinic start generated code]*/ + static PyObject * -memory_cast(PyMemoryViewObject *self, PyObject *args, PyObject *kwds) +memoryview_cast_impl(PyMemoryViewObject *self, PyObject *format, + PyObject *shape) +/*[clinic end generated code: output=bae520b3a389cbab input=138936cc9041b1a3]*/ { - static char *kwlist[] = {"format", "shape", NULL}; PyMemoryViewObject *mv = NULL; - PyObject *shape = NULL; - PyObject *format; Py_ssize_t ndim = 1; CHECK_RELEASED(self); - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O", kwlist, - &format, &shape)) { - return NULL; - } - if (!PyUnicode_Check(format)) { - PyErr_SetString(PyExc_TypeError, - "memoryview: format argument must be a string"); - return NULL; - } if (!MV_C_CONTIGUOUS(self->flags)) { PyErr_SetString(PyExc_TypeError, "memoryview: casts are restricted to C-contiguous views"); @@ -1415,8 +1417,15 @@ memory_cast(PyMemoryViewObject *self, PyObject *args, PyObject *kwds) return NULL; } +/*[clinic input] +memoryview.toreadonly + +Return a readonly version of the memoryview. +[clinic start generated code]*/ + static PyObject * -memory_toreadonly(PyMemoryViewObject *self, PyObject *noargs) +memoryview_toreadonly_impl(PyMemoryViewObject *self) +/*[clinic end generated code: output=2c7e056f04c99e62 input=dc06d20f19ba236f]*/ { CHECK_RELEASED(self); /* Even if self is already readonly, we still need to create a new @@ -2109,13 +2118,20 @@ tolist_rec(const char *ptr, Py_ssize_t ndim, const Py_ssize_t *shape, /* Return a list representation of the memoryview. Currently only buffers with native format strings are supported. */ +/*[clinic input] +memoryview.tolist + +Return the data in the buffer as a list of elements. +[clinic start generated code]*/ + static PyObject * -memory_tolist(PyMemoryViewObject *mv, PyObject *noargs) +memoryview_tolist_impl(PyMemoryViewObject *self) +/*[clinic end generated code: output=a6cda89214fd5a1b input=21e7d0c1860b211a]*/ { - const Py_buffer *view = &(mv->view); + const Py_buffer *view = &self->view; const char *fmt; - CHECK_RELEASED(mv); + CHECK_RELEASED(self); fmt = adjust_fmt(view); if (fmt == NULL) @@ -2135,21 +2151,30 @@ memory_tolist(PyMemoryViewObject *mv, PyObject *noargs) } } +/*[clinic input] +memoryview.tobytes + + order: str(accept={str, NoneType}, c_default="NULL") = 'C' + +Return the data in the buffer as a byte string. + +Order can be {'C', 'F', 'A'}. When order is 'C' or 'F', the data of the +original array is converted to C or Fortran order. For contiguous views, +'A' returns an exact copy of the physical memory. In particular, in-memory +Fortran order is preserved. For non-contiguous views, the data is converted +to C first. order=None is the same as order='C'. +[clinic start generated code]*/ + static PyObject * -memory_tobytes(PyMemoryViewObject *self, PyObject *args, PyObject *kwds) +memoryview_tobytes_impl(PyMemoryViewObject *self, const char *order) +/*[clinic end generated code: output=1288b62560a32a23 input=0efa3ddaeda573a8]*/ { - static char *kwlist[] = {"order", NULL}; Py_buffer *src = VIEW_ADDR(self); - char *order = NULL; char ord = 'C'; PyObject *bytes; CHECK_RELEASED(self); - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|z", kwlist, &order)) { - return NULL; - } - if (order) { if (strcmp(order, "F") == 0) { ord = 'F'; @@ -3122,38 +3147,14 @@ static PyGetSetDef memory_getsetlist[] = { {NULL, NULL, NULL, NULL}, }; -PyDoc_STRVAR(memory_release_doc, -"release($self, /)\n--\n\ -\n\ -Release the underlying buffer exposed by the memoryview object."); -PyDoc_STRVAR(memory_tobytes_doc, -"tobytes($self, /, order=None)\n--\n\ -\n\ -Return the data in the buffer as a byte string. Order can be {'C', 'F', 'A'}.\n\ -When order is 'C' or 'F', the data of the original array is converted to C or\n\ -Fortran order. For contiguous views, 'A' returns an exact copy of the physical\n\ -memory. In particular, in-memory Fortran order is preserved. For non-contiguous\n\ -views, the data is converted to C first. order=None is the same as order='C'."); -PyDoc_STRVAR(memory_tolist_doc, -"tolist($self, /)\n--\n\ -\n\ -Return the data in the buffer as a list of elements."); -PyDoc_STRVAR(memory_cast_doc, -"cast($self, /, format, *, shape)\n--\n\ -\n\ -Cast a memoryview to a new format or shape."); -PyDoc_STRVAR(memory_toreadonly_doc, -"toreadonly($self, /)\n--\n\ -\n\ -Return a readonly version of the memoryview."); static PyMethodDef memory_methods[] = { - {"release", (PyCFunction)memory_release, METH_NOARGS, memory_release_doc}, - {"tobytes", (PyCFunction)(void(*)(void))memory_tobytes, METH_VARARGS|METH_KEYWORDS, memory_tobytes_doc}, + MEMORYVIEW_RELEASE_METHODDEF + MEMORYVIEW_TOBYTES_METHODDEF MEMORYVIEW_HEX_METHODDEF - {"tolist", (PyCFunction)memory_tolist, METH_NOARGS, memory_tolist_doc}, - {"cast", (PyCFunction)(void(*)(void))memory_cast, METH_VARARGS|METH_KEYWORDS, memory_cast_doc}, - {"toreadonly", (PyCFunction)memory_toreadonly, METH_NOARGS, memory_toreadonly_doc}, + MEMORYVIEW_TOLIST_METHODDEF + MEMORYVIEW_CAST_METHODDEF + MEMORYVIEW_TOREADONLY_METHODDEF {"__enter__", memory_enter, METH_NOARGS, NULL}, {"__exit__", memory_exit, METH_VARARGS, NULL}, {NULL, NULL} @@ -3181,7 +3182,7 @@ PyTypeObject PyMemoryView_Type = { 0, /* tp_setattro */ &memory_as_buffer, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */ - memory_doc, /* tp_doc */ + memoryview__doc__, /* tp_doc */ (traverseproc)memory_traverse, /* tp_traverse */ (inquiry)memory_clear, /* tp_clear */ memory_richcompare, /* tp_richcompare */ @@ -3198,5 +3199,5 @@ PyTypeObject PyMemoryView_Type = { 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ - memory_new, /* tp_new */ + memoryview, /* tp_new */ }; diff --git a/Objects/object.c b/Objects/object.c index 4481fc91e1db187..fe3734404f5cf97 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1169,7 +1169,7 @@ _PyObject_GenericGetAttrWithDict(PyObject *obj, PyObject *name, /* Make sure the logic of _PyObject_GetMethod is in sync with this method. - When suppress=1, this function suppress AttributeError. + When suppress=1, this function suppresses AttributeError. */ PyTypeObject *tp = Py_TYPE(obj); diff --git a/Objects/odictobject.c b/Objects/odictobject.c index d5bf499575d097a..b4ac560d2358152 100644 --- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -1045,30 +1045,28 @@ OrderedDict_setdefault_impl(PyODictObject *self, PyObject *key, /* pop() */ -PyDoc_STRVAR(odict_pop__doc__, -"od.pop(k[,d]) -> v, remove specified key and return the corresponding\n\ - value. If key is not found, d is returned if given, otherwise KeyError\n\ - is raised.\n\ -\n\ - "); - /* forward */ static PyObject * _odict_popkey(PyObject *, PyObject *, PyObject *); /* Skips __missing__() calls. */ -static PyObject * -odict_pop(PyObject *od, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = {"key", "default", 0}; - PyObject *key, *failobj = NULL; +/*[clinic input] +OrderedDict.pop - /* borrowed */ - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:pop", kwlist, - &key, &failobj)) { - return NULL; - } + key: object + default: object = NULL + +od.pop(key[,default]) -> v, remove specified key and return the corresponding value. + +If the key is not found, return the default if given; otherwise, +raise a KeyError. +[clinic start generated code]*/ - return _odict_popkey(od, key, failobj); +static PyObject * +OrderedDict_pop_impl(PyODictObject *self, PyObject *key, + PyObject *default_value) +/*[clinic end generated code: output=7a6447d104e7494b input=7efe36601007dff7]*/ +{ + return _odict_popkey((PyObject *)self, key, default_value); } static PyObject * @@ -1362,8 +1360,7 @@ static PyMethodDef odict_methods[] = { {"__reduce__", (PyCFunction)odict_reduce, METH_NOARGS, odict_reduce__doc__}, ORDEREDDICT_SETDEFAULT_METHODDEF - {"pop", (PyCFunction)(void(*)(void))odict_pop, - METH_VARARGS | METH_KEYWORDS, odict_pop__doc__}, + ORDEREDDICT_POP_METHODDEF ORDEREDDICT_POPITEM_METHODDEF {"keys", odictkeys_new, METH_NOARGS, odict_keys__doc__}, diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 16f95f0e1bf7f98..dee8451eb547688 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -3110,7 +3110,7 @@ PyType_FromSpec(PyType_Spec *spec) void * PyType_GetSlot(PyTypeObject *type, int slot) { - if (!_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE) || slot < 0) { + if (slot < 0) { PyErr_BadInternalCall(); return NULL; } @@ -4171,10 +4171,10 @@ object_set_class(PyObject *self, PyObject *value, void *closure) In theory the proper fix would be to identify which classes rely on this invariant and somehow disallow __class__ assignment only for them, perhaps via some mechanism like a new Py_TPFLAGS_IMMUTABLE flag (a - "blacklisting" approach). But in practice, since this problem wasn't + "denylisting" approach). But in practice, since this problem wasn't noticed late in the 3.5 RC cycle, we're taking the conservative approach and reinstating the same HEAPTYPE->HEAPTYPE check that we used - to have, plus a "whitelist". For now, the whitelist consists only of + to have, plus an "allowlist". For now, the allowlist consists only of ModuleType subtypes, since those are the cases that motivated the patch in the first place -- see https://bugs.python.org/issue22986 -- and since module objects are mutable we can be sure that they are @@ -5961,14 +5961,29 @@ hackcheck(PyObject *self, setattrofunc func, const char *what) return 1; } assert(PyTuple_Check(mro)); - Py_ssize_t i, n; - n = PyTuple_GET_SIZE(mro); - for (i = 0; i < n; i++) { + + /* Find the (base) type that defined the type's slot function. */ + PyTypeObject *defining_type = type; + Py_ssize_t i; + for (i = PyTuple_GET_SIZE(mro) - 1; i >= 0; i--) { PyTypeObject *base = (PyTypeObject*) PyTuple_GET_ITEM(mro, i); + if (base->tp_setattro == slot_tp_setattro) { + /* Ignore Python classes: + they never define their own C-level setattro. */ + } + else if (base->tp_setattro == type->tp_setattro) { + defining_type = base; + break; + } + } + + /* Reject calls that jump over intermediate C-level overrides. */ + for (PyTypeObject *base = defining_type; base; base = base->tp_base) { if (base->tp_setattro == func) { - /* 'func' is the earliest non-Python implementation in the MRO. */ + /* 'func' is the right slot function to call. */ break; - } else if (base->tp_setattro != slot_tp_setattro) { + } + else if (base->tp_setattro != slot_tp_setattro) { /* 'base' is not a Python class and overrides 'func'. Its tp_setattro should be called instead. */ PyErr_Format(PyExc_TypeError, @@ -5978,8 +5993,6 @@ hackcheck(PyObject *self, setattrofunc func, const char *what) return 0; } } - /* Either 'func' is not in the mro (which should fail when checking 'self'), - or it's the right slot function to call. */ return 1; } diff --git a/Objects/typeslots.inc b/Objects/typeslots.inc index ffc9bb2e1c7710b..58b11d678827a2f 100644 --- a/Objects/typeslots.inc +++ b/Objects/typeslots.inc @@ -79,3 +79,21 @@ offsetof(PyHeapTypeObject, as_async.am_await), offsetof(PyHeapTypeObject, as_async.am_aiter), offsetof(PyHeapTypeObject, as_async.am_anext), offsetof(PyHeapTypeObject, ht_type.tp_finalize), +offsetof(PyHeapTypeObject, ht_type.tp_as_async), +offsetof(PyHeapTypeObject, ht_type.tp_as_buffer), +offsetof(PyHeapTypeObject, ht_type.tp_as_mapping), +offsetof(PyHeapTypeObject, ht_type.tp_as_number), +offsetof(PyHeapTypeObject, ht_type.tp_as_sequence), +offsetof(PyHeapTypeObject, ht_type.tp_basicsize), +offsetof(PyHeapTypeObject, ht_type.tp_cache), +offsetof(PyHeapTypeObject, ht_type.tp_dict), +offsetof(PyHeapTypeObject, ht_type.tp_dictoffset), +offsetof(PyHeapTypeObject, ht_type.tp_flags), +offsetof(PyHeapTypeObject, ht_type.tp_itemsize), +offsetof(PyHeapTypeObject, ht_type.tp_mro), +offsetof(PyHeapTypeObject, ht_type.tp_name), +offsetof(PyHeapTypeObject, ht_type.tp_subclasses), +offsetof(PyHeapTypeObject, ht_type.tp_vectorcall_offset), +offsetof(PyHeapTypeObject, ht_type.tp_version_tag), +offsetof(PyHeapTypeObject, ht_type.tp_weaklist), +offsetof(PyHeapTypeObject, ht_type.tp_weaklistoffset), diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 809ed85895f86fe..82e09ad05fcd13e 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3150,9 +3150,11 @@ unicode_get_widechar_size(PyObject *unicode) assert(unicode != NULL); assert(_PyUnicode_CHECK(unicode)); +#if USE_UNICODE_WCHAR_CACHE if (_PyUnicode_WSTR(unicode) != NULL) { return PyUnicode_WSTR_LENGTH(unicode); } +#endif /* USE_UNICODE_WCHAR_CACHE */ assert(PyUnicode_IS_READY(unicode)); res = _PyUnicode_LENGTH(unicode); @@ -3173,16 +3175,21 @@ unicode_get_widechar_size(PyObject *unicode) static void unicode_copy_as_widechar(PyObject *unicode, wchar_t *w, Py_ssize_t size) { - const wchar_t *wstr; - assert(unicode != NULL); assert(_PyUnicode_CHECK(unicode)); - wstr = _PyUnicode_WSTR(unicode); +#if USE_UNICODE_WCHAR_CACHE + const wchar_t *wstr = _PyUnicode_WSTR(unicode); if (wstr != NULL) { memcpy(w, wstr, size * sizeof(wchar_t)); return; } +#else /* USE_UNICODE_WCHAR_CACHE */ + if (PyUnicode_KIND(unicode) == sizeof(wchar_t)) { + memcpy(w, PyUnicode_DATA(unicode), size * sizeof(wchar_t)); + return; + } +#endif /* USE_UNICODE_WCHAR_CACHE */ assert(PyUnicode_IS_READY(unicode)); if (PyUnicode_KIND(unicode) == PyUnicode_1BYTE_KIND) { @@ -3325,7 +3332,7 @@ _PyUnicode_WideCharString_Converter(PyObject *obj, void *ptr) } PyErr_Format(PyExc_TypeError, "argument must be str, not %.50s", - obj->ob_type->tp_name); + Py_TYPE(obj)->tp_name); return 0; } @@ -3361,7 +3368,7 @@ _PyUnicode_WideCharString_Opt_Converter(PyObject *obj, void *ptr) } PyErr_Format(PyExc_TypeError, "argument must be str or None, not %.50s", - obj->ob_type->tp_name); + Py_TYPE(obj)->tp_name); return 0; } @@ -4378,7 +4385,6 @@ unicode_decode_call_errorhandler_wchar( Py_ssize_t requiredsize; Py_ssize_t newpos; PyObject *inputobj = NULL; - wchar_t *repwstr; Py_ssize_t repwlen; if (*errorHandler == NULL) { @@ -4424,9 +4430,19 @@ unicode_decode_call_errorhandler_wchar( goto onError; } - repwstr = PyUnicode_AsUnicodeAndSize(repunicode, &repwlen); - if (repwstr == NULL) +#if USE_UNICODE_WCHAR_CACHE +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS + repwlen = PyUnicode_GetSize(repunicode); + if (repwlen < 0) + goto onError; +_Py_COMP_DIAG_POP +#else /* USE_UNICODE_WCHAR_CACHE */ + repwlen = PyUnicode_AsWideChar(repunicode, NULL, 0); + if (repwlen < 0) goto onError; + repwlen--; +#endif /* USE_UNICODE_WCHAR_CACHE */ /* need more space? (at least enough for what we have+the replacement+the rest of the string (starting at the new input position), so we won't have to check space @@ -4446,7 +4462,7 @@ unicode_decode_call_errorhandler_wchar( goto onError; } } - wcsncpy(*buf + *outpos, repwstr, repwlen); + PyUnicode_AsWideChar(repunicode, *buf + *outpos, repwlen); *outpos += repwlen; *endinpos = newpos; *inptr = *input + newpos; @@ -7748,6 +7764,7 @@ encode_code_page_strict(UINT code_page, PyObject **outbytes, /* Create a substring so that we can get the UTF-16 representation of just the slice under consideration. */ PyObject *substring; + int ret = -1; assert(len > 0); @@ -7759,11 +7776,22 @@ encode_code_page_strict(UINT code_page, PyObject **outbytes, substring = PyUnicode_Substring(unicode, offset, offset+len); if (substring == NULL) return -1; +#if USE_UNICODE_WCHAR_CACHE +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS p = PyUnicode_AsUnicodeAndSize(substring, &size); if (p == NULL) { Py_DECREF(substring); return -1; } +_Py_COMP_DIAG_POP +#else /* USE_UNICODE_WCHAR_CACHE */ + p = PyUnicode_AsWideCharString(substring, &size); + Py_CLEAR(substring); + if (p == NULL) { + return -1; + } +#endif /* USE_UNICODE_WCHAR_CACHE */ assert(size <= INT_MAX); /* First get the size of the result */ @@ -7775,16 +7803,15 @@ encode_code_page_strict(UINT code_page, PyObject **outbytes, goto error; /* If we used a default char, then we failed! */ if (pusedDefaultChar && *pusedDefaultChar) { - Py_DECREF(substring); - return -2; + ret = -2; + goto done; } if (*outbytes == NULL) { /* Create string object */ *outbytes = PyBytes_FromStringAndSize(NULL, outsize); if (*outbytes == NULL) { - Py_DECREF(substring); - return -1; + goto done; } out = PyBytes_AS_STRING(*outbytes); } @@ -7793,12 +7820,10 @@ encode_code_page_strict(UINT code_page, PyObject **outbytes, const Py_ssize_t n = PyBytes_Size(*outbytes); if (outsize > PY_SSIZE_T_MAX - n) { PyErr_NoMemory(); - Py_DECREF(substring); - return -1; + goto done; } if (_PyBytes_Resize(outbytes, n + outsize) < 0) { - Py_DECREF(substring); - return -1; + goto done; } out = PyBytes_AS_STRING(*outbytes) + n; } @@ -7808,19 +7833,29 @@ encode_code_page_strict(UINT code_page, PyObject **outbytes, p, (int)size, out, outsize, NULL, pusedDefaultChar); - Py_CLEAR(substring); if (outsize <= 0) goto error; - if (pusedDefaultChar && *pusedDefaultChar) - return -2; - return 0; + if (pusedDefaultChar && *pusedDefaultChar) { + ret = -2; + goto done; + } + ret = 0; + +done: +#if USE_UNICODE_WCHAR_CACHE + Py_DECREF(substring); +#else /* USE_UNICODE_WCHAR_CACHE */ + PyMem_Free(p); +#endif /* USE_UNICODE_WCHAR_CACHE */ + return ret; error: - Py_XDECREF(substring); - if (GetLastError() == ERROR_NO_UNICODE_TRANSLATION) - return -2; + if (GetLastError() == ERROR_NO_UNICODE_TRANSLATION) { + ret = -2; + goto done; + } PyErr_SetFromWindowsErr(0); - return -1; + goto done; } /* @@ -15431,52 +15466,57 @@ PyUnicode_Format(PyObject *format, PyObject *args) } static PyObject * -unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds); +unicode_subtype_new(PyTypeObject *type, PyObject *unicode); + +/*[clinic input] +@classmethod +str.__new__ as unicode_new + + object as x: object = NULL + encoding: str = NULL + errors: str = NULL + +[clinic start generated code]*/ static PyObject * -unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +unicode_new_impl(PyTypeObject *type, PyObject *x, const char *encoding, + const char *errors) +/*[clinic end generated code: output=fc72d4878b0b57e9 input=e81255e5676d174e]*/ { - PyObject *x = NULL; - static char *kwlist[] = {"object", "encoding", "errors", 0}; - char *encoding = NULL; - char *errors = NULL; + PyObject *unicode; + if (x == NULL) { + unicode = unicode_new_empty(); + } + else if (encoding == NULL && errors == NULL) { + unicode = PyObject_Str(x); + } + else { + unicode = PyUnicode_FromEncodedObject(x, encoding, errors); + } - if (type != &PyUnicode_Type) - return unicode_subtype_new(type, args, kwds); - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oss:str", - kwlist, &x, &encoding, &errors)) - return NULL; - if (x == NULL) - _Py_RETURN_UNICODE_EMPTY(); - if (encoding == NULL && errors == NULL) - return PyObject_Str(x); - else - return PyUnicode_FromEncodedObject(x, encoding, errors); + if (unicode != NULL && type != &PyUnicode_Type) { + Py_SETREF(unicode, unicode_subtype_new(type, unicode)); + } + return unicode; } static PyObject * -unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +unicode_subtype_new(PyTypeObject *type, PyObject *unicode) { - PyObject *unicode, *self; + PyObject *self; Py_ssize_t length, char_size; int share_wstr, share_utf8; unsigned int kind; void *data; assert(PyType_IsSubtype(type, &PyUnicode_Type)); - - unicode = unicode_new(&PyUnicode_Type, args, kwds); - if (unicode == NULL) - return NULL; assert(_PyUnicode_CHECK(unicode)); if (PyUnicode_READY(unicode) == -1) { - Py_DECREF(unicode); return NULL; } self = type->tp_alloc(type, 0); if (self == NULL) { - Py_DECREF(unicode); return NULL; } kind = PyUnicode_KIND(unicode); @@ -15545,11 +15585,9 @@ unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) #ifdef Py_DEBUG _PyUnicode_HASH(self) = _PyUnicode_HASH(unicode); #endif - Py_DECREF(unicode); return self; onError: - Py_DECREF(unicode); Py_DECREF(self); return NULL; } diff --git a/PC/_msi.c b/PC/_msi.c index f725c816206e725..504899d0757b78c 100644 --- a/PC/_msi.c +++ b/PC/_msi.c @@ -193,7 +193,7 @@ static FNFCIGETNEXTCABINET(cb_getnextcabinet) if (!PyBytes_Check(result)) { PyErr_Format(PyExc_TypeError, "Incorrect return type %s from getnextcabinet", - result->ob_type->tp_name); + Py_TYPE(result)->tp_name); Py_DECREF(result); return FALSE; } @@ -879,7 +879,7 @@ _msi_View_Execute(msiobj *self, PyObject *oparams) MSIHANDLE params = 0; if (oparams != Py_None) { - if (oparams->ob_type != &record_Type) { + if (!Py_IS_TYPE(oparams, &record_Type)) { PyErr_SetString(PyExc_TypeError, "Execute argument must be a record"); return NULL; } @@ -955,7 +955,7 @@ _msi_View_Modify_impl(msiobj *self, int kind, PyObject *data) { int status; - if (data->ob_type != &record_Type) { + if (!Py_IS_TYPE(data, &record_Type)) { PyErr_SetString(PyExc_TypeError, "Modify expects a record object"); return NULL; } diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index 3301bed9713aa9a..183301f061866bc 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -1143,8 +1143,7 @@ PyDoc_STRVAR(winreg_SetValue__doc__, static PyObject * winreg_SetValue_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key, - DWORD type, const Py_UNICODE *value, - Py_ssize_clean_t value_length); + DWORD type, PyObject *value_obj); static PyObject * winreg_SetValue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) @@ -1153,14 +1152,13 @@ winreg_SetValue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) HKEY key; const Py_UNICODE *sub_key; DWORD type; - const Py_UNICODE *value; - Py_ssize_clean_t value_length; + PyObject *value_obj; - if (!_PyArg_ParseStack(args, nargs, "O&O&ku#:SetValue", - clinic_HKEY_converter, &key, _PyUnicode_WideCharString_Opt_Converter, &sub_key, &type, &value, &value_length)) { + if (!_PyArg_ParseStack(args, nargs, "O&O&kU:SetValue", + clinic_HKEY_converter, &key, _PyUnicode_WideCharString_Opt_Converter, &sub_key, &type, &value_obj)) { goto exit; } - return_value = winreg_SetValue_impl(module, key, sub_key, type, value, value_length); + return_value = winreg_SetValue_impl(module, key, sub_key, type, value_obj); exit: /* Cleanup for sub_key */ @@ -1348,4 +1346,4 @@ winreg_QueryReflectionKey(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=30b1311886c13907 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=497a2e804821d5c9 input=a9049054013a1b77]*/ diff --git a/PC/getpathp.c b/PC/getpathp.c index 0939c5fa9842cd5..53da3a6d05faee9 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -669,7 +669,7 @@ static int get_pth_filename(PyCalculatePath *calculate, wchar_t *filename, const _PyPathConfig *pathconfig) { - if (get_dllpath(filename) && + if (!get_dllpath(filename) && !change_ext(filename, filename, L"._pth") && exists(filename)) { diff --git a/PC/winreg.c b/PC/winreg.c index 7c3b2f4be85c963..78c08693a8ace35 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -112,7 +112,7 @@ typedef struct { HKEY hkey; } PyHKEYObject; -#define PyHKEY_Check(op) ((op)->ob_type == &PyHKEY_Type) +#define PyHKEY_Check(op) Py_IS_TYPE(op, &PyHKEY_Type) static char *failMsg = "bad operand type"; @@ -463,7 +463,7 @@ PyHKEY_FromHKEY(HKEY h) if (op == NULL) { return PyErr_NoMemory(); } - _PyObject_Init(op, &PyHKEY_Type); + _PyObject_Init((PyObject*)op, &PyHKEY_Type); op->hkey = h; return (PyObject *)op; } @@ -640,16 +640,25 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) for (j = 0; j < i; j++) { PyObject *t; - wchar_t *wstr; Py_ssize_t len; t = PyList_GET_ITEM(value, j); if (!PyUnicode_Check(t)) return FALSE; - wstr = PyUnicode_AsUnicodeAndSize(t, &len); - if (wstr == NULL) +#if USE_UNICODE_WCHAR_CACHE +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS + len = PyUnicode_GetSize(t); + if (len < 0) return FALSE; - size += Py_SAFE_DOWNCAST((len + 1) * sizeof(wchar_t), + len++; +_Py_COMP_DIAG_POP +#else /* USE_UNICODE_WCHAR_CACHE */ + len = PyUnicode_AsWideChar(t, NULL, 0); + if (len < 0) + return FALSE; +#endif /* USE_UNICODE_WCHAR_CACHE */ + size += Py_SAFE_DOWNCAST(len * sizeof(wchar_t), size_t, DWORD); } @@ -665,17 +674,18 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) for (j = 0; j < i; j++) { PyObject *t; - wchar_t *wstr; Py_ssize_t len; t = PyList_GET_ITEM(value, j); - wstr = PyUnicode_AsUnicodeAndSize(t, &len); - assert(wstr); - wcscpy(P, wstr); - P += (len + 1); + assert(size > 0); + len = PyUnicode_AsWideChar(t, P, size); + assert(len >= 0); + assert(len < size); + size -= (DWORD)len + 1; + P += len + 1; } /* And doubly-terminate the list... */ - *P = '\0'; + *P = L'\0'; break; } case REG_BINARY: @@ -693,7 +703,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) PyErr_Format(PyExc_TypeError, "Objects of type '%s' can not " "be used as binary registry values", - value->ob_type->tp_name); + Py_TYPE(value)->tp_name); return FALSE; } @@ -1669,7 +1679,7 @@ winreg.SetValue type: DWORD An integer that specifies the type of the data. Currently this must be REG_SZ, meaning only strings are supported. - value: Py_UNICODE(zeroes=True) + value as value_obj: unicode A string that specifies the new value. / @@ -1688,30 +1698,51 @@ KEY_SET_VALUE access. static PyObject * winreg_SetValue_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key, - DWORD type, const Py_UNICODE *value, - Py_ssize_clean_t value_length) -/*[clinic end generated code: output=686bedb1cbb4367b input=2cd2adab79339c53]*/ + DWORD type, PyObject *value_obj) +/*[clinic end generated code: output=d4773dc9c372311a input=bf088494ae2d24fd]*/ { + Py_ssize_t value_length; long rc; if (type != REG_SZ) { PyErr_SetString(PyExc_TypeError, "type must be winreg.REG_SZ"); return NULL; } - if ((size_t)value_length >= PY_DWORD_MAX) { + +#if USE_UNICODE_WCHAR_CACHE +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS + const wchar_t *value = PyUnicode_AsUnicodeAndSize(value_obj, &value_length); +_Py_COMP_DIAG_POP +#else /* USE_UNICODE_WCHAR_CACHE */ + wchar_t *value = PyUnicode_AsWideCharString(value_obj, &value_length); +#endif /* USE_UNICODE_WCHAR_CACHE */ + if (value == NULL) { + return NULL; + } + if ((Py_ssize_t)(DWORD)value_length != value_length) { PyErr_SetString(PyExc_OverflowError, "value is too long"); +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(value); +#endif /* USE_UNICODE_WCHAR_CACHE */ return NULL; } if (PySys_Audit("winreg.SetValue", "nunu#", (Py_ssize_t)key, sub_key, (Py_ssize_t)type, value, value_length) < 0) { +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(value); +#endif /* USE_UNICODE_WCHAR_CACHE */ return NULL; } Py_BEGIN_ALLOW_THREADS rc = RegSetValueW(key, sub_key, REG_SZ, value, (DWORD)(value_length + 1)); Py_END_ALLOW_THREADS +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(value); +#endif /* USE_UNICODE_WCHAR_CACHE */ if (rc != ERROR_SUCCESS) return PyErr_SetFromWindowsErrWithFunction(rc, "RegSetValue"); Py_RETURN_NONE; diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj index 4c71cdb6d1d77dc..0916f1a2d37887f 100644 --- a/PCbuild/_decimal.vcxproj +++ b/PCbuild/_decimal.vcxproj @@ -93,11 +93,11 @@ - _CRT_SECURE_NO_WARNINGS;MASM;%(PreprocessorDefinitions) - CONFIG_32;PPRO;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + CONFIG_32;PPRO;MASM;%(PreprocessorDefinitions) CONFIG_32;ANSI;%(PreprocessorDefinitions) CONFIG_64;ANSI;%(PreprocessorDefinitions) - CONFIG_64;%(PreprocessorDefinitions) + CONFIG_64;MASM;%(PreprocessorDefinitions) ..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories) diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index 4171fd740c7083c..a48b59cad2ed1c1 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -54,7 +54,7 @@ set libraries= set libraries=%libraries% bzip2-1.0.6 if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1g -set libraries=%libraries% sqlite-3.31.1.0 +set libraries=%libraries% sqlite-3.32.3.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.9.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.9.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tix-8.4.3.6 diff --git a/PCbuild/python.props b/PCbuild/python.props index bf6f3716ba51bce..5f4926efa25172c 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -56,7 +56,7 @@ $(EXTERNALS_DIR) $([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`)) $(ExternalsDir)\ - $(ExternalsDir)sqlite-3.31.1.0\ + $(ExternalsDir)sqlite-3.32.3.0\ $(ExternalsDir)bzip2-1.0.6\ $(ExternalsDir)xz-5.2.2\ $(ExternalsDir)libffi\ diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index db26e38911bc052..295b5e21eba5cef 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -460,7 +460,6 @@ - diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 1f3883768c9a258..ec82e42f61e8b08 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -1028,9 +1028,6 @@ Python - - Python - Python @@ -1184,4 +1181,4 @@ Resource Files - \ No newline at end of file + diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index 4d4a706b8e4b960..b8849757e893a78 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -185,7 +185,7 @@ _ssl again when building. _sqlite3 - Wraps SQLite 3.31.1.0, which is itself built by sqlite3.vcxproj + Wraps SQLite 3.32.3.0, which is itself built by sqlite3.vcxproj Homepage: http://www.sqlite.org/ _tkinter diff --git a/Parser/myreadline.c b/Parser/myreadline.c index 2dd362321aaf304..143b41f1eab95eb 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -291,37 +291,16 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt) } #endif - n = 100; - p = (char *)PyMem_RawMalloc(n); - if (p == NULL) { - PyEval_RestoreThread(tstate); - PyErr_NoMemory(); - PyEval_SaveThread(); - return NULL; - } - fflush(sys_stdout); if (prompt) { fprintf(stderr, "%s", prompt); } fflush(stderr); - switch (my_fgets(tstate, p, (int)n, sys_stdin)) { - case 0: /* Normal case */ - break; - case 1: /* Interrupt */ - PyMem_RawFree(p); - return NULL; - case -1: /* EOF */ - case -2: /* Error */ - default: /* Shouldn't happen */ - *p = '\0'; - break; - } - - n = strlen(p); - while (n > 0 && p[n-1] != '\n') { - size_t incr = n+2; + n = 0; + p = NULL; + do { + size_t incr = (n > 0) ? n + 2 : 100; if (incr > INT_MAX) { PyMem_RawFree(p); PyEval_RestoreThread(tstate); @@ -329,7 +308,6 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt) PyEval_SaveThread(); return NULL; } - pr = (char *)PyMem_RawRealloc(p, n + incr); if (pr == NULL) { PyMem_RawFree(p); @@ -339,12 +317,18 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt) return NULL; } p = pr; - - if (my_fgets(tstate, p+n, (int)incr, sys_stdin) != 0) { + int err = my_fgets(tstate, p + n, (int)incr, sys_stdin); + if (err == 1) { + // Interrupt + PyMem_RawFree(p); + return NULL; + } else if (err != 0) { + // EOF or error + p[n] = '\0'; break; } - n += strlen(p+n); - } + n += strlen(p + n); + } while (p[n-1] != '\n'); pr = (char *)PyMem_RawRealloc(p, n+1); if (pr == NULL) { diff --git a/Parser/pegen.c b/Parser/pegen.c index e2cbf8ba2461ce1..f615907f5f571f6 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -4,6 +4,7 @@ #include "pegen.h" #include "string_parser.h" +#include "ast.h" PyObject * _PyPegen_new_type_comment(Parser *p, char *s) @@ -1137,6 +1138,14 @@ _PyPegen_run_parser(Parser *p) return RAISE_SYNTAX_ERROR("multiple statements found while compiling a single statement"); } +#if defined(Py_DEBUG) && defined(Py_BUILD_CORE) + if (p->start_rule == Py_single_input || + p->start_rule == Py_file_input || + p->start_rule == Py_eval_input) + { + assert(PyAST_Validate(res)); + } +#endif return res; } diff --git a/Parser/string_parser.c b/Parser/string_parser.c index 9f56ce21d0f2069..2c35da590defbbc 100644 --- a/Parser/string_parser.c +++ b/Parser/string_parser.c @@ -1,3 +1,5 @@ +#include + #include #include "tokenizer.h" @@ -277,26 +279,23 @@ _PyPegen_parsestr(Parser *p, int *bytesmode, int *rawmode, PyObject **result, `n` is the node which locations are going to be fixed relative to parent. `expr_str` is the child node's string representation, including braces. */ -static void +static bool fstring_find_expr_location(Token *parent, char *expr_str, int *p_lines, int *p_cols) { - char *substr = NULL; - char *start; - int lines = 0; - int cols = 0; - + *p_lines = 0; + *p_cols = 0; if (parent && parent->bytes) { char *parent_str = PyBytes_AsString(parent->bytes); if (!parent_str) { - return; + return false; } - substr = strstr(parent_str, expr_str); + char *substr = strstr(parent_str, expr_str); if (substr) { // The following is needed, in order to correctly shift the column // offset, in the case that (disregarding any whitespace) a newline // immediately follows the opening curly brace of the fstring expression. - int newline_after_brace = 1; - start = substr + 1; + bool newline_after_brace = 1; + char *start = substr + 1; while (start && *start != '}' && *start != '\n') { if (*start != ' ' && *start != '\t' && *start != '\f') { newline_after_brace = 0; @@ -312,19 +311,18 @@ fstring_find_expr_location(Token *parent, char *expr_str, int *p_lines, int *p_c while (start > parent_str && *start != '\n') { start--; } - cols += (int)(substr - start); + *p_cols += (int)(substr - start); } /* adjust the start based on the number of newlines encountered before the f-string expression */ for (char* p = parent_str; p < substr; p++) { if (*p == '\n') { - lines++; + (*p_lines)++; } } } } - *p_lines = lines; - *p_cols = cols; + return true; } @@ -382,9 +380,12 @@ fstring_compile_expr(Parser *p, const char *expr_start, const char *expr_end, str[len+2] = 0; int lines, cols; - fstring_find_expr_location(t, str, &lines, &cols); + if (!fstring_find_expr_location(t, str, &lines, &cols)) { + PyMem_FREE(str); + return NULL; + } - // The parentheses are needed in order to allow for leading whitespace withing + // The parentheses are needed in order to allow for leading whitespace within // the f-string expression. This consequently gets parsed as a group (see the // group rule in python.gram). str[0] = '('; diff --git a/Python/ceval.c b/Python/ceval.c index 0386929a5b2b376..f747faaebf024a3 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1349,10 +1349,15 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) assert(f->f_lasti % sizeof(_Py_CODEUNIT) == 0); next_instr += f->f_lasti / sizeof(_Py_CODEUNIT) + 1; } - stack_pointer = f->f_stacktop; - assert(stack_pointer != NULL); - f->f_stacktop = NULL; /* remains NULL unless yield suspends frame */ - f->f_executing = 1; + stack_pointer = f->f_valuestack + f->f_stackdepth; + /* Set f->f_stackdepth to -1. + * Update when returning or calling trace function. + Having f_stackdepth <= 0 ensures that invalid + values are not visible to the cycle GC. + We choose -1 rather than 0 to assist debugging. + */ + f->f_stackdepth = -1; + f->f_state = FRAME_EXECUTING; if (co->co_opcache_flag < OPCACHE_MIN_RUNS) { co->co_opcache_flag++; @@ -1440,7 +1445,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) int err; /* see maybe_call_line_trace for expository comments */ - f->f_stacktop = stack_pointer; + f->f_stackdepth = stack_pointer-f->f_valuestack; err = maybe_call_line_trace(tstate->c_tracefunc, tstate->c_traceobj, @@ -1448,10 +1453,8 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) &instr_lb, &instr_ub, &instr_prev); /* Reload possibly changed frame fields */ JUMPTO(f->f_lasti); - if (f->f_stacktop != NULL) { - stack_pointer = f->f_stacktop; - f->f_stacktop = NULL; - } + stack_pointer = f->f_valuestack+f->f_stackdepth; + f->f_stackdepth = -1; if (err) /* trace function raised an exception */ goto error; @@ -2076,6 +2079,8 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) retval = POP(); assert(f->f_iblock == 0); assert(EMPTY()); + f->f_state = FRAME_RETURNED; + f->f_stackdepth = 0; goto exiting; } @@ -2242,10 +2247,11 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) DISPATCH(); } /* receiver remains on stack, retval is value to be yielded */ - f->f_stacktop = stack_pointer; /* and repeat... */ assert(f->f_lasti >= (int)sizeof(_Py_CODEUNIT)); f->f_lasti -= sizeof(_Py_CODEUNIT); + f->f_state = FRAME_SUSPENDED; + f->f_stackdepth = stack_pointer-f->f_valuestack; goto exiting; } @@ -2261,8 +2267,8 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) } retval = w; } - - f->f_stacktop = stack_pointer; + f->f_state = FRAME_SUSPENDED; + f->f_stackdepth = stack_pointer-f->f_valuestack; goto exiting; } @@ -3762,11 +3768,15 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) /* Log traceback info. */ PyTraceBack_Here(f); - if (tstate->c_tracefunc != NULL) + if (tstate->c_tracefunc != NULL) { + /* Make sure state is set to FRAME_EXECUTING for tracing */ + assert(f->f_state == FRAME_EXECUTING); + f->f_state = FRAME_UNWINDING; call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, tstate, f); - + } exception_unwind: + f->f_state = FRAME_UNWINDING; /* Unwind stacks if an exception occurred */ while (f->f_iblock > 0) { /* Pop the current block. */ @@ -3825,6 +3835,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) } } /* Resume normal execution */ + f->f_state = FRAME_EXECUTING; goto main_loop; } } /* unwind stack */ @@ -3841,7 +3852,8 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) PyObject *o = POP(); Py_XDECREF(o); } - + f->f_stackdepth = 0; + f->f_state = FRAME_RAISED; exiting: if (tstate->use_tracing) { if (tstate->c_tracefunc) { @@ -3863,7 +3875,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) if (PyDTrace_FUNCTION_RETURN_ENABLED()) dtrace_function_return(f); _Py_LeaveRecursiveCall(tstate); - f->f_executing = 0; tstate->frame = f->f_back; return _Py_CheckFunctionResult(tstate, NULL, retval, __func__); diff --git a/Python/compile.c b/Python/compile.c index 1b94f0656d2d458..2c5326686f8663c 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -9,7 +9,7 @@ * 3. Generate code for basic blocks. See compiler_mod() in this file. * 4. Assemble the basic blocks into final code. See assemble() in * this file. - * 5. Optimize the byte code (peephole optimizations). See peephole.c + * 5. Optimize the byte code (peephole optimizations). * * Note that compiler_mod() suggests module, but the module ast type * (mod_ty) has cases for expressions and interactive statements. @@ -27,6 +27,7 @@ #include "ast.h" #include "code.h" #include "symtable.h" +#define NEED_OPCODE_JUMP_TABLES #include "opcode.h" #include "wordcode_helpers.h" @@ -45,14 +46,38 @@ && (c->u->u_ste->ste_type == ModuleBlock)) struct instr { - unsigned i_jabs : 1; - unsigned i_jrel : 1; unsigned char i_opcode; int i_oparg; struct basicblock_ *i_target; /* target block (if jump instruction) */ int i_lineno; }; +#define LOG_BITS_PER_INT 5 +#define MASK_LOW_LOG_BITS 31 + +static inline int +is_bit_set_in_table(uint32_t *table, int bitindex) { + /* Is the relevant bit set in the relevant word? */ + /* 256 bits fit into 8 32-bits words. + * Word is indexed by (bitindex>>ln(size of int in bits)). + * Bit within word is the low bits of bitindex. + */ + uint32_t word = table[bitindex >> LOG_BITS_PER_INT]; + return (word >> (bitindex & MASK_LOW_LOG_BITS)) & 1; +} + +static inline int +is_relative_jump(struct instr *i) +{ + return is_bit_set_in_table(_PyOpcode_RelativeJump, i->i_opcode); +} + +static inline int +is_jump(struct instr *i) +{ + return is_bit_set_in_table(_PyOpcode_Jump, i->i_opcode); +} + typedef struct basicblock_ { /* Each basicblock in a compilation unit is linked via b_list in the reverse order that the block are allocated. b_list points to the next @@ -69,6 +94,7 @@ typedef struct basicblock_ { struct basicblock_ *b_next; /* b_return is true if a RETURN_VALUE opcode is inserted. */ unsigned b_return : 1; + unsigned b_reachable : 1; /* depth of stack upon entry of block, computed by stackdepth() */ int b_startdepth; /* instruction offset for block, computed by assemble_jump_offsets() */ @@ -181,7 +207,7 @@ static basicblock *compiler_new_block(struct compiler *); static int compiler_next_instr(basicblock *); static int compiler_addop(struct compiler *, int); static int compiler_addop_i(struct compiler *, int, Py_ssize_t); -static int compiler_addop_j(struct compiler *, int, basicblock *, int); +static int compiler_addop_j(struct compiler *, int, basicblock *); static int compiler_error(struct compiler *, const char *); static int compiler_warn(struct compiler *, const char *, ...); static int compiler_nameop(struct compiler *, identifier, expr_context_ty); @@ -499,7 +525,7 @@ compiler_unit_check(struct compiler_unit *u) assert((uintptr_t)block != 0xdbdbdbdbU); if (block->b_instr != NULL) { assert(block->b_ialloc > 0); - assert(block->b_iused > 0); + assert(block->b_iused >= 0); assert(block->b_ialloc >= block->b_iused); } else { @@ -1380,7 +1406,7 @@ compiler_addop_i(struct compiler *c, int opcode, Py_ssize_t oparg) } static int -compiler_addop_j(struct compiler *c, int opcode, basicblock *b, int absolute) +compiler_addop_j(struct compiler *c, int opcode, basicblock *b) { struct instr *i; int off; @@ -1397,10 +1423,6 @@ compiler_addop_j(struct compiler *c, int opcode, basicblock *b, int absolute) i = &c->u->u_curblock->b_instr[off]; i->i_opcode = opcode; i->i_target = b; - if (absolute) - i->i_jabs = 1; - else - i->i_jrel = 1; i->i_lineno = c->u->u_lineno; return 1; } @@ -1470,17 +1492,11 @@ compiler_addop_j(struct compiler *c, int opcode, basicblock *b, int absolute) return 0; \ } -#define ADDOP_JABS(C, OP, O) { \ - if (!compiler_addop_j((C), (OP), (O), 1)) \ - return 0; \ -} - -#define ADDOP_JREL(C, OP, O) { \ - if (!compiler_addop_j((C), (OP), (O), 0)) \ +#define ADDOP_JUMP(C, OP, O) { \ + if (!compiler_addop_j((C), (OP), (O))) \ return 0; \ } - #define ADDOP_COMPARE(C, CMP) { \ if (!compiler_addcompare((C), (cmpop_ty)(CMP))) \ return 0; \ @@ -2544,7 +2560,7 @@ compiler_jump_if(struct compiler *c, expr_ty e, basicblock *next, int cond) return 0; if (!compiler_jump_if(c, e->v.IfExp.body, next, cond)) return 0; - ADDOP_JREL(c, JUMP_FORWARD, end); + ADDOP_JUMP(c, JUMP_FORWARD, end); compiler_use_next_block(c, next2); if (!compiler_jump_if(c, e->v.IfExp.orelse, next, cond)) return 0; @@ -2567,20 +2583,20 @@ compiler_jump_if(struct compiler *c, expr_ty e, basicblock *next, int cond) ADDOP(c, DUP_TOP); ADDOP(c, ROT_THREE); ADDOP_COMPARE(c, asdl_seq_GET(e->v.Compare.ops, i)); - ADDOP_JABS(c, POP_JUMP_IF_FALSE, cleanup); + ADDOP_JUMP(c, POP_JUMP_IF_FALSE, cleanup); NEXT_BLOCK(c); } VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Compare.comparators, n)); ADDOP_COMPARE(c, asdl_seq_GET(e->v.Compare.ops, n)); - ADDOP_JABS(c, cond ? POP_JUMP_IF_TRUE : POP_JUMP_IF_FALSE, next); + ADDOP_JUMP(c, cond ? POP_JUMP_IF_TRUE : POP_JUMP_IF_FALSE, next); basicblock *end = compiler_new_block(c); if (end == NULL) return 0; - ADDOP_JREL(c, JUMP_FORWARD, end); + ADDOP_JUMP(c, JUMP_FORWARD, end); compiler_use_next_block(c, cleanup); ADDOP(c, POP_TOP); if (!cond) { - ADDOP_JREL(c, JUMP_FORWARD, next); + ADDOP_JUMP(c, JUMP_FORWARD, next); } compiler_use_next_block(c, end); return 1; @@ -2595,7 +2611,7 @@ compiler_jump_if(struct compiler *c, expr_ty e, basicblock *next, int cond) /* general implementation */ VISIT(c, expr, e); - ADDOP_JABS(c, cond ? POP_JUMP_IF_TRUE : POP_JUMP_IF_FALSE, next); + ADDOP_JUMP(c, cond ? POP_JUMP_IF_TRUE : POP_JUMP_IF_FALSE, next); return 1; } @@ -2614,7 +2630,7 @@ compiler_ifexp(struct compiler *c, expr_ty e) if (!compiler_jump_if(c, e->v.IfExp.test, next, 0)) return 0; VISIT(c, expr, e->v.IfExp.body); - ADDOP_JREL(c, JUMP_FORWARD, end); + ADDOP_JUMP(c, JUMP_FORWARD, end); compiler_use_next_block(c, next); VISIT(c, expr, e->v.IfExp.orelse); compiler_use_next_block(c, end); @@ -2720,7 +2736,7 @@ compiler_if(struct compiler *c, stmt_ty s) } VISIT_SEQ(c, stmt, s->v.If.body); if (asdl_seq_LEN(s->v.If.orelse)) { - ADDOP_JREL(c, JUMP_FORWARD, end); + ADDOP_JUMP(c, JUMP_FORWARD, end); compiler_use_next_block(c, next); VISIT_SEQ(c, stmt, s->v.If.orelse); } @@ -2746,10 +2762,10 @@ compiler_for(struct compiler *c, stmt_ty s) VISIT(c, expr, s->v.For.iter); ADDOP(c, GET_ITER); compiler_use_next_block(c, start); - ADDOP_JREL(c, FOR_ITER, cleanup); + ADDOP_JUMP(c, FOR_ITER, cleanup); VISIT(c, expr, s->v.For.target); VISIT_SEQ(c, stmt, s->v.For.body); - ADDOP_JABS(c, JUMP_ABSOLUTE, start); + ADDOP_JUMP(c, JUMP_ABSOLUTE, start); compiler_use_next_block(c, cleanup); compiler_pop_fblock(c, FOR_LOOP, start); @@ -2785,7 +2801,7 @@ compiler_async_for(struct compiler *c, stmt_ty s) return 0; } /* SETUP_FINALLY to guard the __anext__ call */ - ADDOP_JREL(c, SETUP_FINALLY, except); + ADDOP_JUMP(c, SETUP_FINALLY, except); ADDOP(c, GET_ANEXT); ADDOP_LOAD_CONST(c, Py_None); ADDOP(c, YIELD_FROM); @@ -2794,7 +2810,7 @@ compiler_async_for(struct compiler *c, stmt_ty s) /* Success block for __anext__ */ VISIT(c, expr, s->v.AsyncFor.target); VISIT_SEQ(c, stmt, s->v.AsyncFor.body); - ADDOP_JABS(c, JUMP_ABSOLUTE, start); + ADDOP_JUMP(c, JUMP_ABSOLUTE, start); compiler_pop_fblock(c, FOR_LOOP, start); @@ -2858,7 +2874,7 @@ compiler_while(struct compiler *c, stmt_ty s) return 0; } VISIT_SEQ(c, stmt, s->v.While.body); - ADDOP_JABS(c, JUMP_ABSOLUTE, loop); + ADDOP_JUMP(c, JUMP_ABSOLUTE, loop); /* XXX should the two POP instructions be in a separate block if there is no else clause ? @@ -2917,7 +2933,7 @@ compiler_break(struct compiler *c) if (!compiler_unwind_fblock(c, loop, 0)) { return 0; } - ADDOP_JABS(c, JUMP_ABSOLUTE, loop->fb_exit); + ADDOP_JUMP(c, JUMP_ABSOLUTE, loop->fb_exit); return 1; } @@ -2931,7 +2947,7 @@ compiler_continue(struct compiler *c) if (loop == NULL) { return compiler_error(c, "'continue' not properly in loop"); } - ADDOP_JABS(c, JUMP_ABSOLUTE, loop->fb_block); + ADDOP_JUMP(c, JUMP_ABSOLUTE, loop->fb_block); return 1; } @@ -2977,7 +2993,7 @@ compiler_try_finally(struct compiler *c, stmt_ty s) return 0; /* `try` block */ - ADDOP_JREL(c, SETUP_FINALLY, end); + ADDOP_JUMP(c, SETUP_FINALLY, end); compiler_use_next_block(c, body); if (!compiler_push_fblock(c, FINALLY_TRY, body, end, s->v.Try.finalbody)) return 0; @@ -2991,7 +3007,7 @@ compiler_try_finally(struct compiler *c, stmt_ty s) ADDOP(c, POP_BLOCK); compiler_pop_fblock(c, FINALLY_TRY, body); VISIT_SEQ(c, stmt, s->v.Try.finalbody); - ADDOP_JREL(c, JUMP_FORWARD, exit); + ADDOP_JUMP(c, JUMP_FORWARD, exit); /* `finally` block */ compiler_use_next_block(c, end); if (!compiler_push_fblock(c, FINALLY_END, end, NULL, NULL)) @@ -3045,14 +3061,14 @@ compiler_try_except(struct compiler *c, stmt_ty s) end = compiler_new_block(c); if (body == NULL || except == NULL || orelse == NULL || end == NULL) return 0; - ADDOP_JREL(c, SETUP_FINALLY, except); + ADDOP_JUMP(c, SETUP_FINALLY, except); compiler_use_next_block(c, body); if (!compiler_push_fblock(c, EXCEPT, body, NULL, NULL)) return 0; VISIT_SEQ(c, stmt, s->v.Try.body); ADDOP(c, POP_BLOCK); compiler_pop_fblock(c, EXCEPT, body); - ADDOP_JREL(c, JUMP_FORWARD, orelse); + ADDOP_JUMP(c, JUMP_FORWARD, orelse); n = asdl_seq_LEN(s->v.Try.handlers); compiler_use_next_block(c, except); for (i = 0; i < n; i++) { @@ -3067,7 +3083,7 @@ compiler_try_except(struct compiler *c, stmt_ty s) if (handler->v.ExceptHandler.type) { ADDOP(c, DUP_TOP); VISIT(c, expr, handler->v.ExceptHandler.type); - ADDOP_JABS(c, JUMP_IF_NOT_EXC_MATCH, except); + ADDOP_JUMP(c, JUMP_IF_NOT_EXC_MATCH, except); } ADDOP(c, POP_TOP); if (handler->v.ExceptHandler.name) { @@ -3094,7 +3110,7 @@ compiler_try_except(struct compiler *c, stmt_ty s) */ /* second try: */ - ADDOP_JREL(c, SETUP_FINALLY, cleanup_end); + ADDOP_JUMP(c, SETUP_FINALLY, cleanup_end); compiler_use_next_block(c, cleanup_body); if (!compiler_push_fblock(c, HANDLER_CLEANUP, cleanup_body, NULL, handler->v.ExceptHandler.name)) return 0; @@ -3108,7 +3124,7 @@ compiler_try_except(struct compiler *c, stmt_ty s) ADDOP_LOAD_CONST(c, Py_None); compiler_nameop(c, handler->v.ExceptHandler.name, Store); compiler_nameop(c, handler->v.ExceptHandler.name, Del); - ADDOP_JREL(c, JUMP_FORWARD, end); + ADDOP_JUMP(c, JUMP_FORWARD, end); /* except: */ compiler_use_next_block(c, cleanup_end); @@ -3135,7 +3151,7 @@ compiler_try_except(struct compiler *c, stmt_ty s) VISIT_SEQ(c, stmt, handler->v.ExceptHandler.body); compiler_pop_fblock(c, HANDLER_CLEANUP, cleanup_body); ADDOP(c, POP_EXCEPT); - ADDOP_JREL(c, JUMP_FORWARD, end); + ADDOP_JUMP(c, JUMP_FORWARD, end); } compiler_use_next_block(c, except); } @@ -3644,7 +3660,12 @@ compiler_boolop(struct compiler *c, expr_ty e) assert(n >= 0); for (i = 0; i < n; ++i) { VISIT(c, expr, (expr_ty)asdl_seq_GET(s, i)); - ADDOP_JABS(c, jumpi, end); + ADDOP_JUMP(c, jumpi, end); + basicblock *next = compiler_new_block(c); + if (next == NULL) { + return 0; + } + compiler_use_next_block(c, next); } VISIT(c, expr, (expr_ty)asdl_seq_GET(s, n)); compiler_use_next_block(c, end); @@ -3873,7 +3894,7 @@ compiler_dict(struct compiler *c, expr_ty e) } else { if (elements == 0xFFFF) { - if (!compiler_subdict(c, e, i - elements, i)) { + if (!compiler_subdict(c, e, i - elements, i + 1)) { return 0; } if (have_dict) { @@ -3927,7 +3948,7 @@ compiler_compare(struct compiler *c, expr_ty e) ADDOP(c, DUP_TOP); ADDOP(c, ROT_THREE); ADDOP_COMPARE(c, asdl_seq_GET(e->v.Compare.ops, i)); - ADDOP_JABS(c, JUMP_IF_FALSE_OR_POP, cleanup); + ADDOP_JUMP(c, JUMP_IF_FALSE_OR_POP, cleanup); NEXT_BLOCK(c); } VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Compare.comparators, n)); @@ -3935,7 +3956,7 @@ compiler_compare(struct compiler *c, expr_ty e) basicblock *end = compiler_new_block(c); if (end == NULL) return 0; - ADDOP_JREL(c, JUMP_FORWARD, end); + ADDOP_JUMP(c, JUMP_FORWARD, end); compiler_use_next_block(c, cleanup); ADDOP(c, ROT_TWO); ADDOP(c, POP_TOP); @@ -4429,7 +4450,7 @@ compiler_sync_comprehension_generator(struct compiler *c, if (start) { depth++; compiler_use_next_block(c, start); - ADDOP_JREL(c, FOR_ITER, anchor); + ADDOP_JUMP(c, FOR_ITER, anchor); NEXT_BLOCK(c); } VISIT(c, expr, gen->target); @@ -4481,7 +4502,7 @@ compiler_sync_comprehension_generator(struct compiler *c, } compiler_use_next_block(c, if_cleanup); if (start) { - ADDOP_JABS(c, JUMP_ABSOLUTE, start); + ADDOP_JUMP(c, JUMP_ABSOLUTE, start); compiler_use_next_block(c, anchor); } @@ -4520,7 +4541,7 @@ compiler_async_comprehension_generator(struct compiler *c, compiler_use_next_block(c, start); - ADDOP_JREL(c, SETUP_FINALLY, except); + ADDOP_JUMP(c, SETUP_FINALLY, except); ADDOP(c, GET_ANEXT); ADDOP_LOAD_CONST(c, Py_None); ADDOP(c, YIELD_FROM); @@ -4571,7 +4592,7 @@ compiler_async_comprehension_generator(struct compiler *c, } } compiler_use_next_block(c, if_cleanup); - ADDOP_JABS(c, JUMP_ABSOLUTE, start); + ADDOP_JUMP(c, JUMP_ABSOLUTE, start); compiler_use_next_block(c, except); ADDOP(c, END_ASYNC_FOR); @@ -4767,7 +4788,7 @@ compiler_with_except_finish(struct compiler *c) { exit = compiler_new_block(c); if (exit == NULL) return 0; - ADDOP_JABS(c, POP_JUMP_IF_TRUE, exit); + ADDOP_JUMP(c, POP_JUMP_IF_TRUE, exit); ADDOP(c, RERAISE); compiler_use_next_block(c, exit); ADDOP(c, POP_TOP); @@ -4829,7 +4850,7 @@ compiler_async_with(struct compiler *c, stmt_ty s, int pos) ADDOP_LOAD_CONST(c, Py_None); ADDOP(c, YIELD_FROM); - ADDOP_JREL(c, SETUP_ASYNC_WITH, final); + ADDOP_JUMP(c, SETUP_ASYNC_WITH, final); /* SETUP_ASYNC_WITH pushes a finally block. */ compiler_use_next_block(c, block); @@ -4867,7 +4888,7 @@ compiler_async_with(struct compiler *c, stmt_ty s, int pos) ADDOP(c, POP_TOP); - ADDOP_JABS(c, JUMP_ABSOLUTE, exit); + ADDOP_JUMP(c, JUMP_ABSOLUTE, exit); /* For exceptional outcome: */ compiler_use_next_block(c, final); @@ -4921,7 +4942,7 @@ compiler_with(struct compiler *c, stmt_ty s, int pos) /* Evaluate EXPR */ VISIT(c, expr, item->context_expr); /* Will push bound __exit__ */ - ADDOP_JREL(c, SETUP_WITH, final); + ADDOP_JUMP(c, SETUP_WITH, final); /* SETUP_WITH pushes a finally block. */ compiler_use_next_block(c, block); @@ -4955,7 +4976,7 @@ compiler_with(struct compiler *c, stmt_ty s, int pos) if (!compiler_call_exit_with_nones(c)) return 0; ADDOP(c, POP_TOP); - ADDOP_JREL(c, JUMP_FORWARD, exit); + ADDOP_JUMP(c, JUMP_FORWARD, exit); /* For exceptional outcome: */ compiler_use_next_block(c, final); @@ -5486,7 +5507,7 @@ stackdepth(struct compiler *c) maxdepth = new_depth; } assert(depth >= 0); /* invalid code or bug in stackdepth() */ - if (instr->i_jrel || instr->i_jabs) { + if (is_jump(instr)) { effect = stack_effect(instr->i_opcode, instr->i_oparg, 1); assert(effect != PY_INVALID_STACK_EFFECT); int target_depth = depth + effect; @@ -5724,9 +5745,9 @@ assemble_jump_offsets(struct assembler *a, struct compiler *c) the jump instruction. */ bsize += isize; - if (instr->i_jabs || instr->i_jrel) { + if (is_jump(instr)) { instr->i_oparg = instr->i_target->b_offset; - if (instr->i_jrel) { + if (is_relative_jump(instr)) { instr->i_oparg -= bsize; } instr->i_oparg *= sizeof(_Py_CODEUNIT); @@ -5861,28 +5882,24 @@ merge_const_tuple(struct compiler *c, PyObject **tuple) } static PyCodeObject * -makecode(struct compiler *c, struct assembler *a) +makecode(struct compiler *c, struct assembler *a, PyObject *consts) { - PyObject *tmp; PyCodeObject *co = NULL; - PyObject *consts = NULL; PyObject *names = NULL; PyObject *varnames = NULL; PyObject *name = NULL; PyObject *freevars = NULL; PyObject *cellvars = NULL; - PyObject *bytecode = NULL; Py_ssize_t nlocals; int nlocals_int; int flags; int posorkeywordargcount, posonlyargcount, kwonlyargcount, maxdepth; - consts = consts_dict_keys_inorder(c->u->u_consts); names = dict_keys_inorder(c->u->u_names, 0); varnames = dict_keys_inorder(c->u->u_varnames, 0); - if (!consts || !names || !varnames) + if (!names || !varnames) { goto error; - + } cellvars = dict_keys_inorder(c->u->u_cellvars, 0); if (!cellvars) goto error; @@ -5906,16 +5923,12 @@ makecode(struct compiler *c, struct assembler *a) if (flags < 0) goto error; - bytecode = PyCode_Optimize(a->a_bytecode, consts, names, a->a_lnotab); - if (!bytecode) + consts = PyList_AsTuple(consts); /* PyCode_New requires a tuple */ + if (consts == NULL) { goto error; - - tmp = PyList_AsTuple(consts); /* PyCode_New requires a tuple */ - if (!tmp) - goto error; - Py_DECREF(consts); - consts = tmp; + } if (!merge_const_tuple(c, &consts)) { + Py_DECREF(consts); goto error; } @@ -5924,21 +5937,21 @@ makecode(struct compiler *c, struct assembler *a) kwonlyargcount = Py_SAFE_DOWNCAST(c->u->u_kwonlyargcount, Py_ssize_t, int); maxdepth = stackdepth(c); if (maxdepth < 0) { + Py_DECREF(consts); goto error; } co = PyCode_NewWithPosOnlyArgs(posonlyargcount+posorkeywordargcount, posonlyargcount, kwonlyargcount, nlocals_int, - maxdepth, flags, bytecode, consts, names, + maxdepth, flags, a->a_bytecode, consts, names, varnames, freevars, cellvars, c->c_filename, c->u->u_name, c->u->u_firstlineno, a->a_lnotab); + Py_DECREF(consts); error: - Py_XDECREF(consts); Py_XDECREF(names); Py_XDECREF(varnames); Py_XDECREF(name); Py_XDECREF(freevars); Py_XDECREF(cellvars); - Py_XDECREF(bytecode); return co; } @@ -5948,8 +5961,8 @@ makecode(struct compiler *c, struct assembler *a) static void dump_instr(const struct instr *i) { - const char *jrel = i->i_jrel ? "jrel " : ""; - const char *jabs = i->i_jabs ? "jabs " : ""; + const char *jrel = (is_relative_jump(instr)) ? "jrel " : ""; + const char *jabs = (is_jump(instr) && !is_relative_jump(instr))? "jabs " : ""; char arg[128]; *arg = '\0'; @@ -5976,6 +5989,9 @@ dump_basicblock(const basicblock *b) } #endif +static int +optimize_cfg(struct assembler *a, PyObject *consts); + static PyCodeObject * assemble(struct compiler *c, int addNone) { @@ -5983,6 +5999,7 @@ assemble(struct compiler *c, int addNone) struct assembler a; int i, j, nblocks; PyCodeObject *co = NULL; + PyObject *consts = NULL; /* Make sure every block that falls off the end returns None. XXX NEXT_BLOCK() isn't quite right, because if the last @@ -6013,6 +6030,14 @@ assemble(struct compiler *c, int addNone) goto error; dfs(c, entryblock, &a, nblocks); + consts = consts_dict_keys_inorder(c->u->u_consts); + if (consts == NULL) { + goto error; + } + if (optimize_cfg(&a, consts)) { + goto error; + } + /* Can't modify the bytecode after computing jump offsets. */ assemble_jump_offsets(&a, c); @@ -6029,8 +6054,9 @@ assemble(struct compiler *c, int addNone) if (_PyBytes_Resize(&a.a_bytecode, a.a_offset * sizeof(_Py_CODEUNIT)) < 0) goto error; - co = makecode(c, &a); + co = makecode(c, &a, consts); error: + Py_XDECREF(consts); assemble_free(&a); return co; } @@ -6042,3 +6068,323 @@ PyAST_Compile(mod_ty mod, const char *filename, PyCompilerFlags *flags, { return PyAST_CompileEx(mod, filename, flags, -1, arena); } + + +/* Replace LOAD_CONST c1, LOAD_CONST c2 ... LOAD_CONST cn, BUILD_TUPLE n + with LOAD_CONST (c1, c2, ... cn). + The consts table must still be in list form so that the + new constant (c1, c2, ... cn) can be appended. + Called with codestr pointing to the first LOAD_CONST. +*/ +static int +fold_tuple_on_constants(struct instr *inst, + int n, PyObject *consts) +{ + /* Pre-conditions */ + assert(PyList_CheckExact(consts)); + assert(inst[n].i_opcode == BUILD_TUPLE); + assert(inst[n].i_oparg == n); + + for (int i = 0; i < n; i++) { + if (inst[i].i_opcode != LOAD_CONST) { + return 0; + } + } + + /* Buildup new tuple of constants */ + PyObject *newconst = PyTuple_New(n); + if (newconst == NULL) { + return -1; + } + for (int i = 0; i < n; i++) { + int arg = inst[i].i_oparg; + PyObject *constant = PyList_GET_ITEM(consts, arg); + Py_INCREF(constant); + PyTuple_SET_ITEM(newconst, i, constant); + } + Py_ssize_t index = PyList_GET_SIZE(consts); +#if SIZEOF_SIZE_T > SIZEOF_INT + if ((size_t)index >= UINT_MAX - 1) { + Py_DECREF(newconst); + PyErr_SetString(PyExc_OverflowError, "too many constants"); + return -1; + } +#endif + if (PyList_Append(consts, newconst)) { + Py_DECREF(newconst); + return -1; + } + Py_DECREF(newconst); + for (int i = 0; i < n; i++) { + inst[i].i_opcode = NOP; + } + inst[n].i_opcode = LOAD_CONST; + inst[n].i_oparg = index; + return 0; +} + + +/* Optimization */ +static int +optimize_basic_block(basicblock *bb, PyObject *consts) +{ + assert(PyList_CheckExact(consts)); + struct instr nop; + nop.i_opcode = NOP; + struct instr *target; + int lineno; + for (int i = 0; i < bb->b_iused; i++) { + struct instr *inst = &bb->b_instr[i]; + int oparg = inst->i_oparg; + int nextop = i+1 < bb->b_iused ? bb->b_instr[i+1].i_opcode : 0; + if (is_jump(inst)) { + /* Skip over empty basic blocks. */ + while (inst->i_target->b_iused == 0) { + inst->i_target = inst->i_target->b_next; + } + target = &inst->i_target->b_instr[0]; + } + else { + target = &nop; + } + switch (inst->i_opcode) { + /* Skip over LOAD_CONST trueconst + POP_JUMP_IF_FALSE xx. This improves + "while 1" performance. */ + case LOAD_CONST: + if (nextop != POP_JUMP_IF_FALSE) { + break; + } + PyObject* cnt = PyList_GET_ITEM(consts, oparg); + int is_true = PyObject_IsTrue(cnt); + if (is_true == -1) { + goto error; + } + if (is_true == 1) { + inst->i_opcode = NOP; + bb->b_instr[i+1].i_opcode = NOP; + } + break; + + /* Try to fold tuples of constants. + Skip over BUILD_SEQN 1 UNPACK_SEQN 1. + Replace BUILD_SEQN 2 UNPACK_SEQN 2 with ROT2. + Replace BUILD_SEQN 3 UNPACK_SEQN 3 with ROT3 ROT2. */ + case BUILD_TUPLE: + if (nextop == UNPACK_SEQUENCE && oparg == bb->b_instr[i+1].i_oparg) { + switch(oparg) { + case 1: + inst->i_opcode = NOP; + bb->b_instr[i+1].i_opcode = NOP; + break; + case 2: + inst->i_opcode = ROT_TWO; + bb->b_instr[i+1].i_opcode = NOP; + break; + case 3: + inst->i_opcode = ROT_THREE; + bb->b_instr[i+1].i_opcode = ROT_TWO; + } + break; + } + if (i >= oparg) { + if (fold_tuple_on_constants(inst-oparg, oparg, consts)) { + goto error; + } + } + break; + + /* Simplify conditional jump to conditional jump where the + result of the first test implies the success of a similar + test or the failure of the opposite test. + Arises in code like: + "a and b or c" + "(a and b) and c" + "(a or b) or c" + "(a or b) and c" + x:JUMP_IF_FALSE_OR_POP y y:JUMP_IF_FALSE_OR_POP z + --> x:JUMP_IF_FALSE_OR_POP z + x:JUMP_IF_FALSE_OR_POP y y:JUMP_IF_TRUE_OR_POP z + --> x:POP_JUMP_IF_FALSE y+1 + where y+1 is the instruction following the second test. + */ + case JUMP_IF_FALSE_OR_POP: + switch(target->i_opcode) { + case POP_JUMP_IF_FALSE: + *inst = *target; + break; + case JUMP_ABSOLUTE: + case JUMP_FORWARD: + case JUMP_IF_FALSE_OR_POP: + inst->i_target = target->i_target; + 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; + break; + } + break; + + case JUMP_IF_TRUE_OR_POP: + switch(target->i_opcode) { + case POP_JUMP_IF_TRUE: + *inst = *target; + break; + case JUMP_ABSOLUTE: + case JUMP_FORWARD: + case JUMP_IF_TRUE_OR_POP: + inst->i_target = target->i_target; + 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; + break; + } + break; + + case POP_JUMP_IF_FALSE: + switch(target->i_opcode) { + case JUMP_ABSOLUTE: + case JUMP_FORWARD: + inst->i_target = target->i_target; + break; + } + break; + + case POP_JUMP_IF_TRUE: + switch(target->i_opcode) { + case JUMP_ABSOLUTE: + case JUMP_FORWARD: + inst->i_target = target->i_target; + break; + } + break; + + case JUMP_ABSOLUTE: + case JUMP_FORWARD: + switch(target->i_opcode) { + case JUMP_FORWARD: + inst->i_target = target->i_target; + break; + case JUMP_ABSOLUTE: + case RETURN_VALUE: + case RERAISE: + case RAISE_VARARGS: + lineno = inst->i_lineno; + *inst = *target; + inst->i_lineno = lineno; + break; + } + break; + } + } + return 0; +error: + return -1; +} + + +static void +clean_basic_block(basicblock *bb) { + /* Remove NOPs and any code following a return or re-raise. */ + int dest = 0; + for (int src = 0; src < bb->b_iused; src++) { + switch(bb->b_instr[src].i_opcode) { + case NOP: + /* skip */ + break; + case RETURN_VALUE: + case RERAISE: + bb->b_next = NULL; + bb->b_instr[dest] = bb->b_instr[src]; + dest++; + goto end; + default: + if (dest != src) { + bb->b_instr[dest] = bb->b_instr[src]; + } + dest++; + break; + } + } +end: + assert(dest <= bb->b_iused); + bb->b_iused = dest; +} + +static int +mark_reachable(struct assembler *a) { + basicblock **stack, **sp; + sp = stack = (basicblock **)PyObject_Malloc(sizeof(basicblock *) * a->a_nblocks); + if (stack == NULL) { + return -1; + } + basicblock *entry = a->a_reverse_postorder[0]; + entry->b_reachable = 1; + *sp++ = entry; + while (sp > stack) { + basicblock *b = *(--sp); + if (b->b_next && b->b_next->b_reachable == 0) { + b->b_next->b_reachable = 1; + *sp++ = b->b_next; + } + for (int i = 0; i < b->b_iused; i++) { + basicblock *target; + if (is_jump(&b->b_instr[i])) { + target = b->b_instr[i].i_target; + if (target->b_reachable == 0) { + target->b_reachable = 1; + *sp++ = target; + } + } + } + } + PyObject_Free(stack); + return 0; +} + + +/* Perform basic peephole optimizations on a control flow graph. + The consts object should still be in list form to allow new constants + to be appended. + + All transformations keep the code size the same or smaller. + For those that reduce size, the gaps are initially filled with + NOPs. Later those NOPs are removed. +*/ + +static int +optimize_cfg(struct assembler *a, PyObject *consts) +{ + for (int i = 0; i < a->a_nblocks; i++) { + if (optimize_basic_block(a->a_reverse_postorder[i], consts)) { + return -1; + } + clean_basic_block(a->a_reverse_postorder[i]); + assert(a->a_reverse_postorder[i]->b_reachable == 0); + } + if (mark_reachable(a)) { + return -1; + } + /* Delete unreachable instructions */ + for (int i = 0; i < a->a_nblocks; i++) { + if (a->a_reverse_postorder[i]->b_reachable == 0) { + a->a_reverse_postorder[i]->b_iused = 0; + } + } + return 0; +} + +/* Retained for API compatibility. + * Optimization is now done in optimize_cfg */ + +PyObject * +PyCode_Optimize(PyObject *code, PyObject* Py_UNUSED(consts), + PyObject *Py_UNUSED(names), PyObject *Py_UNUSED(lnotab_obj)) +{ + Py_INCREF(code); + return code; +} + diff --git a/Python/dynload_win.c b/Python/dynload_win.c index 8431c5b3b2f308e..5702ab2cd71ba12 100644 --- a/Python/dynload_win.c +++ b/Python/dynload_win.c @@ -166,11 +166,14 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix, { dl_funcptr p; char funcname[258], *import_python; - const wchar_t *wpathname; _Py_CheckPython3(); - wpathname = _PyUnicode_AsUnicode(pathname); +#if USE_UNICODE_WCHAR_CACHE + const wchar_t *wpathname = _PyUnicode_AsUnicode(pathname); +#else /* USE_UNICODE_WCHAR_CACHE */ + wchar_t *wpathname = PyUnicode_AsWideCharString(pathname, NULL); +#endif /* USE_UNICODE_WCHAR_CACHE */ if (wpathname == NULL) return NULL; @@ -192,6 +195,9 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR); Py_END_ALLOW_THREADS +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(wpathname); +#endif /* USE_UNICODE_WCHAR_CACHE */ /* restore old error mode settings */ SetErrorMode(old_mode); diff --git a/Python/fileutils.c b/Python/fileutils.c index 2c86828ba989acd..50ef3c174acc844 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1008,15 +1008,21 @@ _Py_stat(PyObject *path, struct stat *statbuf) #ifdef MS_WINDOWS int err; struct _stat wstatbuf; - const wchar_t *wpath; - wpath = _PyUnicode_AsUnicode(path); +#if USE_UNICODE_WCHAR_CACHE + const wchar_t *wpath = _PyUnicode_AsUnicode(path); +#else /* USE_UNICODE_WCHAR_CACHE */ + wchar_t *wpath = PyUnicode_AsWideCharString(path, NULL); +#endif /* USE_UNICODE_WCHAR_CACHE */ if (wpath == NULL) return -2; err = _wstat(wpath, &wstatbuf); if (!err) statbuf->st_mode = wstatbuf.st_mode; +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(wpath); +#endif /* USE_UNICODE_WCHAR_CACHE */ return err; #else int ret; @@ -1433,7 +1439,6 @@ _Py_fopen_obj(PyObject *path, const char *mode) FILE *f; int async_err = 0; #ifdef MS_WINDOWS - const wchar_t *wpath; wchar_t wmode[10]; int usize; @@ -1448,7 +1453,11 @@ _Py_fopen_obj(PyObject *path, const char *mode) Py_TYPE(path)); return NULL; } - wpath = _PyUnicode_AsUnicode(path); +#if USE_UNICODE_WCHAR_CACHE + const wchar_t *wpath = _PyUnicode_AsUnicode(path); +#else /* USE_UNICODE_WCHAR_CACHE */ + wchar_t *wpath = PyUnicode_AsWideCharString(path, NULL); +#endif /* USE_UNICODE_WCHAR_CACHE */ if (wpath == NULL) return NULL; @@ -1456,6 +1465,9 @@ _Py_fopen_obj(PyObject *path, const char *mode) wmode, Py_ARRAY_LENGTH(wmode)); if (usize == 0) { PyErr_SetFromWindowsErr(0); +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(wpath); +#endif /* USE_UNICODE_WCHAR_CACHE */ return NULL; } @@ -1465,6 +1477,9 @@ _Py_fopen_obj(PyObject *path, const char *mode) Py_END_ALLOW_THREADS } while (f == NULL && errno == EINTR && !(async_err = PyErr_CheckSignals())); +#if !USE_UNICODE_WCHAR_CACHE + PyMem_Free(wpath); +#endif /* USE_UNICODE_WCHAR_CACHE */ #else PyObject *bytes; const char *path_bytes; diff --git a/Python/importlib.h b/Python/importlib.h index 1fb877a75341975..00d1f3570b32297 100644 --- a/Python/importlib.h +++ b/Python/importlib.h @@ -475,215 +475,214 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 114,101,115,95,102,114,111,122,101,110,250,0,0,0,115,6, 0,0,0,0,2,12,5,10,1,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,62,0,0,0,116,0,124,1, + 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,100,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,6,1,0,0,115, - 12,0,0,0,0,6,10,1,10,1,10,1,10,1,10,2, - 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,218, - 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,56,4,0,116,5,121,200,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,89,0,110,14,48,0,100,6,160, - 9,124,3,124,4,161,2,83,0,100,0,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,22,1,0,0, - 115,46,0,0,0,0,2,12,1,10,4,2,1,12,1,12, - 1,6,1,2,1,10,1,12,1,6,2,8,1,8,4,2, - 1,10,1,12,1,10,1,2,1,10,1,12,1,8,1,14, - 2,22,2,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, + 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,6,1,0,0,115,12,0,0,0, + 0,6,10,1,10,1,10,1,10,1,10,2,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, + 22,1,0,0,115,46,0,0,0,0,2,12,1,10,4,2, + 1,12,1,12,1,6,1,2,1,10,1,12,1,6,2,8, + 1,8,4,2,1,10,1,12,1,10,1,2,1,10,1,12, + 1,8,1,14,2,18,2,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,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, + 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,95,1,0,0,115,14, + 0,0,0,0,2,6,1,6,1,6,1,6,1,14,3,6, + 1,122,19,77,111,100,117,108,101,83,112,101,99,46,95,95, + 105,110,105,116,95,95,99,1,0,0,0,0,0,0,0,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,31,0,0,0,95,1,0,0,115,14,0,0,0,0, - 2,6,1,6,1,6,1,6,1,14,3,6,1,122,19,77, - 111,100,117,108,101,83,112,101,99,46,95,95,105,110,105,116, - 95,95,99,1,0,0,0,0,0,0,0,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,107,1,0,0,115,20,0,0,0,0,1,10,1,10, - 255,4,2,10,1,18,1,10,1,8,1,4,255,6,2,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,106,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,100,0,83,0,114,13,0,0, + 0,114,49,0,0,0,107,1,0,0,115,20,0,0,0,0, + 1,10,1,10,255,4,2,10,1,18,1,10,1,8,1,4, + 255,6,2,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, @@ -716,335 +715,477 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 0,0,114,10,0,0,0,114,11,0,0,0,114,123,0,0, 0,138,1,0,0,115,2,0,0,0,0,2,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, + 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,100,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,142, - 1,0,0,115,6,0,0,0,0,3,10,1,16,2,122,17, - 77,111,100,117,108,101,83,112,101,99,46,112,97,114,101,110, - 116,99,1,0,0,0,0,0,0,0,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,150,1,0,0,115,2, - 0,0,0,0,2,122,23,77,111,100,117,108,101,83,112,101, - 99,46,104,97,115,95,108,111,99,97,116,105,111,110,99,2, - 0,0,0,0,0,0,0,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,154,1, - 0,0,115,2,0,0,0,0,2,41,12,114,1,0,0,0, - 114,0,0,0,0,114,2,0,0,0,114,3,0,0,0,114, - 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,58,1,0,0,115,32,0,0, - 0,8,1,4,36,4,1,2,255,12,12,8,10,8,12,2, - 1,10,8,4,1,10,3,2,1,10,7,2,1,10,3,4, - 1,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,152,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,136,116,0,124,1,100,5,131,2,114,132,122,14,124,1, - 160,4,124,0,161,1,125,3,87,0,113,136,4,0,116,5, - 121,128,1,0,1,0,1,0,100,2,125,3,89,0,113,136, - 48,0,110,4,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,159,1, - 0,0,115,36,0,0,0,0,2,10,1,8,1,4,1,6, - 2,8,1,12,1,12,1,6,1,2,255,6,3,8,1,10, - 1,2,1,14,1,12,1,12,3,4,2,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,42,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,176,124,5, - 100,0,117,0,114,172,122,10,124,1,106,5,125,2,87,0, - 113,176,4,0,116,1,121,168,1,0,1,0,1,0,100,0, - 125,2,89,0,113,176,48,0,110,4,124,5,125,2,122,10, - 124,0,106,6,125,6,87,0,110,22,4,0,116,1,121,208, - 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,246,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,20,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,185,1,0,0,115,72,0, - 0,0,0,2,2,1,10,1,12,1,6,2,8,1,4,2, - 6,1,8,1,2,1,10,1,12,2,6,1,2,1,10,1, - 12,1,10,1,8,1,8,1,2,1,10,1,12,1,12,2, - 4,1,2,1,10,1,12,1,10,1,2,1,14,1,12,1, - 10,2,14,1,20,1,6,1,6,1,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,210,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,206,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,206,124,0,106,19,100,0, - 117,1,144,1,114,206,122,12,124,0,106,19,124,1,95,20, - 87,0,110,20,4,0,116,3,144,1,121,204,1,0,1,0, - 1,0,89,0,110,2,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,230,1,0,0,115,96,0,0,0,0,4,20,1,2,1, - 12,1,12,1,6,2,20,1,6,1,8,2,10,1,8,1, - 4,1,6,2,10,1,8,1,6,11,6,1,2,1,10,1, - 12,1,6,2,20,1,2,1,12,1,12,1,6,2,2,1, - 10,1,12,1,6,2,24,1,12,1,2,1,12,1,14,1, - 6,2,8,1,24,1,2,1,12,1,14,1,6,2,24,1, - 12,1,2,1,12,1,14,1,6,1,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,46,2,0,0,115,18,0,0,0,0,3,4,1,12,3, - 14,1,12,1,8,2,8,1,10,1,10,1,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,106,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,66,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,110, - 36,124,0,106,4,114,86,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,100,1,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,63,2,0,0,115,16,0,0,0, - 0,3,20,1,10,1,10,1,10,2,16,2,6,1,14,2, - 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,250, - 0,0,0,124,0,106,0,125,2,116,1,124,2,131,1,143, - 216,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,110,16,49,0,115,236,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,80,2,0,0,115,38,0,0,0,0,2,6,1,10, - 1,16,1,10,1,12,1,2,1,10,1,10,1,14,2,16, - 2,14,1,12,4,14,2,14,4,14,1,14,255,14,1,44, - 1,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, - 20,1,0,0,122,18,124,0,106,0,160,1,124,0,106,2, - 161,1,1,0,87,0,110,52,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,89,0,110,2,48,0,116,3,106,4, + 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,142,1,0,0,115, + 6,0,0,0,0,3,10,1,16,2,122,17,77,111,100,117, + 108,101,83,112,101,99,46,112,97,114,101,110,116,99,1,0, + 0,0,0,0,0,0,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,150,1,0,0,115,2,0,0,0,0, + 2,122,23,77,111,100,117,108,101,83,112,101,99,46,104,97, + 115,95,108,111,99,97,116,105,111,110,99,2,0,0,0,0, + 0,0,0,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,154,1,0,0,115,2, + 0,0,0,0,2,41,12,114,1,0,0,0,114,0,0,0, + 0,114,2,0,0,0,114,3,0,0,0,114,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,58,1,0,0,115,32,0,0,0,8,1,4, + 36,4,1,2,255,12,12,8,10,8,12,2,1,10,8,4, + 1,10,3,2,1,10,7,2,1,10,3,4,1,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,159,1,0,0,115,36,0,0, + 0,0,2,10,1,8,1,4,1,6,2,8,1,12,1,12, + 1,6,1,2,255,6,3,8,1,10,1,2,1,14,1,12, + 1,10,3,4,2,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,185,1,0,0,115,72,0,0,0,0,2,2,1,10,1, + 12,1,6,2,8,1,4,2,6,1,8,1,2,1,10,1, + 12,2,6,1,2,1,10,1,12,1,10,1,8,1,8,1, + 2,1,10,1,12,1,10,2,4,1,2,1,10,1,12,1, + 10,1,2,1,14,1,12,1,10,2,14,1,20,1,6,1, + 6,1,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,210,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,206, + 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,206,124,0,106,19,100,0,117,1,144,1,114,206,122,12, + 124,0,106,19,124,1,95,20,87,0,110,20,4,0,116,3, + 144,1,121,204,1,0,1,0,1,0,89,0,110,2,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,230,1,0,0,115,96,0, + 0,0,0,4,20,1,2,1,12,1,12,1,6,2,20,1, + 6,1,8,2,10,1,8,1,4,1,6,2,10,1,8,1, + 6,11,6,1,2,1,10,1,12,1,6,2,20,1,2,1, + 12,1,12,1,6,2,2,1,10,1,12,1,6,2,24,1, + 12,1,2,1,12,1,14,1,6,2,8,1,24,1,2,1, + 12,1,14,1,6,2,24,1,12,1,2,1,12,1,14,1, + 6,1,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,46,2,0,0,115,18,0, + 0,0,0,3,4,1,12,3,14,1,12,1,8,2,8,1, + 10,1,10,1,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,63,2,0,0,115,16,0, + 0,0,0,3,20,1,10,1,10,1,10,2,14,2,6,1, + 14,2,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,250,0,0,0,124,0,106,0,125,2,116,1,124,2,131, + 1,143,216,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,110,16,49,0,115,236,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,80,2,0,0,115,38,0,0,0,0,2,6, + 1,10,1,16,1,10,1,12,1,2,1,10,1,10,1,14, + 2,16,2,14,1,12,4,14,2,14,4,14,1,14,255,14, + 1,44,1,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,20,1,0,0,122,18,124,0,106,0,160,1,124,0, + 106,2,161,1,1,0,87,0,110,52,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,116,6,124,1,100,1,100,0,131,3, - 100,0,117,0,114,146,122,12,124,0,106,0,124,1,95,7, - 87,0,110,18,4,0,116,8,121,144,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,222,122,40,124,1,106,9,124,1,95,10, - 116,11,124,1,100,3,131,2,115,200,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,220,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,16,122,10,124,0,124,1,95,13,87,0,110,20, - 4,0,116,8,144,1,121,14,1,0,1,0,1,0,89,0, - 110,2,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, - 110,2,0,0,115,54,0,0,0,0,4,2,1,18,1,6, - 1,12,1,14,1,12,1,8,3,14,1,12,1,16,1,2, - 1,12,1,12,1,6,1,16,1,2,4,8,1,10,1,22, - 1,12,1,6,1,18,1,2,1,10,1,14,1,6,1,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,224,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,166, - 124,1,116,5,106,6,124,0,106,7,60,0,122,52,124,0, - 106,0,100,0,117,0,114,96,124,0,106,8,100,0,117,0, - 114,108,116,9,100,3,124,0,106,7,100,4,141,2,130,1, - 110,12,124,0,106,0,160,10,124,1,161,1,1,0,87,0, - 110,48,1,0,1,0,1,0,122,14,116,5,106,6,124,0, - 106,7,61,0,87,0,110,18,4,0,116,11,121,150,1,0, - 1,0,1,0,89,0,110,2,48,0,130,0,89,0,110,2, - 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,110,8,100,6,124,0,95,4,48,0,124,1, - 83,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, + 124,0,106,2,60,0,130,0,89,0,110,2,48,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,146,122,12,124,0,106,0,124,1, + 95,7,87,0,110,18,4,0,116,8,121,144,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,222,122,40,124,1,106,9,124,1, + 95,10,116,11,124,1,100,3,131,2,115,200,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,220,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,16,122,10,124,0,124,1,95,13,87,0, + 110,20,4,0,116,8,144,1,121,14,1,0,1,0,1,0, + 89,0,110,2,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,110,2,0,0,115,54,0,0,0,0,4,2,1,18, + 1,6,1,12,1,14,1,12,1,8,3,14,1,12,1,16, + 1,2,1,12,1,12,1,6,1,16,1,2,4,8,1,10, + 1,22,1,12,1,6,1,18,1,2,1,10,1,14,1,6, + 1,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, + 216,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,52, + 124,0,106,0,100,0,117,0,114,96,124,0,106,8,100,0, + 117,0,114,108,116,9,100,3,124,0,106,7,100,4,141,2, + 130,1,110,12,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,150, + 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,110,8, + 100,6,124,0,95,4,48,0,124,1,83,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,147,2,0,0,115,44, + 0,0,0,0,2,10,2,12,1,8,2,8,5,6,1,2, + 1,12,1,2,1,10,1,10,1,16,3,16,1,6,1,2, + 1,14,1,12,1,6,6,14,1,12,1,18,2,16,2,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,41,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,189,2,0,0,115,4,0,0, + 0,0,9,12,1,114,95,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,7,100,10,100,11,132,0,131,1,90,10,101,7,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,4,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, + 41,3,114,1,0,0,0,114,161,0,0,0,114,139,0,0, + 0,41,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,215,2,0,0, + 115,2,0,0,0,0,7,122,27,66,117,105,108,116,105,110, + 73,109,112,111,114,116,101,114,46,109,111,100,117,108,101,95, + 114,101,112,114,78,99,4,0,0,0,0,0,0,0,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,224,2,0,0,115,10,0,0,0,0, + 2,8,1,4,1,10,1,16,2,122,25,66,117,105,108,116, + 105,110,73,109,112,111,114,116,101,114,46,102,105,110,100,95, + 115,112,101,99,99,3,0,0,0,0,0,0,0,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,168,0,0,0,114,110,0,0,0, + 41,4,114,165,0,0,0,114,82,0,0,0,114,166,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,233,2,0,0,115,4,0,0,0,0,9,12,1,122, + 27,66,117,105,108,116,105,110,73,109,112,111,114,116,101,114, + 46,102,105,110,100,95,109,111,100,117,108,101,99,2,0,0, + 0,0,0,0,0,0,0,0,0,2,0,0,0,4,0,0, + 0,67,0,0,0,115,46,0,0,0,124,1,106,0,116,1, + 106,2,118,1,114,34,116,3,100,1,160,4,124,1,106,0, + 161,1,124,1,106,0,100,2,141,2,130,1,116,5,116,6, + 106,7,124,1,131,2,83,0,41,3,122,24,67,114,101,97, + 116,101,32,97,32,98,117,105,108,116,45,105,110,32,109,111, + 100,117,108,101,114,78,0,0,0,114,16,0,0,0,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,41,2,114,30,0,0,0,114,96,0,0,0,114, + 10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,150, + 0,0,0,245,2,0,0,115,10,0,0,0,0,3,12,1, + 12,1,4,255,6,2,122,29,66,117,105,108,116,105,110,73, + 109,112,111,114,116,101,114,46,99,114,101,97,116,101,95,109, + 111,100,117,108,101,99,2,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,3,0,0,0,67,0,0,0,115,16, + 0,0,0,116,0,116,1,106,2,124,1,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,41,2,114,30,0,0,0,114, + 97,0,0,0,114,10,0,0,0,114,10,0,0,0,114,11, + 0,0,0,114,151,0,0,0,253,2,0,0,115,2,0,0, + 0,0,3,122,27,66,117,105,108,116,105,110,73,109,112,111, + 114,116,101,114,46,101,120,101,99,95,109,111,100,117,108,101, + 99,2,0,0,0,0,0,0,0,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,165,0,0,0,114,82,0,0, 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0, - 218,14,95,108,111,97,100,95,117,110,108,111,99,107,101,100, - 147,2,0,0,115,46,0,0,0,0,2,10,2,12,1,8, - 2,8,5,6,1,2,1,12,1,2,1,10,1,10,1,16, - 3,16,1,6,1,2,1,14,1,12,1,6,1,8,5,14, - 1,12,1,18,2,16,2,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,41,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, - 189,2,0,0,115,4,0,0,0,0,9,12,1,114,95,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,7,100,10,100,11,132,0, - 131,1,90,10,101,7,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, + 218,8,103,101,116,95,99,111,100,101,2,3,0,0,115,2, + 0,0,0,0,4,122,24,66,117,105,108,116,105,110,73,109, + 112,111,114,116,101,114,46,103,101,116,95,99,111,100,101,99, + 2,0,0,0,0,0,0,0,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,170,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,8,3,0,0,115,2,0,0,0,0,4,122,26, + 66,117,105,108,116,105,110,73,109,112,111,114,116,101,114,46, + 103,101,116,95,115,111,117,114,99,101,99,2,0,0,0,0, + 0,0,0,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,52, + 82,101,116,117,114,110,32,70,97,108,115,101,32,97,115,32, + 98,117,105,108,116,45,105,110,32,109,111,100,117,108,101,115, + 32,97,114,101,32,110,101,118,101,114,32,112,97,99,107,97, + 103,101,115,46,70,114,10,0,0,0,114,170,0,0,0,114, + 10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,116, + 0,0,0,14,3,0,0,115,2,0,0,0,0,4,122,26, + 66,117,105,108,116,105,110,73,109,112,111,114,116,101,114,46, + 105,115,95,112,97,99,107,97,103,101,41,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,168,0,0, + 0,114,169,0,0,0,114,150,0,0,0,114,151,0,0,0, + 114,87,0,0,0,114,171,0,0,0,114,172,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,161,0,0,0,204,2,0,0,115,44,0,0,0, + 8,2,4,7,4,2,2,1,10,8,2,1,12,8,2,1, + 12,11,2,1,10,7,2,1,10,4,2,1,2,1,12,4, + 2,1,2,1,12,4,2,1,2,1,12,4,114,161,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,7,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, @@ -1052,163 +1193,19 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 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, - 4,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,41,3,114,1,0,0,0,114, - 161,0,0,0,114,139,0,0,0,41,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,215,2,0,0,115,2,0,0,0,0,7,122, - 27,66,117,105,108,116,105,110,73,109,112,111,114,116,101,114, - 46,109,111,100,117,108,101,95,114,101,112,114,78,99,4,0, - 0,0,0,0,0,0,0,0,0,0,4,0,0,0,5,0, - 0,0,67,0,0,0,115,46,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,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,224,2,0,0,115,10,0,0,0,0,2,8,1,4, - 1,10,1,16,2,122,25,66,117,105,108,116,105,110,73,109, - 112,111,114,116,101,114,46,102,105,110,100,95,115,112,101,99, - 99,3,0,0,0,0,0,0,0,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,168,0,0,0,114,110,0,0,0,41,4,114,165, - 0,0,0,114,82,0,0,0,114,166,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,233,2, - 0,0,115,4,0,0,0,0,9,12,1,122,27,66,117,105, - 108,116,105,110,73,109,112,111,114,116,101,114,46,102,105,110, - 100,95,109,111,100,117,108,101,99,2,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,4,0,0,0,67,0,0, - 0,115,46,0,0,0,124,1,106,0,116,1,106,2,118,1, - 114,34,116,3,100,1,160,4,124,1,106,0,161,1,124,1, - 106,0,100,2,141,2,130,1,116,5,116,6,106,7,124,1, - 131,2,83,0,41,3,122,24,67,114,101,97,116,101,32,97, - 32,98,117,105,108,116,45,105,110,32,109,111,100,117,108,101, - 114,78,0,0,0,114,16,0,0,0,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,41, - 2,114,30,0,0,0,114,96,0,0,0,114,10,0,0,0, - 114,10,0,0,0,114,11,0,0,0,114,150,0,0,0,245, - 2,0,0,115,10,0,0,0,0,3,12,1,12,1,4,255, - 6,2,122,29,66,117,105,108,116,105,110,73,109,112,111,114, - 116,101,114,46,99,114,101,97,116,101,95,109,111,100,117,108, - 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,3,0,0,0,67,0,0,0,115,16,0,0,0,116, - 0,116,1,106,2,124,1,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,41,2,114,30,0,0,0,114,97,0,0,0, - 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,114, - 151,0,0,0,253,2,0,0,115,2,0,0,0,0,3,122, - 27,66,117,105,108,116,105,110,73,109,112,111,114,116,101,114, - 46,101,120,101,99,95,109,111,100,117,108,101,99,2,0,0, - 0,0,0,0,0,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,165,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,2,3,0,0,115,2,0,0,0,0, - 4,122,24,66,117,105,108,116,105,110,73,109,112,111,114,116, - 101,114,46,103,101,116,95,99,111,100,101,99,2,0,0,0, - 0,0,0,0,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, - 170,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,8, - 3,0,0,115,2,0,0,0,0,4,122,26,66,117,105,108, - 116,105,110,73,109,112,111,114,116,101,114,46,103,101,116,95, - 115,111,117,114,99,101,99,2,0,0,0,0,0,0,0,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,52,82,101,116,117, - 114,110,32,70,97,108,115,101,32,97,115,32,98,117,105,108, - 116,45,105,110,32,109,111,100,117,108,101,115,32,97,114,101, - 32,110,101,118,101,114,32,112,97,99,107,97,103,101,115,46, - 70,114,10,0,0,0,114,170,0,0,0,114,10,0,0,0, - 114,10,0,0,0,114,11,0,0,0,114,116,0,0,0,14, - 3,0,0,115,2,0,0,0,0,4,122,26,66,117,105,108, - 116,105,110,73,109,112,111,114,116,101,114,46,105,115,95,112, - 97,99,107,97,103,101,41,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,168,0,0,0,114,169,0, - 0,0,114,150,0,0,0,114,151,0,0,0,114,87,0,0, - 0,114,171,0,0,0,114,172,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,161, - 0,0,0,204,2,0,0,115,44,0,0,0,8,2,4,7, - 4,2,2,1,10,8,2,1,12,8,2,1,12,11,2,1, - 10,7,2,1,10,4,2,1,2,1,12,4,2,1,2,1, - 12,4,2,1,2,1,12,4,114,161,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,7,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,2,114,162,0,0,0,114,154,0,0,0,41, - 4,114,46,0,0,0,114,1,0,0,0,114,175,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,34,3, - 0,0,115,2,0,0,0,0,7,122,26,70,114,111,122,101, - 110,73,109,112,111,114,116,101,114,46,109,111,100,117,108,101, - 95,114,101,112,114,78,99,4,0,0,0,0,0,0,0,0, - 0,0,0,4,0,0,0,5,0,0,0,67,0,0,0,115, - 34,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, + 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,2,114,162,0,0,0,114,154, + 0,0,0,41,4,114,46,0,0,0,114,1,0,0,0,114, + 175,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,34,3,0,0,115,2,0,0,0,0,7,122,26,70, + 114,111,122,101,110,73,109,112,111,114,116,101,114,46,109,111, + 100,117,108,101,95,114,101,112,114,78,99,4,0,0,0,0, + 0,0,0,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,163,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,164,0,0,0,114,10,0,0,0,114,10,0,0,0, @@ -1379,11 +1376,11 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 100,95,115,112,101,99,95,108,101,103,97,99,121,124,3,0, 0,115,8,0,0,0,0,3,12,1,8,1,4,1,114,191, 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,32,1,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,230,125,5,116,7,131,0,143,94,1, + 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, @@ -1391,422 +1388,421 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 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,18,124,0,116,0,106, - 6,118,0,144,1,114,18,116,0,106,6,124,0,25,0,125, + 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,113,52,124,7,2,0,1,0,83,0,113,52,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,180,0,0,0,114,168,0,0,0, - 114,107,0,0,0,114,191,0,0,0,114,106,0,0,0,41, - 10,114,17,0,0,0,114,166,0,0,0,114,167,0,0,0, - 114,192,0,0,0,90,9,105,115,95,114,101,108,111,97,100, - 114,190,0,0,0,114,168,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,133,3,0,0,115,54,0,0,0,0,2,6, - 1,8,2,8,3,4,1,12,5,10,1,8,1,8,1,2, - 1,10,1,12,1,12,1,8,1,22,2,42,1,8,2,18, - 1,10,1,2,1,10,1,12,4,14,2,10,1,8,2,10, - 2,10,2,114,196,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,108,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,84,116,0,124,1,116,1, - 131,2,115,72,116,2,100,4,131,1,130,1,110,12,124,1, - 115,84,116,6,100,5,131,1,130,1,124,0,115,104,124,2, - 100,2,107,2,114,104,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,187,0,0,0,114,188, - 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,180,3,0,0,115,22,0,0,0,0,2,10,1,18,1, - 8,1,8,1,8,1,10,1,10,1,4,1,8,2,12,1, - 114,202,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, - 132,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,48,4, - 0,116,5,121,130,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,89,0,110,2,48,0,116, - 9,124,0,124,2,131,2,125,6,124,6,100,0,117,0,114, - 170,116,8,116,6,160,7,124,0,161,1,124,0,100,4,141, - 2,130,1,110,8,116,10,124,6,131,1,125,7,124,3,144, - 1,114,18,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,16,116,11,124, - 4,124,8,124,7,131,3,1,0,87,0,110,48,4,0,116, - 5,144,1,121,16,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,110,2,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,196,0,0,0,114,160,0,0,0, - 114,5,0,0,0,114,193,0,0,0,114,194,0,0,0,114, - 195,0,0,0,41,9,114,17,0,0,0,218,7,105,109,112, - 111,114,116,95,114,166,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,199,3,0,0,115, - 52,0,0,0,0,1,4,1,14,1,4,1,10,1,10,2, - 10,1,10,1,10,1,2,1,10,1,12,1,16,1,20,1, - 10,1,8,1,20,2,8,1,6,2,10,1,14,1,2,1, - 16,1,14,1,16,1,18,1,114,207,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,207, - 0,0,0,114,46,0,0,0,114,205,0,0,0,114,66,0, - 0,0,41,4,114,17,0,0,0,114,206,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,234,3,0,0,115,22,0,0,0, - 0,2,10,1,14,1,8,1,54,2,8,1,4,1,2,255, - 4,2,12,2,8,1,114,209,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,2,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,41,4,114,202,0,0,0,114,189,0, - 0,0,114,209,0,0,0,218,11,95,103,99,100,95,105,109, - 112,111,114,116,114,201,0,0,0,114,10,0,0,0,114,10, - 0,0,0,114,11,0,0,0,114,210,0,0,0,250,3,0, - 0,115,8,0,0,0,0,9,12,1,8,1,12,1,114,210, - 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,232,0,0,0,124,1, - 68,0,93,222,125,4,116,0,124,4,116,1,131,2,115,66, - 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,113,4, - 124,4,100,5,107,2,114,108,124,3,115,226,116,5,124,0, - 100,6,131,2,114,226,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,224,1,0,125,7,1,0,122,54, - 124,7,106,11,124,6,107,2,114,202,116,12,106,13,160,14, - 124,6,116,15,161,2,100,10,117,1,114,202,87,0,89,0, - 100,10,125,7,126,7,113,4,130,0,87,0,89,0,100,10, - 125,7,126,7,113,4,100,10,125,7,126,7,48,0,48,0, - 113,4,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,211,0,0, - 0,114,184,0,0,0,78,41,16,114,197,0,0,0,114,198, - 0,0,0,114,1,0,0,0,114,199,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,214,0,0,0,114,46, - 0,0,0,114,68,0,0,0,114,205,0,0,0,114,17,0, - 0,0,114,15,0,0,0,114,93,0,0,0,114,35,0,0, - 0,114,208,0,0,0,41,8,114,97,0,0,0,218,8,102, - 114,111,109,108,105,115,116,114,206,0,0,0,114,212,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,215,0,0,0,9, - 4,0,0,115,48,0,0,0,0,10,8,1,10,1,4,1, - 12,2,4,1,10,1,8,255,10,2,8,1,14,1,10,1, - 2,255,8,2,10,1,14,1,2,1,14,1,14,4,10,1, - 16,255,2,2,12,1,26,1,114,215,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,193,0,0, - 0,114,194,0,0,0,114,195,0,0,0,114,130,0,0,0, - 41,3,218,7,103,108,111,98,97,108,115,114,187,0,0,0, + 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,180,0,0,0,114,168,0,0,0,114,107,0,0, + 0,114,191,0,0,0,114,106,0,0,0,41,10,114,17,0, + 0,0,114,166,0,0,0,114,167,0,0,0,114,192,0,0, + 0,90,9,105,115,95,114,101,108,111,97,100,114,190,0,0, + 0,114,168,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, + 133,3,0,0,115,54,0,0,0,0,2,6,1,8,2,8, + 3,4,1,12,5,10,1,8,1,8,1,2,1,10,1,12, + 1,12,1,8,1,22,2,42,1,8,2,18,1,10,1,2, + 1,10,1,12,4,14,2,10,1,8,2,8,2,8,2,114, + 196,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,108,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,84,116,0,124,1,116,1,131,2,115,72, + 116,2,100,4,131,1,130,1,110,12,124,1,115,84,116,6, + 100,5,131,1,130,1,124,0,115,104,124,2,100,2,107,2, + 114,104,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,187,0,0,0,114,188,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,180,3,0, + 0,115,22,0,0,0,0,2,10,1,18,1,8,1,8,1, + 8,1,10,1,10,1,4,1,8,2,12,1,114,202,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,132,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,48,4,0,116,5,121, + 130,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,89,0,110,2,48,0,116,9,124,0,124, + 2,131,2,125,6,124,6,100,0,117,0,114,170,116,8,116, + 6,160,7,124,0,161,1,124,0,100,4,141,2,130,1,110, + 8,116,10,124,6,131,1,125,7,124,3,144,1,114,18,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,16,116,11,124,4,124,8,124, + 7,131,3,1,0,87,0,110,48,4,0,116,5,144,1,121, + 16,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,110,2,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,196,0,0,0,114,160,0,0,0,114,5,0,0, + 0,114,193,0,0,0,114,194,0,0,0,114,195,0,0,0, + 41,9,114,17,0,0,0,218,7,105,109,112,111,114,116,95, + 114,166,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,199,3,0,0,115,52,0,0,0, + 0,1,4,1,14,1,4,1,10,1,10,2,10,1,10,1, + 10,1,2,1,10,1,12,1,16,1,20,1,10,1,8,1, + 20,2,8,1,6,2,10,1,14,1,2,1,16,1,14,1, + 16,1,18,1,114,207,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,207,0,0,0,114, + 46,0,0,0,114,205,0,0,0,114,66,0,0,0,41,4, + 114,17,0,0,0,114,206,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,234,3,0,0,115,22,0,0,0,0,2,10,1, + 14,1,8,1,54,2,8,1,4,1,2,255,4,2,12,2, + 8,1,114,209,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,2,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,41,4,114,202,0,0,0,114,189,0,0,0,114,209, + 0,0,0,218,11,95,103,99,100,95,105,109,112,111,114,116, + 114,201,0,0,0,114,10,0,0,0,114,10,0,0,0,114, + 11,0,0,0,114,210,0,0,0,250,3,0,0,115,8,0, + 0,0,0,9,12,1,8,1,12,1,114,210,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,232,0,0,0,124,1,68,0,93,222, + 125,4,116,0,124,4,116,1,131,2,115,66,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,113,4,124,4,100,5, + 107,2,114,108,124,3,115,226,116,5,124,0,100,6,131,2, + 114,226,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,224,1,0,125,7,1,0,122,54,124,7,106,11, + 124,6,107,2,114,202,116,12,106,13,160,14,124,6,116,15, + 161,2,100,10,117,1,114,202,87,0,89,0,100,10,125,7, + 126,7,113,4,130,0,87,0,89,0,100,10,125,7,126,7, + 113,4,100,10,125,7,126,7,48,0,48,0,113,4,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,211,0,0,0,114,184,0, + 0,0,78,41,16,114,197,0,0,0,114,198,0,0,0,114, + 1,0,0,0,114,199,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,214,0,0,0,114,46,0,0,0,114, + 68,0,0,0,114,205,0,0,0,114,17,0,0,0,114,15, + 0,0,0,114,93,0,0,0,114,35,0,0,0,114,208,0, + 0,0,41,8,114,97,0,0,0,218,8,102,114,111,109,108, + 105,115,116,114,206,0,0,0,114,212,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,215,0,0,0,9,4,0,0,115, + 48,0,0,0,0,10,8,1,10,1,4,1,12,2,4,1, + 10,1,8,255,10,2,8,1,14,1,10,1,2,255,8,2, + 10,1,14,1,2,1,14,1,14,4,10,1,16,255,2,2, + 12,1,26,1,114,215,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,193,0,0,0,114,194,0, + 0,0,114,195,0,0,0,114,130,0,0,0,41,3,218,7, + 103,108,111,98,97,108,115,114,187,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,46,4,0,0,115,42,0,0,0,0,7,10,1, + 10,1,8,1,18,1,6,1,2,255,4,1,4,255,6,2, + 4,254,6,3,4,1,8,1,6,2,6,2,4,254,6,3, + 8,1,8,1,14,1,114,221,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,210,0,0, + 0,114,221,0,0,0,218,9,112,97,114,116,105,116,105,111, + 110,114,186,0,0,0,114,15,0,0,0,114,93,0,0,0, + 114,1,0,0,0,114,4,0,0,0,114,215,0,0,0,41, + 9,114,17,0,0,0,114,220,0,0,0,218,6,108,111,99, + 97,108,115,114,216,0,0,0,114,188,0,0,0,114,97,0, + 0,0,90,8,103,108,111,98,97,108,115,95,114,187,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,73,4,0,0,115,30,0,0,0,0,11, + 8,1,10,2,16,1,8,1,12,1,4,3,8,1,18,1, + 4,1,4,4,26,3,30,1,10,1,12,2,114,224,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,161,0,0,0,114,168,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,17,95,99,97,108,99,95,95,95,112,97, - 99,107,97,103,101,95,95,46,4,0,0,115,42,0,0,0, - 0,7,10,1,10,1,8,1,18,1,6,1,2,255,4,1, - 4,255,6,2,4,254,6,3,4,1,8,1,6,2,6,2, - 4,254,6,3,8,1,8,1,14,1,114,221,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,180,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,150,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,110,26,116,7,124,5,100,4,131,2, - 114,172,116,8,124,5,124,3,116,0,131,3,83,0,124,5, - 83,0,100,2,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,210,0,0,0,114,221,0,0,0, - 218,9,112,97,114,116,105,116,105,111,110,114,186,0,0,0, - 114,15,0,0,0,114,93,0,0,0,114,1,0,0,0,114, - 4,0,0,0,114,215,0,0,0,41,9,114,17,0,0,0, - 114,220,0,0,0,218,6,108,111,99,97,108,115,114,216,0, - 0,0,114,188,0,0,0,114,97,0,0,0,90,8,103,108, - 111,98,97,108,115,95,114,187,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,73, - 4,0,0,115,30,0,0,0,0,11,8,1,10,2,16,1, - 8,1,12,1,4,3,8,1,18,1,4,1,4,4,26,3, - 32,1,10,1,12,2,114,224,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, - 161,0,0,0,114,168,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,110,4,0,0,115,8,0,0,0,0,1,10,1,8, - 1,12,1,114,225,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,26,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,26,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,23,0,0, - 0,114,193,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,197,0,0,0,114,79, - 0,0,0,114,161,0,0,0,114,89,0,0,0,114,175,0, - 0,0,114,143,0,0,0,114,149,0,0,0,114,1,0,0, - 0,114,225,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,117,4,0,0,115,36,0, - 0,0,0,9,4,1,4,3,8,1,18,1,10,1,10,1, - 6,1,10,1,6,2,2,1,10,1,12,3,10,1,8,1, - 10,1,10,2,10,1,114,229,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,229,0,0,0,114,15,0,0,0, - 114,192,0,0,0,114,120,0,0,0,114,161,0,0,0,114, - 175,0,0,0,41,2,114,227,0,0,0,114,228,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,152,4,0,0,115,6,0, - 0,0,0,2,10,2,12,1,114,230,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,230,0,0,0,114,15,0,0,0,114,93,0,0,0, - 114,1,0,0,0,41,1,114,231,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,160,4,0,0,115,6,0,0, - 0,0,3,8,1,4,1,114,232,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,50,114,3,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,161,0,0, - 0,114,175,0,0,0,114,180,0,0,0,114,189,0,0,0, - 114,191,0,0,0,114,196,0,0,0,114,202,0,0,0,90, - 15,95,69,82,82,95,77,83,71,95,80,82,69,70,73,88, - 114,204,0,0,0,114,207,0,0,0,218,6,111,98,106,101, - 99,116,114,208,0,0,0,114,209,0,0,0,114,210,0,0, - 0,114,215,0,0,0,114,221,0,0,0,114,224,0,0,0, - 114,225,0,0,0,114,229,0,0,0,114,230,0,0,0,114, - 232,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,94,0,0,0,4,24,4,2,8, - 8,8,8,4,2,4,3,16,4,14,77,14,21,14,16,8, - 37,8,17,8,11,14,8,8,11,8,12,8,16,8,36,14, - 101,16,26,10,45,14,72,8,17,8,17,8,30,8,37,8, - 42,8,15,14,75,14,79,14,13,8,9,8,9,10,47,8, - 16,4,1,8,2,8,32,6,3,8,16,10,15,14,37,8, - 27,10,37,8,7,8,35,8,8, + 11,0,0,0,218,18,95,98,117,105,108,116,105,110,95,102, + 114,111,109,95,110,97,109,101,110,4,0,0,115,8,0,0, + 0,0,1,10,1,8,1,12,1,114,225,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,26,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,26,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,23,0,0,0,114,193,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, + 197,0,0,0,114,79,0,0,0,114,161,0,0,0,114,89, + 0,0,0,114,175,0,0,0,114,143,0,0,0,114,149,0, + 0,0,114,1,0,0,0,114,225,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,117, + 4,0,0,115,36,0,0,0,0,9,4,1,4,3,8,1, + 18,1,10,1,10,1,6,1,10,1,6,2,2,1,10,1, + 12,3,10,1,8,1,10,1,10,2,10,1,114,229,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,229,0,0, + 0,114,15,0,0,0,114,192,0,0,0,114,120,0,0,0, + 114,161,0,0,0,114,175,0,0,0,41,2,114,227,0,0, + 0,114,228,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,152, + 4,0,0,115,6,0,0,0,0,2,10,2,12,1,114,230, + 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,230,0,0,0,114,15,0,0, + 0,114,93,0,0,0,114,1,0,0,0,41,1,114,231,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,160,4, + 0,0,115,6,0,0,0,0,3,8,1,4,1,114,232,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, + 50,114,3,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,161,0,0,0,114,175,0,0,0,114,180,0,0, + 0,114,189,0,0,0,114,191,0,0,0,114,196,0,0,0, + 114,202,0,0,0,90,15,95,69,82,82,95,77,83,71,95, + 80,82,69,70,73,88,114,204,0,0,0,114,207,0,0,0, + 218,6,111,98,106,101,99,116,114,208,0,0,0,114,209,0, + 0,0,114,210,0,0,0,114,215,0,0,0,114,221,0,0, + 0,114,224,0,0,0,114,225,0,0,0,114,229,0,0,0, + 114,230,0,0,0,114,232,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,94,0,0, + 0,4,24,4,2,8,8,8,8,4,2,4,3,16,4,14, + 77,14,21,14,16,8,37,8,17,8,11,14,8,8,11,8, + 12,8,16,8,36,14,101,16,26,10,45,14,72,8,17,8, + 17,8,30,8,37,8,42,8,15,14,75,14,79,14,13,8, + 9,8,9,10,47,8,16,4,1,8,2,8,32,6,3,8, + 16,10,15,14,37,8,27,10,37,8,7,8,35,8,8, }; diff --git a/Python/importlib_external.h b/Python/importlib_external.h index a5a7c383d785e40..0ef1b45594fbf72 100644 --- a/Python/importlib_external.h +++ b/Python/importlib_external.h @@ -163,829 +163,828 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 95,112,97,116,104,95,106,111,105,110,62,0,0,0,115,6, 0,0,0,0,2,10,1,2,255,114,38,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, + 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,42,125,4,124,4,116,1, + 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,113,44,100,3,124,0,102,2,83,0,41,4,122,32, - 82,101,112,108,97,99,101,109,101,110,116,32,102,111,114,32, - 111,115,46,112,97,116,104,46,115,112,108,105,116,40,41,46, - 233,1,0,0,0,41,1,90,8,109,97,120,115,112,108,105, - 116,218,0,41,6,114,23,0,0,0,114,31,0,0,0,218, - 10,114,112,97,114,116,105,116,105,111,110,114,35,0,0,0, - 218,8,114,101,118,101,114,115,101,100,218,6,114,115,112,108, - 105,116,41,5,218,4,112,97,116,104,90,5,102,114,111,110, - 116,218,1,95,218,4,116,97,105,108,114,20,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,8,0,0,0,218,11, - 95,112,97,116,104,95,115,112,108,105,116,68,0,0,0,115, - 16,0,0,0,0,2,12,1,16,1,8,1,12,1,8,1, - 18,1,14,1,114,47,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,1,122,126,83,116,97,116,32,116,104,101,32,112,97, - 116,104,46,10,10,32,32,32,32,77,97,100,101,32,97,32, - 115,101,112,97,114,97,116,101,32,102,117,110,99,116,105,111, - 110,32,116,111,32,109,97,107,101,32,105,116,32,101,97,115, - 105,101,114,32,116,111,32,111,118,101,114,114,105,100,101,32, - 105,110,32,101,120,112,101,114,105,109,101,110,116,115,10,32, - 32,32,32,40,101,46,103,46,32,99,97,99,104,101,32,115, - 116,97,116,32,114,101,115,117,108,116,115,41,46,10,10,32, - 32,32,32,41,2,114,4,0,0,0,90,4,115,116,97,116, - 169,1,114,44,0,0,0,114,5,0,0,0,114,5,0,0, - 0,114,8,0,0,0,218,10,95,112,97,116,104,95,115,116, - 97,116,80,0,0,0,115,2,0,0,0,0,7,114,49,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,3,122,49,84,101,115,116,32,119,104,101,116,104,101,114, - 32,116,104,101,32,112,97,116,104,32,105,115,32,116,104,101, - 32,115,112,101,99,105,102,105,101,100,32,109,111,100,101,32, - 116,121,112,101,46,70,105,0,240,0,0,41,3,114,49,0, - 0,0,218,7,79,83,69,114,114,111,114,218,7,115,116,95, - 109,111,100,101,41,3,114,44,0,0,0,218,4,109,111,100, - 101,90,9,115,116,97,116,95,105,110,102,111,114,5,0,0, - 0,114,5,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,90, - 0,0,0,115,10,0,0,0,0,2,2,1,12,1,12,1, - 8,1,114,53,0,0,0,99,1,0,0,0,0,0,0,0, + 83,0,100,3,124,0,102,2,83,0,41,4,122,32,82,101, + 112,108,97,99,101,109,101,110,116,32,102,111,114,32,111,115, + 46,112,97,116,104,46,115,112,108,105,116,40,41,46,233,1, + 0,0,0,41,1,90,8,109,97,120,115,112,108,105,116,218, + 0,41,6,114,23,0,0,0,114,31,0,0,0,218,10,114, + 112,97,114,116,105,116,105,111,110,114,35,0,0,0,218,8, + 114,101,118,101,114,115,101,100,218,6,114,115,112,108,105,116, + 41,5,218,4,112,97,116,104,90,5,102,114,111,110,116,218, + 1,95,218,4,116,97,105,108,114,20,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,8,0,0,0,218,11,95,112, + 97,116,104,95,115,112,108,105,116,68,0,0,0,115,16,0, + 0,0,0,2,12,1,16,1,8,1,12,1,8,1,18,1, + 12,1,114,47,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, - 2,122,31,82,101,112,108,97,99,101,109,101,110,116,32,102, - 111,114,32,111,115,46,112,97,116,104,46,105,115,102,105,108, - 101,46,105,0,128,0,0,41,1,114,53,0,0,0,114,48, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, - 0,0,218,12,95,112,97,116,104,95,105,115,102,105,108,101, - 99,0,0,0,115,2,0,0,0,0,2,114,54,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,2,122,30,82,101,112,108,97,99,101,109, - 101,110,116,32,102,111,114,32,111,115,46,112,97,116,104,46, - 105,115,100,105,114,46,105,0,64,0,0,41,3,114,4,0, - 0,0,218,6,103,101,116,99,119,100,114,53,0,0,0,114, - 48,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, - 0,0,0,218,11,95,112,97,116,104,95,105,115,100,105,114, - 104,0,0,0,115,6,0,0,0,0,2,4,1,8,1,114, - 56,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,3,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,39, - 0,0,0,233,3,0,0,0,41,3,114,11,0,0,0,114, - 31,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,48,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,8,0,0,0,218,11, - 95,112,97,116,104,95,105,115,97,98,115,111,0,0,0,115, - 2,0,0,0,0,6,114,59,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,178,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,70, - 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,110,54,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, - 110,18,4,0,116,11,121,164,1,0,1,0,1,0,89,0, - 110,2,48,0,130,0,89,0,110,2,48,0,100,4,83,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,60,0, - 0,0,90,2,119,98,78,41,13,218,6,102,111,114,109,97, - 116,218,2,105,100,114,4,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,50,0,0,0,90,6,117, - 110,108,105,110,107,41,6,114,44,0,0,0,114,26,0,0, - 0,114,52,0,0,0,90,8,112,97,116,104,95,116,109,112, - 90,2,102,100,218,4,102,105,108,101,114,5,0,0,0,114, - 5,0,0,0,114,8,0,0,0,218,13,95,119,114,105,116, - 101,95,97,116,111,109,105,99,120,0,0,0,115,28,0,0, - 0,0,5,16,1,6,1,22,255,4,2,2,3,14,1,40, - 1,16,1,12,1,2,1,14,1,12,1,6,1,114,69,0, - 0,0,105,97,13,0,0,114,28,0,0,0,114,17,0,0, - 0,115,2,0,0,0,13,10,90,11,95,95,112,121,99,97, - 99,104,101,95,95,122,4,111,112,116,45,122,3,46,112,121, - 122,4,46,112,121,99,78,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, - 40,0,0,0,114,39,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,233,0,0,0,0,122,24,123,33,114,125,32,105,115, - 32,110,111,116,32,97,108,112,104,97,110,117,109,101,114,105, - 99,122,7,123,125,46,123,125,123,125,250,1,58,114,28,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,4,0,0,0,218,6,102,115,112,97,116, - 104,114,47,0,0,0,114,41,0,0,0,114,1,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,36,0,0,0,114,2,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,62, - 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,59,0,0, - 0,114,38,0,0,0,114,55,0,0,0,114,31,0,0,0, - 218,6,108,115,116,114,105,112,218,8,95,80,89,67,65,67, - 72,69,41,12,114,44,0,0,0,90,14,100,101,98,117,103, - 95,111,118,101,114,114,105,100,101,114,70,0,0,0,218,7, - 109,101,115,115,97,103,101,218,4,104,101,97,100,114,46,0, - 0,0,90,4,98,97,115,101,218,3,115,101,112,218,4,114, - 101,115,116,90,3,116,97,103,90,15,97,108,109,111,115,116, - 95,102,105,108,101,110,97,109,101,218,8,102,105,108,101,110, - 97,109,101,114,5,0,0,0,114,5,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,45,1,0,0,115,72,0,0,0,0,18, - 8,1,6,1,2,255,4,2,8,1,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,2,8,1,8,1,8,1,8,1,14,1,14,1, - 12,1,12,9,10,1,14,5,28,1,12,4,2,1,4,1, - 8,1,2,253,4,5,114,97,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,46,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,178,116,14,100,8,124, - 2,155,2,157,2,131,1,130,1,110,92,124,6,100,9,107, - 2,144,1,114,14,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,228,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,14,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,72,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,71,0,0,0,62,2,0,0,0,114, - 28,0,0,0,114,57,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,57,0,0,0,114,28,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,73,0,0,0,41,22,114,1,0,0,0,114,80, - 0,0,0,114,81,0,0,0,114,82,0,0,0,114,4,0, - 0,0,114,79,0,0,0,114,47,0,0,0,114,89,0,0, - 0,114,30,0,0,0,114,31,0,0,0,114,11,0,0,0, - 114,35,0,0,0,114,23,0,0,0,114,91,0,0,0,114, - 86,0,0,0,218,5,99,111,117,110,116,114,43,0,0,0, - 114,87,0,0,0,114,85,0,0,0,218,9,112,97,114,116, - 105,116,105,111,110,114,38,0,0,0,218,15,83,79,85,82, - 67,69,95,83,85,70,70,73,88,69,83,41,10,114,44,0, - 0,0,114,93,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,70,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,5,0,0,0,114,5,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,116,1,0,0,115,60,0,0,0,0, - 9,12,1,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,255,8, - 2,10,1,8,1,16,1,10,1,16,1,10,1,4,1,2, - 255,8,2,16,1,10,1,16,2,14,1,114,102,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,73,0,0,0,78, - 114,71,0,0,0,233,253,255,255,255,233,255,255,255,255,90, - 2,112,121,41,7,114,23,0,0,0,114,41,0,0,0,218, - 5,108,111,119,101,114,114,102,0,0,0,114,82,0,0,0, - 114,86,0,0,0,114,54,0,0,0,41,5,218,13,98,121, - 116,101,99,111,100,101,95,112,97,116,104,114,95,0,0,0, - 114,45,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,5,0, - 0,0,114,5,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,156,1,0, - 0,115,20,0,0,0,0,7,12,1,4,1,16,1,24,1, - 4,1,2,1,12,1,16,1,18,1,114,108,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,72,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,42,1,0,1, - 0,1,0,89,0,113,68,48,0,110,22,124,0,160,0,116, - 1,116,5,131,1,161,1,114,64,124,0,83,0,100,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,101,0,0,0, - 114,97,0,0,0,114,82,0,0,0,114,88,0,0,0,41, - 1,114,96,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,8,0,0,0,218,11,95,103,101,116,95,99,97,99,104, - 101,100,175,1,0,0,115,16,0,0,0,0,1,14,1,2, - 1,10,1,12,1,8,1,14,1,4,2,114,112,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,3,122,51,67,97,108,99,117,108,97,116,101,32,116,104, - 101,32,109,111,100,101,32,112,101,114,109,105,115,115,105,111, - 110,115,32,102,111,114,32,97,32,98,121,116,101,99,111,100, - 101,32,102,105,108,101,46,114,60,0,0,0,233,128,0,0, - 0,41,3,114,49,0,0,0,114,51,0,0,0,114,50,0, - 0,0,41,2,114,44,0,0,0,114,52,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,8,0,0,0,218,10,95, - 99,97,108,99,95,109,111,100,101,187,1,0,0,115,12,0, - 0,0,0,2,2,1,14,1,12,1,10,3,8,1,114,114, + 115,10,0,0,0,116,0,160,1,124,0,161,1,83,0,41, + 1,122,126,83,116,97,116,32,116,104,101,32,112,97,116,104, + 46,10,10,32,32,32,32,77,97,100,101,32,97,32,115,101, + 112,97,114,97,116,101,32,102,117,110,99,116,105,111,110,32, + 116,111,32,109,97,107,101,32,105,116,32,101,97,115,105,101, + 114,32,116,111,32,111,118,101,114,114,105,100,101,32,105,110, + 32,101,120,112,101,114,105,109,101,110,116,115,10,32,32,32, + 32,40,101,46,103,46,32,99,97,99,104,101,32,115,116,97, + 116,32,114,101,115,117,108,116,115,41,46,10,10,32,32,32, + 32,41,2,114,4,0,0,0,90,4,115,116,97,116,169,1, + 114,44,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 8,0,0,0,218,10,95,112,97,116,104,95,115,116,97,116, + 80,0,0,0,115,2,0,0,0,0,7,114,49,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,3, + 122,49,84,101,115,116,32,119,104,101,116,104,101,114,32,116, + 104,101,32,112,97,116,104,32,105,115,32,116,104,101,32,115, + 112,101,99,105,102,105,101,100,32,109,111,100,101,32,116,121, + 112,101,46,70,105,0,240,0,0,41,3,114,49,0,0,0, + 218,7,79,83,69,114,114,111,114,218,7,115,116,95,109,111, + 100,101,41,3,114,44,0,0,0,218,4,109,111,100,101,90, + 9,115,116,97,116,95,105,110,102,111,114,5,0,0,0,114, + 5,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,90,0,0, + 0,115,10,0,0,0,0,2,2,1,12,1,12,1,8,1, + 114,53,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,2,122, + 31,82,101,112,108,97,99,101,109,101,110,116,32,102,111,114, + 32,111,115,46,112,97,116,104,46,105,115,102,105,108,101,46, + 105,0,128,0,0,41,1,114,53,0,0,0,114,48,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, + 218,12,95,112,97,116,104,95,105,115,102,105,108,101,99,0, + 0,0,115,2,0,0,0,0,2,114,54,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,2,122,30,82,101,112,108,97,99,101,109,101,110, + 116,32,102,111,114,32,111,115,46,112,97,116,104,46,105,115, + 100,105,114,46,105,0,64,0,0,41,3,114,4,0,0,0, + 218,6,103,101,116,99,119,100,114,53,0,0,0,114,48,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,8,0,0, + 0,218,11,95,112,97,116,104,95,105,115,100,105,114,104,0, + 0,0,115,6,0,0,0,0,2,4,1,8,1,114,56,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,3,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,39,0,0, + 0,233,3,0,0,0,41,3,114,11,0,0,0,114,31,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,48,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,8,0,0,0,218,11,95,112, + 97,116,104,95,105,115,97,98,115,111,0,0,0,115,2,0, + 0,0,0,6,114,59,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,172,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,70,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,110,48,4,0,116,11,121,166,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,164,1,0,1,0,1,0,89,0,130,0, + 48,0,48,0,100,4,83,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,60,0,0,0,90,2,119,98,78,41, + 13,218,6,102,111,114,109,97,116,218,2,105,100,114,4,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,50,0,0,0,90,6,117,110,108,105,110,107,41,6,114, + 44,0,0,0,114,26,0,0,0,114,52,0,0,0,90,8, + 112,97,116,104,95,116,109,112,90,2,102,100,218,4,102,105, + 108,101,114,5,0,0,0,114,5,0,0,0,114,8,0,0, + 0,218,13,95,119,114,105,116,101,95,97,116,111,109,105,99, + 120,0,0,0,115,28,0,0,0,0,5,16,1,6,1,22, + 255,4,2,2,3,14,1,40,1,16,1,12,1,2,1,14, + 1,12,1,6,1,114,69,0,0,0,105,97,13,0,0,114, + 28,0,0,0,114,17,0,0,0,115,2,0,0,0,13,10, + 90,11,95,95,112,121,99,97,99,104,101,95,95,122,4,111, + 112,116,45,122,3,46,112,121,122,4,46,112,121,99,78,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,40,0,0,0,114,39,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,233,0,0,0,0,122, + 24,123,33,114,125,32,105,115,32,110,111,116,32,97,108,112, + 104,97,110,117,109,101,114,105,99,122,7,123,125,46,123,125, + 123,125,250,1,58,114,28,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,4,0,0, + 0,218,6,102,115,112,97,116,104,114,47,0,0,0,114,41, + 0,0,0,114,1,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,36,0,0,0,114,2,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,62,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,59,0,0,0,114,38,0,0,0,114,55, + 0,0,0,114,31,0,0,0,218,6,108,115,116,114,105,112, + 218,8,95,80,89,67,65,67,72,69,41,12,114,44,0,0, + 0,90,14,100,101,98,117,103,95,111,118,101,114,114,105,100, + 101,114,70,0,0,0,218,7,109,101,115,115,97,103,101,218, + 4,104,101,97,100,114,46,0,0,0,90,4,98,97,115,101, + 218,3,115,101,112,218,4,114,101,115,116,90,3,116,97,103, + 90,15,97,108,109,111,115,116,95,102,105,108,101,110,97,109, + 101,218,8,102,105,108,101,110,97,109,101,114,5,0,0,0, + 114,5,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,45,1,0, + 0,115,72,0,0,0,0,18,8,1,6,1,2,255,4,2, + 8,1,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,2,8,1,8,1, + 8,1,8,1,14,1,14,1,12,1,12,9,10,1,14,5, + 28,1,12,4,2,1,4,1,8,1,2,253,4,5,114,97, 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, - 3,0,0,0,8,0,0,0,3,0,0,0,115,66,0,0, - 0,100,6,135,0,102,1,100,2,100,3,132,9,125,1,122, - 10,116,0,106,1,125,2,87,0,110,26,4,0,116,2,121, - 50,1,0,1,0,1,0,100,4,100,5,132,0,125,2,89, - 0,110,2,48,0,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,116,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,116,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,5, - 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,207,1,0, - 0,115,18,0,0,0,0,1,8,1,8,1,10,1,4,1, - 8,255,2,1,2,255,6,2,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,67,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,8,0,0,0,218,5,95,119,114,97,112, - 218,1,0,0,115,8,0,0,0,0,1,8,1,10,1,20, - 1,122,26,95,99,104,101,99,107,95,110,97,109,101,46,60, - 108,111,99,97,108,115,62,46,95,119,114,97,112,41,1,78, - 41,3,218,10,95,98,111,111,116,115,116,114,97,112,114,133, - 0,0,0,218,9,78,97,109,101,69,114,114,111,114,41,3, - 114,122,0,0,0,114,123,0,0,0,114,133,0,0,0,114, - 5,0,0,0,114,121,0,0,0,114,8,0,0,0,218,11, - 95,99,104,101,99,107,95,110,97,109,101,199,1,0,0,115, - 14,0,0,0,0,8,14,7,2,1,10,1,12,2,14,5, - 10,1,114,136,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, - 73,0,0,0,41,6,218,11,102,105,110,100,95,108,111,97, - 100,101,114,114,23,0,0,0,114,75,0,0,0,114,76,0, - 0,0,114,62,0,0,0,218,13,73,109,112,111,114,116,87, - 97,114,110,105,110,103,41,5,114,118,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,5, - 0,0,0,114,5,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, - 227,1,0,0,115,10,0,0,0,0,10,14,1,16,1,4, - 1,22,1,114,143,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,16,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,134,0,0,0,218, - 16,95,118,101,114,98,111,115,101,95,109,101,115,115,97,103, - 101,114,117,0,0,0,114,23,0,0,0,218,8,69,79,70, - 69,114,114,111,114,114,27,0,0,0,41,6,114,26,0,0, - 0,114,116,0,0,0,218,11,101,120,99,95,100,101,116,97, - 105,108,115,90,5,109,97,103,105,99,114,92,0,0,0,114, - 2,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, - 0,0,0,218,13,95,99,108,97,115,115,105,102,121,95,112, - 121,99,244,1,0,0,115,28,0,0,0,0,16,12,1,8, - 1,16,1,12,1,16,1,12,1,10,1,12,1,8,1,16, - 2,8,1,16,1,16,1,114,152,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,146,0,0,0,233,12,0,0,0,114,15,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,144,0,0,0,78,114,145,0, - 0,0,41,4,114,27,0,0,0,114,134,0,0,0,114,149, - 0,0,0,114,117,0,0,0,41,6,114,26,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,116,0,0,0,114, - 151,0,0,0,114,92,0,0,0,114,5,0,0,0,114,5, - 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,21,2,0,0,115,16,0,0,0,0,19,24,1,10,1, - 12,1,16,1,8,1,22,255,2,2,114,156,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, + 10,0,0,0,5,0,0,0,67,0,0,0,115,46,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,178,116,14,100,8,124,2,155,2,157,2,131,1,130, + 1,110,92,124,6,100,9,107,2,144,1,114,14,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,228,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,14,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,72,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,71,0, + 0,0,62,2,0,0,0,114,28,0,0,0,114,57,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,57,0,0,0,114,28,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,73,0,0,0,41, + 22,114,1,0,0,0,114,80,0,0,0,114,81,0,0,0, + 114,82,0,0,0,114,4,0,0,0,114,79,0,0,0,114, + 47,0,0,0,114,89,0,0,0,114,30,0,0,0,114,31, + 0,0,0,114,11,0,0,0,114,35,0,0,0,114,23,0, + 0,0,114,91,0,0,0,114,86,0,0,0,218,5,99,111, + 117,110,116,114,43,0,0,0,114,87,0,0,0,114,85,0, + 0,0,218,9,112,97,114,116,105,116,105,111,110,114,38,0, + 0,0,218,15,83,79,85,82,67,69,95,83,85,70,70,73, + 88,69,83,41,10,114,44,0,0,0,114,93,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,70,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,5,0,0, + 0,114,5,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,116,1, + 0,0,115,60,0,0,0,0,9,12,1,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,255,8,2,10,1,8,1,16,1,10, + 1,16,1,10,1,4,1,2,255,8,2,16,1,10,1,16, + 2,14,1,114,102,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,73,0,0,0,78,114,71,0,0,0,233,253,255, + 255,255,233,255,255,255,255,90,2,112,121,41,7,114,23,0, + 0,0,114,41,0,0,0,218,5,108,111,119,101,114,114,102, + 0,0,0,114,82,0,0,0,114,86,0,0,0,114,54,0, + 0,0,41,5,218,13,98,121,116,101,99,111,100,101,95,112, + 97,116,104,114,95,0,0,0,114,45,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,5,0,0,0,114,5,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,156,1,0,0,115,20,0,0,0,0,7, + 12,1,4,1,16,1,24,1,4,1,2,1,12,1,16,1, + 18,1,114,108,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,70,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,42,1,0,1,0,1,0,89,0,110,24,48, + 0,124,0,160,0,116,1,116,5,131,1,161,1,114,62,124, + 0,83,0,100,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,101,0,0,0,114,97,0,0,0,114,82,0,0,0, + 114,88,0,0,0,41,1,114,96,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,8,0,0,0,218,11,95,103,101, + 116,95,99,97,99,104,101,100,175,1,0,0,115,16,0,0, + 0,0,1,14,1,2,1,10,1,12,1,6,1,14,1,4, + 2,114,112,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,3,122,51,67,97,108,99,117,108, + 97,116,101,32,116,104,101,32,109,111,100,101,32,112,101,114, + 109,105,115,115,105,111,110,115,32,102,111,114,32,97,32,98, + 121,116,101,99,111,100,101,32,102,105,108,101,46,114,60,0, + 0,0,233,128,0,0,0,41,3,114,49,0,0,0,114,51, + 0,0,0,114,50,0,0,0,41,2,114,44,0,0,0,114, + 52,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, + 0,0,0,218,10,95,99,97,108,99,95,109,111,100,101,187, + 1,0,0,115,12,0,0,0,0,2,2,1,14,1,12,1, + 10,3,8,1,114,114,0,0,0,99,1,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,0,8,0,0,0,3,0, + 0,0,115,66,0,0,0,100,6,135,0,102,1,100,2,100, + 3,132,9,125,1,122,10,116,0,106,1,125,2,87,0,110, + 26,4,0,116,2,121,50,1,0,1,0,1,0,100,4,100, + 5,132,0,125,2,89,0,110,2,48,0,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,116,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,116,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,5,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,207,1,0,0,115,18,0,0,0,0,1,8,1, + 8,1,10,1,4,1,8,255,2,1,2,255,6,2,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,67,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,218, + 5,95,119,114,97,112,218,1,0,0,115,8,0,0,0,0, + 1,8,1,10,1,20,1,122,26,95,99,104,101,99,107,95, + 110,97,109,101,46,60,108,111,99,97,108,115,62,46,95,119, + 114,97,112,41,1,78,41,3,218,10,95,98,111,111,116,115, + 116,114,97,112,114,133,0,0,0,218,9,78,97,109,101,69, + 114,114,111,114,41,3,114,122,0,0,0,114,123,0,0,0, + 114,133,0,0,0,114,5,0,0,0,114,121,0,0,0,114, + 8,0,0,0,218,11,95,99,104,101,99,107,95,110,97,109, + 101,199,1,0,0,115,14,0,0,0,0,8,14,7,2,1, + 10,1,12,2,14,5,10,1,114,136,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,73,0,0,0,41,6,218,11,102,105, + 110,100,95,108,111,97,100,101,114,114,23,0,0,0,114,75, + 0,0,0,114,76,0,0,0,114,62,0,0,0,218,13,73, + 109,112,111,114,116,87,97,114,110,105,110,103,41,5,114,118, + 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,5,0,0,0,114,5,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,227,1,0,0,115,10,0,0,0,0, + 10,14,1,16,1,4,1,22,1,114,143,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,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,146,0,0,0,114,145,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,117, - 0,0,0,41,4,114,26,0,0,0,218,11,115,111,117,114, - 99,101,95,104,97,115,104,114,116,0,0,0,114,151,0,0, - 0,114,5,0,0,0,114,5,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,49,2,0,0,115,12,0,0,0,0,17,16, - 1,2,1,8,255,4,2,2,254,114,158,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,80,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,100,2,83,0,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,116,0,0,0,114,44,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,134,0,0,0,114, - 149,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,117,0,0, - 0,114,62,0,0,0,41,5,114,26,0,0,0,114,116,0, - 0,0,114,106,0,0,0,114,107,0,0,0,218,4,99,111, - 100,101,114,5,0,0,0,114,5,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,73,2,0,0,115,18,0,0,0,0,2,10, - 1,10,1,12,1,8,1,12,1,4,2,10,1,4,255,114, - 165,0,0,0,114,73,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,2,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,73,0,0, - 0,41,6,218,9,98,121,116,101,97,114,114,97,121,114,148, - 0,0,0,218,6,101,120,116,101,110,100,114,21,0,0,0, - 114,160,0,0,0,218,5,100,117,109,112,115,41,4,114,164, - 0,0,0,218,5,109,116,105,109,101,114,155,0,0,0,114, - 26,0,0,0,114,5,0,0,0,114,5,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,86,2,0,0,115, - 12,0,0,0,0,2,8,1,14,1,14,1,14,1,16,1, - 114,170,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,3,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,39, - 0,0,0,114,146,0,0,0,41,7,114,166,0,0,0,114, - 148,0,0,0,114,167,0,0,0,114,21,0,0,0,114,23, - 0,0,0,114,160,0,0,0,114,168,0,0,0,41,5,114, - 164,0,0,0,114,157,0,0,0,90,7,99,104,101,99,107, - 101,100,114,26,0,0,0,114,2,0,0,0,114,5,0,0, - 0,114,5,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,96,2, - 0,0,115,14,0,0,0,0,2,8,1,12,1,14,1,16, - 1,10,1,16,1,114,171,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,73,0,0,0,78,84,41,7,218,8,116,111, - 107,101,110,105,122,101,114,64,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,172,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,5,0,0,0,114,5, - 0,0,0,114,8,0,0,0,218,13,100,101,99,111,100,101, - 95,115,111,117,114,99,101,107,2,0,0,115,10,0,0,0, - 0,5,8,1,12,1,10,1,12,1,114,176,0,0,0,169, - 2,114,140,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,12,1,0,0, - 124,1,100,1,117,0,114,58,100,2,125,1,116,0,124,2, - 100,3,131,2,114,68,122,14,124,2,160,1,124,0,161,1, - 125,1,87,0,113,68,4,0,116,2,121,54,1,0,1,0, - 1,0,89,0,113,68,48,0,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,104,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,222,122,14,124,2,160,13, - 124,0,161,1,125,7,87,0,110,18,4,0,116,2,121,202, - 1,0,1,0,1,0,89,0,113,222,48,0,124,7,114,222, - 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,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,73,0,0,0,41,17,114,128,0,0,0,114,179,0, - 0,0,114,117,0,0,0,114,4,0,0,0,114,79,0,0, - 0,114,134,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,110, - 0,0,0,114,111,0,0,0,114,140,0,0,0,218,9,95, - 80,79,80,85,76,65,84,69,114,182,0,0,0,114,178,0, - 0,0,114,47,0,0,0,218,6,97,112,112,101,110,100,41, - 9,114,116,0,0,0,90,8,108,111,99,97,116,105,111,110, - 114,140,0,0,0,114,178,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,182,0,0,0,90,7,100, - 105,114,110,97,109,101,114,5,0,0,0,114,5,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,124,2, - 0,0,115,62,0,0,0,0,12,8,4,4,1,10,2,2, - 1,14,1,12,1,8,2,10,8,16,1,6,3,8,1,14, - 1,14,1,10,1,6,1,6,2,4,3,8,2,10,1,2, - 1,14,1,12,1,6,2,4,1,8,2,6,1,12,1,6, - 1,12,1,12,2,114,190,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,80,0,0,0,101,0,90,1,100,0,90,2, - 100,1,90,3,100,2,90,4,100,3,90,5,100,4,90,6, - 101,7,100,5,100,6,132,0,131,1,90,8,101,7,100,7, - 100,8,132,0,131,1,90,9,101,7,100,14,100,10,100,11, - 132,1,131,1,90,10,101,7,100,15,100,12,100,13,132,1, - 131,1,90,11,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,70,99,2,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, - 122,16,116,0,160,1,116,0,106,2,124,1,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,1,161,2,6,0,89,0,83,0, - 48,0,100,0,83,0,114,109,0,0,0,41,5,218,6,119, + 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,16, + 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,134,0,0,0,218,16,95,118,101,114,98,111,115,101,95, + 109,101,115,115,97,103,101,114,117,0,0,0,114,23,0,0, + 0,218,8,69,79,70,69,114,114,111,114,114,27,0,0,0, + 41,6,114,26,0,0,0,114,116,0,0,0,218,11,101,120, + 99,95,100,101,116,97,105,108,115,90,5,109,97,103,105,99, + 114,92,0,0,0,114,2,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,8,0,0,0,218,13,95,99,108,97,115, + 115,105,102,121,95,112,121,99,244,1,0,0,115,28,0,0, + 0,0,16,12,1,8,1,16,1,12,1,16,1,12,1,10, + 1,12,1,8,1,16,2,8,1,16,1,16,1,114,152,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,146,0,0,0,233,12,0,0,0, + 114,15,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,144,0, + 0,0,78,114,145,0,0,0,41,4,114,27,0,0,0,114, + 134,0,0,0,114,149,0,0,0,114,117,0,0,0,41,6, + 114,26,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,116,0,0,0,114,151,0,0,0,114,92,0,0,0,114, + 5,0,0,0,114,5,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,21,2,0,0,115,16,0,0,0, + 0,19,24,1,10,1,12,1,16,1,8,1,22,255,2,2, + 114,156,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,146,0,0,0,114,145,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,117,0,0,0,41,4,114,26,0,0,0, + 218,11,115,111,117,114,99,101,95,104,97,115,104,114,116,0, + 0,0,114,151,0,0,0,114,5,0,0,0,114,5,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,49,2,0,0,115,12, + 0,0,0,0,17,16,1,2,1,8,255,4,2,2,254,114, + 158,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,80,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,100,2, + 83,0,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,116,0,0, + 0,114,44,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,134,0,0,0,114,149,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,117,0,0,0,114,62,0,0,0,41,5,114,26, + 0,0,0,114,116,0,0,0,114,106,0,0,0,114,107,0, + 0,0,218,4,99,111,100,101,114,5,0,0,0,114,5,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,73,2,0,0,115,18, + 0,0,0,0,2,10,1,10,1,12,1,8,1,12,1,4, + 2,10,1,4,255,114,165,0,0,0,114,73,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,2,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,73,0,0,0,41,6,218,9,98,121,116,101,97, + 114,114,97,121,114,148,0,0,0,218,6,101,120,116,101,110, + 100,114,21,0,0,0,114,160,0,0,0,218,5,100,117,109, + 112,115,41,4,114,164,0,0,0,218,5,109,116,105,109,101, + 114,155,0,0,0,114,26,0,0,0,114,5,0,0,0,114, + 5,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,86,2,0,0,115,12,0,0,0,0,2,8,1,14,1, + 14,1,14,1,16,1,114,170,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,3,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,39,0,0,0,114,146,0,0,0,41,7, + 114,166,0,0,0,114,148,0,0,0,114,167,0,0,0,114, + 21,0,0,0,114,23,0,0,0,114,160,0,0,0,114,168, + 0,0,0,41,5,114,164,0,0,0,114,157,0,0,0,90, + 7,99,104,101,99,107,101,100,114,26,0,0,0,114,2,0, + 0,0,114,5,0,0,0,114,5,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,96,2,0,0,115,14,0,0,0,0,2,8, + 1,12,1,14,1,16,1,10,1,16,1,114,171,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,73,0,0,0,78,84, + 41,7,218,8,116,111,107,101,110,105,122,101,114,64,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,172,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, + 5,0,0,0,114,5,0,0,0,114,8,0,0,0,218,13, + 100,101,99,111,100,101,95,115,111,117,114,99,101,107,2,0, + 0,115,10,0,0,0,0,5,8,1,12,1,10,1,12,1, + 114,176,0,0,0,169,2,114,140,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,10,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,150,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,102,124,5,124,0,124,1,131,2,125,2,124,2,124,4, + 95,11,1,0,113,150,113,102,100,1,83,0,124,3,116,12, + 117,0,114,214,116,0,124,2,100,6,131,2,114,220,122,14, + 124,2,160,13,124,0,161,1,125,7,87,0,110,18,4,0, + 116,2,121,200,1,0,1,0,1,0,89,0,110,20,48,0, + 124,7,114,220,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,6,124,1, + 144,1,114,6,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,73,0,0,0,41,17,114,128,0,0, + 0,114,179,0,0,0,114,117,0,0,0,114,4,0,0,0, + 114,79,0,0,0,114,134,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,110,0,0,0,114,111,0,0,0,114,140,0,0, + 0,218,9,95,80,79,80,85,76,65,84,69,114,182,0,0, + 0,114,178,0,0,0,114,47,0,0,0,218,6,97,112,112, + 101,110,100,41,9,114,116,0,0,0,90,8,108,111,99,97, + 116,105,111,110,114,140,0,0,0,114,178,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,182,0,0, + 0,90,7,100,105,114,110,97,109,101,114,5,0,0,0,114, + 5,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,124,2,0,0,115,62,0,0,0,0,12,8,4,4, + 1,10,2,2,1,14,1,12,1,6,2,10,8,16,1,6, + 3,8,1,14,1,14,1,10,1,6,1,6,2,4,3,8, + 2,10,1,2,1,14,1,12,1,6,2,4,1,8,2,6, + 1,12,1,6,1,12,1,12,2,114,190,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,80,0,0,0,101,0,90,1, + 100,0,90,2,100,1,90,3,100,2,90,4,100,3,90,5, + 100,4,90,6,101,7,100,5,100,6,132,0,131,1,90,8, + 101,7,100,7,100,8,132,0,131,1,90,9,101,7,100,14, + 100,10,100,11,132,1,131,1,90,10,101,7,100,15,100,12, + 100,13,132,1,131,1,90,11,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,70,99,2,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,16,116,0,160,1,116,0,106,2,124,1, + 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,1,161,2,6,0, + 89,0,83,0,48,0,114,109,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,50,0,0,0,90,18,72,75,69,89,95,76,79,67, @@ -1025,1666 +1024,1664 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 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,120,0, + 0,8,0,0,0,8,0,0,0,67,0,0,0,115,118,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,52,92,2,125,5,125,6,124,4,160,4,116,5,124,6, + 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,113,62,100,0,83,0,41,2,78,114,180,0, - 0,0,41,8,114,200,0,0,0,114,49,0,0,0,114,50, - 0,0,0,114,184,0,0,0,114,110,0,0,0,114,111,0, - 0,0,114,134,0,0,0,218,16,115,112,101,99,95,102,114, - 111,109,95,108,111,97,100,101,114,41,8,114,193,0,0,0, - 114,139,0,0,0,114,44,0,0,0,218,6,116,97,114,103, - 101,116,114,199,0,0,0,114,140,0,0,0,114,189,0,0, + 1,0,83,0,100,0,83,0,41,2,78,114,180,0,0,0, + 41,8,114,200,0,0,0,114,49,0,0,0,114,50,0,0, + 0,114,184,0,0,0,114,110,0,0,0,114,111,0,0,0, + 114,134,0,0,0,218,16,115,112,101,99,95,102,114,111,109, + 95,108,111,97,100,101,114,41,8,114,193,0,0,0,114,139, + 0,0,0,114,44,0,0,0,218,6,116,97,114,103,101,116, + 114,199,0,0,0,114,140,0,0,0,114,189,0,0,0,114, + 187,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, + 0,0,0,218,9,102,105,110,100,95,115,112,101,99,226,2, + 0,0,115,28,0,0,0,0,2,10,1,8,1,4,1,2, + 1,12,1,12,1,8,1,14,1,14,1,6,1,8,1,2, + 254,6,3,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,203,0,0,0,114,140,0,0,0,169,4,114, + 193,0,0,0,114,139,0,0,0,114,44,0,0,0,114,187, + 0,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, + 0,0,218,11,102,105,110,100,95,109,111,100,117,108,101,242, + 2,0,0,115,8,0,0,0,0,7,12,1,8,1,6,2, + 122,33,87,105,110,100,111,119,115,82,101,103,105,115,116,114, + 121,70,105,110,100,101,114,46,102,105,110,100,95,109,111,100, + 117,108,101,41,2,78,78,41,1,78,41,12,114,125,0,0, + 0,114,124,0,0,0,114,126,0,0,0,114,127,0,0,0, + 114,197,0,0,0,114,196,0,0,0,114,195,0,0,0,218, + 11,99,108,97,115,115,109,101,116,104,111,100,114,194,0,0, + 0,114,200,0,0,0,114,203,0,0,0,114,206,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 8,0,0,0,114,191,0,0,0,192,2,0,0,115,28,0, + 0,0,8,2,4,3,2,255,2,4,2,255,2,3,4,2, + 2,1,10,6,2,1,10,14,2,1,12,15,2,1,114,191, + 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,6,122,141,67,111,110,99,114,101,116, + 101,32,105,109,112,108,101,109,101,110,116,97,116,105,111,110, + 32,111,102,32,73,110,115,112,101,99,116,76,111,97,100,101, + 114,46,105,115,95,112,97,99,107,97,103,101,32,98,121,32, + 99,104,101,99,107,105,110,103,32,105,102,10,32,32,32,32, + 32,32,32,32,116,104,101,32,112,97,116,104,32,114,101,116, + 117,114,110,101,100,32,98,121,32,103,101,116,95,102,105,108, + 101,110,97,109,101,32,104,97,115,32,97,32,102,105,108,101, + 110,97,109,101,32,111,102,32,39,95,95,105,110,105,116,95, + 95,46,112,121,39,46,114,39,0,0,0,114,71,0,0,0, + 114,73,0,0,0,114,28,0,0,0,218,8,95,95,105,110, + 105,116,95,95,41,4,114,47,0,0,0,114,179,0,0,0, + 114,43,0,0,0,114,41,0,0,0,41,5,114,118,0,0, + 0,114,139,0,0,0,114,96,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,5,0,0,0,114,5,0,0,0,114, + 8,0,0,0,114,182,0,0,0,5,3,0,0,115,8,0, + 0,0,0,3,18,1,16,1,14,1,122,24,95,76,111,97, + 100,101,114,66,97,115,105,99,115,46,105,115,95,112,97,99, + 107,97,103,101,99,2,0,0,0,0,0,0,0,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,5,0,0,0,169,2,114,118,0,0, 0,114,187,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,8,0,0,0,218,9,102,105,110,100,95,115,112,101,99, - 226,2,0,0,115,28,0,0,0,0,2,10,1,8,1,4, - 1,2,1,12,1,12,1,8,1,14,1,14,1,6,1,8, - 1,2,254,6,3,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, - 34,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,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,203,0,0,0,114,140, - 0,0,0,169,4,114,193,0,0,0,114,139,0,0,0,114, - 44,0,0,0,114,187,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,8,0,0,0,218,11,102,105,110,100,95,109, - 111,100,117,108,101,242,2,0,0,115,8,0,0,0,0,7, - 12,1,8,1,6,2,122,33,87,105,110,100,111,119,115,82, - 101,103,105,115,116,114,121,70,105,110,100,101,114,46,102,105, - 110,100,95,109,111,100,117,108,101,41,2,78,78,41,1,78, - 41,12,114,125,0,0,0,114,124,0,0,0,114,126,0,0, - 0,114,127,0,0,0,114,197,0,0,0,114,196,0,0,0, - 114,195,0,0,0,218,11,99,108,97,115,115,109,101,116,104, - 111,100,114,194,0,0,0,114,200,0,0,0,114,203,0,0, - 0,114,206,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,5,0,0,0,114,8,0,0,0,114,191,0,0,0,192, - 2,0,0,115,28,0,0,0,8,2,4,3,2,255,2,4, - 2,255,2,3,4,2,2,1,10,6,2,1,10,14,2,1, - 12,15,2,1,114,191,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,6,122,141,67, - 111,110,99,114,101,116,101,32,105,109,112,108,101,109,101,110, - 116,97,116,105,111,110,32,111,102,32,73,110,115,112,101,99, - 116,76,111,97,100,101,114,46,105,115,95,112,97,99,107,97, - 103,101,32,98,121,32,99,104,101,99,107,105,110,103,32,105, - 102,10,32,32,32,32,32,32,32,32,116,104,101,32,112,97, - 116,104,32,114,101,116,117,114,110,101,100,32,98,121,32,103, - 101,116,95,102,105,108,101,110,97,109,101,32,104,97,115,32, - 97,32,102,105,108,101,110,97,109,101,32,111,102,32,39,95, - 95,105,110,105,116,95,95,46,112,121,39,46,114,39,0,0, - 0,114,71,0,0,0,114,73,0,0,0,114,28,0,0,0, - 218,8,95,95,105,110,105,116,95,95,41,4,114,47,0,0, - 0,114,179,0,0,0,114,43,0,0,0,114,41,0,0,0, - 41,5,114,118,0,0,0,114,139,0,0,0,114,96,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,5,0,0,0, - 114,5,0,0,0,114,8,0,0,0,114,182,0,0,0,5, - 3,0,0,115,8,0,0,0,0,3,18,1,16,1,14,1, - 122,24,95,76,111,97,100,101,114,66,97,115,105,99,115,46, - 105,115,95,112,97,99,107,97,103,101,99,2,0,0,0,0, + 114,8,0,0,0,218,13,99,114,101,97,116,101,95,109,111, + 100,117,108,101,13,3,0,0,115,2,0,0,0,0,1,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,125,0,0, + 0,114,117,0,0,0,114,62,0,0,0,114,134,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,131,0,0,0,41,3,114,118,0,0,0,218,6,109, + 111,100,117,108,101,114,164,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,8,0,0,0,218,11,101,120,101,99,95, + 109,111,100,117,108,101,16,3,0,0,115,12,0,0,0,0, + 2,12,1,8,1,6,1,4,255,6,2,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,1,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,41,2, + 114,134,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,118,0,0,0,114, + 139,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, + 0,0,0,218,11,108,111,97,100,95,109,111,100,117,108,101, + 24,3,0,0,115,2,0,0,0,0,2,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,125,0,0,0,114,124, + 0,0,0,114,126,0,0,0,114,127,0,0,0,114,182,0, + 0,0,114,212,0,0,0,114,217,0,0,0,114,220,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,8,0,0,0,114,208,0,0,0,0,3,0,0,115,10, + 0,0,0,8,2,4,3,8,8,8,3,8,8,114,208,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,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,5,0,0,0, - 169,2,114,118,0,0,0,114,187,0,0,0,114,5,0,0, - 0,114,5,0,0,0,114,8,0,0,0,218,13,99,114,101, - 97,116,101,95,109,111,100,117,108,101,13,3,0,0,115,2, - 0,0,0,0,1,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,125,0,0,0,114,117,0,0,0,114,62,0,0, - 0,114,134,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,131,0,0,0,41,3,114,118, - 0,0,0,218,6,109,111,100,117,108,101,114,164,0,0,0, - 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,218, - 11,101,120,101,99,95,109,111,100,117,108,101,16,3,0,0, - 115,12,0,0,0,0,2,12,1,8,1,6,1,4,255,6, - 2,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,115,8,0,0,0,116,0,130,1,100,1,83,0, + 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,50,0,0, + 0,169,2,114,118,0,0,0,114,44,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,8,0,0,0,218,10,112,97, + 116,104,95,109,116,105,109,101,31,3,0,0,115,2,0,0, + 0,0,6,122,23,83,111,117,114,99,101,76,111,97,100,101, + 114,46,112,97,116,104,95,109,116,105,109,101,99,2,0,0, 0,0,0,0,0,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,1,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,41,2,114,134,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,118,0,0,0,114,139,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,8,0,0,0,218,11,108,111,97,100,95, - 109,111,100,117,108,101,24,3,0,0,115,2,0,0,0,0, - 2,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, - 125,0,0,0,114,124,0,0,0,114,126,0,0,0,114,127, - 0,0,0,114,182,0,0,0,114,212,0,0,0,114,217,0, - 0,0,114,220,0,0,0,114,5,0,0,0,114,5,0,0, - 0,114,5,0,0,0,114,8,0,0,0,114,208,0,0,0, - 0,3,0,0,115,10,0,0,0,8,2,4,3,8,8,8, - 3,8,8,114,208,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,8,0,0,0,116,0, - 130,1,100,1,83,0,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,50,0,0,0,169,2,114,118,0,0,0,114,44, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, - 0,0,218,10,112,97,116,104,95,109,116,105,109,101,31,3, - 0,0,115,2,0,0,0,0,6,122,23,83,111,117,114,99, - 101,76,111,97,100,101,114,46,112,97,116,104,95,109,116,105, - 109,101,99,2,0,0,0,0,0,0,0,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,2, - 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,169,0,0,0,41,1,114,223,0,0,0,114, - 222,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, - 0,0,0,218,10,112,97,116,104,95,115,116,97,116,115,39, - 3,0,0,115,2,0,0,0,0,12,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,1,122, - 228,79,112,116,105,111,110,97,108,32,109,101,116,104,111,100, - 32,119,104,105,99,104,32,119,114,105,116,101,115,32,100,97, - 116,97,32,40,98,121,116,101,115,41,32,116,111,32,97,32, - 102,105,108,101,32,112,97,116,104,32,40,97,32,115,116,114, - 41,46,10,10,32,32,32,32,32,32,32,32,73,109,112,108, - 101,109,101,110,116,105,110,103,32,116,104,105,115,32,109,101, - 116,104,111,100,32,97,108,108,111,119,115,32,102,111,114,32, - 116,104,101,32,119,114,105,116,105,110,103,32,111,102,32,98, - 121,116,101,99,111,100,101,32,102,105,108,101,115,46,10,10, - 32,32,32,32,32,32,32,32,84,104,101,32,115,111,117,114, - 99,101,32,112,97,116,104,32,105,115,32,110,101,101,100,101, - 100,32,105,110,32,111,114,100,101,114,32,116,111,32,99,111, - 114,114,101,99,116,108,121,32,116,114,97,110,115,102,101,114, - 32,112,101,114,109,105,115,115,105,111,110,115,10,32,32,32, - 32,32,32,32,32,41,1,218,8,115,101,116,95,100,97,116, - 97,41,4,114,118,0,0,0,114,107,0,0,0,90,10,99, - 97,99,104,101,95,112,97,116,104,114,26,0,0,0,114,5, - 0,0,0,114,5,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,53,3, - 0,0,115,2,0,0,0,0,8,122,28,83,111,117,114,99, - 101,76,111,97,100,101,114,46,95,99,97,99,104,101,95,98, - 121,116,101,99,111,100,101,99,3,0,0,0,0,0,0,0, - 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,5,0,0,0,41,3,114,118,0,0,0, - 114,44,0,0,0,114,26,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,8,0,0,0,114,225,0,0,0,63,3, - 0,0,115,2,0,0,0,0,1,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,84,0,0,0,124,0, - 160,0,124,1,161,1,125,2,122,14,124,0,160,1,124,2, - 161,1,125,3,87,0,110,50,4,0,116,2,121,74,1,0, - 125,4,1,0,122,26,116,3,100,1,124,1,100,2,141,2, - 124,4,130,2,87,0,89,0,100,3,125,4,126,4,110,10, - 100,3,125,4,126,4,48,0,48,0,116,4,124,3,131,1, - 83,0,41,4,122,52,67,111,110,99,114,101,116,101,32,105, + 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,2,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,169,0, + 0,0,41,1,114,223,0,0,0,114,222,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,8,0,0,0,218,10,112, + 97,116,104,95,115,116,97,116,115,39,3,0,0,115,2,0, + 0,0,0,12,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,1,122,228,79,112,116,105,111, + 110,97,108,32,109,101,116,104,111,100,32,119,104,105,99,104, + 32,119,114,105,116,101,115,32,100,97,116,97,32,40,98,121, + 116,101,115,41,32,116,111,32,97,32,102,105,108,101,32,112, + 97,116,104,32,40,97,32,115,116,114,41,46,10,10,32,32, + 32,32,32,32,32,32,73,109,112,108,101,109,101,110,116,105, + 110,103,32,116,104,105,115,32,109,101,116,104,111,100,32,97, + 108,108,111,119,115,32,102,111,114,32,116,104,101,32,119,114, + 105,116,105,110,103,32,111,102,32,98,121,116,101,99,111,100, + 101,32,102,105,108,101,115,46,10,10,32,32,32,32,32,32, + 32,32,84,104,101,32,115,111,117,114,99,101,32,112,97,116, + 104,32,105,115,32,110,101,101,100,101,100,32,105,110,32,111, + 114,100,101,114,32,116,111,32,99,111,114,114,101,99,116,108, + 121,32,116,114,97,110,115,102,101,114,32,112,101,114,109,105, + 115,115,105,111,110,115,10,32,32,32,32,32,32,32,32,41, + 1,218,8,115,101,116,95,100,97,116,97,41,4,114,118,0, + 0,0,114,107,0,0,0,90,10,99,97,99,104,101,95,112, + 97,116,104,114,26,0,0,0,114,5,0,0,0,114,5,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,53,3,0,0,115,2,0,0, + 0,0,8,122,28,83,111,117,114,99,101,76,111,97,100,101, + 114,46,95,99,97,99,104,101,95,98,121,116,101,99,111,100, + 101,99,3,0,0,0,0,0,0,0,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,5, + 0,0,0,41,3,114,118,0,0,0,114,44,0,0,0,114, + 26,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, + 0,0,0,114,225,0,0,0,63,3,0,0,115,2,0,0, + 0,0,1,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,84,0,0,0,124,0,160,0,124,1,161,1, + 125,2,122,14,124,0,160,1,124,2,161,1,125,3,87,0, + 110,50,4,0,116,2,121,74,1,0,125,4,1,0,122,26, + 116,3,100,1,124,1,100,2,141,2,124,4,130,2,87,0, + 89,0,100,3,125,4,126,4,110,10,100,3,125,4,126,4, + 48,0,48,0,116,4,124,3,131,1,83,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,115,0, + 0,0,78,41,5,114,179,0,0,0,218,8,103,101,116,95, + 100,97,116,97,114,50,0,0,0,114,117,0,0,0,114,176, + 0,0,0,41,5,114,118,0,0,0,114,139,0,0,0,114, + 44,0,0,0,114,174,0,0,0,218,3,101,120,99,114,5, + 0,0,0,114,5,0,0,0,114,8,0,0,0,218,10,103, + 101,116,95,115,111,117,114,99,101,70,3,0,0,115,20,0, + 0,0,0,2,10,1,2,1,14,1,14,1,4,1,2,255, + 4,1,2,255,24,2,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, + 104,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,4,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,215,0,0,0, + 84,41,2,218,12,100,111,110,116,95,105,110,104,101,114,105, + 116,114,83,0,0,0,41,3,114,134,0,0,0,114,214,0, + 0,0,218,7,99,111,109,112,105,108,101,41,4,114,118,0, + 0,0,114,26,0,0,0,114,44,0,0,0,114,230,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, + 218,14,115,111,117,114,99,101,95,116,111,95,99,111,100,101, + 80,3,0,0,115,6,0,0,0,0,5,12,1,4,255,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,24,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,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,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,18,124,0,160,26,124,2,124,8, + 124,10,161,3,1,0,87,0,110,20,4,0,116,2,144,2, + 121,18,1,0,1,0,1,0,89,0,110,2,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,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,115,0,0,0,78,41,5,114,179,0,0,0, - 218,8,103,101,116,95,100,97,116,97,114,50,0,0,0,114, - 117,0,0,0,114,176,0,0,0,41,5,114,118,0,0,0, - 114,139,0,0,0,114,44,0,0,0,114,174,0,0,0,218, - 3,101,120,99,114,5,0,0,0,114,5,0,0,0,114,8, - 0,0,0,218,10,103,101,116,95,115,111,117,114,99,101,70, - 3,0,0,115,20,0,0,0,0,2,10,1,2,1,14,1, - 14,1,4,1,2,255,4,1,2,255,24,2,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,104,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,4,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,215,0,0,0,84,41,2,218,12,100,111,110,116,95, - 105,110,104,101,114,105,116,114,83,0,0,0,41,3,114,134, - 0,0,0,114,214,0,0,0,218,7,99,111,109,112,105,108, - 101,41,4,114,118,0,0,0,114,26,0,0,0,114,44,0, - 0,0,114,230,0,0,0,114,5,0,0,0,114,5,0,0, - 0,114,8,0,0,0,218,14,115,111,117,114,99,101,95,116, - 111,95,99,111,100,101,80,3,0,0,115,6,0,0,0,0, - 5,12,1,4,255,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,24,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,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,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,18,124,0, - 160,26,124,2,124,8,124,10,161,3,1,0,87,0,110,20, - 4,0,116,2,144,2,121,18,1,0,1,0,1,0,89,0, - 110,2,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,169,0, - 0,0,114,159,0,0,0,114,145,0,0,0,114,39,0,0, - 0,114,73,0,0,0,114,28,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,116,0,0,0,114,106,0,0,0,114,107,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,179,0,0,0,114,97,0,0, - 0,114,82,0,0,0,114,224,0,0,0,114,50,0,0,0, - 114,18,0,0,0,114,227,0,0,0,114,152,0,0,0,218, - 10,109,101,109,111,114,121,118,105,101,119,114,163,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,157,0,0,0,218,17,95,82, - 65,87,95,77,65,71,73,67,95,78,85,77,66,69,82,114, - 158,0,0,0,114,156,0,0,0,114,117,0,0,0,114,150, - 0,0,0,114,134,0,0,0,114,149,0,0,0,114,165,0, - 0,0,114,233,0,0,0,114,1,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,171,0,0,0,114,170,0,0,0,114,23,0,0,0, - 114,226,0,0,0,41,15,114,118,0,0,0,114,139,0,0, - 0,114,107,0,0,0,114,154,0,0,0,114,174,0,0,0, - 114,157,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, - 106,0,0,0,218,2,115,116,114,26,0,0,0,114,151,0, - 0,0,114,2,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, + 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,169,0,0,0,114,159,0,0, + 0,114,145,0,0,0,114,39,0,0,0,114,73,0,0,0, + 114,28,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,116,0,0,0, + 114,106,0,0,0,114,107,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,179,0,0,0,114,97,0,0,0,114,82,0,0,0, + 114,224,0,0,0,114,50,0,0,0,114,18,0,0,0,114, + 227,0,0,0,114,152,0,0,0,218,10,109,101,109,111,114, + 121,118,105,101,119,114,163,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,157,0,0,0,218,17,95,82,65,87,95,77,65,71, + 73,67,95,78,85,77,66,69,82,114,158,0,0,0,114,156, + 0,0,0,114,117,0,0,0,114,150,0,0,0,114,134,0, + 0,0,114,149,0,0,0,114,165,0,0,0,114,233,0,0, + 0,114,1,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,171,0,0,0, + 114,170,0,0,0,114,23,0,0,0,114,226,0,0,0,41, + 15,114,118,0,0,0,114,139,0,0,0,114,107,0,0,0, + 114,154,0,0,0,114,174,0,0,0,114,157,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,106,0,0,0,218,2, + 115,116,114,26,0,0,0,114,151,0,0,0,114,2,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,5,0,0,0,114, + 5,0,0,0,114,8,0,0,0,114,213,0,0,0,88,3, + 0,0,115,152,0,0,0,0,7,10,1,4,1,4,1,4, + 1,4,1,4,1,2,1,12,1,12,1,12,2,2,1,14, + 1,12,1,8,2,12,1,2,1,14,1,12,1,6,3,2, + 1,2,254,6,4,2,1,12,1,16,1,12,1,6,1,12, + 1,12,1,2,255,2,2,8,254,4,3,10,1,4,1,2, + 1,2,254,4,4,8,1,2,255,6,3,2,1,2,1,2, + 1,6,1,2,1,2,251,8,7,18,1,6,2,8,1,2, + 255,4,2,6,1,2,1,2,254,6,3,10,1,10,1,12, + 1,12,1,18,1,6,255,4,2,6,1,10,1,10,1,14, + 2,6,1,6,255,4,2,2,1,18,1,14,1,6,1,122, + 21,83,111,117,114,99,101,76,111,97,100,101,114,46,103,101, + 116,95,99,111,100,101,78,41,10,114,125,0,0,0,114,124, + 0,0,0,114,126,0,0,0,114,223,0,0,0,114,224,0, + 0,0,114,226,0,0,0,114,225,0,0,0,114,229,0,0, + 0,114,233,0,0,0,114,213,0,0,0,114,5,0,0,0, 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,114, - 213,0,0,0,88,3,0,0,115,152,0,0,0,0,7,10, - 1,4,1,4,1,4,1,4,1,4,1,2,1,12,1,12, - 1,12,2,2,1,14,1,12,1,8,2,12,1,2,1,14, - 1,12,1,6,3,2,1,2,254,6,4,2,1,12,1,16, - 1,12,1,6,1,12,1,12,1,2,255,2,2,8,254,4, - 3,10,1,4,1,2,1,2,254,4,4,8,1,2,255,6, - 3,2,1,2,1,2,1,6,1,2,1,2,251,8,7,18, - 1,6,2,8,1,2,255,4,2,6,1,2,1,2,254,6, - 3,10,1,10,1,12,1,12,1,18,1,6,255,4,2,6, - 1,10,1,10,1,14,2,6,1,6,255,4,2,2,1,18, - 1,14,1,6,1,122,21,83,111,117,114,99,101,76,111,97, - 100,101,114,46,103,101,116,95,99,111,100,101,78,41,10,114, - 125,0,0,0,114,124,0,0,0,114,126,0,0,0,114,223, - 0,0,0,114,224,0,0,0,114,226,0,0,0,114,225,0, - 0,0,114,229,0,0,0,114,233,0,0,0,114,213,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,8,0,0,0,114,221,0,0,0,29,3,0,0,115,14, - 0,0,0,8,2,8,8,8,14,8,10,8,7,8,10,14, - 8,114,221,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,159,0,0,0,41,3,114,118,0,0, - 0,114,139,0,0,0,114,44,0,0,0,114,5,0,0,0, - 114,5,0,0,0,114,8,0,0,0,114,209,0,0,0,178, - 3,0,0,115,4,0,0,0,0,3,6,1,122,19,70,105, - 108,101,76,111,97,100,101,114,46,95,95,105,110,105,116,95, - 95,99,2,0,0,0,0,0,0,0,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,109,0,0,0,169,2,218,9, - 95,95,99,108,97,115,115,95,95,114,131,0,0,0,169,2, - 114,118,0,0,0,90,5,111,116,104,101,114,114,5,0,0, - 0,114,5,0,0,0,114,8,0,0,0,218,6,95,95,101, - 113,95,95,184,3,0,0,115,6,0,0,0,0,1,12,1, - 10,255,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,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,109,0,0,0,169,3,218,4, - 104,97,115,104,114,116,0,0,0,114,44,0,0,0,169,1, - 114,118,0,0,0,114,5,0,0,0,114,5,0,0,0,114, - 8,0,0,0,218,8,95,95,104,97,115,104,95,95,188,3, - 0,0,115,2,0,0,0,0,1,122,19,70,105,108,101,76, - 111,97,100,101,114,46,95,95,104,97,115,104,95,95,99,2, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3, - 0,0,0,3,0,0,0,115,16,0,0,0,116,0,116,1, - 124,0,131,2,160,2,124,1,161,1,83,0,41,1,122,100, - 76,111,97,100,32,97,32,109,111,100,117,108,101,32,102,114, - 111,109,32,97,32,102,105,108,101,46,10,10,32,32,32,32, - 32,32,32,32,84,104,105,115,32,109,101,116,104,111,100,32, - 105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,32, - 85,115,101,32,101,120,101,99,95,109,111,100,117,108,101,40, - 41,32,105,110,115,116,101,97,100,46,10,10,32,32,32,32, - 32,32,32,32,41,3,218,5,115,117,112,101,114,114,239,0, - 0,0,114,220,0,0,0,114,219,0,0,0,169,1,114,241, - 0,0,0,114,5,0,0,0,114,8,0,0,0,114,220,0, - 0,0,191,3,0,0,115,2,0,0,0,0,10,122,22,70, - 105,108,101,76,111,97,100,101,114,46,108,111,97,100,95,109, - 111,100,117,108,101,99,2,0,0,0,0,0,0,0,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,169,1,122,58,82,101,116, - 117,114,110,32,116,104,101,32,112,97,116,104,32,116,111,32, - 116,104,101,32,115,111,117,114,99,101,32,102,105,108,101,32, - 97,115,32,102,111,117,110,100,32,98,121,32,116,104,101,32, - 102,105,110,100,101,114,46,114,48,0,0,0,114,219,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, - 114,179,0,0,0,203,3,0,0,115,2,0,0,0,0,3, - 122,23,70,105,108,101,76,111,97,100,101,114,46,103,101,116, - 95,102,105,108,101,110,97,109,101,99,2,0,0,0,0,0, - 0,0,0,0,0,0,3,0,0,0,8,0,0,0,67,0, - 0,0,115,126,0,0,0,116,0,124,0,116,1,116,2,102, - 2,131,2,114,70,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,110,52,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,112,48,0,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,101,115,46, - 78,218,1,114,41,8,114,161,0,0,0,114,221,0,0,0, - 218,19,69,120,116,101,110,115,105,111,110,70,105,108,101,76, - 111,97,100,101,114,114,64,0,0,0,90,9,111,112,101,110, - 95,99,111,100,101,114,84,0,0,0,90,4,114,101,97,100, - 114,65,0,0,0,41,3,114,118,0,0,0,114,44,0,0, - 0,114,68,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,8,0,0,0,114,227,0,0,0,208,3,0,0,115,10, - 0,0,0,0,2,14,1,16,1,40,2,14,1,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,73,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, - 253,0,0,0,41,3,114,118,0,0,0,114,216,0,0,0, - 114,253,0,0,0,114,5,0,0,0,114,5,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,217,3,0,0,115,4,0, - 0,0,0,2,12,1,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,125,0,0,0,114,124,0, - 0,0,114,126,0,0,0,114,127,0,0,0,114,209,0,0, - 0,114,243,0,0,0,114,247,0,0,0,114,136,0,0,0, - 114,220,0,0,0,114,179,0,0,0,114,227,0,0,0,114, - 254,0,0,0,90,13,95,95,99,108,97,115,115,99,101,108, - 108,95,95,114,5,0,0,0,114,5,0,0,0,114,249,0, - 0,0,114,8,0,0,0,114,239,0,0,0,173,3,0,0, - 115,22,0,0,0,8,2,4,3,8,6,8,4,8,3,2, - 1,14,11,2,1,10,4,8,9,2,1,114,239,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,2,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,169,0,0,0, - 114,234,0,0,0,41,3,114,49,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,118,0,0,0,114,44,0,0,0,114,238,0,0,0, - 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,114, - 224,0,0,0,227,3,0,0,115,4,0,0,0,0,2,8, - 1,122,27,83,111,117,114,99,101,70,105,108,101,76,111,97, - 100,101,114,46,112,97,116,104,95,115,116,97,116,115,99,4, - 0,0,0,0,0,0,0,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,114,0,0,0,114,225,0,0,0,41,5,114,118, - 0,0,0,114,107,0,0,0,114,106,0,0,0,114,26,0, - 0,0,114,52,0,0,0,114,5,0,0,0,114,5,0,0, - 0,114,8,0,0,0,114,226,0,0,0,232,3,0,0,115, - 4,0,0,0,0,2,8,1,122,32,83,111,117,114,99,101, - 70,105,108,101,76,111,97,100,101,114,46,95,99,97,99,104, - 101,95,98,121,116,101,99,111,100,101,114,60,0,0,0,114, - 1,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,252,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,104, - 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,110,1,0,1,0,1,0,89,0,113,60,89,0,113,60, - 4,0,116,8,121,162,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,113,60,122,28,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,110,52,4,0,116,8,144,0,121,246,1,0, - 125,8,1,0,122,26,116,9,160,10,100,1,124,1,124,8, - 161,3,1,0,87,0,89,0,100,2,125,8,126,8,110,10, - 100,2,125,8,126,8,48,0,48,0,100,2,83,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,47,0,0,0, - 114,56,0,0,0,114,186,0,0,0,114,42,0,0,0,114, - 38,0,0,0,114,4,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,50,0,0,0,114,134,0,0,0,114,149,0,0,0, - 114,69,0,0,0,41,9,114,118,0,0,0,114,44,0,0, - 0,114,26,0,0,0,114,2,1,0,0,218,6,112,97,114, - 101,110,116,114,96,0,0,0,114,37,0,0,0,114,33,0, - 0,0,114,228,0,0,0,114,5,0,0,0,114,5,0,0, - 0,114,8,0,0,0,114,225,0,0,0,237,3,0,0,115, - 46,0,0,0,0,2,12,1,4,2,12,1,12,1,12,2, - 12,1,10,1,2,1,14,1,12,2,8,1,14,3,6,1, - 4,255,4,2,28,1,2,1,12,1,16,1,16,2,8,1, - 2,255,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,125,0,0,0,114,124,0,0,0,114,126,0,0,0,114, - 127,0,0,0,114,224,0,0,0,114,226,0,0,0,114,225, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,8,0,0,0,114,255,0,0,0,223,3,0,0, - 115,8,0,0,0,8,2,4,2,8,5,8,5,114,255,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,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,159,0,0, - 0,114,145,0,0,0,41,2,114,116,0,0,0,114,106,0, - 0,0,41,5,114,179,0,0,0,114,227,0,0,0,114,152, - 0,0,0,114,165,0,0,0,114,235,0,0,0,41,5,114, - 118,0,0,0,114,139,0,0,0,114,44,0,0,0,114,26, - 0,0,0,114,151,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,8,0,0,0,114,213,0,0,0,16,4,0,0, - 115,22,0,0,0,0,1,10,1,10,4,2,1,2,254,6, - 4,12,1,2,1,14,1,2,1,2,253,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,5,0,0,0,114,219,0, - 0,0,114,5,0,0,0,114,5,0,0,0,114,8,0,0, - 0,114,229,0,0,0,32,4,0,0,115,2,0,0,0,0, - 2,122,31,83,111,117,114,99,101,108,101,115,115,70,105,108, - 101,76,111,97,100,101,114,46,103,101,116,95,115,111,117,114, - 99,101,78,41,6,114,125,0,0,0,114,124,0,0,0,114, - 126,0,0,0,114,127,0,0,0,114,213,0,0,0,114,229, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,8,0,0,0,114,5,1,0,0,12,4,0,0, - 115,6,0,0,0,8,2,4,2,8,16,114,5,1,0,0, + 221,0,0,0,29,3,0,0,115,14,0,0,0,8,2,8, + 8,8,14,8,10,8,7,8,10,14,8,114,221,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,92,0,0,0,101,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,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,252,0,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,109, - 0,0,0,114,159,0,0,0,41,3,114,118,0,0,0,114, - 116,0,0,0,114,44,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,8,0,0,0,114,209,0,0,0,49,4,0, - 0,115,4,0,0,0,0,1,6,1,122,28,69,120,116,101, - 110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,46, - 95,95,105,110,105,116,95,95,99,2,0,0,0,0,0,0, - 0,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,109, - 0,0,0,114,240,0,0,0,114,242,0,0,0,114,5,0, - 0,0,114,5,0,0,0,114,8,0,0,0,114,243,0,0, - 0,53,4,0,0,115,6,0,0,0,0,1,12,1,10,255, - 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,109, - 0,0,0,114,244,0,0,0,114,246,0,0,0,114,5,0, - 0,0,114,5,0,0,0,114,8,0,0,0,114,247,0,0, - 0,57,4,0,0,115,2,0,0,0,0,1,122,28,69,120, - 116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,101, - 114,46,95,95,104,97,115,104,95,95,99,2,0,0,0,0, - 0,0,0,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,2,122,38, - 67,114,101,97,116,101,32,97,110,32,117,110,105,116,105,97, - 108,105,122,101,100,32,101,120,116,101,110,115,105,111,110,32, - 109,111,100,117,108,101,122,38,101,120,116,101,110,115,105,111, - 110,32,109,111,100,117,108,101,32,123,33,114,125,32,108,111, - 97,100,101,100,32,102,114,111,109,32,123,33,114,125,41,7, - 114,134,0,0,0,114,214,0,0,0,114,163,0,0,0,90, - 14,99,114,101,97,116,101,95,100,121,110,97,109,105,99,114, - 149,0,0,0,114,116,0,0,0,114,44,0,0,0,41,3, - 114,118,0,0,0,114,187,0,0,0,114,216,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,8,0,0,0,114,212, - 0,0,0,60,4,0,0,115,14,0,0,0,0,2,4,1, - 6,255,4,2,6,1,8,255,4,2,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,134, - 0,0,0,114,214,0,0,0,114,163,0,0,0,90,12,101, - 120,101,99,95,100,121,110,97,109,105,99,114,149,0,0,0, - 114,116,0,0,0,114,44,0,0,0,169,2,114,118,0,0, - 0,114,216,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,8,0,0,0,114,217,0,0,0,68,4,0,0,115,8, - 0,0,0,0,2,14,1,6,1,8,255,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,3,0,0,0,115,36,0,0,0,116,0,124,0,106,1, - 131,1,100,1,25,0,137,0,116,2,135,0,102,1,100,2, - 100,3,132,8,116,3,68,0,131,1,131,1,83,0,41,4, - 122,49,82,101,116,117,114,110,32,84,114,117,101,32,105,102, - 32,116,104,101,32,101,120,116,101,110,115,105,111,110,32,109, - 111,100,117,108,101,32,105,115,32,97,32,112,97,99,107,97, - 103,101,46,114,39,0,0,0,99,1,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,4,0,0,0,51,0,0, - 0,115,26,0,0,0,124,0,93,18,125,1,136,0,100,0, - 124,1,23,0,107,2,86,0,1,0,113,2,100,1,83,0, - 41,2,114,209,0,0,0,78,114,5,0,0,0,169,2,114, - 32,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,5,0,0,0,114,8, - 0,0,0,218,9,60,103,101,110,101,120,112,114,62,77,4, - 0,0,115,4,0,0,0,4,1,2,255,122,49,69,120,116, - 101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,114, - 46,105,115,95,112,97,99,107,97,103,101,46,60,108,111,99, - 97,108,115,62,46,60,103,101,110,101,120,112,114,62,41,4, - 114,47,0,0,0,114,44,0,0,0,218,3,97,110,121,218, - 18,69,88,84,69,78,83,73,79,78,95,83,85,70,70,73, - 88,69,83,114,219,0,0,0,114,5,0,0,0,114,9,1, - 0,0,114,8,0,0,0,114,182,0,0,0,74,4,0,0, - 115,8,0,0,0,0,2,14,1,12,1,2,255,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,5,0,0,0,114,219,0,0,0,114,5,0, - 0,0,114,5,0,0,0,114,8,0,0,0,114,213,0,0, - 0,80,4,0,0,115,2,0,0,0,0,2,122,28,69,120, - 116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,101, - 114,46,103,101,116,95,99,111,100,101,99,2,0,0,0,0, - 0,0,0,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,5,0,0,0,114,219,0,0,0, - 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,114, - 229,0,0,0,84,4,0,0,115,2,0,0,0,0,2,122, - 30,69,120,116,101,110,115,105,111,110,70,105,108,101,76,111, - 97,100,101,114,46,103,101,116,95,115,111,117,114,99,101,99, + 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, + 159,0,0,0,41,3,114,118,0,0,0,114,139,0,0,0, + 114,44,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 8,0,0,0,114,209,0,0,0,178,3,0,0,115,4,0, + 0,0,0,3,6,1,122,19,70,105,108,101,76,111,97,100, + 101,114,46,95,95,105,110,105,116,95,95,99,2,0,0,0, + 0,0,0,0,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,109,0,0,0,169,2,218,9,95,95,99,108,97,115, + 115,95,95,114,131,0,0,0,169,2,114,118,0,0,0,90, + 5,111,116,104,101,114,114,5,0,0,0,114,5,0,0,0, + 114,8,0,0,0,218,6,95,95,101,113,95,95,184,3,0, + 0,115,6,0,0,0,0,1,12,1,10,255,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,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,109,0,0,0,169,3,218,4,104,97,115,104,114,116, + 0,0,0,114,44,0,0,0,169,1,114,118,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,8,0,0,0,218,8, + 95,95,104,97,115,104,95,95,188,3,0,0,115,2,0,0, + 0,0,1,122,19,70,105,108,101,76,111,97,100,101,114,46, + 95,95,104,97,115,104,95,95,99,2,0,0,0,0,0,0, + 0,0,0,0,0,2,0,0,0,3,0,0,0,3,0,0, + 0,115,16,0,0,0,116,0,116,1,124,0,131,2,160,2, + 124,1,161,1,83,0,41,1,122,100,76,111,97,100,32,97, + 32,109,111,100,117,108,101,32,102,114,111,109,32,97,32,102, + 105,108,101,46,10,10,32,32,32,32,32,32,32,32,84,104, + 105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,112, + 114,101,99,97,116,101,100,46,32,32,85,115,101,32,101,120, + 101,99,95,109,111,100,117,108,101,40,41,32,105,110,115,116, + 101,97,100,46,10,10,32,32,32,32,32,32,32,32,41,3, + 218,5,115,117,112,101,114,114,239,0,0,0,114,220,0,0, + 0,114,219,0,0,0,169,1,114,241,0,0,0,114,5,0, + 0,0,114,8,0,0,0,114,220,0,0,0,191,3,0,0, + 115,2,0,0,0,0,10,122,22,70,105,108,101,76,111,97, + 100,101,114,46,108,111,97,100,95,109,111,100,117,108,101,99, 2,0,0,0,0,0,0,0,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,250,0,0,0,114,48,0,0,0,114,219,0, - 0,0,114,5,0,0,0,114,5,0,0,0,114,8,0,0, - 0,114,179,0,0,0,88,4,0,0,115,2,0,0,0,0, - 3,122,32,69,120,116,101,110,115,105,111,110,70,105,108,101, + 0,83,0,169,1,122,58,82,101,116,117,114,110,32,116,104, + 101,32,112,97,116,104,32,116,111,32,116,104,101,32,115,111, + 117,114,99,101,32,102,105,108,101,32,97,115,32,102,111,117, + 110,100,32,98,121,32,116,104,101,32,102,105,110,100,101,114, + 46,114,48,0,0,0,114,219,0,0,0,114,5,0,0,0, + 114,5,0,0,0,114,8,0,0,0,114,179,0,0,0,203, + 3,0,0,115,2,0,0,0,0,3,122,23,70,105,108,101, 76,111,97,100,101,114,46,103,101,116,95,102,105,108,101,110, - 97,109,101,78,41,14,114,125,0,0,0,114,124,0,0,0, - 114,126,0,0,0,114,127,0,0,0,114,209,0,0,0,114, - 243,0,0,0,114,247,0,0,0,114,212,0,0,0,114,217, - 0,0,0,114,182,0,0,0,114,213,0,0,0,114,229,0, - 0,0,114,136,0,0,0,114,179,0,0,0,114,5,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, - 114,252,0,0,0,41,4,0,0,115,22,0,0,0,8,2, - 4,6,8,4,8,4,8,3,8,8,8,6,8,6,8,4, - 8,4,2,1,114,252,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,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,109, - 0,0,0,41,6,218,5,95,110,97,109,101,218,5,95,112, - 97,116,104,114,111,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,118,0, - 0,0,114,116,0,0,0,114,44,0,0,0,90,11,112,97, - 116,104,95,102,105,110,100,101,114,114,5,0,0,0,114,5, - 0,0,0,114,8,0,0,0,114,209,0,0,0,101,4,0, - 0,115,8,0,0,0,0,1,6,1,6,1,14,1,122,23, - 95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95, - 95,105,110,105,116,95,95,99,1,0,0,0,0,0,0,0, - 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,5,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,71,0, - 0,0,114,40,0,0,0,41,2,114,1,0,0,0,114,44, - 0,0,0,90,8,95,95,112,97,116,104,95,95,41,2,114, - 14,1,0,0,114,41,0,0,0,41,4,114,118,0,0,0, - 114,4,1,0,0,218,3,100,111,116,90,2,109,101,114,5, - 0,0,0,114,5,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,107,4,0,0,115,8,0,0,0,0, - 2,18,1,8,2,4,3,122,38,95,78,97,109,101,115,112, - 97,99,101,80,97,116,104,46,95,102,105,110,100,95,112,97, - 114,101,110,116,95,112,97,116,104,95,110,97,109,101,115,99, - 1,0,0,0,0,0,0,0,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,109,0,0,0,41,4, - 114,21,1,0,0,114,130,0,0,0,114,1,0,0,0,218, - 7,109,111,100,117,108,101,115,41,3,114,118,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,5,0,0,0,114,5,0,0,0,114,8,0, - 0,0,114,16,1,0,0,117,4,0,0,115,4,0,0,0, - 0,1,12,1,122,31,95,78,97,109,101,115,112,97,99,101, - 80,97,116,104,46,95,103,101,116,95,112,97,114,101,110,116, - 95,112,97,116,104,99,1,0,0,0,0,0,0,0,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,109,0,0,0,41,8,114,111,0,0,0,114, - 16,1,0,0,114,17,1,0,0,114,18,1,0,0,114,14, - 1,0,0,114,140,0,0,0,114,178,0,0,0,114,15,1, - 0,0,41,3,114,118,0,0,0,90,11,112,97,114,101,110, - 116,95,112,97,116,104,114,187,0,0,0,114,5,0,0,0, - 114,5,0,0,0,114,8,0,0,0,218,12,95,114,101,99, - 97,108,99,117,108,97,116,101,121,4,0,0,115,16,0,0, - 0,0,2,12,1,10,1,14,3,18,1,6,1,8,1,6, - 1,122,27,95,78,97,109,101,115,112,97,99,101,80,97,116, - 104,46,95,114,101,99,97,108,99,117,108,97,116,101,99,1, - 0,0,0,0,0,0,0,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,109,0,0,0,41,2,218, - 4,105,116,101,114,114,23,1,0,0,114,246,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,8,0,0,0,218,8, - 95,95,105,116,101,114,95,95,134,4,0,0,115,2,0,0, - 0,0,1,122,23,95,78,97,109,101,115,112,97,99,101,80, - 97,116,104,46,95,95,105,116,101,114,95,95,99,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,109,0,0,0,169,1,114,23,1, - 0,0,41,2,114,118,0,0,0,218,5,105,110,100,101,120, - 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,218, - 11,95,95,103,101,116,105,116,101,109,95,95,137,4,0,0, - 115,2,0,0,0,0,1,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, - 109,0,0,0,41,1,114,15,1,0,0,41,3,114,118,0, - 0,0,114,27,1,0,0,114,44,0,0,0,114,5,0,0, - 0,114,5,0,0,0,114,8,0,0,0,218,11,95,95,115, - 101,116,105,116,101,109,95,95,140,4,0,0,115,2,0,0, - 0,0,1,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,109,0,0,0,41,2, - 114,23,0,0,0,114,23,1,0,0,114,246,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,8,0,0,0,218,7, - 95,95,108,101,110,95,95,143,4,0,0,115,2,0,0,0, - 0,1,122,22,95,78,97,109,101,115,112,97,99,101,80,97, - 116,104,46,95,95,108,101,110,95,95,99,1,0,0,0,0, - 0,0,0,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, - 62,0,0,0,114,15,1,0,0,114,246,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,8,0,0,0,218,8,95, - 95,114,101,112,114,95,95,146,4,0,0,115,2,0,0,0, - 0,1,122,23,95,78,97,109,101,115,112,97,99,101,80,97, - 116,104,46,95,95,114,101,112,114,95,95,99,2,0,0,0, - 0,0,0,0,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,109,0,0,0,114,26,1,0,0,169, - 2,114,118,0,0,0,218,4,105,116,101,109,114,5,0,0, - 0,114,5,0,0,0,114,8,0,0,0,218,12,95,95,99, - 111,110,116,97,105,110,115,95,95,149,4,0,0,115,2,0, - 0,0,0,1,122,27,95,78,97,109,101,115,112,97,99,101, - 80,97,116,104,46,95,95,99,111,110,116,97,105,110,115,95, - 95,99,2,0,0,0,0,0,0,0,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, - 109,0,0,0,41,2,114,15,1,0,0,114,186,0,0,0, - 114,32,1,0,0,114,5,0,0,0,114,5,0,0,0,114, - 8,0,0,0,114,186,0,0,0,152,4,0,0,115,2,0, - 0,0,0,1,122,21,95,78,97,109,101,115,112,97,99,101, - 80,97,116,104,46,97,112,112,101,110,100,78,41,15,114,125, - 0,0,0,114,124,0,0,0,114,126,0,0,0,114,127,0, - 0,0,114,209,0,0,0,114,21,1,0,0,114,16,1,0, - 0,114,23,1,0,0,114,25,1,0,0,114,28,1,0,0, - 114,29,1,0,0,114,30,1,0,0,114,31,1,0,0,114, - 34,1,0,0,114,186,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,8,0,0,0,114,13,1, - 0,0,94,4,0,0,115,24,0,0,0,8,1,4,6,8, - 6,8,10,8,4,8,13,8,3,8,3,8,3,8,3,8, - 3,8,3,114,13,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,109,0,0,0,41, - 2,114,13,1,0,0,114,15,1,0,0,114,19,1,0,0, + 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,0,0,0,115,126,0,0, + 0,116,0,124,0,116,1,116,2,102,2,131,2,114,70,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,110,52,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,112,48, + 0,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,101,115,46,78,218,1,114,41,8, + 114,161,0,0,0,114,221,0,0,0,218,19,69,120,116,101, + 110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,114, + 64,0,0,0,90,9,111,112,101,110,95,99,111,100,101,114, + 84,0,0,0,90,4,114,101,97,100,114,65,0,0,0,41, + 3,114,118,0,0,0,114,44,0,0,0,114,68,0,0,0, 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,114, - 209,0,0,0,158,4,0,0,115,2,0,0,0,0,1,122, - 25,95,78,97,109,101,115,112,97,99,101,76,111,97,100,101, - 114,46,95,95,105,110,105,116,95,95,99,2,0,0,0,0, - 0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,67, - 0,0,0,115,12,0,0,0,100,1,160,0,124,1,106,1, - 161,1,83,0,41,2,122,115,82,101,116,117,114,110,32,114, - 101,112,114,32,102,111,114,32,116,104,101,32,109,111,100,117, - 108,101,46,10,10,32,32,32,32,32,32,32,32,84,104,101, - 32,109,101,116,104,111,100,32,105,115,32,100,101,112,114,101, - 99,97,116,101,100,46,32,32,84,104,101,32,105,109,112,111, - 114,116,32,109,97,99,104,105,110,101,114,121,32,100,111,101, - 115,32,116,104,101,32,106,111,98,32,105,116,115,101,108,102, - 46,10,10,32,32,32,32,32,32,32,32,122,25,60,109,111, - 100,117,108,101,32,123,33,114,125,32,40,110,97,109,101,115, - 112,97,99,101,41,62,41,2,114,62,0,0,0,114,125,0, - 0,0,41,2,114,193,0,0,0,114,216,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,8,0,0,0,218,11,109, - 111,100,117,108,101,95,114,101,112,114,161,4,0,0,115,2, - 0,0,0,0,7,122,28,95,78,97,109,101,115,112,97,99, - 101,76,111,97,100,101,114,46,109,111,100,117,108,101,95,114, - 101,112,114,99,2,0,0,0,0,0,0,0,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,5,0,0,0,114,219, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, - 0,0,114,182,0,0,0,170,4,0,0,115,2,0,0,0, - 0,1,122,27,95,78,97,109,101,115,112,97,99,101,76,111, - 97,100,101,114,46,105,115,95,112,97,99,107,97,103,101,99, - 2,0,0,0,0,0,0,0,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,40,0,0,0,114,5,0,0,0,114,219, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, - 0,0,114,229,0,0,0,173,4,0,0,115,2,0,0,0, - 0,1,122,27,95,78,97,109,101,115,112,97,99,101,76,111, - 97,100,101,114,46,103,101,116,95,115,111,117,114,99,101,99, - 2,0,0,0,0,0,0,0,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,40,0,0,0,122,8,60,115,116,114,105,110,103,62,114, - 215,0,0,0,84,41,1,114,231,0,0,0,41,1,114,232, + 227,0,0,0,208,3,0,0,115,10,0,0,0,0,2,14, + 1,16,1,40,2,14,1,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,73,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,253,0,0,0,41,3, + 114,118,0,0,0,114,216,0,0,0,114,253,0,0,0,114, + 5,0,0,0,114,5,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,217,3,0,0,115,4,0,0,0,0,2,12,1, + 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,125,0,0,0,114,124,0,0,0,114,126,0,0, + 0,114,127,0,0,0,114,209,0,0,0,114,243,0,0,0, + 114,247,0,0,0,114,136,0,0,0,114,220,0,0,0,114, + 179,0,0,0,114,227,0,0,0,114,254,0,0,0,90,13, + 95,95,99,108,97,115,115,99,101,108,108,95,95,114,5,0, + 0,0,114,5,0,0,0,114,249,0,0,0,114,8,0,0, + 0,114,239,0,0,0,173,3,0,0,115,22,0,0,0,8, + 2,4,3,8,6,8,4,8,3,2,1,14,11,2,1,10, + 4,8,9,2,1,114,239,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,2, + 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,169,0,0,0,114,234,0,0,0,41, + 3,114,49,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,118,0,0,0, + 114,44,0,0,0,114,238,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,8,0,0,0,114,224,0,0,0,227,3, + 0,0,115,4,0,0,0,0,2,8,1,122,27,83,111,117, + 114,99,101,70,105,108,101,76,111,97,100,101,114,46,112,97, + 116,104,95,115,116,97,116,115,99,4,0,0,0,0,0,0, + 0,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,114,0,0, + 0,114,225,0,0,0,41,5,114,118,0,0,0,114,107,0, + 0,0,114,106,0,0,0,114,26,0,0,0,114,52,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, + 114,226,0,0,0,232,3,0,0,115,4,0,0,0,0,2, + 8,1,122,32,83,111,117,114,99,101,70,105,108,101,76,111, + 97,100,101,114,46,95,99,97,99,104,101,95,98,121,116,101, + 99,111,100,101,114,60,0,0,0,114,1,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,248,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,102,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,110,1,0,1,0, + 1,0,89,0,113,60,89,0,113,60,4,0,116,8,121,162, + 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,28,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,110,50,4,0, + 116,8,121,242,1,0,125,8,1,0,122,26,116,9,160,10, + 100,1,124,1,124,8,161,3,1,0,87,0,89,0,100,2, + 125,8,126,8,110,10,100,2,125,8,126,8,48,0,48,0, + 100,2,83,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,47,0,0,0,114,56,0,0,0,114,186,0,0,0, + 114,42,0,0,0,114,38,0,0,0,114,4,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,50,0,0,0,114,134,0,0, + 0,114,149,0,0,0,114,69,0,0,0,41,9,114,118,0, + 0,0,114,44,0,0,0,114,26,0,0,0,114,2,1,0, + 0,218,6,112,97,114,101,110,116,114,96,0,0,0,114,37, + 0,0,0,114,33,0,0,0,114,228,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,8,0,0,0,114,225,0,0, + 0,237,3,0,0,115,46,0,0,0,0,2,12,1,4,2, + 12,1,12,1,12,2,12,1,10,1,2,1,14,1,12,2, + 8,1,14,3,6,1,4,255,4,2,26,1,2,1,12,1, + 16,1,14,2,8,1,2,255,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,125,0,0,0,114,124,0,0,0, + 114,126,0,0,0,114,127,0,0,0,114,224,0,0,0,114, + 226,0,0,0,114,225,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,8,0,0,0,114,255,0, + 0,0,223,3,0,0,115,8,0,0,0,8,2,4,2,8, + 5,8,5,114,255,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,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,159,0,0,0,114,145,0,0,0,41,2,114,116, + 0,0,0,114,106,0,0,0,41,5,114,179,0,0,0,114, + 227,0,0,0,114,152,0,0,0,114,165,0,0,0,114,235, + 0,0,0,41,5,114,118,0,0,0,114,139,0,0,0,114, + 44,0,0,0,114,26,0,0,0,114,151,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,8,0,0,0,114,213,0, + 0,0,16,4,0,0,115,22,0,0,0,0,1,10,1,10, + 4,2,1,2,254,6,4,12,1,2,1,14,1,2,1,2, + 253,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,5, 0,0,0,114,219,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,8,0,0,0,114,213,0,0,0,176,4,0,0, - 115,2,0,0,0,0,1,122,25,95,78,97,109,101,115,112, - 97,99,101,76,111,97,100,101,114,46,103,101,116,95,99,111, - 100,101,99,2,0,0,0,0,0,0,0,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,210,0,0,0,114,5,0,0,0,114,211, + 0,0,114,8,0,0,0,114,229,0,0,0,32,4,0,0, + 115,2,0,0,0,0,2,122,31,83,111,117,114,99,101,108, + 101,115,115,70,105,108,101,76,111,97,100,101,114,46,103,101, + 116,95,115,111,117,114,99,101,78,41,6,114,125,0,0,0, + 114,124,0,0,0,114,126,0,0,0,114,127,0,0,0,114, + 213,0,0,0,114,229,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,8,0,0,0,114,5,1, + 0,0,12,4,0,0,115,6,0,0,0,8,2,4,2,8, + 16,114,5,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,252,0,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,109,0,0,0,114,159,0,0,0,41,3, + 114,118,0,0,0,114,116,0,0,0,114,44,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,8,0,0,0,114,209, + 0,0,0,49,4,0,0,115,4,0,0,0,0,1,6,1, + 122,28,69,120,116,101,110,115,105,111,110,70,105,108,101,76, + 111,97,100,101,114,46,95,95,105,110,105,116,95,95,99,2, + 0,0,0,0,0,0,0,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,109,0,0,0,114,240,0,0,0,114,242, 0,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, - 0,0,114,212,0,0,0,179,4,0,0,115,2,0,0,0, - 0,1,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, + 0,0,114,243,0,0,0,53,4,0,0,115,6,0,0,0, + 0,1,12,1,10,255,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,109,0,0,0,114,244,0,0,0,114,246, + 0,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, + 0,0,114,247,0,0,0,57,4,0,0,115,2,0,0,0, + 0,1,122,28,69,120,116,101,110,115,105,111,110,70,105,108, + 101,76,111,97,100,101,114,46,95,95,104,97,115,104,95,95, + 99,2,0,0,0,0,0,0,0,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,2,122,38,67,114,101,97,116,101,32,97,110,32, + 117,110,105,116,105,97,108,105,122,101,100,32,101,120,116,101, + 110,115,105,111,110,32,109,111,100,117,108,101,122,38,101,120, + 116,101,110,115,105,111,110,32,109,111,100,117,108,101,32,123, + 33,114,125,32,108,111,97,100,101,100,32,102,114,111,109,32, + 123,33,114,125,41,7,114,134,0,0,0,114,214,0,0,0, + 114,163,0,0,0,90,14,99,114,101,97,116,101,95,100,121, + 110,97,109,105,99,114,149,0,0,0,114,116,0,0,0,114, + 44,0,0,0,41,3,114,118,0,0,0,114,187,0,0,0, + 114,216,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 8,0,0,0,114,212,0,0,0,60,4,0,0,115,14,0, + 0,0,0,2,4,1,6,255,4,2,6,1,8,255,4,2, + 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,134,0,0,0,114,214,0,0,0,114,163, + 0,0,0,90,12,101,120,101,99,95,100,121,110,97,109,105, + 99,114,149,0,0,0,114,116,0,0,0,114,44,0,0,0, + 169,2,114,118,0,0,0,114,216,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,8,0,0,0,114,217,0,0,0, + 68,4,0,0,115,8,0,0,0,0,2,14,1,6,1,8, + 255,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,1,0,0,0,67,0,0,0,115,4,0,0,0, - 100,0,83,0,114,109,0,0,0,114,5,0,0,0,114,6, - 1,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, - 0,0,114,217,0,0,0,182,4,0,0,115,2,0,0,0, - 0,1,122,28,95,78,97,109,101,115,112,97,99,101,76,111, - 97,100,101,114,46,101,120,101,99,95,109,111,100,117,108,101, + 0,0,0,4,0,0,0,3,0,0,0,115,36,0,0,0, + 116,0,124,0,106,1,131,1,100,1,25,0,137,0,116,2, + 135,0,102,1,100,2,100,3,132,8,116,3,68,0,131,1, + 131,1,83,0,41,4,122,49,82,101,116,117,114,110,32,84, + 114,117,101,32,105,102,32,116,104,101,32,101,120,116,101,110, + 115,105,111,110,32,109,111,100,117,108,101,32,105,115,32,97, + 32,112,97,99,107,97,103,101,46,114,39,0,0,0,99,1, + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,4, + 0,0,0,51,0,0,0,115,26,0,0,0,124,0,93,18, + 125,1,136,0,100,0,124,1,23,0,107,2,86,0,1,0, + 113,2,100,1,83,0,41,2,114,209,0,0,0,78,114,5, + 0,0,0,169,2,114,32,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, + 5,0,0,0,114,8,0,0,0,218,9,60,103,101,110,101, + 120,112,114,62,77,4,0,0,115,4,0,0,0,4,1,2, + 255,122,49,69,120,116,101,110,115,105,111,110,70,105,108,101, + 76,111,97,100,101,114,46,105,115,95,112,97,99,107,97,103, + 101,46,60,108,111,99,97,108,115,62,46,60,103,101,110,101, + 120,112,114,62,41,4,114,47,0,0,0,114,44,0,0,0, + 218,3,97,110,121,218,18,69,88,84,69,78,83,73,79,78, + 95,83,85,70,70,73,88,69,83,114,219,0,0,0,114,5, + 0,0,0,114,9,1,0,0,114,8,0,0,0,114,182,0, + 0,0,74,4,0,0,115,8,0,0,0,0,2,14,1,12, + 1,2,255,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,5,0,0,0,114,219, + 0,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, + 0,0,114,213,0,0,0,80,4,0,0,115,2,0,0,0, + 0,2,122,28,69,120,116,101,110,115,105,111,110,70,105,108, + 101,76,111,97,100,101,114,46,103,101,116,95,99,111,100,101, 99,2,0,0,0,0,0,0,0,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,2,122,98,76,111,97,100, - 32,97,32,110,97,109,101,115,112,97,99,101,32,109,111,100, - 117,108,101,46,10,10,32,32,32,32,32,32,32,32,84,104, - 105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,112, - 114,101,99,97,116,101,100,46,32,32,85,115,101,32,101,120, - 101,99,95,109,111,100,117,108,101,40,41,32,105,110,115,116, - 101,97,100,46,10,10,32,32,32,32,32,32,32,32,122,38, - 110,97,109,101,115,112,97,99,101,32,109,111,100,117,108,101, - 32,108,111,97,100,101,100,32,119,105,116,104,32,112,97,116, - 104,32,123,33,114,125,41,4,114,134,0,0,0,114,149,0, - 0,0,114,15,1,0,0,114,218,0,0,0,114,219,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, - 114,220,0,0,0,185,4,0,0,115,8,0,0,0,0,7, - 6,1,4,255,4,2,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,125,0,0,0,114,124,0,0, - 0,114,126,0,0,0,114,209,0,0,0,114,207,0,0,0, - 114,36,1,0,0,114,182,0,0,0,114,229,0,0,0,114, - 213,0,0,0,114,212,0,0,0,114,217,0,0,0,114,220, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,8,0,0,0,114,35,1,0,0,157,4,0,0, - 115,18,0,0,0,8,1,8,3,2,1,10,8,8,3,8, - 3,8,3,8,3,8,3,114,35,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,4, - 100,6,100,7,132,0,131,1,90,7,101,4,100,8,100,9, - 132,0,131,1,90,8,101,4,100,19,100,11,100,12,132,1, - 131,1,90,9,101,4,100,20,100,13,100,14,132,1,131,1, - 90,10,101,4,100,21,100,15,100,16,132,1,131,1,90,11, - 101,4,100,17,100,18,132,0,131,1,90,12,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,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,116,0,116,1, - 106,2,160,3,161,0,131,1,68,0,93,44,92,2,125,1, - 125,2,124,2,100,1,117,0,114,40,116,1,106,2,124,1, - 61,0,113,14,116,4,124,2,100,2,131,2,114,14,124,2, - 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,1,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,128,0,0,0,114, - 38,1,0,0,41,3,114,193,0,0,0,114,116,0,0,0, - 218,6,102,105,110,100,101,114,114,5,0,0,0,114,5,0, - 0,0,114,8,0,0,0,114,38,1,0,0,203,4,0,0, - 115,10,0,0,0,0,4,22,1,8,1,10,1,10,1,122, - 28,80,97,116,104,70,105,110,100,101,114,46,105,110,118,97, - 108,105,100,97,116,101,95,99,97,99,104,101,115,99,2,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,9,0, - 0,0,67,0,0,0,115,82,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,42,125, - 2,122,14,124,2,124,1,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,89,0,113,34,48,0,113,34,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,1,0,0,0, - 218,10,112,97,116,104,95,104,111,111,107,115,114,75,0,0, - 0,114,76,0,0,0,114,138,0,0,0,114,117,0,0,0, - 41,3,114,193,0,0,0,114,44,0,0,0,90,4,104,111, - 111,107,114,5,0,0,0,114,5,0,0,0,114,8,0,0, - 0,218,11,95,112,97,116,104,95,104,111,111,107,115,213,4, - 0,0,115,16,0,0,0,0,3,16,1,12,1,10,1,2, - 1,14,1,12,1,12,2,122,22,80,97,116,104,70,105,110, - 100,101,114,46,95,112,97,116,104,95,104,111,111,107,115,99, - 2,0,0,0,0,0,0,0,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,14,116,3,106,4,124,1,25, - 0,125,2,87,0,110,38,4,0,116,5,121,94,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,110,2,48,0,124,2,83, - 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,40,0,0,0,78,41,7,114, - 4,0,0,0,114,55,0,0,0,218,17,70,105,108,101,78, - 111,116,70,111,117,110,100,69,114,114,111,114,114,1,0,0, - 0,114,40,1,0,0,218,8,75,101,121,69,114,114,111,114, - 114,44,1,0,0,41,3,114,193,0,0,0,114,44,0,0, - 0,114,42,1,0,0,114,5,0,0,0,114,5,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,226,4,0,0,115, - 22,0,0,0,0,8,8,1,2,1,12,1,12,3,8,1, - 2,1,14,1,12,1,10,1,16,1,122,31,80,97,116,104, - 70,105,110,100,101,114,46,95,112,97,116,104,95,105,109,112, - 111,114,116,101,114,95,99,97,99,104,101,99,3,0,0,0, - 0,0,0,0,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,137, - 0,0,0,41,7,114,128,0,0,0,114,137,0,0,0,114, - 206,0,0,0,114,134,0,0,0,114,201,0,0,0,114,183, - 0,0,0,114,178,0,0,0,41,6,114,193,0,0,0,114, - 139,0,0,0,114,42,1,0,0,114,140,0,0,0,114,141, - 0,0,0,114,187,0,0,0,114,5,0,0,0,114,5,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,248,4,0,0,115,18,0, - 0,0,0,4,10,1,16,2,10,1,4,1,8,1,12,1, - 12,1,6,1,122,27,80,97,116,104,70,105,110,100,101,114, - 46,95,108,101,103,97,99,121,95,103,101,116,95,115,112,101, - 99,78,99,4,0,0,0,0,0,0,0,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,203,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,161,0,0,0,114,84,0,0,0, - 218,5,98,121,116,101,115,114,47,1,0,0,114,128,0,0, - 0,114,203,0,0,0,114,48,1,0,0,114,140,0,0,0, - 114,178,0,0,0,114,117,0,0,0,114,167,0,0,0,114, - 134,0,0,0,114,183,0,0,0,41,9,114,193,0,0,0, - 114,139,0,0,0,114,44,0,0,0,114,202,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,42,1,0,0,114,187,0,0,0, - 114,141,0,0,0,114,5,0,0,0,114,5,0,0,0,114, - 8,0,0,0,218,9,95,103,101,116,95,115,112,101,99,7, - 5,0,0,115,40,0,0,0,0,5,4,1,8,1,14,1, - 2,1,10,1,8,1,10,1,14,2,12,1,8,1,2,1, - 10,1,8,1,6,1,8,1,8,5,12,2,12,1,6,1, - 122,20,80,97,116,104,70,105,110,100,101,114,46,95,103,101, - 116,95,115,112,101,99,99,4,0,0,0,0,0,0,0,0, - 0,0,0,6,0,0,0,5,0,0,0,67,0,0,0,115, - 100,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,92,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,110,4, - 124,4,83,0,100,1,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,1,0,0, - 0,114,44,0,0,0,114,51,1,0,0,114,140,0,0,0, - 114,178,0,0,0,114,181,0,0,0,114,13,1,0,0,41, - 6,114,193,0,0,0,114,139,0,0,0,114,44,0,0,0, - 114,202,0,0,0,114,187,0,0,0,114,50,1,0,0,114, - 5,0,0,0,114,5,0,0,0,114,8,0,0,0,114,203, - 0,0,0,39,5,0,0,115,26,0,0,0,0,6,8,1, - 6,1,14,1,8,1,4,1,10,1,6,1,4,3,6,1, - 16,1,4,2,6,2,122,20,80,97,116,104,70,105,110,100, - 101,114,46,102,105,110,100,95,115,112,101,99,99,3,0,0, - 0,0,0,0,0,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,204,0,0,0,114,205,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, - 114,206,0,0,0,63,5,0,0,115,8,0,0,0,0,8, - 12,1,8,1,4,1,122,22,80,97,116,104,70,105,110,100, - 101,114,46,102,105,110,100,95,109,111,100,117,108,101,99,1, - 0,0,0,0,0,0,0,0,0,0,0,4,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,3,1,0,124,3,106,2,124,1,105,0, - 124,2,164,1,142,1,83,0,41,3,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, - 73,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,41,3,90,18,105,109, - 112,111,114,116,108,105,98,46,109,101,116,97,100,97,116,97, - 114,52,1,0,0,218,18,102,105,110,100,95,100,105,115,116, - 114,105,98,117,116,105,111,110,115,41,4,114,193,0,0,0, - 114,119,0,0,0,114,120,0,0,0,114,52,1,0,0,114, - 5,0,0,0,114,5,0,0,0,114,8,0,0,0,114,53, - 1,0,0,76,5,0,0,115,4,0,0,0,0,10,12,1, - 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,13,114,125,0,0,0, - 114,124,0,0,0,114,126,0,0,0,114,127,0,0,0,114, - 207,0,0,0,114,38,1,0,0,114,44,1,0,0,114,47, - 1,0,0,114,48,1,0,0,114,51,1,0,0,114,203,0, - 0,0,114,206,0,0,0,114,53,1,0,0,114,5,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, - 114,37,1,0,0,199,4,0,0,115,34,0,0,0,8,2, - 4,2,2,1,10,9,2,1,10,12,2,1,10,21,2,1, - 10,14,2,1,12,31,2,1,12,23,2,1,12,12,2,1, - 114,37,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,109,0, - 0,0,114,5,0,0,0,114,7,1,0,0,169,1,114,140, - 0,0,0,114,5,0,0,0,114,8,0,0,0,114,10,1, - 0,0,105,5,0,0,243,0,0,0,0,122,38,70,105,108, - 101,70,105,110,100,101,114,46,95,95,105,110,105,116,95,95, - 46,60,108,111,99,97,108,115,62,46,60,103,101,110,101,120, - 112,114,62,114,71,0,0,0,114,104,0,0,0,78,41,7, - 114,167,0,0,0,218,8,95,108,111,97,100,101,114,115,114, - 44,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,118,0,0,0,114, - 44,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,189,0, - 0,0,114,5,0,0,0,114,55,1,0,0,114,8,0,0, - 0,114,209,0,0,0,99,5,0,0,115,16,0,0,0,0, - 4,4,1,12,1,26,1,6,2,10,1,6,1,8,1,122, - 19,70,105,108,101,70,105,110,100,101,114,46,95,95,105,110, - 105,116,95,95,99,1,0,0,0,0,0,0,0,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, - 104,0,0,0,78,41,1,114,58,1,0,0,114,246,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,5,0,0, + 0,114,219,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,8,0,0,0,114,229,0,0,0,84,4,0,0,115,2, + 0,0,0,0,2,122,30,69,120,116,101,110,115,105,111,110, + 70,105,108,101,76,111,97,100,101,114,46,103,101,116,95,115, + 111,117,114,99,101,99,2,0,0,0,0,0,0,0,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,250,0,0,0,114,48, + 0,0,0,114,219,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,8,0,0,0,114,179,0,0,0,88,4,0,0, + 115,2,0,0,0,0,3,122,32,69,120,116,101,110,115,105, + 111,110,70,105,108,101,76,111,97,100,101,114,46,103,101,116, + 95,102,105,108,101,110,97,109,101,78,41,14,114,125,0,0, + 0,114,124,0,0,0,114,126,0,0,0,114,127,0,0,0, + 114,209,0,0,0,114,243,0,0,0,114,247,0,0,0,114, + 212,0,0,0,114,217,0,0,0,114,182,0,0,0,114,213, + 0,0,0,114,229,0,0,0,114,136,0,0,0,114,179,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,5,0,0, + 0,114,8,0,0,0,114,252,0,0,0,41,4,0,0,115, + 22,0,0,0,8,2,4,6,8,4,8,4,8,3,8,8, + 8,6,8,6,8,4,8,4,2,1,114,252,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,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,109,0,0,0,41,6,218,5,95,110,97, + 109,101,218,5,95,112,97,116,104,114,111,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,118,0,0,0,114,116,0,0,0,114,44,0, + 0,0,90,11,112,97,116,104,95,102,105,110,100,101,114,114, + 5,0,0,0,114,5,0,0,0,114,8,0,0,0,114,209, + 0,0,0,101,4,0,0,115,8,0,0,0,0,1,6,1, + 6,1,14,1,122,23,95,78,97,109,101,115,112,97,99,101, + 80,97,116,104,46,95,95,105,110,105,116,95,95,99,1,0, + 0,0,0,0,0,0,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,5,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,71,0,0,0,114,40,0,0,0,41,2,114, + 1,0,0,0,114,44,0,0,0,90,8,95,95,112,97,116, + 104,95,95,41,2,114,14,1,0,0,114,41,0,0,0,41, + 4,114,118,0,0,0,114,4,1,0,0,218,3,100,111,116, + 90,2,109,101,114,5,0,0,0,114,5,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,107,4,0,0, + 115,8,0,0,0,0,2,18,1,8,2,4,3,122,38,95, + 78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,102, + 105,110,100,95,112,97,114,101,110,116,95,112,97,116,104,95, + 110,97,109,101,115,99,1,0,0,0,0,0,0,0,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, + 109,0,0,0,41,4,114,21,1,0,0,114,130,0,0,0, + 114,1,0,0,0,218,7,109,111,100,117,108,101,115,41,3, + 114,118,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,5,0,0,0,114,5, + 0,0,0,114,8,0,0,0,114,16,1,0,0,117,4,0, + 0,115,4,0,0,0,0,1,12,1,122,31,95,78,97,109, + 101,115,112,97,99,101,80,97,116,104,46,95,103,101,116,95, + 112,97,114,101,110,116,95,112,97,116,104,99,1,0,0,0, + 0,0,0,0,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,109,0,0,0,41,8, + 114,111,0,0,0,114,16,1,0,0,114,17,1,0,0,114, + 18,1,0,0,114,14,1,0,0,114,140,0,0,0,114,178, + 0,0,0,114,15,1,0,0,41,3,114,118,0,0,0,90, + 11,112,97,114,101,110,116,95,112,97,116,104,114,187,0,0, 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, - 114,38,1,0,0,113,5,0,0,115,2,0,0,0,0,2, - 122,28,70,105,108,101,70,105,110,100,101,114,46,105,110,118, - 97,108,105,100,97,116,101,95,99,97,99,104,101,115,99,2, - 0,0,0,0,0,0,0,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,203,0,0,0,114,140,0,0,0,114,178,0,0, - 0,41,3,114,118,0,0,0,114,139,0,0,0,114,187,0, + 218,12,95,114,101,99,97,108,99,117,108,97,116,101,121,4, + 0,0,115,16,0,0,0,0,2,12,1,10,1,14,3,18, + 1,6,1,8,1,6,1,122,27,95,78,97,109,101,115,112, + 97,99,101,80,97,116,104,46,95,114,101,99,97,108,99,117, + 108,97,116,101,99,1,0,0,0,0,0,0,0,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,109, + 0,0,0,41,2,218,4,105,116,101,114,114,23,1,0,0, + 114,246,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 8,0,0,0,218,8,95,95,105,116,101,114,95,95,134,4, + 0,0,115,2,0,0,0,0,1,122,23,95,78,97,109,101, + 115,112,97,99,101,80,97,116,104,46,95,95,105,116,101,114, + 95,95,99,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,109,0,0, + 0,169,1,114,23,1,0,0,41,2,114,118,0,0,0,218, + 5,105,110,100,101,120,114,5,0,0,0,114,5,0,0,0, + 114,8,0,0,0,218,11,95,95,103,101,116,105,116,101,109, + 95,95,137,4,0,0,115,2,0,0,0,0,1,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,109,0,0,0,41,1,114,15,1,0, + 0,41,3,114,118,0,0,0,114,27,1,0,0,114,44,0, 0,0,114,5,0,0,0,114,5,0,0,0,114,8,0,0, - 0,114,137,0,0,0,119,5,0,0,115,8,0,0,0,0, - 7,10,1,8,1,8,1,122,22,70,105,108,101,70,105,110, - 100,101,114,46,102,105,110,100,95,108,111,97,100,101,114,99, - 6,0,0,0,0,0,0,0,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,177,0,0,0,41, - 1,114,190,0,0,0,41,7,114,118,0,0,0,114,188,0, - 0,0,114,139,0,0,0,114,44,0,0,0,90,4,115,109, - 115,108,114,202,0,0,0,114,140,0,0,0,114,5,0,0, - 0,114,5,0,0,0,114,8,0,0,0,114,51,1,0,0, - 131,5,0,0,115,8,0,0,0,0,1,10,1,8,1,2, - 255,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,96,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,216,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,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,113,148,116,17,124,8,131,1,125,3,124,0, - 106,14,68,0,93,82,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,222,116,15,124,12,131,1,114,222, - 124,0,160,16,124,10,124,1,124,12,100,8,124,2,161,5, - 2,0,1,0,83,0,113,222,124,3,144,1,114,92,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, + 0,218,11,95,95,115,101,116,105,116,101,109,95,95,140,4, + 0,0,115,2,0,0,0,0,1,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, + 109,0,0,0,41,2,114,23,0,0,0,114,23,1,0,0, + 114,246,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 8,0,0,0,218,7,95,95,108,101,110,95,95,143,4,0, + 0,115,2,0,0,0,0,1,122,22,95,78,97,109,101,115, + 112,97,99,101,80,97,116,104,46,95,95,108,101,110,95,95, + 99,1,0,0,0,0,0,0,0,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,62,0,0,0,114,15,1,0,0,114, + 246,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, + 0,0,0,218,8,95,95,114,101,112,114,95,95,146,4,0, + 0,115,2,0,0,0,0,1,122,23,95,78,97,109,101,115, + 112,97,99,101,80,97,116,104,46,95,95,114,101,112,114,95, + 95,99,2,0,0,0,0,0,0,0,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,109,0,0,0, + 114,26,1,0,0,169,2,114,118,0,0,0,218,4,105,116, + 101,109,114,5,0,0,0,114,5,0,0,0,114,8,0,0, + 0,218,12,95,95,99,111,110,116,97,105,110,115,95,95,149, + 4,0,0,115,2,0,0,0,0,1,122,27,95,78,97,109, + 101,115,112,97,99,101,80,97,116,104,46,95,95,99,111,110, + 116,97,105,110,115,95,95,99,2,0,0,0,0,0,0,0, + 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,109,0,0,0,41,2,114,15,1,0, + 0,114,186,0,0,0,114,32,1,0,0,114,5,0,0,0, + 114,5,0,0,0,114,8,0,0,0,114,186,0,0,0,152, + 4,0,0,115,2,0,0,0,0,1,122,21,95,78,97,109, + 101,115,112,97,99,101,80,97,116,104,46,97,112,112,101,110, + 100,78,41,15,114,125,0,0,0,114,124,0,0,0,114,126, + 0,0,0,114,127,0,0,0,114,209,0,0,0,114,21,1, + 0,0,114,16,1,0,0,114,23,1,0,0,114,25,1,0, + 0,114,28,1,0,0,114,29,1,0,0,114,30,1,0,0, + 114,31,1,0,0,114,34,1,0,0,114,186,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, + 0,0,0,114,13,1,0,0,94,4,0,0,115,24,0,0, + 0,8,1,4,6,8,6,8,10,8,4,8,13,8,3,8, + 3,8,3,8,3,8,3,8,3,114,13,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,109,0,0,0,41,2,114,13,1,0,0,114,15,1,0, + 0,114,19,1,0,0,114,5,0,0,0,114,5,0,0,0, + 114,8,0,0,0,114,209,0,0,0,158,4,0,0,115,2, + 0,0,0,0,1,122,25,95,78,97,109,101,115,112,97,99, + 101,76,111,97,100,101,114,46,95,95,105,110,105,116,95,95, + 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, + 0,3,0,0,0,67,0,0,0,115,12,0,0,0,100,1, + 160,0,124,1,106,1,161,1,83,0,41,2,122,115,82,101, + 116,117,114,110,32,114,101,112,114,32,102,111,114,32,116,104, + 101,32,109,111,100,117,108,101,46,10,10,32,32,32,32,32, + 32,32,32,84,104,101,32,109,101,116,104,111,100,32,105,115, + 32,100,101,112,114,101,99,97,116,101,100,46,32,32,84,104, + 101,32,105,109,112,111,114,116,32,109,97,99,104,105,110,101, + 114,121,32,100,111,101,115,32,116,104,101,32,106,111,98,32, + 105,116,115,101,108,102,46,10,10,32,32,32,32,32,32,32, + 32,122,25,60,109,111,100,117,108,101,32,123,33,114,125,32, + 40,110,97,109,101,115,112,97,99,101,41,62,41,2,114,62, + 0,0,0,114,125,0,0,0,41,2,114,193,0,0,0,114, + 216,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, + 0,0,0,218,11,109,111,100,117,108,101,95,114,101,112,114, + 161,4,0,0,115,2,0,0,0,0,7,122,28,95,78,97, + 109,101,115,112,97,99,101,76,111,97,100,101,114,46,109,111, + 100,117,108,101,95,114,101,112,114,99,2,0,0,0,0,0, + 0,0,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, + 5,0,0,0,114,219,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,8,0,0,0,114,182,0,0,0,170,4,0, + 0,115,2,0,0,0,0,1,122,27,95,78,97,109,101,115, + 112,97,99,101,76,111,97,100,101,114,46,105,115,95,112,97, + 99,107,97,103,101,99,2,0,0,0,0,0,0,0,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,40,0,0,0,114, + 5,0,0,0,114,219,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,8,0,0,0,114,229,0,0,0,173,4,0, + 0,115,2,0,0,0,0,1,122,27,95,78,97,109,101,115, + 112,97,99,101,76,111,97,100,101,114,46,103,101,116,95,115, + 111,117,114,99,101,99,2,0,0,0,0,0,0,0,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,40,0,0,0,122,8,60,115,116, + 114,105,110,103,62,114,215,0,0,0,84,41,1,114,231,0, + 0,0,41,1,114,232,0,0,0,114,219,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,8,0,0,0,114,213,0, + 0,0,176,4,0,0,115,2,0,0,0,0,1,122,25,95, + 78,97,109,101,115,112,97,99,101,76,111,97,100,101,114,46, + 103,101,116,95,99,111,100,101,99,2,0,0,0,0,0,0, + 0,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,210,0,0,0,114, + 5,0,0,0,114,211,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,8,0,0,0,114,212,0,0,0,179,4,0, + 0,115,2,0,0,0,0,1,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,109,0,0,0,114, + 5,0,0,0,114,6,1,0,0,114,5,0,0,0,114,5, + 0,0,0,114,8,0,0,0,114,217,0,0,0,182,4,0, + 0,115,2,0,0,0,0,1,122,28,95,78,97,109,101,115, + 112,97,99,101,76,111,97,100,101,114,46,101,120,101,99,95, + 109,111,100,117,108,101,99,2,0,0,0,0,0,0,0,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,2, + 122,98,76,111,97,100,32,97,32,110,97,109,101,115,112,97, + 99,101,32,109,111,100,117,108,101,46,10,10,32,32,32,32, + 32,32,32,32,84,104,105,115,32,109,101,116,104,111,100,32, + 105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,32, + 85,115,101,32,101,120,101,99,95,109,111,100,117,108,101,40, + 41,32,105,110,115,116,101,97,100,46,10,10,32,32,32,32, + 32,32,32,32,122,38,110,97,109,101,115,112,97,99,101,32, + 109,111,100,117,108,101,32,108,111,97,100,101,100,32,119,105, + 116,104,32,112,97,116,104,32,123,33,114,125,41,4,114,134, + 0,0,0,114,149,0,0,0,114,15,1,0,0,114,218,0, + 0,0,114,219,0,0,0,114,5,0,0,0,114,5,0,0, + 0,114,8,0,0,0,114,220,0,0,0,185,4,0,0,115, + 8,0,0,0,0,7,6,1,4,255,4,2,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,125,0, + 0,0,114,124,0,0,0,114,126,0,0,0,114,209,0,0, + 0,114,207,0,0,0,114,36,1,0,0,114,182,0,0,0, + 114,229,0,0,0,114,213,0,0,0,114,212,0,0,0,114, + 217,0,0,0,114,220,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,8,0,0,0,114,35,1, + 0,0,157,4,0,0,115,18,0,0,0,8,1,8,3,2, + 1,10,8,8,3,8,3,8,3,8,3,8,3,114,35,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,4,100,6,100,7,132,0,131,1,90,7, + 101,4,100,8,100,9,132,0,131,1,90,8,101,4,100,19, + 100,11,100,12,132,1,131,1,90,9,101,4,100,20,100,13, + 100,14,132,1,131,1,90,10,101,4,100,21,100,15,100,16, + 132,1,131,1,90,11,101,4,100,17,100,18,132,0,131,1, + 90,12,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,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,116,0,116,1,106,2,160,3,161,0,131,1,68,0, + 93,44,92,2,125,1,125,2,124,2,100,1,117,0,114,40, + 116,1,106,2,124,1,61,0,113,14,116,4,124,2,100,2, + 131,2,114,14,124,2,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, + 1,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,128,0,0,0,114,38,1,0,0,41,3,114,193,0,0, + 0,114,116,0,0,0,218,6,102,105,110,100,101,114,114,5, + 0,0,0,114,5,0,0,0,114,8,0,0,0,114,38,1, + 0,0,203,4,0,0,115,10,0,0,0,0,4,22,1,8, + 1,10,1,10,1,122,28,80,97,116,104,70,105,110,100,101, + 114,46,105,110,118,97,108,105,100,97,116,101,95,99,97,99, + 104,101,115,99,2,0,0,0,0,0,0,0,0,0,0,0, + 3,0,0,0,9,0,0,0,67,0,0,0,115,80,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,40,125,2,122,14,124,2,124,1,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,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, + 1,0,0,0,218,10,112,97,116,104,95,104,111,111,107,115, + 114,75,0,0,0,114,76,0,0,0,114,138,0,0,0,114, + 117,0,0,0,41,3,114,193,0,0,0,114,44,0,0,0, + 90,4,104,111,111,107,114,5,0,0,0,114,5,0,0,0, + 114,8,0,0,0,218,11,95,112,97,116,104,95,104,111,111, + 107,115,213,4,0,0,115,16,0,0,0,0,3,16,1,12, + 1,10,1,2,1,14,1,12,1,10,2,122,22,80,97,116, + 104,70,105,110,100,101,114,46,95,112,97,116,104,95,104,111, + 111,107,115,99,2,0,0,0,0,0,0,0,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,14,116,3,106, + 4,124,1,25,0,125,2,87,0,110,38,4,0,116,5,121, + 94,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,110,2,48, + 0,124,2,83,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,40,0,0,0, + 78,41,7,114,4,0,0,0,114,55,0,0,0,218,17,70, + 105,108,101,78,111,116,70,111,117,110,100,69,114,114,111,114, + 114,1,0,0,0,114,40,1,0,0,218,8,75,101,121,69, + 114,114,111,114,114,44,1,0,0,41,3,114,193,0,0,0, + 114,44,0,0,0,114,42,1,0,0,114,5,0,0,0,114, + 5,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,226, + 4,0,0,115,22,0,0,0,0,8,8,1,2,1,12,1, + 12,3,8,1,2,1,14,1,12,1,10,1,16,1,122,31, + 80,97,116,104,70,105,110,100,101,114,46,95,112,97,116,104, + 95,105,109,112,111,114,116,101,114,95,99,97,99,104,101,99, + 3,0,0,0,0,0,0,0,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,137,0,0,0,41,7,114,128,0,0,0,114,137, + 0,0,0,114,206,0,0,0,114,134,0,0,0,114,201,0, + 0,0,114,183,0,0,0,114,178,0,0,0,41,6,114,193, + 0,0,0,114,139,0,0,0,114,42,1,0,0,114,140,0, + 0,0,114,141,0,0,0,114,187,0,0,0,114,5,0,0, + 0,114,5,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,248,4,0, + 0,115,18,0,0,0,0,4,10,1,16,2,10,1,4,1, + 8,1,12,1,12,1,6,1,122,27,80,97,116,104,70,105, + 110,100,101,114,46,95,108,101,103,97,99,121,95,103,101,116, + 95,115,112,101,99,78,99,4,0,0,0,0,0,0,0,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,203, + 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,161,0,0,0,114, + 84,0,0,0,218,5,98,121,116,101,115,114,47,1,0,0, + 114,128,0,0,0,114,203,0,0,0,114,48,1,0,0,114, + 140,0,0,0,114,178,0,0,0,114,117,0,0,0,114,167, + 0,0,0,114,134,0,0,0,114,183,0,0,0,41,9,114, + 193,0,0,0,114,139,0,0,0,114,44,0,0,0,114,202, + 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,42,1,0,0,114, + 187,0,0,0,114,141,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,8,0,0,0,218,9,95,103,101,116,95,115, + 112,101,99,7,5,0,0,115,40,0,0,0,0,5,4,1, + 8,1,14,1,2,1,10,1,8,1,10,1,14,2,12,1, + 8,1,2,1,10,1,8,1,6,1,8,1,8,5,12,2, + 12,1,6,1,122,20,80,97,116,104,70,105,110,100,101,114, + 46,95,103,101,116,95,115,112,101,99,99,4,0,0,0,0, + 0,0,0,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,1,0,0,0,114, + 44,0,0,0,114,51,1,0,0,114,140,0,0,0,114,178, + 0,0,0,114,181,0,0,0,114,13,1,0,0,41,6,114, + 193,0,0,0,114,139,0,0,0,114,44,0,0,0,114,202, + 0,0,0,114,187,0,0,0,114,50,1,0,0,114,5,0, + 0,0,114,5,0,0,0,114,8,0,0,0,114,203,0,0, + 0,39,5,0,0,115,26,0,0,0,0,6,8,1,6,1, + 14,1,8,1,4,1,10,1,6,1,4,3,6,1,16,1, + 4,2,4,2,122,20,80,97,116,104,70,105,110,100,101,114, + 46,102,105,110,100,95,115,112,101,99,99,3,0,0,0,0, + 0,0,0,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,204,0,0,0,114,205,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,8,0,0,0,114,206, + 0,0,0,63,5,0,0,115,8,0,0,0,0,8,12,1, + 8,1,4,1,122,22,80,97,116,104,70,105,110,100,101,114, + 46,102,105,110,100,95,109,111,100,117,108,101,99,1,0,0, + 0,0,0,0,0,0,0,0,0,4,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,3,1,0,124,3,106,2,124,1,105,0,124,2, + 164,1,142,1,83,0,41,3,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,73,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,41,3,90,18,105,109,112,111, + 114,116,108,105,98,46,109,101,116,97,100,97,116,97,114,52, + 1,0,0,218,18,102,105,110,100,95,100,105,115,116,114,105, + 98,117,116,105,111,110,115,41,4,114,193,0,0,0,114,119, + 0,0,0,114,120,0,0,0,114,52,1,0,0,114,5,0, + 0,0,114,5,0,0,0,114,8,0,0,0,114,53,1,0, + 0,76,5,0,0,115,4,0,0,0,0,10,12,1,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,13,114,125,0,0,0,114,124, + 0,0,0,114,126,0,0,0,114,127,0,0,0,114,207,0, + 0,0,114,38,1,0,0,114,44,1,0,0,114,47,1,0, + 0,114,48,1,0,0,114,51,1,0,0,114,203,0,0,0, + 114,206,0,0,0,114,53,1,0,0,114,5,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,8,0,0,0,114,37, + 1,0,0,199,4,0,0,115,34,0,0,0,8,2,4,2, + 2,1,10,9,2,1,10,12,2,1,10,21,2,1,10,14, + 2,1,12,31,2,1,12,23,2,1,12,12,2,1,114,37, + 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,109,0,0,0, + 114,5,0,0,0,114,7,1,0,0,169,1,114,140,0,0, + 0,114,5,0,0,0,114,8,0,0,0,114,10,1,0,0, + 105,5,0,0,243,0,0,0,0,122,38,70,105,108,101,70, + 105,110,100,101,114,46,95,95,105,110,105,116,95,95,46,60, + 108,111,99,97,108,115,62,46,60,103,101,110,101,120,112,114, + 62,114,71,0,0,0,114,104,0,0,0,78,41,7,114,167, + 0,0,0,218,8,95,108,111,97,100,101,114,115,114,44,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,118,0,0,0,114,44,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,189,0,0,0, + 114,5,0,0,0,114,55,1,0,0,114,8,0,0,0,114, + 209,0,0,0,99,5,0,0,115,16,0,0,0,0,4,4, + 1,12,1,26,1,6,2,10,1,6,1,8,1,122,19,70, + 105,108,101,70,105,110,100,101,114,46,95,95,105,110,105,116, + 95,95,99,1,0,0,0,0,0,0,0,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,104,0, + 0,0,78,41,1,114,58,1,0,0,114,246,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,8,0,0,0,114,38, + 1,0,0,113,5,0,0,115,2,0,0,0,0,2,122,28, + 70,105,108,101,70,105,110,100,101,114,46,105,110,118,97,108, + 105,100,97,116,101,95,99,97,99,104,101,115,99,2,0,0, + 0,0,0,0,0,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,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,71,0,0,0,114, - 28,0,0,0,114,104,0,0,0,114,209,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,41,0,0,0,114,49,0,0,0,114,44, - 0,0,0,114,4,0,0,0,114,55,0,0,0,114,0,1, - 0,0,114,50,0,0,0,114,58,1,0,0,218,11,95,102, - 105,108,108,95,99,97,99,104,101,114,9,0,0,0,114,61, - 1,0,0,114,105,0,0,0,114,60,1,0,0,114,38,0, - 0,0,114,57,1,0,0,114,54,0,0,0,114,51,1,0, - 0,114,56,0,0,0,114,134,0,0,0,114,149,0,0,0, - 114,183,0,0,0,114,178,0,0,0,41,14,114,118,0,0, - 0,114,139,0,0,0,114,202,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,169,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,8,1,0,0, - 114,188,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, - 187,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, - 0,0,0,114,203,0,0,0,136,5,0,0,115,72,0,0, - 0,0,5,4,1,14,1,2,1,24,1,12,1,10,1,10, - 1,8,1,6,2,6,1,6,1,10,2,6,1,4,2,8, - 1,12,1,14,1,8,1,10,1,8,1,26,4,8,2,14, - 1,16,1,16,1,12,1,8,1,10,1,4,255,10,2,6, - 1,12,1,12,1,8,1,4,1,122,20,70,105,108,101,70, - 105,110,100,101,114,46,102,105,110,100,95,115,112,101,99,99, - 1,0,0,0,0,0,0,0,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,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,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,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,0,0,0,0,114,71,0,0,0,114,61,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,5,0,0,0,41,1,114,105,0,0,0,41,2, - 114,32,0,0,0,90,2,102,110,114,5,0,0,0,114,5, - 0,0,0,114,8,0,0,0,218,9,60,115,101,116,99,111, - 109,112,62,213,5,0,0,114,56,1,0,0,122,41,70,105, - 108,101,70,105,110,100,101,114,46,95,102,105,108,108,95,99, - 97,99,104,101,46,60,108,111,99,97,108,115,62,46,60,115, - 101,116,99,111,109,112,62,78,41,18,114,44,0,0,0,114, - 4,0,0,0,90,7,108,105,115,116,100,105,114,114,55,0, - 0,0,114,45,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,1,0,0, - 0,114,10,0,0,0,114,11,0,0,0,114,59,1,0,0, - 114,60,1,0,0,114,100,0,0,0,114,62,0,0,0,114, - 105,0,0,0,218,3,97,100,100,114,12,0,0,0,114,61, - 1,0,0,41,9,114,118,0,0,0,114,44,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,33,1,0,0,114,116,0,0,0,114,20,1,0,0,114, - 8,1,0,0,90,8,110,101,119,95,110,97,109,101,114,5, - 0,0,0,114,5,0,0,0,114,8,0,0,0,114,63,1, - 0,0,184,5,0,0,115,34,0,0,0,0,2,6,1,2, - 1,22,1,18,3,10,3,12,1,12,7,6,1,8,1,16, - 1,4,1,18,2,4,1,12,1,6,1,12,1,122,22,70, - 105,108,101,70,105,110,100,101,114,46,95,102,105,108,108,95, - 99,97,99,104,101,99,1,0,0,0,0,0,0,0,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,3,97,20,1,0,0,65,32,99,108, - 97,115,115,32,109,101,116,104,111,100,32,119,104,105,99,104, - 32,114,101,116,117,114,110,115,32,97,32,99,108,111,115,117, - 114,101,32,116,111,32,117,115,101,32,111,110,32,115,121,115, - 46,112,97,116,104,95,104,111,111,107,10,32,32,32,32,32, - 32,32,32,119,104,105,99,104,32,119,105,108,108,32,114,101, - 116,117,114,110,32,97,110,32,105,110,115,116,97,110,99,101, - 32,117,115,105,110,103,32,116,104,101,32,115,112,101,99,105, - 102,105,101,100,32,108,111,97,100,101,114,115,32,97,110,100, - 32,116,104,101,32,112,97,116,104,10,32,32,32,32,32,32, - 32,32,99,97,108,108,101,100,32,111,110,32,116,104,101,32, - 99,108,111,115,117,114,101,46,10,10,32,32,32,32,32,32, - 32,32,73,102,32,116,104,101,32,112,97,116,104,32,99,97, - 108,108,101,100,32,111,110,32,116,104,101,32,99,108,111,115, - 117,114,101,32,105,115,32,110,111,116,32,97,32,100,105,114, - 101,99,116,111,114,121,44,32,73,109,112,111,114,116,69,114, - 114,111,114,32,105,115,10,32,32,32,32,32,32,32,32,114, - 97,105,115,101,100,46,10,10,32,32,32,32,32,32,32,32, - 99,1,0,0,0,0,0,0,0,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,3,122,45,80,97,116,104,32,104,111,111,107,32, - 102,111,114,32,105,109,112,111,114,116,108,105,98,46,109,97, - 99,104,105,110,101,114,121,46,70,105,108,101,70,105,110,100, - 101,114,46,122,30,111,110,108,121,32,100,105,114,101,99,116, - 111,114,105,101,115,32,97,114,101,32,115,117,112,112,111,114, - 116,101,100,114,48,0,0,0,41,2,114,56,0,0,0,114, - 117,0,0,0,114,48,0,0,0,169,2,114,193,0,0,0, - 114,62,1,0,0,114,5,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,225,5,0,0,115,6,0, - 0,0,0,2,8,1,12,1,122,54,70,105,108,101,70,105, - 110,100,101,114,46,112,97,116,104,95,104,111,111,107,46,60, - 108,111,99,97,108,115,62,46,112,97,116,104,95,104,111,111, - 107,95,102,111,114,95,70,105,108,101,70,105,110,100,101,114, - 114,5,0,0,0,41,3,114,193,0,0,0,114,62,1,0, - 0,114,69,1,0,0,114,5,0,0,0,114,68,1,0,0, - 114,8,0,0,0,218,9,112,97,116,104,95,104,111,111,107, - 215,5,0,0,115,4,0,0,0,0,10,14,6,122,20,70, - 105,108,101,70,105,110,100,101,114,46,112,97,116,104,95,104, - 111,111,107,99,1,0,0,0,0,0,0,0,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,62,0,0,0,114,44,0,0,0,114,246, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,8,0, - 0,0,114,31,1,0,0,233,5,0,0,115,2,0,0,0, - 0,1,122,19,70,105,108,101,70,105,110,100,101,114,46,95, - 95,114,101,112,114,95,95,41,1,78,41,15,114,125,0,0, - 0,114,124,0,0,0,114,126,0,0,0,114,127,0,0,0, - 114,209,0,0,0,114,38,1,0,0,114,143,0,0,0,114, - 206,0,0,0,114,137,0,0,0,114,51,1,0,0,114,203, - 0,0,0,114,63,1,0,0,114,207,0,0,0,114,70,1, - 0,0,114,31,1,0,0,114,5,0,0,0,114,5,0,0, - 0,114,5,0,0,0,114,8,0,0,0,114,54,1,0,0, - 90,5,0,0,115,22,0,0,0,8,2,4,7,8,14,8, - 4,4,2,8,12,8,5,10,48,8,31,2,1,10,17,114, - 54,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,36,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,110,18,4,0,116,5, - 121,138,1,0,1,0,1,0,89,0,110,2,48,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,55,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,140,0, - 0,0,114,5,1,0,0,114,255,0,0,0,114,190,0,0, - 0,218,9,69,120,99,101,112,116,105,111,110,41,6,90,2, - 110,115,114,116,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,140,0,0, - 0,114,187,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,8,0,0,0,218,14,95,102,105,120,95,117,112,95,109, - 111,100,117,108,101,239,5,0,0,115,34,0,0,0,0,2, - 10,1,10,1,4,1,4,1,8,1,8,1,12,2,10,1, - 4,1,14,1,2,1,8,1,8,1,8,1,12,1,12,2, - 114,75,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,1,122,95,82,101,116, - 117,114,110,115,32,97,32,108,105,115,116,32,111,102,32,102, - 105,108,101,45,98,97,115,101,100,32,109,111,100,117,108,101, - 32,108,111,97,100,101,114,115,46,10,10,32,32,32,32,69, - 97,99,104,32,105,116,101,109,32,105,115,32,97,32,116,117, - 112,108,101,32,40,108,111,97,100,101,114,44,32,115,117,102, - 102,105,120,101,115,41,46,10,32,32,32,32,41,7,114,252, - 0,0,0,114,163,0,0,0,218,18,101,120,116,101,110,115, - 105,111,110,95,115,117,102,102,105,120,101,115,114,255,0,0, - 0,114,101,0,0,0,114,5,1,0,0,114,88,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, + 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,203,0,0,0,114,140,0,0,0,114,178,0,0,0,41, + 3,114,118,0,0,0,114,139,0,0,0,114,187,0,0,0, 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,114, - 184,0,0,0,6,6,0,0,115,8,0,0,0,0,5,12, - 1,8,1,8,1,114,184,0,0,0,99,1,0,0,0,0, - 0,0,0,0,0,0,0,10,0,0,0,9,0,0,0,67, - 0,0,0,115,132,1,0,0,124,0,97,0,116,0,106,1, - 97,1,116,0,106,2,97,2,116,1,106,3,116,4,25,0, - 125,1,100,1,100,2,103,1,102,2,100,3,100,4,100,2, - 103,2,102,2,102,2,125,2,124,2,68,0,93,108,92,2, - 125,3,125,4,116,5,100,5,100,6,132,0,124,4,68,0, - 131,1,131,1,115,82,74,0,130,1,124,4,100,7,25,0, - 125,5,124,3,116,1,106,3,118,0,114,116,116,1,106,3, - 124,3,25,0,125,6,1,0,113,170,113,52,122,20,116,0, - 160,6,124,3,161,1,125,6,87,0,1,0,113,170,87,0, - 113,52,4,0,116,7,121,158,1,0,1,0,1,0,89,0, - 113,52,89,0,113,52,48,0,113,52,116,7,100,8,131,1, - 130,1,116,8,124,1,100,9,124,6,131,3,1,0,116,8, - 124,1,100,10,124,5,131,3,1,0,116,8,124,1,100,11, - 100,12,160,9,124,4,161,1,131,3,1,0,116,8,124,1, - 100,13,100,14,100,15,132,0,124,4,68,0,131,1,131,3, - 1,0,103,0,100,16,162,1,125,7,124,3,100,3,107,2, - 144,1,114,6,124,7,160,10,100,17,161,1,1,0,124,7, - 68,0,93,52,125,8,124,8,116,1,106,3,118,1,144,1, - 114,38,116,0,160,6,124,8,161,1,125,9,110,10,116,1, - 106,3,124,8,25,0,125,9,116,8,124,1,124,8,124,9, - 131,3,1,0,144,1,113,10,116,8,124,1,100,18,116,11, - 131,0,131,3,1,0,116,12,160,13,116,2,160,14,161,0, - 161,1,1,0,124,3,100,3,107,2,144,1,114,128,116,15, - 160,10,100,19,161,1,1,0,100,20,116,12,118,0,144,1, - 114,128,100,21,116,16,95,17,100,22,83,0,41,23,122,205, - 83,101,116,117,112,32,116,104,101,32,112,97,116,104,45,98, - 97,115,101,100,32,105,109,112,111,114,116,101,114,115,32,102, - 111,114,32,105,109,112,111,114,116,108,105,98,32,98,121,32, - 105,109,112,111,114,116,105,110,103,32,110,101,101,100,101,100, - 10,32,32,32,32,98,117,105,108,116,45,105,110,32,109,111, - 100,117,108,101,115,32,97,110,100,32,105,110,106,101,99,116, - 105,110,103,32,116,104,101,109,32,105,110,116,111,32,116,104, - 101,32,103,108,111,98,97,108,32,110,97,109,101,115,112,97, - 99,101,46,10,10,32,32,32,32,79,116,104,101,114,32,99, - 111,109,112,111,110,101,110,116,115,32,97,114,101,32,101,120, - 116,114,97,99,116,101,100,32,102,114,111,109,32,116,104,101, - 32,99,111,114,101,32,98,111,111,116,115,116,114,97,112,32, - 109,111,100,117,108,101,46,10,10,32,32,32,32,90,5,112, - 111,115,105,120,250,1,47,90,2,110,116,250,1,92,99,1, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3, - 0,0,0,115,0,0,0,115,26,0,0,0,124,0,93,18, - 125,1,116,0,124,1,131,1,100,0,107,2,86,0,1,0, - 113,2,100,1,83,0,41,2,114,39,0,0,0,78,41,1, - 114,23,0,0,0,41,2,114,32,0,0,0,114,94,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, - 114,10,1,0,0,35,6,0,0,114,56,1,0,0,122,25, - 95,115,101,116,117,112,46,60,108,111,99,97,108,115,62,46, - 60,103,101,110,101,120,112,114,62,114,73,0,0,0,122,30, - 105,109,112,111,114,116,108,105,98,32,114,101,113,117,105,114, - 101,115,32,112,111,115,105,120,32,111,114,32,110,116,114,4, - 0,0,0,114,35,0,0,0,114,31,0,0,0,114,40,0, - 0,0,114,58,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,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,114,74,0, - 0,0,114,5,0,0,0,41,2,114,32,0,0,0,218,1, - 115,114,5,0,0,0,114,5,0,0,0,114,8,0,0,0, - 114,64,1,0,0,52,6,0,0,114,56,1,0,0,122,25, - 95,115,101,116,117,112,46,60,108,111,99,97,108,115,62,46, - 60,115,101,116,99,111,109,112,62,41,3,114,64,0,0,0, - 114,75,0,0,0,114,160,0,0,0,114,192,0,0,0,114, - 9,0,0,0,122,4,46,112,121,119,122,6,95,100,46,112, - 121,100,84,78,41,18,114,134,0,0,0,114,1,0,0,0, - 114,163,0,0,0,114,22,1,0,0,114,125,0,0,0,218, - 3,97,108,108,90,18,95,98,117,105,108,116,105,110,95,102, - 114,111,109,95,110,97,109,101,114,117,0,0,0,114,129,0, - 0,0,114,36,0,0,0,114,186,0,0,0,114,14,0,0, - 0,114,12,1,0,0,114,167,0,0,0,114,76,1,0,0, - 114,101,0,0,0,114,191,0,0,0,114,195,0,0,0,41, - 10,218,17,95,98,111,111,116,115,116,114,97,112,95,109,111, - 100,117,108,101,90,11,115,101,108,102,95,109,111,100,117,108, - 101,90,10,111,115,95,100,101,116,97,105,108,115,90,10,98, - 117,105,108,116,105,110,95,111,115,114,31,0,0,0,114,35, - 0,0,0,90,9,111,115,95,109,111,100,117,108,101,90,13, - 98,117,105,108,116,105,110,95,110,97,109,101,115,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,8,0,0,0,218,6,95,115,101,116, - 117,112,17,6,0,0,115,70,0,0,0,0,8,4,1,6, - 1,6,2,10,3,22,1,12,2,22,1,8,1,10,1,10, - 1,6,2,2,1,10,1,10,1,12,1,12,2,8,2,12, - 1,12,1,18,1,22,3,8,1,10,1,10,1,8,1,12, - 1,12,2,10,1,16,3,14,1,14,1,10,1,10,1,10, - 1,114,82,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,82,1,0,0,114,184,0,0,0, - 114,1,0,0,0,114,43,1,0,0,114,167,0,0,0,114, - 54,1,0,0,114,70,1,0,0,218,9,109,101,116,97,95, - 112,97,116,104,114,186,0,0,0,114,37,1,0,0,41,2, - 114,81,1,0,0,90,17,115,117,112,112,111,114,116,101,100, - 95,108,111,97,100,101,114,115,114,5,0,0,0,114,5,0, - 0,0,114,8,0,0,0,218,8,95,105,110,115,116,97,108, - 108,74,6,0,0,115,8,0,0,0,0,2,8,1,6,1, - 20,1,114,84,1,0,0,41,1,114,60,0,0,0,41,1, - 78,41,3,78,78,78,41,2,114,73,0,0,0,114,73,0, - 0,0,41,1,84,41,1,78,41,1,78,41,63,114,127,0, - 0,0,114,13,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,12, - 0,0,0,114,14,0,0,0,114,21,0,0,0,114,27,0, - 0,0,114,29,0,0,0,114,38,0,0,0,114,47,0,0, - 0,114,49,0,0,0,114,53,0,0,0,114,54,0,0,0, - 114,56,0,0,0,114,59,0,0,0,114,69,0,0,0,218, - 4,116,121,112,101,218,8,95,95,99,111,100,101,95,95,114, - 162,0,0,0,114,19,0,0,0,114,148,0,0,0,114,18, - 0,0,0,114,24,0,0,0,114,236,0,0,0,114,91,0, - 0,0,114,87,0,0,0,114,101,0,0,0,114,88,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,97,0,0,0,114,102,0,0, - 0,114,108,0,0,0,114,112,0,0,0,114,114,0,0,0, - 114,136,0,0,0,114,143,0,0,0,114,152,0,0,0,114, - 156,0,0,0,114,158,0,0,0,114,165,0,0,0,114,170, - 0,0,0,114,171,0,0,0,114,176,0,0,0,218,6,111, - 98,106,101,99,116,114,185,0,0,0,114,190,0,0,0,114, - 191,0,0,0,114,208,0,0,0,114,221,0,0,0,114,239, - 0,0,0,114,255,0,0,0,114,5,1,0,0,114,12,1, - 0,0,114,252,0,0,0,114,13,1,0,0,114,35,1,0, - 0,114,37,1,0,0,114,54,1,0,0,114,75,1,0,0, - 114,184,0,0,0,114,82,1,0,0,114,84,1,0,0,114, - 5,0,0,0,114,5,0,0,0,114,5,0,0,0,114,8, - 0,0,0,218,8,60,109,111,100,117,108,101,62,1,0,0, - 0,115,126,0,0,0,4,22,4,1,4,1,2,1,2,255, - 4,4,8,17,8,5,8,5,8,6,8,6,8,12,8,10, - 8,9,8,5,8,7,8,9,10,22,10,127,0,20,16,1, - 12,2,4,1,4,2,6,2,6,2,8,2,16,71,8,40, - 8,19,8,12,8,12,8,28,8,17,8,33,8,28,8,24, - 10,13,10,10,10,11,8,14,6,3,4,1,2,255,12,68, - 14,64,14,29,16,127,0,17,14,50,18,45,18,26,4,3, - 18,53,14,63,14,42,14,127,0,20,14,127,0,22,10,23, - 8,11,8,57, + 137,0,0,0,119,5,0,0,115,8,0,0,0,0,7,10, + 1,8,1,8,1,122,22,70,105,108,101,70,105,110,100,101, + 114,46,102,105,110,100,95,108,111,97,100,101,114,99,6,0, + 0,0,0,0,0,0,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,177,0,0,0,41,1,114, + 190,0,0,0,41,7,114,118,0,0,0,114,188,0,0,0, + 114,139,0,0,0,114,44,0,0,0,90,4,115,109,115,108, + 114,202,0,0,0,114,140,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,8,0,0,0,114,51,1,0,0,131,5, + 0,0,115,8,0,0,0,0,1,10,1,8,1,2,255,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,71,0,0,0,114,28,0,0,0,114,104, + 0,0,0,114,209,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,41, + 0,0,0,114,49,0,0,0,114,44,0,0,0,114,4,0, + 0,0,114,55,0,0,0,114,0,1,0,0,114,50,0,0, + 0,114,58,1,0,0,218,11,95,102,105,108,108,95,99,97, + 99,104,101,114,9,0,0,0,114,61,1,0,0,114,105,0, + 0,0,114,60,1,0,0,114,38,0,0,0,114,57,1,0, + 0,114,54,0,0,0,114,51,1,0,0,114,56,0,0,0, + 114,134,0,0,0,114,149,0,0,0,114,183,0,0,0,114, + 178,0,0,0,41,14,114,118,0,0,0,114,139,0,0,0, + 114,202,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,169,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,8,1,0,0,114,188,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,187,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,8,0,0,0,114,203,0, + 0,0,136,5,0,0,115,72,0,0,0,0,5,4,1,14, + 1,2,1,24,1,12,1,10,1,10,1,8,1,6,2,6, + 1,6,1,10,2,6,1,4,2,8,1,12,1,14,1,8, + 1,10,1,8,1,24,4,8,2,14,1,16,1,16,1,12, + 1,8,1,10,1,4,255,8,2,6,1,12,1,12,1,8, + 1,4,1,122,20,70,105,108,101,70,105,110,100,101,114,46, + 102,105,110,100,95,115,112,101,99,99,1,0,0,0,0,0, + 0,0,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,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,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,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,0,0,0,0, + 114,71,0,0,0,114,61,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,5,0,0, + 0,41,1,114,105,0,0,0,41,2,114,32,0,0,0,90, + 2,102,110,114,5,0,0,0,114,5,0,0,0,114,8,0, + 0,0,218,9,60,115,101,116,99,111,109,112,62,213,5,0, + 0,114,56,1,0,0,122,41,70,105,108,101,70,105,110,100, + 101,114,46,95,102,105,108,108,95,99,97,99,104,101,46,60, + 108,111,99,97,108,115,62,46,60,115,101,116,99,111,109,112, + 62,78,41,18,114,44,0,0,0,114,4,0,0,0,90,7, + 108,105,115,116,100,105,114,114,55,0,0,0,114,45,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,1,0,0,0,114,10,0,0,0, + 114,11,0,0,0,114,59,1,0,0,114,60,1,0,0,114, + 100,0,0,0,114,62,0,0,0,114,105,0,0,0,218,3, + 97,100,100,114,12,0,0,0,114,61,1,0,0,41,9,114, + 118,0,0,0,114,44,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,33,1,0,0,114, + 116,0,0,0,114,20,1,0,0,114,8,1,0,0,90,8, + 110,101,119,95,110,97,109,101,114,5,0,0,0,114,5,0, + 0,0,114,8,0,0,0,114,63,1,0,0,184,5,0,0, + 115,34,0,0,0,0,2,6,1,2,1,22,1,18,3,10, + 3,12,1,12,7,6,1,8,1,16,1,4,1,18,2,4, + 1,12,1,6,1,12,1,122,22,70,105,108,101,70,105,110, + 100,101,114,46,95,102,105,108,108,95,99,97,99,104,101,99, + 1,0,0,0,0,0,0,0,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, + 3,97,20,1,0,0,65,32,99,108,97,115,115,32,109,101, + 116,104,111,100,32,119,104,105,99,104,32,114,101,116,117,114, + 110,115,32,97,32,99,108,111,115,117,114,101,32,116,111,32, + 117,115,101,32,111,110,32,115,121,115,46,112,97,116,104,95, + 104,111,111,107,10,32,32,32,32,32,32,32,32,119,104,105, + 99,104,32,119,105,108,108,32,114,101,116,117,114,110,32,97, + 110,32,105,110,115,116,97,110,99,101,32,117,115,105,110,103, + 32,116,104,101,32,115,112,101,99,105,102,105,101,100,32,108, + 111,97,100,101,114,115,32,97,110,100,32,116,104,101,32,112, + 97,116,104,10,32,32,32,32,32,32,32,32,99,97,108,108, + 101,100,32,111,110,32,116,104,101,32,99,108,111,115,117,114, + 101,46,10,10,32,32,32,32,32,32,32,32,73,102,32,116, + 104,101,32,112,97,116,104,32,99,97,108,108,101,100,32,111, + 110,32,116,104,101,32,99,108,111,115,117,114,101,32,105,115, + 32,110,111,116,32,97,32,100,105,114,101,99,116,111,114,121, + 44,32,73,109,112,111,114,116,69,114,114,111,114,32,105,115, + 10,32,32,32,32,32,32,32,32,114,97,105,115,101,100,46, + 10,10,32,32,32,32,32,32,32,32,99,1,0,0,0,0, + 0,0,0,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,3,122,45, + 80,97,116,104,32,104,111,111,107,32,102,111,114,32,105,109, + 112,111,114,116,108,105,98,46,109,97,99,104,105,110,101,114, + 121,46,70,105,108,101,70,105,110,100,101,114,46,122,30,111, + 110,108,121,32,100,105,114,101,99,116,111,114,105,101,115,32, + 97,114,101,32,115,117,112,112,111,114,116,101,100,114,48,0, + 0,0,41,2,114,56,0,0,0,114,117,0,0,0,114,48, + 0,0,0,169,2,114,193,0,0,0,114,62,1,0,0,114, + 5,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,225,5,0,0,115,6,0,0,0,0,2,8,1, + 12,1,122,54,70,105,108,101,70,105,110,100,101,114,46,112, + 97,116,104,95,104,111,111,107,46,60,108,111,99,97,108,115, + 62,46,112,97,116,104,95,104,111,111,107,95,102,111,114,95, + 70,105,108,101,70,105,110,100,101,114,114,5,0,0,0,41, + 3,114,193,0,0,0,114,62,1,0,0,114,69,1,0,0, + 114,5,0,0,0,114,68,1,0,0,114,8,0,0,0,218, + 9,112,97,116,104,95,104,111,111,107,215,5,0,0,115,4, + 0,0,0,0,10,14,6,122,20,70,105,108,101,70,105,110, + 100,101,114,46,112,97,116,104,95,104,111,111,107,99,1,0, + 0,0,0,0,0,0,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,62, + 0,0,0,114,44,0,0,0,114,246,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,8,0,0,0,114,31,1,0, + 0,233,5,0,0,115,2,0,0,0,0,1,122,19,70,105, + 108,101,70,105,110,100,101,114,46,95,95,114,101,112,114,95, + 95,41,1,78,41,15,114,125,0,0,0,114,124,0,0,0, + 114,126,0,0,0,114,127,0,0,0,114,209,0,0,0,114, + 38,1,0,0,114,143,0,0,0,114,206,0,0,0,114,137, + 0,0,0,114,51,1,0,0,114,203,0,0,0,114,63,1, + 0,0,114,207,0,0,0,114,70,1,0,0,114,31,1,0, + 0,114,5,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,8,0,0,0,114,54,1,0,0,90,5,0,0,115,22, + 0,0,0,8,2,4,7,8,14,8,4,4,2,8,12,8, + 5,10,48,8,31,2,1,10,17,114,54,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,36,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,110,18,4,0,116,5,121,138,1,0,1,0, + 1,0,89,0,110,2,48,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,55,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,140,0,0,0,114,5,1,0, + 0,114,255,0,0,0,114,190,0,0,0,218,9,69,120,99, + 101,112,116,105,111,110,41,6,90,2,110,115,114,116,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,140,0,0,0,114,187,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,218, + 14,95,102,105,120,95,117,112,95,109,111,100,117,108,101,239, + 5,0,0,115,34,0,0,0,0,2,10,1,10,1,4,1, + 4,1,8,1,8,1,12,2,10,1,4,1,14,1,2,1, + 8,1,8,1,8,1,12,1,12,2,114,75,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,1,122,95,82,101,116,117,114,110,115,32,97, + 32,108,105,115,116,32,111,102,32,102,105,108,101,45,98,97, + 115,101,100,32,109,111,100,117,108,101,32,108,111,97,100,101, + 114,115,46,10,10,32,32,32,32,69,97,99,104,32,105,116, + 101,109,32,105,115,32,97,32,116,117,112,108,101,32,40,108, + 111,97,100,101,114,44,32,115,117,102,102,105,120,101,115,41, + 46,10,32,32,32,32,41,7,114,252,0,0,0,114,163,0, + 0,0,218,18,101,120,116,101,110,115,105,111,110,95,115,117, + 102,102,105,120,101,115,114,255,0,0,0,114,101,0,0,0, + 114,5,1,0,0,114,88,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,5,0,0,0,114, + 5,0,0,0,114,8,0,0,0,114,184,0,0,0,6,6, + 0,0,115,8,0,0,0,0,5,12,1,8,1,8,1,114, + 184,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0, + 0,10,0,0,0,9,0,0,0,67,0,0,0,115,130,1, + 0,0,124,0,97,0,116,0,106,1,97,1,116,0,106,2, + 97,2,116,1,106,3,116,4,25,0,125,1,100,1,100,2, + 103,1,102,2,100,3,100,4,100,2,103,2,102,2,102,2, + 125,2,124,2,68,0,93,106,92,2,125,3,125,4,116,5, + 100,5,100,6,132,0,124,4,68,0,131,1,131,1,115,82, + 74,0,130,1,124,4,100,7,25,0,125,5,124,3,116,1, + 106,3,118,0,114,116,116,1,106,3,124,3,25,0,125,6, + 1,0,113,168,113,52,122,20,116,0,160,6,124,3,161,1, + 125,6,87,0,1,0,113,168,87,0,113,52,4,0,116,7, + 121,158,1,0,1,0,1,0,89,0,113,52,89,0,113,52, + 48,0,116,7,100,8,131,1,130,1,116,8,124,1,100,9, + 124,6,131,3,1,0,116,8,124,1,100,10,124,5,131,3, + 1,0,116,8,124,1,100,11,100,12,160,9,124,4,161,1, + 131,3,1,0,116,8,124,1,100,13,100,14,100,15,132,0, + 124,4,68,0,131,1,131,3,1,0,103,0,100,16,162,1, + 125,7,124,3,100,3,107,2,144,1,114,4,124,7,160,10, + 100,17,161,1,1,0,124,7,68,0,93,52,125,8,124,8, + 116,1,106,3,118,1,144,1,114,36,116,0,160,6,124,8, + 161,1,125,9,110,10,116,1,106,3,124,8,25,0,125,9, + 116,8,124,1,124,8,124,9,131,3,1,0,144,1,113,8, + 116,8,124,1,100,18,116,11,131,0,131,3,1,0,116,12, + 160,13,116,2,160,14,161,0,161,1,1,0,124,3,100,3, + 107,2,144,1,114,126,116,15,160,10,100,19,161,1,1,0, + 100,20,116,12,118,0,144,1,114,126,100,21,116,16,95,17, + 100,22,83,0,41,23,122,205,83,101,116,117,112,32,116,104, + 101,32,112,97,116,104,45,98,97,115,101,100,32,105,109,112, + 111,114,116,101,114,115,32,102,111,114,32,105,109,112,111,114, + 116,108,105,98,32,98,121,32,105,109,112,111,114,116,105,110, + 103,32,110,101,101,100,101,100,10,32,32,32,32,98,117,105, + 108,116,45,105,110,32,109,111,100,117,108,101,115,32,97,110, + 100,32,105,110,106,101,99,116,105,110,103,32,116,104,101,109, + 32,105,110,116,111,32,116,104,101,32,103,108,111,98,97,108, + 32,110,97,109,101,115,112,97,99,101,46,10,10,32,32,32, + 32,79,116,104,101,114,32,99,111,109,112,111,110,101,110,116, + 115,32,97,114,101,32,101,120,116,114,97,99,116,101,100,32, + 102,114,111,109,32,116,104,101,32,99,111,114,101,32,98,111, + 111,116,115,116,114,97,112,32,109,111,100,117,108,101,46,10, + 10,32,32,32,32,90,5,112,111,115,105,120,250,1,47,90, + 2,110,116,250,1,92,99,1,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,3,0,0,0,115,0,0,0,115, + 26,0,0,0,124,0,93,18,125,1,116,0,124,1,131,1, + 100,0,107,2,86,0,1,0,113,2,100,1,83,0,41,2, + 114,39,0,0,0,78,41,1,114,23,0,0,0,41,2,114, + 32,0,0,0,114,94,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,8,0,0,0,114,10,1,0,0,35,6,0, + 0,114,56,1,0,0,122,25,95,115,101,116,117,112,46,60, + 108,111,99,97,108,115,62,46,60,103,101,110,101,120,112,114, + 62,114,73,0,0,0,122,30,105,109,112,111,114,116,108,105, + 98,32,114,101,113,117,105,114,101,115,32,112,111,115,105,120, + 32,111,114,32,110,116,114,4,0,0,0,114,35,0,0,0, + 114,31,0,0,0,114,40,0,0,0,114,58,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,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,114,74,0,0,0,114,5,0,0,0,41, + 2,114,32,0,0,0,218,1,115,114,5,0,0,0,114,5, + 0,0,0,114,8,0,0,0,114,64,1,0,0,52,6,0, + 0,114,56,1,0,0,122,25,95,115,101,116,117,112,46,60, + 108,111,99,97,108,115,62,46,60,115,101,116,99,111,109,112, + 62,41,3,114,64,0,0,0,114,75,0,0,0,114,160,0, + 0,0,114,192,0,0,0,114,9,0,0,0,122,4,46,112, + 121,119,122,6,95,100,46,112,121,100,84,78,41,18,114,134, + 0,0,0,114,1,0,0,0,114,163,0,0,0,114,22,1, + 0,0,114,125,0,0,0,218,3,97,108,108,90,18,95,98, + 117,105,108,116,105,110,95,102,114,111,109,95,110,97,109,101, + 114,117,0,0,0,114,129,0,0,0,114,36,0,0,0,114, + 186,0,0,0,114,14,0,0,0,114,12,1,0,0,114,167, + 0,0,0,114,76,1,0,0,114,101,0,0,0,114,191,0, + 0,0,114,195,0,0,0,41,10,218,17,95,98,111,111,116, + 115,116,114,97,112,95,109,111,100,117,108,101,90,11,115,101, + 108,102,95,109,111,100,117,108,101,90,10,111,115,95,100,101, + 116,97,105,108,115,90,10,98,117,105,108,116,105,110,95,111, + 115,114,31,0,0,0,114,35,0,0,0,90,9,111,115,95, + 109,111,100,117,108,101,90,13,98,117,105,108,116,105,110,95, + 110,97,109,101,115,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,8,0, + 0,0,218,6,95,115,101,116,117,112,17,6,0,0,115,70, + 0,0,0,0,8,4,1,6,1,6,2,10,3,22,1,12, + 2,22,1,8,1,10,1,10,1,6,2,2,1,10,1,10, + 1,12,1,10,2,8,2,12,1,12,1,18,1,22,3,8, + 1,10,1,10,1,8,1,12,1,12,2,10,1,16,3,14, + 1,14,1,10,1,10,1,10,1,114,82,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,82, + 1,0,0,114,184,0,0,0,114,1,0,0,0,114,43,1, + 0,0,114,167,0,0,0,114,54,1,0,0,114,70,1,0, + 0,218,9,109,101,116,97,95,112,97,116,104,114,186,0,0, + 0,114,37,1,0,0,41,2,114,81,1,0,0,90,17,115, + 117,112,112,111,114,116,101,100,95,108,111,97,100,101,114,115, + 114,5,0,0,0,114,5,0,0,0,114,8,0,0,0,218, + 8,95,105,110,115,116,97,108,108,74,6,0,0,115,8,0, + 0,0,0,2,8,1,6,1,20,1,114,84,1,0,0,41, + 1,114,60,0,0,0,41,1,78,41,3,78,78,78,41,2, + 114,73,0,0,0,114,73,0,0,0,41,1,84,41,1,78, + 41,1,78,41,63,114,127,0,0,0,114,13,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,12,0,0,0,114,14,0,0,0, + 114,21,0,0,0,114,27,0,0,0,114,29,0,0,0,114, + 38,0,0,0,114,47,0,0,0,114,49,0,0,0,114,53, + 0,0,0,114,54,0,0,0,114,56,0,0,0,114,59,0, + 0,0,114,69,0,0,0,218,4,116,121,112,101,218,8,95, + 95,99,111,100,101,95,95,114,162,0,0,0,114,19,0,0, + 0,114,148,0,0,0,114,18,0,0,0,114,24,0,0,0, + 114,236,0,0,0,114,91,0,0,0,114,87,0,0,0,114, + 101,0,0,0,114,88,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, + 97,0,0,0,114,102,0,0,0,114,108,0,0,0,114,112, + 0,0,0,114,114,0,0,0,114,136,0,0,0,114,143,0, + 0,0,114,152,0,0,0,114,156,0,0,0,114,158,0,0, + 0,114,165,0,0,0,114,170,0,0,0,114,171,0,0,0, + 114,176,0,0,0,218,6,111,98,106,101,99,116,114,185,0, + 0,0,114,190,0,0,0,114,191,0,0,0,114,208,0,0, + 0,114,221,0,0,0,114,239,0,0,0,114,255,0,0,0, + 114,5,1,0,0,114,12,1,0,0,114,252,0,0,0,114, + 13,1,0,0,114,35,1,0,0,114,37,1,0,0,114,54, + 1,0,0,114,75,1,0,0,114,184,0,0,0,114,82,1, + 0,0,114,84,1,0,0,114,5,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,8,0,0,0,218,8,60,109,111, + 100,117,108,101,62,1,0,0,0,115,126,0,0,0,4,22, + 4,1,4,1,2,1,2,255,4,4,8,17,8,5,8,5, + 8,6,8,6,8,12,8,10,8,9,8,5,8,7,8,9, + 10,22,10,127,0,20,16,1,12,2,4,1,4,2,6,2, + 6,2,8,2,16,71,8,40,8,19,8,12,8,12,8,28, + 8,17,8,33,8,28,8,24,10,13,10,10,10,11,8,14, + 6,3,4,1,2,255,12,68,14,64,14,29,16,127,0,17, + 14,50,18,45,18,26,4,3,18,53,14,63,14,42,14,127, + 0,20,14,127,0,22,10,23,8,11,8,57, }; diff --git a/Python/importlib_zipimport.h b/Python/importlib_zipimport.h index be7d24fe1df257c..a70d7d2fe780706 100644 --- a/Python/importlib_zipimport.h +++ b/Python/importlib_zipimport.h @@ -502,460 +502,459 @@ const unsigned char _Py_M__zipimport[] = { 0,0,114,9,0,0,0,114,10,0,0,0,114,37,0,0, 0,53,1,0,0,115,4,0,0,0,0,4,8,2,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,56,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, - 36,92,3,125,3,125,4,125,5,124,2,124,3,23,0,125, + 34,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,113,14,100,0,83,0,114,86,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,47,0,0,0,114,63,0,0,0,114,9,0,0,0, - 114,9,0,0,0,114,10,0,0,0,114,35,0,0,0,62, - 1,0,0,115,12,0,0,0,0,1,10,1,14,1,8,1, - 10,1,10,1,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,2,5,0,0,122,14,116,0,160,1,124,0,161, - 1,125,1,87,0,110,36,4,0,116,2,121,50,1,0,1, - 0,1,0,116,3,100,1,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,89,0,110,2,48,0,124,1,144,4,143, - 164,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,36,4,0,116,2,121,132,1, - 0,1,0,1,0,116,3,100,4,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,89,0,110,2,48,0,116,8,124, - 3,131,1,116,5,107,3,114,164,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,170,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,36,4,0,116,2,121,242,1,0,1, - 0,1,0,116,3,100,4,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,89,0,110,2,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,38,4,0,116,2,144,1,121,66,1,0,1, + 0,83,0,100,0,83,0,114,86,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, + 47,0,0,0,114,63,0,0,0,114,9,0,0,0,114,9, + 0,0,0,114,10,0,0,0,114,35,0,0,0,62,1,0, + 0,115,12,0,0,0,0,1,10,1,14,1,8,1,10,1, + 8,1,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,2,5,0,0,122,14,116,0,160,1,124,0,161,1,125, + 1,87,0,110,36,4,0,116,2,121,50,1,0,1,0,1, + 0,116,3,100,1,124,0,155,2,157,2,124,0,100,2,141, + 2,130,1,89,0,110,2,48,0,124,1,144,4,143,164,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,36,4,0,116,2,121,132,1,0,1, 0,1,0,116,3,100,4,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,89,0,110,2,48,0,124,6,160,12,116, - 9,161,1,125,7,124,7,100,6,107,0,144,1,114,106,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,154,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,230,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,2,114,2,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,46,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,38,4,0,116, - 2,144,2,121,106,1,0,1,0,1,0,116,3,100,4,124, + 2,141,2,130,1,89,0,110,2,48,0,116,8,124,3,131, + 1,116,5,107,3,114,164,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,170,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,36,4,0,116,2,121,242,1,0,1,0,1, + 0,116,3,100,4,124,0,155,2,157,2,124,0,100,2,141, + 2,130,1,89,0,110,2,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,38,4,0,116,2,144,1,121,66,1,0,1,0,1, + 0,116,3,100,4,124,0,155,2,157,2,124,0,100,2,141, + 2,130,1,89,0,110,2,48,0,124,6,160,12,116,9,161, + 1,125,7,124,7,100,6,107,0,144,1,114,106,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,154,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,230,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,2,114,2,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, + 46,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,38,4,0,116,2,144, + 2,121,106,1,0,1,0,1,0,116,3,100,4,124,0,155, + 2,157,2,124,0,100,2,141,2,130,1,89,0,110,2,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,140,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,162,144,4,113,208,116,8,124,3,131,1,100,15,107, + 3,144,2,114,184,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,144,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,38,4,0,116, + 2,144,3,121,204,1,0,1,0,1,0,116,3,100,4,124, 0,155,2,157,2,124,0,100,2,141,2,130,1,89,0,110, - 2,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,140,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,162,144,4,113,208,116,8,124,3,131,1,100, - 15,107,3,144,2,114,184,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,144,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,38,4, - 0,116,2,144,3,121,204,1,0,1,0,1,0,116,3,100, - 4,124,0,155,2,157,2,124,0,100,2,141,2,130,1,89, - 0,110,2,48,0,116,8,124,23,131,1,124,19,107,3,144, - 3,114,238,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,30,116,3,100,4,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,87,0,110,38,4,0,116,2,144,4,121, - 70,1,0,1,0,1,0,116,3,100,4,124,0,155,2,157, - 2,124,0,100,2,141,2,130,1,89,0,110,2,48,0,124, - 13,100,28,64,0,144,4,114,92,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,142,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,108,87,0,100,0,4,0,4,0,131, - 3,1,0,110,18,49,0,144,4,115,230,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,84,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, - 51,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,62,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,76, - 0,0,0,114,77,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,59,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,93,1,0,0,115,212,0, - 0,0,0,1,2,1,14,1,12,1,24,2,8,1,2,1, - 14,1,8,1,14,1,12,1,24,1,12,1,18,1,18,3, - 2,1,12,1,12,1,12,1,10,1,2,255,12,2,8,1, - 2,255,2,1,2,255,4,2,2,1,10,1,12,1,14,1, - 10,1,2,255,12,2,10,1,10,1,10,1,2,255,6,2, - 16,1,14,1,10,1,2,255,6,2,16,2,16,1,16,1, - 10,1,18,1,10,1,18,1,8,1,8,1,10,1,18,2, - 4,2,4,1,2,1,14,1,14,1,24,2,10,1,14,1, - 8,2,18,1,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,2,2,1,14,1,14,1,24,1, - 14,1,18,4,2,1,28,1,22,1,14,1,24,2,10,2, - 10,3,2,1,14,1,14,1,22,2,12,1,12,1,20,1, - 8,1,44,1,14,1,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,110,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,62,122,16,100,4,100,5,108,4, - 109,5,125,0,1,0,87,0,110,36,4,0,116,6,121,80, - 1,0,1,0,1,0,116,1,160,2,100,1,161,1,1,0, - 116,3,100,2,131,1,130,1,89,0,110,2,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,76,0,0,0,114,77,0, - 0,0,114,3,0,0,0,90,4,122,108,105,98,114,139,0, - 0,0,218,9,69,120,99,101,112,116,105,111,110,114,138,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,251,1,0,0,115,24,0,0,0, - 0,2,4,3,10,1,8,2,4,1,4,1,16,1,12,1, - 10,1,16,2,12,2,10,1,114,142,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,144,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,14,125,10,122,14,124, - 10,160,3,124,6,161,1,1,0,87,0,110,36,4,0,116, - 4,121,100,1,0,1,0,1,0,116,0,100,3,124,0,155, - 2,157,2,124,0,100,4,141,2,130,1,89,0,110,2,48, - 0,124,10,160,5,100,5,161,1,125,11,116,6,124,11,131, - 1,100,5,107,3,114,132,116,7,100,6,131,1,130,1,124, - 11,100,0,100,7,133,2,25,0,100,8,107,3,114,166,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,38,4,0,116,4,144,1,121,14,1,0,1, - 0,1,0,116,0,100,3,124,0,155,2,157,2,124,0,100, - 4,141,2,130,1,89,0,110,2,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,48,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,70,48, - 0,1,0,1,0,1,0,89,0,1,0,124,3,100,1,107, - 2,144,1,114,94,124,15,83,0,122,10,116,9,131,0,125, - 16,87,0,110,28,4,0,116,10,144,1,121,132,1,0,1, - 0,1,0,116,0,100,13,131,1,130,1,89,0,110,2,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,90,0,0,0,114,12,0,0, - 0,114,102,0,0,0,114,96,0,0,0,114,91,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,101,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,137,0,0,0,105,241,255, - 255,255,41,11,114,3,0,0,0,114,108,0,0,0,114,109, - 0,0,0,114,110,0,0,0,114,22,0,0,0,114,112,0, - 0,0,114,51,0,0,0,114,117,0,0,0,114,1,0,0, - 0,114,142,0,0,0,114,141,0,0,0,41,17,114,29,0, - 0,0,114,54,0,0,0,90,8,100,97,116,97,112,97,116, - 104,114,128,0,0,0,114,132,0,0,0,114,123,0,0,0, - 114,135,0,0,0,114,129,0,0,0,114,130,0,0,0,114, - 131,0,0,0,114,121,0,0,0,114,122,0,0,0,114,133, - 0,0,0,114,134,0,0,0,114,125,0,0,0,90,8,114, - 97,119,95,100,97,116,97,114,139,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,114,52,0,0,0, - 16,2,0,0,115,62,0,0,0,0,1,20,1,8,1,8, - 2,14,2,2,1,14,1,12,1,24,1,10,1,12,1,8, - 2,16,2,18,2,16,1,16,1,12,1,8,1,2,1,14, - 1,14,1,24,1,10,1,14,1,40,2,10,2,4,3,2, - 1,10,1,14,1,14,1,114,52,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,62,2,0, - 0,115,2,0,0,0,0,2,114,145,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,56,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,178,124,6,100, - 4,64,0,100,3,107,3,125,8,116,3,106,4,100,5,107, - 3,114,176,124,8,115,102,116,3,106,4,100,6,107,2,114, - 176,116,5,124,0,124,2,131,2,125,9,124,9,100,0,117, - 1,114,176,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,20,4,0,116,2,121,174,1,0,1, - 0,1,0,89,0,100,0,83,0,48,0,110,84,116,9,124, - 0,124,2,131,2,92,2,125,11,125,12,124,11,144,1,114, - 6,116,10,116,11,124,4,100,7,100,8,133,2,25,0,131, - 1,124,11,131,2,114,242,116,11,124,4,100,8,100,9,133, - 2,25,0,131,1,124,12,107,3,144,1,114,6,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,52,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,59,0,0,0,114,13,0, - 0,0,114,5,0,0,0,114,0,0,0,0,114,84,0,0, - 0,90,5,110,101,118,101,114,90,6,97,108,119,97,121,115, - 114,97,0,0,0,114,92,0,0,0,114,93,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,75,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,145,0,0, - 0,114,2,0,0,0,114,76,0,0,0,114,77,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,53,0,0,0,114,63,0,0,0,114,38,0, - 0,0,114,124,0,0,0,90,11,101,120,99,95,100,101,116, - 97,105,108,115,114,127,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,148,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,46,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,72,2,0,0,115,82,0,0,0,0, - 2,2,1,2,254,6,5,2,1,18,1,12,1,8,2,12, - 1,4,1,12,1,10,1,2,255,2,1,8,255,2,2,10, - 1,8,1,4,1,4,1,2,254,4,5,2,1,4,1,8, - 255,8,2,12,1,10,3,8,255,6,3,6,3,22,1,18, - 255,4,2,4,1,8,255,4,2,4,2,18,1,12,1,16, - 1,114,153,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,123, - 2,0,0,115,6,0,0,0,0,1,12,1,12,1,114,157, - 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,74,0,0, - 0,84,41,1,90,12,100,111,110,116,95,105,110,104,101,114, - 105,116,41,2,114,157,0,0,0,218,7,99,111,109,112,105, - 108,101,41,2,114,53,0,0,0,114,156,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,130,2, - 0,0,115,4,0,0,0,0,1,8,1,114,159,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,84,0,0,0,114,14,0, - 0,0,41,2,114,129,0,0,0,90,6,109,107,116,105,109, - 101,41,2,218,1,100,114,136,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,136,2,0,0,115,18, - 0,0,0,0,1,4,1,10,1,10,1,6,1,6,1,10, - 1,10,1,6,249,114,167,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,114,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,100,0,83,0,41,7,78,114,14,0, - 0,0,169,2,218,1,99,218,1,111,114,161,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,167,0,0, - 0,114,26,0,0,0,218,10,73,110,100,101,120,69,114,114, - 111,114,114,152,0,0,0,41,6,114,32,0,0,0,114,13, - 0,0,0,114,54,0,0,0,114,129,0,0,0,114,130,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,149,0,0,0,149,2,0,0,115,20,0, - 0,0,0,1,2,2,20,1,12,1,10,3,8,1,8,1, - 8,1,16,1,18,1,114,149,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,84,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,100,0,83,0,41,3,78, - 114,14,0,0,0,114,168,0,0,0,41,4,114,28,0,0, - 0,114,26,0,0,0,114,52,0,0,0,114,29,0,0,0, - 41,3,114,32,0,0,0,114,13,0,0,0,114,54,0,0, - 0,114,9,0,0,0,114,9,0,0,0,114,10,0,0,0, - 114,147,0,0,0,168,2,0,0,115,14,0,0,0,0,2, - 20,1,12,2,2,1,14,1,12,1,8,2,114,147,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,196,0,0,0,116, - 0,124,0,124,1,131,2,125,2,116,1,68,0,93,158,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,113,14,116,11,100, - 5,124,1,155,2,157,2,124,1,100,6,141,2,130,1,100, - 0,83,0,41,7,78,122,13,116,114,121,105,110,103,32,123, - 125,123,125,123,125,114,84,0,0,0,41,1,90,9,118,101, - 114,98,111,115,105,116,121,114,0,0,0,0,114,57,0,0, - 0,114,58,0,0,0,41,12,114,36,0,0,0,114,87,0, - 0,0,114,76,0,0,0,114,77,0,0,0,114,29,0,0, - 0,114,20,0,0,0,114,28,0,0,0,114,26,0,0,0, - 114,52,0,0,0,114,153,0,0,0,114,159,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,88,0,0,0,114,89,0,0,0,114, - 47,0,0,0,114,63,0,0,0,114,54,0,0,0,114,40, - 0,0,0,114,124,0,0,0,114,46,0,0,0,114,9,0, - 0,0,114,9,0,0,0,114,10,0,0,0,114,44,0,0, - 0,183,2,0,0,115,36,0,0,0,0,1,10,1,14,1, - 8,1,22,1,2,1,14,1,12,1,6,2,8,1,12,1, - 4,1,18,2,10,1,8,3,2,1,8,1,16,2,114,44, - 0,0,0,41,44,114,82,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,76,0,0,0,114,146,0, - 0,0,114,108,0,0,0,114,150,0,0,0,114,67,0,0, - 0,114,129,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,75,0,0,0,114, - 3,0,0,0,114,25,0,0,0,218,4,116,121,112,101,114, - 70,0,0,0,114,111,0,0,0,114,113,0,0,0,114,115, - 0,0,0,114,4,0,0,0,114,87,0,0,0,114,36,0, - 0,0,114,37,0,0,0,114,35,0,0,0,114,27,0,0, - 0,114,120,0,0,0,114,140,0,0,0,114,142,0,0,0, - 114,52,0,0,0,114,145,0,0,0,114,153,0,0,0,218, - 8,95,95,99,111,100,101,95,95,114,151,0,0,0,114,157, - 0,0,0,114,159,0,0,0,114,167,0,0,0,114,149,0, - 0,0,114,147,0,0,0,114,44,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,84, - 0,0,0,4,16,8,1,16,1,8,1,8,1,8,1,8, - 1,8,1,8,2,8,3,6,1,14,3,16,4,4,2,8, - 2,4,1,4,1,4,2,14,127,0,125,12,1,12,1,2, - 1,2,252,4,9,8,4,8,9,8,31,8,126,2,254,2, - 29,4,5,8,21,8,46,8,10,8,46,10,5,8,7,8, - 6,8,13,8,19,8,15, + 2,48,0,116,8,124,23,131,1,124,19,107,3,144,3,114, + 238,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, + 30,116,3,100,4,124,0,155,2,157,2,124,0,100,2,141, + 2,130,1,87,0,110,38,4,0,116,2,144,4,121,70,1, + 0,1,0,1,0,116,3,100,4,124,0,155,2,157,2,124, + 0,100,2,141,2,130,1,89,0,110,2,48,0,124,13,100, + 28,64,0,144,4,114,92,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,142,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,108,87,0,100,0,4,0,4,0,131,3,1, + 0,110,18,49,0,144,4,115,230,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,84,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,51,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,62,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,76,0,0, + 0,114,77,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,59,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,93,1,0,0,115,212,0,0,0, + 0,1,2,1,14,1,12,1,24,2,8,1,2,1,14,1, + 8,1,14,1,12,1,24,1,12,1,18,1,18,3,2,1, + 12,1,12,1,12,1,10,1,2,255,12,2,8,1,2,255, + 2,1,2,255,4,2,2,1,10,1,12,1,14,1,10,1, + 2,255,12,2,10,1,10,1,10,1,2,255,6,2,16,1, + 14,1,10,1,2,255,6,2,16,2,16,1,16,1,10,1, + 18,1,10,1,18,1,8,1,8,1,10,1,18,2,4,2, + 4,1,2,1,14,1,14,1,24,2,10,1,14,1,8,2, + 18,1,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,2,2,1,14,1,14,1,24,1,14,1, + 18,4,2,1,28,1,22,1,14,1,24,2,10,2,10,3, + 2,1,14,1,14,1,22,2,12,1,12,1,20,1,8,1, + 44,1,14,1,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,110,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,62,122,16,100,4,100,5,108,4,109,5, + 125,0,1,0,87,0,110,36,4,0,116,6,121,80,1,0, + 1,0,1,0,116,1,160,2,100,1,161,1,1,0,116,3, + 100,2,131,1,130,1,89,0,110,2,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,76,0,0,0,114,77,0,0,0, + 114,3,0,0,0,90,4,122,108,105,98,114,139,0,0,0, + 218,9,69,120,99,101,112,116,105,111,110,114,138,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,251,1,0,0,115,24,0,0,0,0,2, + 4,3,10,1,8,2,4,1,4,1,16,1,12,1,10,1, + 16,2,12,2,10,1,114,142,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,144,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,14,125,10,122,14,124,10,160, + 3,124,6,161,1,1,0,87,0,110,36,4,0,116,4,121, + 100,1,0,1,0,1,0,116,0,100,3,124,0,155,2,157, + 2,124,0,100,4,141,2,130,1,89,0,110,2,48,0,124, + 10,160,5,100,5,161,1,125,11,116,6,124,11,131,1,100, + 5,107,3,114,132,116,7,100,6,131,1,130,1,124,11,100, + 0,100,7,133,2,25,0,100,8,107,3,114,166,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,38,4,0,116,4,144,1,121,14,1,0,1,0,1, + 0,116,0,100,3,124,0,155,2,157,2,124,0,100,4,141, + 2,130,1,89,0,110,2,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, + 48,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,70,48,0,1, + 0,1,0,1,0,89,0,1,0,124,3,100,1,107,2,144, + 1,114,94,124,15,83,0,122,10,116,9,131,0,125,16,87, + 0,110,28,4,0,116,10,144,1,121,132,1,0,1,0,1, + 0,116,0,100,13,131,1,130,1,89,0,110,2,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,90,0,0,0,114,12,0,0,0,114, + 102,0,0,0,114,96,0,0,0,114,91,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,101,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,137,0,0,0,105,241,255,255,255, + 41,11,114,3,0,0,0,114,108,0,0,0,114,109,0,0, + 0,114,110,0,0,0,114,22,0,0,0,114,112,0,0,0, + 114,51,0,0,0,114,117,0,0,0,114,1,0,0,0,114, + 142,0,0,0,114,141,0,0,0,41,17,114,29,0,0,0, + 114,54,0,0,0,90,8,100,97,116,97,112,97,116,104,114, + 128,0,0,0,114,132,0,0,0,114,123,0,0,0,114,135, + 0,0,0,114,129,0,0,0,114,130,0,0,0,114,131,0, + 0,0,114,121,0,0,0,114,122,0,0,0,114,133,0,0, + 0,114,134,0,0,0,114,125,0,0,0,90,8,114,97,119, + 95,100,97,116,97,114,139,0,0,0,114,9,0,0,0,114, + 9,0,0,0,114,10,0,0,0,114,52,0,0,0,16,2, + 0,0,115,62,0,0,0,0,1,20,1,8,1,8,2,14, + 2,2,1,14,1,12,1,24,1,10,1,12,1,8,2,16, + 2,18,2,16,1,16,1,12,1,8,1,2,1,14,1,14, + 1,24,1,10,1,14,1,40,2,10,2,4,3,2,1,10, + 1,14,1,14,1,114,52,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,62,2,0,0,115, + 2,0,0,0,0,2,114,145,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,59,0,0,0,114, + 13,0,0,0,114,5,0,0,0,114,0,0,0,0,114,84, + 0,0,0,90,5,110,101,118,101,114,90,6,97,108,119,97, + 121,115,114,97,0,0,0,114,92,0,0,0,114,93,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,75,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,145, + 0,0,0,114,2,0,0,0,114,76,0,0,0,114,77,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,53,0,0,0,114,63,0,0,0,114, + 38,0,0,0,114,124,0,0,0,90,11,101,120,99,95,100, + 101,116,97,105,108,115,114,127,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,148,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,46,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,72,2,0,0,115,82,0,0, + 0,0,2,2,1,2,254,6,5,2,1,18,1,12,1,8, + 2,12,1,4,1,12,1,12,1,2,255,2,1,8,255,4, + 2,10,1,10,1,4,1,4,1,2,254,4,5,2,1,4, + 1,8,255,8,2,12,1,8,3,8,255,6,3,6,3,22, + 1,18,255,4,2,4,1,8,255,4,2,4,2,18,1,12, + 1,16,1,114,153,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,123,2,0,0,115,6,0,0,0,0,1,12,1,12,1, + 114,157,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,74, + 0,0,0,84,41,1,90,12,100,111,110,116,95,105,110,104, + 101,114,105,116,41,2,114,157,0,0,0,218,7,99,111,109, + 112,105,108,101,41,2,114,53,0,0,0,114,156,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, + 130,2,0,0,115,4,0,0,0,0,1,8,1,114,159,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,84,0,0,0,114, + 14,0,0,0,41,2,114,129,0,0,0,90,6,109,107,116, + 105,109,101,41,2,218,1,100,114,136,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,136,2,0,0, + 115,18,0,0,0,0,1,4,1,10,1,10,1,6,1,6, + 1,10,1,10,1,6,249,114,167,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,161,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,167,0,0,0,114, + 26,0,0,0,218,10,73,110,100,101,120,69,114,114,111,114, + 114,152,0,0,0,41,6,114,32,0,0,0,114,13,0,0, + 0,114,54,0,0,0,114,129,0,0,0,114,130,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,149,0,0,0,149,2,0,0,115,20,0,0,0, + 0,1,2,2,20,1,12,1,10,3,8,1,8,1,8,1, + 16,1,18,1,114,149,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, + 168,0,0,0,41,4,114,28,0,0,0,114,26,0,0,0, + 114,52,0,0,0,114,29,0,0,0,41,3,114,32,0,0, + 0,114,13,0,0,0,114,54,0,0,0,114,9,0,0,0, + 114,9,0,0,0,114,10,0,0,0,114,147,0,0,0,168, + 2,0,0,115,14,0,0,0,0,2,20,1,12,2,2,1, + 14,1,12,1,8,2,114,147,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,194,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,100,0,83,0,41,7,78,122,13, + 116,114,121,105,110,103,32,123,125,123,125,123,125,114,84,0, + 0,0,41,1,90,9,118,101,114,98,111,115,105,116,121,114, + 0,0,0,0,114,57,0,0,0,114,58,0,0,0,41,12, + 114,36,0,0,0,114,87,0,0,0,114,76,0,0,0,114, + 77,0,0,0,114,29,0,0,0,114,20,0,0,0,114,28, + 0,0,0,114,26,0,0,0,114,52,0,0,0,114,153,0, + 0,0,114,159,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,88,0, + 0,0,114,89,0,0,0,114,47,0,0,0,114,63,0,0, + 0,114,54,0,0,0,114,40,0,0,0,114,124,0,0,0, + 114,46,0,0,0,114,9,0,0,0,114,9,0,0,0,114, + 10,0,0,0,114,44,0,0,0,183,2,0,0,115,36,0, + 0,0,0,1,10,1,14,1,8,1,22,1,2,1,14,1, + 12,1,6,2,8,1,12,1,4,1,18,2,10,1,8,3, + 2,1,8,1,14,2,114,44,0,0,0,41,44,114,82,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,76,0,0,0,114,146,0,0,0,114,108,0,0,0,114, + 150,0,0,0,114,67,0,0,0,114,129,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,75,0,0,0,114,3,0,0,0,114,25,0,0, + 0,218,4,116,121,112,101,114,70,0,0,0,114,111,0,0, + 0,114,113,0,0,0,114,115,0,0,0,114,4,0,0,0, + 114,87,0,0,0,114,36,0,0,0,114,37,0,0,0,114, + 35,0,0,0,114,27,0,0,0,114,120,0,0,0,114,140, + 0,0,0,114,142,0,0,0,114,52,0,0,0,114,145,0, + 0,0,114,153,0,0,0,218,8,95,95,99,111,100,101,95, + 95,114,151,0,0,0,114,157,0,0,0,114,159,0,0,0, + 114,167,0,0,0,114,149,0,0,0,114,147,0,0,0,114, + 44,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,84,0,0,0,4,16,8,1,16, + 1,8,1,8,1,8,1,8,1,8,1,8,2,8,3,6, + 1,14,3,16,4,4,2,8,2,4,1,4,1,4,2,14, + 127,0,125,12,1,12,1,2,1,2,252,4,9,8,4,8, + 9,8,31,8,126,2,254,2,29,4,5,8,21,8,46,8, + 10,8,46,10,5,8,7,8,6,8,13,8,19,8,15, }; diff --git a/Python/initconfig.c b/Python/initconfig.c index 86285c77e2307c0..64286763b621edf 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -868,9 +868,7 @@ _PyConfig_Copy(PyConfig *config, const PyConfig *config2) static PyObject * config_as_dict(const PyConfig *config) { - PyObject *dict; - - dict = PyDict_New(); + PyObject *dict = PyDict_New(); if (dict == NULL) { return NULL; } @@ -2643,6 +2641,16 @@ _Py_GetConfigsAsDict(void) } Py_CLEAR(dict); + /* path config */ + dict = _PyPathConfig_AsDict(); + if (dict == NULL) { + goto error; + } + if (PyDict_SetItemString(result, "path_config", dict) < 0) { + goto error; + } + Py_CLEAR(dict); + return result; error: diff --git a/Python/pathconfig.c b/Python/pathconfig.c index 9a302213e77b654..12a684a66b718ea 100644 --- a/Python/pathconfig.c +++ b/Python/pathconfig.c @@ -186,6 +186,80 @@ pathconfig_set_from_config(_PyPathConfig *pathconfig, const PyConfig *config) return status; } +PyObject * +_PyPathConfig_AsDict(void) +{ + PyObject *dict = PyDict_New(); + if (dict == NULL) { + return NULL; + } + +#define SET_ITEM(KEY, EXPR) \ + do { \ + PyObject *obj = (EXPR); \ + if (obj == NULL) { \ + goto fail; \ + } \ + int res = PyDict_SetItemString(dict, KEY, obj); \ + Py_DECREF(obj); \ + if (res < 0) { \ + goto fail; \ + } \ + } while (0) +#define SET_ITEM_STR(KEY) \ + SET_ITEM(#KEY, \ + (_Py_path_config.KEY \ + ? PyUnicode_FromWideChar(_Py_path_config.KEY, -1) \ + : (Py_INCREF(Py_None), Py_None))) +#define SET_ITEM_INT(KEY) \ + SET_ITEM(#KEY, PyLong_FromLong(_Py_path_config.KEY)) + + SET_ITEM_STR(program_full_path); + SET_ITEM_STR(prefix); + SET_ITEM_STR(exec_prefix); + SET_ITEM_STR(module_search_path); + SET_ITEM_STR(program_name); + SET_ITEM_STR(home); +#ifdef MS_WINDOWS + SET_ITEM_INT(isolated); + SET_ITEM_INT(site_import); + SET_ITEM_STR(base_executable); + + { + wchar_t py3path[MAX_PATH]; + HMODULE hPython3 = GetModuleHandleW(PY3_DLLNAME); + PyObject *obj; + if (hPython3 + && GetModuleFileNameW(hPython3, py3path, Py_ARRAY_LENGTH(py3path))) + { + obj = PyUnicode_FromWideChar(py3path, -1); + if (obj == NULL) { + goto fail; + } + } + else { + obj = Py_None; + Py_INCREF(obj); + } + if (PyDict_SetItemString(dict, "python3_dll", obj) < 0) { + Py_DECREF(obj); + goto fail; + } + Py_DECREF(obj); + } +#endif + +#undef SET_ITEM +#undef SET_ITEM_STR +#undef SET_ITEM_INT + + return dict; + +fail: + Py_DECREF(dict); + return NULL; +} + PyStatus _PyConfig_WritePathConfig(const PyConfig *config) diff --git a/Python/peephole.c b/Python/peephole.c deleted file mode 100644 index fe67de42227b5bd..000000000000000 --- a/Python/peephole.c +++ /dev/null @@ -1,537 +0,0 @@ -/* Peephole optimizations for bytecode compiler. */ - -#include "Python.h" - -#include "Python-ast.h" -#include "ast.h" -#include "code.h" -#include "symtable.h" -#include "opcode.h" -#include "wordcode_helpers.h" - -#define UNCONDITIONAL_JUMP(op) (op==JUMP_ABSOLUTE || op==JUMP_FORWARD) -#define CONDITIONAL_JUMP(op) (op==POP_JUMP_IF_FALSE || op==POP_JUMP_IF_TRUE \ - || op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP || op==JUMP_IF_NOT_EXC_MATCH) -#define ABSOLUTE_JUMP(op) (op==JUMP_ABSOLUTE \ - || op==POP_JUMP_IF_FALSE || op==POP_JUMP_IF_TRUE \ - || op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP || op==JUMP_IF_NOT_EXC_MATCH) -#define JUMPS_ON_TRUE(op) (op==POP_JUMP_IF_TRUE || op==JUMP_IF_TRUE_OR_POP) -#define GETJUMPTGT(arr, i) (get_arg(arr, i) / sizeof(_Py_CODEUNIT) + \ - (ABSOLUTE_JUMP(_Py_OPCODE(arr[i])) ? 0 : i+1)) -#define ISBASICBLOCK(blocks, start, end) \ - (blocks[start]==blocks[end]) - - -/* Scans back N consecutive LOAD_CONST instructions, skipping NOPs, - returns index of the Nth last's LOAD_CONST's EXTENDED_ARG prefix. - Callers are responsible to check CONST_STACK_LEN beforehand. -*/ -static Py_ssize_t -lastn_const_start(const _Py_CODEUNIT *codestr, Py_ssize_t i, Py_ssize_t n) -{ - assert(n > 0); - for (;;) { - i--; - assert(i >= 0); - if (_Py_OPCODE(codestr[i]) == LOAD_CONST) { - if (!--n) { - while (i > 0 && _Py_OPCODE(codestr[i-1]) == EXTENDED_ARG) { - i--; - } - return i; - } - } - else { - assert(_Py_OPCODE(codestr[i]) == EXTENDED_ARG); - } - } -} - -/* Scans through EXTENDED ARGs, seeking the index of the effective opcode */ -static Py_ssize_t -find_op(const _Py_CODEUNIT *codestr, Py_ssize_t codelen, Py_ssize_t i) -{ - while (i < codelen && _Py_OPCODE(codestr[i]) == EXTENDED_ARG) { - i++; - } - return i; -} - -/* Given the index of the effective opcode, - scan back to construct the oparg with EXTENDED_ARG */ -static unsigned int -get_arg(const _Py_CODEUNIT *codestr, Py_ssize_t i) -{ - _Py_CODEUNIT word; - unsigned int oparg = _Py_OPARG(codestr[i]); - if (i >= 1 && _Py_OPCODE(word = codestr[i-1]) == EXTENDED_ARG) { - oparg |= _Py_OPARG(word) << 8; - if (i >= 2 && _Py_OPCODE(word = codestr[i-2]) == EXTENDED_ARG) { - oparg |= _Py_OPARG(word) << 16; - if (i >= 3 && _Py_OPCODE(word = codestr[i-3]) == EXTENDED_ARG) { - oparg |= _Py_OPARG(word) << 24; - } - } - } - return oparg; -} - -/* Fill the region with NOPs. */ -static void -fill_nops(_Py_CODEUNIT *codestr, Py_ssize_t start, Py_ssize_t end) -{ - memset(codestr + start, NOP, (end - start) * sizeof(_Py_CODEUNIT)); -} - -/* Given the index of the effective opcode, - attempt to replace the argument, taking into account EXTENDED_ARG. - Returns -1 on failure, or the new op index on success */ -static Py_ssize_t -set_arg(_Py_CODEUNIT *codestr, Py_ssize_t i, unsigned int oparg) -{ - unsigned int curarg = get_arg(codestr, i); - int curilen, newilen; - if (curarg == oparg) - return i; - curilen = instrsize(curarg); - newilen = instrsize(oparg); - if (curilen < newilen) { - return -1; - } - - write_op_arg(codestr + i + 1 - curilen, _Py_OPCODE(codestr[i]), oparg, newilen); - fill_nops(codestr, i + 1 - curilen + newilen, i + 1); - return i-curilen+newilen; -} - -/* Attempt to write op/arg at end of specified region of memory. - Preceding memory in the region is overwritten with NOPs. - Returns -1 on failure, op index on success */ -static Py_ssize_t -copy_op_arg(_Py_CODEUNIT *codestr, Py_ssize_t i, unsigned char op, - unsigned int oparg, Py_ssize_t maxi) -{ - int ilen = instrsize(oparg); - if (i + ilen > maxi) { - return -1; - } - write_op_arg(codestr + maxi - ilen, op, oparg, ilen); - fill_nops(codestr, i, maxi - ilen); - return maxi - 1; -} - -/* Replace LOAD_CONST c1, LOAD_CONST c2 ... LOAD_CONST cn, BUILD_TUPLE n - with LOAD_CONST (c1, c2, ... cn). - The consts table must still be in list form so that the - new constant (c1, c2, ... cn) can be appended. - Called with codestr pointing to the first LOAD_CONST. -*/ -static Py_ssize_t -fold_tuple_on_constants(_Py_CODEUNIT *codestr, Py_ssize_t codelen, - Py_ssize_t c_start, Py_ssize_t opcode_end, - PyObject *consts, int n) -{ - /* Pre-conditions */ - assert(PyList_CheckExact(consts)); - - /* Buildup new tuple of constants */ - PyObject *newconst = PyTuple_New(n); - if (newconst == NULL) { - return -1; - } - - for (Py_ssize_t i = 0, pos = c_start; i < n; i++, pos++) { - assert(pos < opcode_end); - pos = find_op(codestr, codelen, pos); - assert(_Py_OPCODE(codestr[pos]) == LOAD_CONST); - - unsigned int arg = get_arg(codestr, pos); - PyObject *constant = PyList_GET_ITEM(consts, arg); - Py_INCREF(constant); - PyTuple_SET_ITEM(newconst, i, constant); - } - - Py_ssize_t index = PyList_GET_SIZE(consts); -#if SIZEOF_SIZE_T > SIZEOF_INT - if ((size_t)index >= UINT_MAX - 1) { - Py_DECREF(newconst); - PyErr_SetString(PyExc_OverflowError, "too many constants"); - return -1; - } -#endif - - /* Append folded constant onto consts */ - if (PyList_Append(consts, newconst)) { - Py_DECREF(newconst); - return -1; - } - Py_DECREF(newconst); - - return copy_op_arg(codestr, c_start, LOAD_CONST, - (unsigned int)index, opcode_end); -} - -static unsigned int * -markblocks(_Py_CODEUNIT *code, Py_ssize_t len) -{ - unsigned int *blocks = PyMem_New(unsigned int, len); - int i, j, opcode, blockcnt = 0; - - if (blocks == NULL) { - PyErr_NoMemory(); - return NULL; - } - memset(blocks, 0, len*sizeof(int)); - - /* Mark labels in the first pass */ - for (i = 0; i < len; i++) { - opcode = _Py_OPCODE(code[i]); - switch (opcode) { - case FOR_ITER: - case JUMP_FORWARD: - case JUMP_IF_FALSE_OR_POP: - case JUMP_IF_TRUE_OR_POP: - case POP_JUMP_IF_FALSE: - case POP_JUMP_IF_TRUE: - case JUMP_IF_NOT_EXC_MATCH: - case JUMP_ABSOLUTE: - case SETUP_FINALLY: - case SETUP_WITH: - case SETUP_ASYNC_WITH: - j = GETJUMPTGT(code, i); - assert(j < len); - blocks[j] = 1; - break; - } - } - /* Build block numbers in the second pass */ - for (i = 0; i < len; i++) { - blockcnt += blocks[i]; /* increment blockcnt over labels */ - blocks[i] = blockcnt; - } - return blocks; -} - -/* Perform basic peephole optimizations to components of a code object. - The consts object should still be in list form to allow new constants - to be appended. - - To keep the optimizer simple, it bails when the lineno table has complex - encoding for gaps >= 255. - - Optimizations are restricted to simple transformations occurring within a - single basic block. All transformations keep the code size the same or - smaller. For those that reduce size, the gaps are initially filled with - NOPs. Later those NOPs are removed and the jump addresses retargeted in - a single pass. */ - -PyObject * -PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, - PyObject *lnotab_obj) -{ - Py_ssize_t h, i, nexti, op_start, tgt; - unsigned int j, nops; - unsigned char opcode, nextop; - _Py_CODEUNIT *codestr = NULL; - unsigned char *lnotab; - unsigned int cum_orig_offset, last_offset; - Py_ssize_t tabsiz; - // Count runs of consecutive LOAD_CONSTs - unsigned int cumlc = 0, lastlc = 0; - unsigned int *blocks = NULL; - - /* Bail out if an exception is set */ - if (PyErr_Occurred()) - goto exitError; - - /* Bypass optimization when the lnotab table is too complex */ - assert(PyBytes_Check(lnotab_obj)); - lnotab = (unsigned char*)PyBytes_AS_STRING(lnotab_obj); - tabsiz = PyBytes_GET_SIZE(lnotab_obj); - assert(tabsiz == 0 || Py_REFCNT(lnotab_obj) == 1); - - /* Don't optimize if lnotab contains instruction pointer delta larger - than +255 (encoded as multiple bytes), just to keep the peephole optimizer - simple. The optimizer leaves line number deltas unchanged. */ - - for (i = 0; i < tabsiz; i += 2) { - if (lnotab[i] == 255) { - goto exitUnchanged; - } - } - - assert(PyBytes_Check(code)); - Py_ssize_t codesize = PyBytes_GET_SIZE(code); - assert(codesize % sizeof(_Py_CODEUNIT) == 0); - Py_ssize_t codelen = codesize / sizeof(_Py_CODEUNIT); - if (codelen > INT_MAX) { - /* Python assembler is limited to INT_MAX: see assembler.a_offset in - compile.c. */ - goto exitUnchanged; - } - - /* Make a modifiable copy of the code string */ - codestr = (_Py_CODEUNIT *)PyMem_Malloc(codesize); - if (codestr == NULL) { - PyErr_NoMemory(); - goto exitError; - } - memcpy(codestr, PyBytes_AS_STRING(code), codesize); - - blocks = markblocks(codestr, codelen); - if (blocks == NULL) - goto exitError; - assert(PyList_Check(consts)); - - for (i=find_op(codestr, codelen, 0) ; i= 1 && _Py_OPCODE(codestr[op_start-1]) == EXTENDED_ARG) { - op_start--; - } - - nexti = i + 1; - while (nexti < codelen && _Py_OPCODE(codestr[nexti]) == EXTENDED_ARG) - nexti++; - nextop = nexti < codelen ? _Py_OPCODE(codestr[nexti]) : 0; - - lastlc = cumlc; - cumlc = 0; - - switch (opcode) { - /* Skip over LOAD_CONST trueconst - POP_JUMP_IF_FALSE xx. This improves - "while 1" performance. */ - case LOAD_CONST: - cumlc = lastlc + 1; - if (nextop != POP_JUMP_IF_FALSE || - !ISBASICBLOCK(blocks, op_start, i + 1)) { - break; - } - PyObject* cnt = PyList_GET_ITEM(consts, get_arg(codestr, i)); - int is_true = PyObject_IsTrue(cnt); - if (is_true == -1) { - goto exitError; - } - if (is_true == 1) { - fill_nops(codestr, op_start, nexti + 1); - cumlc = 0; - } - break; - - /* Try to fold tuples of constants. - Skip over BUILD_SEQN 1 UNPACK_SEQN 1. - Replace BUILD_SEQN 2 UNPACK_SEQN 2 with ROT2. - Replace BUILD_SEQN 3 UNPACK_SEQN 3 with ROT3 ROT2. */ - case BUILD_TUPLE: - j = get_arg(codestr, i); - if (j > 0 && lastlc >= j) { - h = lastn_const_start(codestr, op_start, j); - if (ISBASICBLOCK(blocks, h, op_start)) { - h = fold_tuple_on_constants(codestr, codelen, - h, i+1, consts, j); - break; - } - } - if (nextop != UNPACK_SEQUENCE || - !ISBASICBLOCK(blocks, op_start, i + 1) || - j != get_arg(codestr, nexti)) - break; - if (j < 2) { - fill_nops(codestr, op_start, nexti + 1); - } else if (j == 2) { - codestr[op_start] = PACKOPARG(ROT_TWO, 0); - fill_nops(codestr, op_start + 1, nexti + 1); - } else if (j == 3) { - codestr[op_start] = PACKOPARG(ROT_THREE, 0); - codestr[op_start + 1] = PACKOPARG(ROT_TWO, 0); - fill_nops(codestr, op_start + 2, nexti + 1); - } - break; - - /* Simplify conditional jump to conditional jump where the - result of the first test implies the success of a similar - test or the failure of the opposite test. - Arises in code like: - "a and b or c" - "(a and b) and c" - "(a or b) or c" - "(a or b) and c" - x:JUMP_IF_FALSE_OR_POP y y:JUMP_IF_FALSE_OR_POP z - --> x:JUMP_IF_FALSE_OR_POP z - x:JUMP_IF_FALSE_OR_POP y y:JUMP_IF_TRUE_OR_POP z - --> x:POP_JUMP_IF_FALSE y+1 - where y+1 is the instruction following the second test. - */ - case JUMP_IF_FALSE_OR_POP: - case JUMP_IF_TRUE_OR_POP: - h = get_arg(codestr, i) / sizeof(_Py_CODEUNIT); - tgt = find_op(codestr, codelen, h); - - j = _Py_OPCODE(codestr[tgt]); - if (CONDITIONAL_JUMP(j)) { - /* NOTE: all possible jumps here are absolute. */ - if (JUMPS_ON_TRUE(j) == JUMPS_ON_TRUE(opcode)) { - /* The second jump will be taken iff the first is. - The current opcode inherits its target's - stack effect */ - h = set_arg(codestr, i, get_arg(codestr, tgt)); - } else { - /* The second jump is not taken if the first is (so - jump past it), and all conditional jumps pop their - argument when they're not taken (so change the - first jump to pop its argument when it's taken). */ - Py_ssize_t arg = (tgt + 1); - /* cannot overflow: codelen <= INT_MAX */ - assert((size_t)arg <= UINT_MAX / sizeof(_Py_CODEUNIT)); - arg *= sizeof(_Py_CODEUNIT); - h = set_arg(codestr, i, (unsigned int)arg); - j = opcode == JUMP_IF_TRUE_OR_POP ? - POP_JUMP_IF_TRUE : POP_JUMP_IF_FALSE; - } - - if (h >= 0) { - nexti = h; - codestr[nexti] = PACKOPARG(j, _Py_OPARG(codestr[nexti])); - break; - } - } - /* Intentional fallthrough */ - - /* Replace jumps to unconditional jumps */ - case POP_JUMP_IF_FALSE: - case POP_JUMP_IF_TRUE: - case JUMP_FORWARD: - case JUMP_ABSOLUTE: - h = GETJUMPTGT(codestr, i); - tgt = find_op(codestr, codelen, h); - /* Replace JUMP_* to a RETURN into just a RETURN */ - if (UNCONDITIONAL_JUMP(opcode) && - _Py_OPCODE(codestr[tgt]) == RETURN_VALUE) { - codestr[op_start] = PACKOPARG(RETURN_VALUE, 0); - fill_nops(codestr, op_start + 1, i + 1); - } else if (UNCONDITIONAL_JUMP(_Py_OPCODE(codestr[tgt]))) { - size_t arg = GETJUMPTGT(codestr, tgt); - if (opcode == JUMP_FORWARD) { /* JMP_ABS can go backwards */ - opcode = JUMP_ABSOLUTE; - } else if (!ABSOLUTE_JUMP(opcode)) { - if (arg < (size_t)(i + 1)) { - break; /* No backward relative jumps */ - } - arg -= i + 1; /* Calc relative jump addr */ - } - /* cannot overflow: codelen <= INT_MAX */ - assert(arg <= (UINT_MAX / sizeof(_Py_CODEUNIT))); - arg *= sizeof(_Py_CODEUNIT); - copy_op_arg(codestr, op_start, opcode, - (unsigned int)arg, i + 1); - } - break; - - /* Remove unreachable ops after RETURN */ - case RETURN_VALUE: - h = i + 1; - while (h < codelen && ISBASICBLOCK(blocks, i, h)) - { - /* Leave SETUP_FINALLY and RERAISE in place to help find block limits. */ - if (_Py_OPCODE(codestr[h]) == SETUP_FINALLY || _Py_OPCODE(codestr[h]) == RERAISE) { - while (h > i + 1 && - _Py_OPCODE(codestr[h - 1]) == EXTENDED_ARG) - { - h--; - } - break; - } - h++; - } - if (h > i + 1) { - fill_nops(codestr, i + 1, h); - nexti = find_op(codestr, codelen, h); - } - break; - } - } - - /* Fixup lnotab */ - for (i = 0, nops = 0; i < codelen; i++) { - size_t block = (size_t)i - nops; - /* cannot overflow: codelen <= INT_MAX */ - assert(block <= UINT_MAX); - /* original code offset => new code offset */ - blocks[i] = (unsigned int)block; - if (_Py_OPCODE(codestr[i]) == NOP) { - nops++; - } - } - cum_orig_offset = 0; - last_offset = 0; - for (i=0 ; i < tabsiz ; i+=2) { - unsigned int offset_delta, new_offset; - cum_orig_offset += lnotab[i]; - assert(cum_orig_offset % sizeof(_Py_CODEUNIT) == 0); - new_offset = blocks[cum_orig_offset / sizeof(_Py_CODEUNIT)] * - sizeof(_Py_CODEUNIT); - offset_delta = new_offset - last_offset; - assert(offset_delta <= 255); - lnotab[i] = (unsigned char)offset_delta; - last_offset = new_offset; - } - - /* Remove NOPs and fixup jump targets */ - for (op_start = i = h = 0; i < codelen; i++, op_start = i) { - j = _Py_OPARG(codestr[i]); - while (_Py_OPCODE(codestr[i]) == EXTENDED_ARG) { - i++; - j = j<<8 | _Py_OPARG(codestr[i]); - } - opcode = _Py_OPCODE(codestr[i]); - switch (opcode) { - case NOP:continue; - - case JUMP_ABSOLUTE: - case POP_JUMP_IF_FALSE: - case POP_JUMP_IF_TRUE: - case JUMP_IF_FALSE_OR_POP: - case JUMP_IF_TRUE_OR_POP: - case JUMP_IF_NOT_EXC_MATCH: - j = blocks[j / sizeof(_Py_CODEUNIT)] * sizeof(_Py_CODEUNIT); - break; - - case FOR_ITER: - case JUMP_FORWARD: - case SETUP_FINALLY: - case SETUP_WITH: - case SETUP_ASYNC_WITH: - j = blocks[j / sizeof(_Py_CODEUNIT) + i + 1] - blocks[i] - 1; - j *= sizeof(_Py_CODEUNIT); - break; - } - Py_ssize_t ilen = i - op_start + 1; - if (instrsize(j) > ilen) { - goto exitUnchanged; - } - /* If instrsize(j) < ilen, we'll emit EXTENDED_ARG 0 */ - if (ilen > 4) { - /* Can only happen when PyCode_Optimize() is called with - malformed bytecode. */ - goto exitUnchanged; - } - write_op_arg(codestr + h, opcode, j, (int)ilen); - h += ilen; - } - assert(h + (Py_ssize_t)nops == codelen); - - PyMem_Free(blocks); - code = PyBytes_FromStringAndSize((char *)codestr, h * sizeof(_Py_CODEUNIT)); - PyMem_Free(codestr); - return code; - - exitError: - code = NULL; - - exitUnchanged: - Py_XINCREF(code); - PyMem_Free(blocks); - PyMem_Free(codestr); - return code; -} diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 2d219a4a3a8b0db..ab5a6767864dc59 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1286,10 +1286,8 @@ finalize_interp_clear(PyThreadState *tstate) /* Clear interpreter state and all thread states */ PyInterpreterState_Clear(tstate->interp); - /* Trigger a GC collection on subinterpreters*/ - if (!is_main_interp) { - _PyGC_CollectNoFail(); - } + /* Last explicit GC collection */ + _PyGC_CollectNoFail(); /* Clear all loghooks */ /* Both _PySys_Audit function and users still need PyObject, such as tuple. diff --git a/Python/pystate.c b/Python/pystate.c index d0cbf5cb8364bf4..f6d1956e9dce9ae 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -294,8 +294,6 @@ PyInterpreterState_Clear(PyInterpreterState *interp) Py_CLEAR(interp->codec_error_registry); Py_CLEAR(interp->modules); Py_CLEAR(interp->modules_by_index); - Py_CLEAR(interp->sysdict); - Py_CLEAR(interp->builtins); Py_CLEAR(interp->builtins_copy); Py_CLEAR(interp->importlib); Py_CLEAR(interp->import_func); @@ -308,6 +306,14 @@ PyInterpreterState_Clear(PyInterpreterState *interp) if (_PyRuntimeState_GetFinalizing(runtime) == NULL) { _PyWarnings_Fini(interp); } + /* We don't clear sysdict and builtins until the end of this function. + Because clearing other attributes can execute arbitrary Python code + which requires sysdict and builtins. */ + PyDict_Clear(interp->sysdict); + PyDict_Clear(interp->builtins); + Py_CLEAR(interp->sysdict); + Py_CLEAR(interp->builtins); + // XXX Once we have one allocator per interpreter (i.e. // per-interpreter GC) we must ensure that all of the interpreter's // objects have been cleaned up at the point. diff --git a/Python/strdup.c b/Python/strdup.c deleted file mode 100644 index 6ce171b21fe6c45..000000000000000 --- a/Python/strdup.c +++ /dev/null @@ -1,12 +0,0 @@ -/* strdup() replacement (from stdwin, if you must know) */ - -char * -strdup(const char *str) -{ - if (str != NULL) { - char *copy = malloc(strlen(str) + 1); - if (copy != NULL) - return strcpy(copy, str); - } - return NULL; -} diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index cf4e854d829cb5f..e6910b3083a8920 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -134,7 +134,7 @@ do { \ static pthread_condattr_t *condattr_monotonic = NULL; static void -init_condattr() +init_condattr(void) { #ifdef CONDATTR_MONOTONIC static pthread_condattr_t ca; diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat index a0fc6b9a9458bc8..25c796a60e173d2 100644 --- a/Tools/buildbot/test.bat +++ b/Tools/buildbot/test.bat @@ -36,8 +36,10 @@ if NOT "%REMOTE_PYTHON_DIR:~-1,1%"=="\" (set REMOTE_PYTHON_DIR=%REMOTE_PYTHON_DI set TEMP_ARGS=--temp %REMOTE_PYTHON_DIR%temp set rt_args=%rt_opts% %dashU% -rwW --slowest --timeout=1200 --fail-env-changed %regrtest_args% %TEMP_ARGS% -ssh %SSH_SERVER% "set TEMP=%REMOTE_PYTHON_DIR%temp& %REMOTE_PYTHON_DIR%PCbuild\rt.bat" %rt_args% -exit /b %ERRORLEVEL% +ssh %SSH_SERVER% "set TEMP=%REMOTE_PYTHON_DIR%temp& cd %REMOTE_PYTHON_DIR% & %REMOTE_PYTHON_DIR%PCbuild\rt.bat" %rt_args% +set ERR=%ERRORLEVEL% +scp %SSH_SERVER%:"%REMOTE_PYTHON_DIR%test-results.xml" "%PYTHON_SOURCE%\test-results.xml" +exit /b %ERR% :Arm32SshHelp echo SSH_SERVER environment variable must be set to administrator@[ip address] diff --git a/Tools/c-analyzer/TODO b/Tools/c-analyzer/TODO index 829daba291463c9..1134055f9a8fd81 100644 --- a/Tools/c-analyzer/TODO +++ b/Tools/c-analyzer/TODO @@ -64,8 +64,6 @@ Objects/object.c:_Py_RefTotal Py_ssize_t _Py_ Objects/tupleobject.c:_Py_fast_tuple_allocs Py_ssize_t _Py_fast_tuple_allocs Objects/tupleobject.c:_Py_tuple_zero_allocs Py_ssize_t _Py_tuple_zero_allocs Objects/typeobject.c:next_version_tag static unsigned int next_version_tag -Parser/listnode.c:atbol static int atbol -Parser/listnode.c:level static int level Python/Python-ast.c:init_types():initialized static int initialized Python/bootstrap_hash.c:urandom_cache static struct { int fd; dev_t st_dev; ino_t st_ino; } urandom_cache Python/ceval.c:_Py_CheckRecursionLimit int _Py_CheckRecursionLimit diff --git a/Tools/c-analyzer/cpython/_generate.py b/Tools/c-analyzer/cpython/_generate.py index 4c340acf99e1c37..3456604b81470e9 100644 --- a/Tools/c-analyzer/cpython/_generate.py +++ b/Tools/c-analyzer/cpython/_generate.py @@ -183,9 +183,6 @@ def find_matching_variable(varid, varcache, allfilenames, *, 'float_format': 'static float_format_type ', 'detected_double_format': 'static float_format_type ', 'detected_float_format': 'static float_format_type ', - # Parser/listnode.c - 'level': 'static int ', - 'atbol': 'static int ', # Python/dtoa.c 'private_mem': 'static double private_mem[PRIVATE_mem]', 'pmem_next': 'static double *', diff --git a/Tools/c-analyzer/known.tsv b/Tools/c-analyzer/known.tsv index db44080bc2e312f..f92b45e5b4d8599 100644 --- a/Tools/c-analyzer/known.tsv +++ b/Tools/c-analyzer/known.tsv @@ -51,7 +51,6 @@ Objects/genobject.c - async_gen_memberlist variable static PyMemberDef async_gen Objects/genobject.c - async_gen_methods variable static PyMethodDef async_gen_methods Python/Python-ast.c - AsyncWith_fields variable static const char *AsyncWith_fields[] Python/Python-ast.c - AsyncWith_type variable static PyTypeObject *AsyncWith_type -Parser/listnode.c - atbol variable static int atbol Modules/atexitmodule.c - atexit_methods variable static PyMethodDef atexit_methods Modules/atexitmodule.c - atexitmodule variable static struct PyModuleDef atexitmodule Modules/atexitmodule.c - atexit_slots variable static PyModuleDef_Slot atexit_slots[] @@ -429,7 +428,6 @@ Modules/_json.c encoder_call kwlist variable static const char *kwlist[] Python/symtable.c - lambda variable static identifier lambda Python/Python-ast.c - Lambda_fields variable static const char *Lambda_fields[] Python/Python-ast.c - Lambda_type variable static PyTypeObject *Lambda_type -Parser/listnode.c - level variable static int level Objects/listobject.c - list_as_mapping variable static PyMappingMethods list_as_mapping Objects/listobject.c - list_as_sequence variable static PySequenceMethods list_as_sequence Python/symtable.c - listcomp variable static identifier listcomp diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 92334d9195fcce0..1bbbd4f9fb19334 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -4433,7 +4433,7 @@ def state_parameter(self, line): if 'c_default' not in kwargs: # we can only represent very simple data values in C. - # detect whether default is okay, via a blacklist + # detect whether default is okay, via a denylist # of disallowed ast nodes. class DetectBadNodes(ast.NodeVisitor): bad = False @@ -4456,9 +4456,9 @@ def bad_node(self, node): # "starred": "a = [1, 2, 3]; *a" visit_Starred = bad_node - blacklist = DetectBadNodes() - blacklist.visit(module) - bad = blacklist.bad + denylist = DetectBadNodes() + denylist.visit(module) + bad = denylist.bad else: # if they specify a c_default, we can be more lenient about the default value. # but at least make an attempt at ensuring it's a valid expression. diff --git a/Tools/msi/bundle/Default.thm b/Tools/msi/bundle/Default.thm index 1c0bd08eec94153..f5ba43d838fcf7c 100644 --- a/Tools/msi/bundle/Default.thm +++ b/Tools/msi/bundle/Default.thm @@ -116,9 +116,9 @@ #(loc.SuccessHeader) - + - + #(loc.SuccessRestartText) diff --git a/Tools/msi/bundle/Default.wxl b/Tools/msi/bundle/Default.wxl index 43506d61004a570..791ce6eab74745c 100644 --- a/Tools/msi/bundle/Default.wxl +++ b/Tools/msi/bundle/Default.wxl @@ -89,7 +89,7 @@ Select Customize to review current options. Install &launcher for all users (recommended) &Precompile standard library Download debugging &symbols - Download debu&g binaries (requires VS 2015 or later) + Download debu&g binaries (requires VS 2017 or later) [ActionLikeInstallation] Progress [ActionLikeInstalling]: @@ -105,11 +105,9 @@ Select Customize to review current options. &Launch You may need to restart your computer to finish updating files. &Restart - Special thanks to Mark Hammond, without whose years of freely shared Windows expertise, Python for Windows would still be Python for DOS. + New to Python? Start with the <a href="https://docs.python.org/[ShortVersion]/tutorial/index.html">online tutorial</a> and <a href="https://docs.python.org/[ShortVersion]/index.html">documentation</a>. At your terminal, type "py" to launch Python, or search for Python in your Start menu. -New to Python? Start with the <a href="https://docs.python.org/[ShortVersion]/tutorial/index.html">online tutorial</a> and <a href="https://docs.python.org/[ShortVersion]/index.html">documentation</a>. - -See <a href="https://docs.python.org/[ShortVersion]/whatsnew/[ShortVersion].html">what's new</a> in this release. +See <a href="https://docs.python.org/[ShortVersion]/whatsnew/[ShortVersion].html">what's new</a> in this release, or find more info about <a href="https://docs.python.org/[ShortVersion]/using/windows.html">using Python on Windows</a>. Thank you for using [WixBundleName]. Thank you for using [WixBundleName]. @@ -123,26 +121,9 @@ Feel free to email <a href="mailto:python-list@python.org">python-list@pyt &Restart Unable to install [WixBundleName] due to an existing install. Use Programs and Features to modify, repair or remove [WixBundleName]. - Windows 7 Service Pack 1 and all applicable updates are required to install [WixBundleName]. - -Please <a href="https://www.bing.com/search?q=how%20to%20install%20windows%207%20service%20pack%201">update your machine</a> and then restart the installation. - Windows Vista Service Pack 2 and all applicable updates are required to install [WixBundleName]. - -Please <a href="https://www.bing.com/search?q=how%20to%20install%20windows%20vista%20service%20pack%202">update your machine</a> and then restart the installation. - Windows Vista or later is required to install and use [WixBundleName]. - -Visit <a href="https://www.python.org/">python.org</a> to download Python 3.4. - - Windows Server 2008 R2 Service Pack 1 and all applicable updates are required to install [WixBundleName]. - -Please <a href="https://www.bing.com/search?q=how%20to%20install%20windows%20server%202008%20r2%20service%20pack%201">update your machine</a> and then restart the installation. - Windows Server 2008 Service Pack 2 and all applicable updates are required to install [WixBundleName]. - -Please <a href="https://www.bing.com/search?q=how%20to%20install%20windows%20server%202008%20service%20pack%202">update your machine</a> and then restart the installation. - Windows Server 2008 SP2 or later is required to install and use [WixBundleName]. - -Visit <a href="https://www.python.org/">python.org</a> to download Python 3.4. + At least Windows 8.1 or Windows Server 2012 are required to install [WixBundleName] +Visit <a href="https://www.python.org/">python.org</a> to download an earlier version of Python. Disable path length limit Changes your machine configuration to allow programs, including Python, to bypass the 260 character "MAX_PATH" limitation. diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp index fbdf7b6424d6179..3c54e401330cfde 100644 --- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp +++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp @@ -3011,65 +3011,35 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication { BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2012 or later"); return; } else if (IsWindowsVersionOrGreater(6, 1, 1)) { - HMODULE hKernel32 = GetModuleHandleW(L"kernel32"); - if (hKernel32 && !GetProcAddress(hKernel32, "AddDllDirectory")) { - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2 without KB2533623"); - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "KB2533623 update is required to continue."); - /* The "MissingSP1" error also specifies updates are required */ - LocGetString(_wixLoc, L"#(loc.FailureWS2K8R2MissingSP1)", &pLocString); - } else { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2008 R2 or later"); - return; - } + BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Detected Windows Server 2008 R2"); } else if (IsWindowsVersionOrGreater(6, 1, 0)) { BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2"); - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation"); - LocGetString(_wixLoc, L"#(loc.FailureWS2K8R2MissingSP1)", &pLocString); - } else if (IsWindowsVersionOrGreater(6, 0, 2)) { - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Server 2008 SP2 or later"); - return; } else if (IsWindowsVersionOrGreater(6, 0, 0)) { BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008"); - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation"); - LocGetString(_wixLoc, L"#(loc.FailureWS2K8MissingSP2)", &pLocString); } else { BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2003 or earlier"); - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Server 2008 SP2 or later is required to continue installation"); - LocGetString(_wixLoc, L"#(loc.FailureWS2K3OrEarlier)", &pLocString); } + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Server 2012 or later is required to continue installation"); } else { - if (IsWindows8OrGreater()) { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 8 or later"); + if (IsWindows10OrGreater()) { + BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 10 or later"); return; - } else if (IsWindows7SP1OrGreater()) { - HMODULE hKernel32 = GetModuleHandleW(L"kernel32"); - if (hKernel32 && !GetProcAddress(hKernel32, "AddDllDirectory")) { - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 SP1 without KB2533623"); - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "KB2533623 update is required to continue."); - /* The "MissingSP1" error also specifies updates are required */ - LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString); - } else { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 7 SP1 or later"); - return; - } - } else if (IsWindows7OrGreater()) { - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 RTM"); - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation"); - LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString); - } else if (IsWindowsVistaSP2OrGreater()) { - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Vista SP2"); + } else if (IsWindows8Point1OrGreater()) { + BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 8.1"); return; + } else if (IsWindows8OrGreater()) { + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 8"); + } else if (IsWindows7OrGreater()) { + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7"); } else if (IsWindowsVistaOrGreater()) { - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Vista RTM or SP1"); - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation"); - LocGetString(_wixLoc, L"#(loc.FailureVistaMissingSP2)", &pLocString); + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Vista"); } else { BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows XP or earlier"); - BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Vista SP2 or later is required to continue installation"); - LocGetString(_wixLoc, L"#(loc.FailureXPOrEarlier)", &pLocString); } + BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows 8.1 or later is required to continue installation"); } + LocGetString(_wixLoc, L"#(loc.FailureOldOS)", &pLocString); if (pLocString && pLocString->wzText) { BalFormatString(pLocString->wzText, &_failedMessage); } diff --git a/Tools/msi/bundle/packagegroups/crt.wxs b/Tools/msi/bundle/packagegroups/crt.wxs index 61b756fc2558bc2..f931da1403b2278 100644 --- a/Tools/msi/bundle/packagegroups/crt.wxs +++ b/Tools/msi/bundle/packagegroups/crt.wxs @@ -4,7 +4,7 @@ @@ -12,7 +12,7 @@ diff --git a/Tools/peg_generator/pegen/keywordgen.py b/Tools/peg_generator/pegen/keywordgen.py index 53638b17e61c6d5..2937ddb512aa8f2 100644 --- a/Tools/peg_generator/pegen/keywordgen.py +++ b/Tools/peg_generator/pegen/keywordgen.py @@ -14,7 +14,7 @@ the python source tree and run: PYTHONPATH=Tools/peg_generator python3 -m pegen.keywordgen \ - Grammar/Grammar \ + Grammar/python.gram \ Grammar/Tokens \ Lib/keyword.py diff --git a/Tools/scripts/combinerefs.py b/Tools/scripts/combinerefs.py index 49ccca73909fc8f..848bae5658ca3ab 100755 --- a/Tools/scripts/combinerefs.py +++ b/Tools/scripts/combinerefs.py @@ -33,7 +33,7 @@ if the refcount changed. -typename is object->ob_type->tp_name, extracted from the second PYTHONDUMPREFS +typename is Py_TYPE(object)->tp_name, extracted from the second PYTHONDUMPREFS output block. repr is repr(object), extracted from the first PYTHONDUMPREFS output block. diff --git a/Tools/scripts/generate_opcode_h.py b/Tools/scripts/generate_opcode_h.py index 873f82156e217bf..cba13b24213906f 100644 --- a/Tools/scripts/generate_opcode_h.py +++ b/Tools/scripts/generate_opcode_h.py @@ -30,6 +30,18 @@ #endif /* !Py_OPCODE_H */ """ +UINT32_MASK = (1<<32)-1 + +def write_int_array_from_ops(name, ops, out): + bits = 0 + for op in ops: + bits |= 1<>= 32 + assert bits == 0 + out.write(f"}};\n") def main(opcode_py, outfile='Include/opcode.h'): opcode = {} @@ -41,6 +53,8 @@ def main(opcode_py, outfile='Include/opcode.h'): code = fp.read() exec(code, opcode) opmap = opcode['opmap'] + hasjrel = opcode['hasjrel'] + hasjabs = opcode['hasjabs'] with open(outfile, 'w') as fobj: fobj.write(header) for name in opcode['opname']: @@ -49,8 +63,13 @@ def main(opcode_py, outfile='Include/opcode.h'): if name == 'POP_EXCEPT': # Special entry for HAVE_ARGUMENT fobj.write("#define %-23s %3d\n" % ('HAVE_ARGUMENT', opcode['HAVE_ARGUMENT'])) + fobj.write("#ifdef NEED_OPCODE_JUMP_TABLES\n") + write_int_array_from_ops("_PyOpcode_RelativeJump", opcode['hasjrel'], fobj) + write_int_array_from_ops("_PyOpcode_Jump", opcode['hasjrel'] + opcode['hasjabs'], fobj) + fobj.write("#endif /* OPCODE_TABLES */\n") fobj.write(footer) + print("%s regenerated from %s" % (outfile, opcode_py)) diff --git a/configure b/configure index 5024860ca4395aa..69e975a4e8ef3cb 100755 --- a/configure +++ b/configure @@ -12829,19 +12829,6 @@ esac fi -ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" -if test "x$ac_cv_func_strdup" = xyes; then : - $as_echo "#define HAVE_STRDUP 1" >>confdefs.h - -else - case " $LIBOBJS " in - *" strdup.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strdup.$ac_objext" - ;; -esac - -fi - for ac_func in getpgrp do : diff --git a/configure.ac b/configure.ac index 5a3e340aa3e72b5..07c0585432b0654 100644 --- a/configure.ac +++ b/configure.ac @@ -3970,7 +3970,7 @@ AC_CHECK_FUNCS(forkpty,, # check for long file support functions AC_CHECK_FUNCS(fseek64 fseeko fstatvfs ftell64 ftello statvfs) -AC_REPLACE_FUNCS(dup2 strdup) +AC_REPLACE_FUNCS(dup2) AC_CHECK_FUNCS(getpgrp, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[getpgrp(0);]])], [AC_DEFINE(GETPGRP_HAVE_ARG, 1, [Define if getpgrp() must be called as getpgrp(0).])], diff --git a/pyconfig.h.in b/pyconfig.h.in index bc906a869b623e9..c162a3c33e57b67 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1034,9 +1034,6 @@ /* Has stdatomic.h with atomic_int and atomic_uintptr_t */ #undef HAVE_STD_ATOMIC -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME