Skip to content
Snippets Groups Projects
Unverified Commit 114ee5de authored by Pablo Galindo's avatar Pablo Galindo
Browse files

Python 3.10.0a2

parent 9568622c
Branches
Tags v3.10.0a2
No related merge requests found
Showing
with 1046 additions and 107 deletions
......@@ -20,10 +20,10 @@
#define PY_MINOR_VERSION 10
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
#define PY_RELEASE_SERIAL 1
#define PY_RELEASE_SERIAL 2
/* Version as a string */
#define PY_VERSION "3.10.0a1+"
#define PY_VERSION "3.10.0a2"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
......
# -*- coding: utf-8 -*-
# Autogenerated by Sphinx on Mon Oct 5 18:27:28 2020
# Autogenerated by Sphinx on Tue Nov 3 00:01:01 2020
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
......@@ -433,11 +433,9 @@
'\n'
'Execution of Python coroutines can be suspended and resumed at '
'many\n'
'points (see *coroutine*). Inside the body of a coroutine '
'function,\n'
'"await" and "async" identifiers become reserved keywords; "await"\n'
'expressions, "async for" and "async with" can only be used in\n'
'coroutine function bodies.\n'
'points (see *coroutine*). "await" expressions, "async for" and '
'"async\n'
'with" can only be used in the body of a coroutine function.\n'
'\n'
'Functions defined with "async def" syntax are always coroutine\n'
'functions, even if they do not contain "await" or "async" '
......@@ -453,6 +451,10 @@
' do_stuff()\n'
' await some_coroutine()\n'
'\n'
'Changed in version 3.7: "await" and "async" are now keywords;\n'
'previously they were only treated as such inside the body of a\n'
'coroutine function.\n'
'\n'
'\n'
'The "async for" statement\n'
'=========================\n'
......@@ -700,6 +702,11 @@
'syntax or\n'
' built-in functions. See Special method lookup.\n'
'\n'
' For certain sensitive attribute accesses, raises an '
'auditing event\n'
' "object.__getattr__" with arguments "obj" and '
'"name".\n'
'\n'
'object.__setattr__(self, name, value)\n'
'\n'
' Called when an attribute assignment is attempted. '
......@@ -716,6 +723,11 @@
'for example,\n'
' "object.__setattr__(self, name, value)".\n'
'\n'
' For certain sensitive attribute assignments, raises '
'an auditing\n'
' event "object.__setattr__" with arguments "obj", '
'"name", "value".\n'
'\n'
'object.__delattr__(self, name)\n'
'\n'
' Like "__setattr__()" but for attribute deletion '
......@@ -724,6 +736,11 @@
'obj.name" is\n'
' meaningful for the object.\n'
'\n'
' For certain sensitive attribute deletions, raises an '
'auditing event\n'
' "object.__delattr__" with arguments "obj" and '
'"name".\n'
'\n'
'object.__dir__(self)\n'
'\n'
' Called when "dir()" is called on the object. A '
......@@ -1464,8 +1481,8 @@
'\n'
' Called when the instance is “called” as a function; if '
'this method\n'
' is defined, "x(arg1, arg2, ...)" is a shorthand for\n'
' "x.__call__(arg1, arg2, ...)".\n',
' is defined, "x(arg1, arg2, ...)" roughly translates to\n'
' "type(x).__call__(x, arg1, ...)".\n',
'calls': 'Calls\n'
'*****\n'
'\n'
......@@ -2766,20 +2783,11 @@
'parameter list. These annotations can be any valid Python '
'expression.\n'
'The presence of annotations does not change the semantics of a\n'
'function. The annotation values are available as values of a\n'
'function. The annotation values are available as string values '
'in a\n'
'dictionary keyed by the parameters’ names in the '
'"__annotations__"\n'
'attribute of the function object. If the "annotations" import '
'from\n'
'"__future__" is used, annotations are preserved as strings at '
'runtime\n'
'which enables postponed evaluation. Otherwise, they are '
'evaluated\n'
'when the function definition is executed. In this case '
'annotations\n'
'may be evaluated in a different order than they appear in the '
'source\n'
'code.\n'
'attribute of the function object.\n'
'\n'
'It is also possible to create anonymous functions (functions not '
'bound\n'
......@@ -2949,12 +2957,9 @@
'\n'
'Execution of Python coroutines can be suspended and resumed at '
'many\n'
'points (see *coroutine*). Inside the body of a coroutine '
'function,\n'
'"await" and "async" identifiers become reserved keywords; '
'"await"\n'
'expressions, "async for" and "async with" can only be used in\n'
'coroutine function bodies.\n'
'points (see *coroutine*). "await" expressions, "async for" and '
'"async\n'
'with" can only be used in the body of a coroutine function.\n'
'\n'
'Functions defined with "async def" syntax are always coroutine\n'
'functions, even if they do not contain "await" or "async" '
......@@ -2970,6 +2975,10 @@
' do_stuff()\n'
' await some_coroutine()\n'
'\n'
'Changed in version 3.7: "await" and "async" are now keywords;\n'
'previously they were only treated as such inside the body of a\n'
'coroutine function.\n'
'\n'
'\n'
'The "async for" statement\n'
'-------------------------\n'
......@@ -3461,16 +3470,21 @@
' on the value to determine if the result is true or '
'false.\n'
'\n'
' By default, "__ne__()" delegates to "__eq__()" and '
'inverts the\n'
' result unless it is "NotImplemented". There are no '
'other implied\n'
' relationships among the comparison operators, for '
'example, the\n'
' truth of "(x<y or x==y)" does not imply "x<=y". To '
'automatically\n'
' generate ordering operations from a single root '
'operation, see\n'
' By default, "object" implements "__eq__()" by using '
'"is", returning\n'
' "NotImplemented" in the case of a false comparison: '
'"True if x is y\n'
' else NotImplemented". For "__ne__()", by default it '
'delegates to\n'
' "__eq__()" and inverts the result unless it is '
'"NotImplemented".\n'
' There are no other implied relationships among the '
'comparison\n'
' operators or default implementations; for example, the '
'truth of\n'
' "(x<y or x==y)" does not imply "x<=y". To automatically '
'generate\n'
' ordering operations from a single root operation, see\n'
' "functools.total_ordering()".\n'
'\n'
' See the paragraph on "__hash__()" for some important '
......@@ -5859,20 +5873,11 @@
'parameter list. These annotations can be any valid Python '
'expression.\n'
'The presence of annotations does not change the semantics of a\n'
'function. The annotation values are available as values of a\n'
'function. The annotation values are available as string values '
'in a\n'
'dictionary keyed by the parameters’ names in the '
'"__annotations__"\n'
'attribute of the function object. If the "annotations" import '
'from\n'
'"__future__" is used, annotations are preserved as strings at '
'runtime\n'
'which enables postponed evaluation. Otherwise, they are '
'evaluated\n'
'when the function definition is executed. In this case '
'annotations\n'
'may be evaluated in a different order than they appear in the '
'source\n'
'code.\n'
'attribute of the function object.\n'
'\n'
'It is also possible to create anonymous functions (functions not '
'bound\n'
......@@ -6395,8 +6400,8 @@
'\n'
'* other future statements.\n'
'\n'
'The only feature in Python 3.7 that requires using the future\n'
'statement is "annotations".\n'
'The only feature that requires using the future statement is\n'
'"annotations" (see **PEP 563**).\n'
'\n'
'All historical features enabled by the future statement are still\n'
'recognized by Python 3. The list includes "absolute_import",\n'
......@@ -8242,16 +8247,21 @@
' on the value to determine if the result is true or '
'false.\n'
'\n'
' By default, "__ne__()" delegates to "__eq__()" and '
'inverts the\n'
' result unless it is "NotImplemented". There are no other '
'implied\n'
' relationships among the comparison operators, for '
'example, the\n'
' truth of "(x<y or x==y)" does not imply "x<=y". To '
'automatically\n'
' generate ordering operations from a single root '
'operation, see\n'
' By default, "object" implements "__eq__()" by using "is", '
'returning\n'
' "NotImplemented" in the case of a false comparison: "True '
'if x is y\n'
' else NotImplemented". For "__ne__()", by default it '
'delegates to\n'
' "__eq__()" and inverts the result unless it is '
'"NotImplemented".\n'
' There are no other implied relationships among the '
'comparison\n'
' operators or default implementations; for example, the '
'truth of\n'
' "(x<y or x==y)" does not imply "x<=y". To automatically '
'generate\n'
' ordering operations from a single root operation, see\n'
' "functools.total_ordering()".\n'
'\n'
' See the paragraph on "__hash__()" for some important '
......@@ -8481,6 +8491,10 @@
'syntax or\n'
' built-in functions. See Special method lookup.\n'
'\n'
' For certain sensitive attribute accesses, raises an '
'auditing event\n'
' "object.__getattr__" with arguments "obj" and "name".\n'
'\n'
'object.__setattr__(self, name, value)\n'
'\n'
' Called when an attribute assignment is attempted. This '
......@@ -8497,6 +8511,11 @@
'example,\n'
' "object.__setattr__(self, name, value)".\n'
'\n'
' For certain sensitive attribute assignments, raises an '
'auditing\n'
' event "object.__setattr__" with arguments "obj", "name", '
'"value".\n'
'\n'
'object.__delattr__(self, name)\n'
'\n'
' Like "__setattr__()" but for attribute deletion instead '
......@@ -8505,6 +8524,10 @@
'obj.name" is\n'
' meaningful for the object.\n'
'\n'
' For certain sensitive attribute deletions, raises an '
'auditing event\n'
' "object.__delattr__" with arguments "obj" and "name".\n'
'\n'
'object.__dir__(self)\n'
'\n'
' Called when "dir()" is called on the object. A sequence '
......@@ -9298,8 +9321,8 @@
'\n'
' Called when the instance is “called” as a function; if '
'this method\n'
' is defined, "x(arg1, arg2, ...)" is a shorthand for\n'
' "x.__call__(arg1, arg2, ...)".\n'
' is defined, "x(arg1, arg2, ...)" roughly translates to\n'
' "type(x).__call__(x, arg1, ...)".\n'
'\n'
'\n'
'Emulating container types\n'
......@@ -11054,9 +11077,10 @@
'subscriptions': 'Subscriptions\n'
'*************\n'
'\n'
'A subscription selects an item of a sequence (string, tuple '
'or list)\n'
'or mapping (dictionary) object:\n'
'Subscription of a sequence (string, tuple or list) or '
'mapping\n'
'(dictionary) object usually selects an item from the '
'collection:\n'
'\n'
' subscription ::= primary "[" expression_list "]"\n'
'\n'
......@@ -11107,7 +11131,13 @@
'\n'
'A string’s items are characters. A character is not a '
'separate data\n'
'type but a string of exactly one character.\n',
'type but a string of exactly one character.\n'
'\n'
'Subscription of certain *classes* or *types* creates a '
'generic alias.\n'
'In this case, user-defined classes can support subscription '
'by\n'
'providing a "__class_getitem__()" classmethod.\n',
'truth': 'Truth Value Testing\n'
'*******************\n'
'\n'
......@@ -11353,6 +11383,27 @@
'representation\n'
' in computers.\n'
'\n'
' The string representations of the numeric classes, computed by\n'
' "__repr__()" and "__str__()", have the following properties:\n'
'\n'
' * They are valid numeric literals which, when passed to their '
'class\n'
' constructor, produce an object having the value of the '
'original\n'
' numeric.\n'
'\n'
' * The representation is in base 10, when possible.\n'
'\n'
' * Leading zeros, possibly excepting a single zero before a '
'decimal\n'
' point, are not shown.\n'
'\n'
' * Trailing zeros, possibly excepting a single zero after a '
'decimal\n'
' point, are not shown.\n'
'\n'
' * A sign is shown only when the number is negative.\n'
'\n'
' Python distinguishes between integers, floating point numbers, '
'and\n'
' complex numbers:\n'
......@@ -12404,6 +12455,21 @@
'positional\n'
' argument and a possibly empty set of keyword arguments.\n'
'\n'
' Dictionaries can be created by several means:\n'
'\n'
' * Use a comma-separated list of "key: value" pairs within '
'braces:\n'
' "{\'jack\': 4098, \'sjoerd\': 4127}" or "{4098: '
"'jack', 4127:\n"
' \'sjoerd\'}"\n'
'\n'
' * Use a dict comprehension: "{}", "{x: x ** 2 for x in '
'range(10)}"\n'
'\n'
' * Use the type constructor: "dict()", "dict([(\'foo\', '
"100), ('bar',\n"
' 200)])", "dict(foo=100, bar=200)"\n'
'\n'
' If no positional argument is given, an empty dictionary '
'is created.\n'
' If a positional argument is given and it is a mapping '
......
This diff is collapsed.
Add ``-fno-semantic-interposition`` to both the compile and link line when
building with ``--enable-optimizations``. Patch by Victor Stinner and Pablo
Galindo.
Added ``PyUnicode_AsUTF8AndSize`` to the limited C API.
Add `PyIter_Send` function to allow sending value into
generator/coroutine/iterator without raising StopIteration exception to
signal return.
:c:data:`Py_FileSystemDefaultEncodeErrors` and :c:data:`Py_UTF8Mode` are
available again in limited API.
Add `_Py_closerange` function to provide performant closing of a range of file descriptors.
\ No newline at end of file
:c:func:`PyObject_GenericGetDict` is available again in the limited API
when targeting 3.10 or later.
The :mod:`subprocess` module and ``os.closerange`` will now use the
``close_range(low, high, flags)`` syscall when it is available for more
efficient closing of ranges of descriptors.
\ No newline at end of file
Fix potential crash in deallocating method objects when dynamically
allocated `PyMethodDef`'s lifetime is managed through the ``self``
argument of a `PyCFunction`.
The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API
``unicodedata.ucnhash_CAPI`` has been moved to the internal C API.
Patch by Victor Stinner.
Enable ``from __future__ import annotations`` (:pep:`563`) by default.
The values found in :attr:`__annotations__` dicts are now strings, e.g.
``{"x": "int"}`` instead of ``{"x": int}``.
Add `sys._current_exceptions()` function to retrieve a dictionary mapping each thread's identifier to the topmost exception currently active in that thread at the time the function is called.
\ No newline at end of file
Micro optimization for range.index if step is 1. Patch by Dong-hee Na.
When loading a native module and a load failure occurs, prevent a possible
UnicodeDecodeError when not running in a UTF-8 locale by decoding the load
error message using the current locale's encoding.
Micro optimization when compute :c:member:`~PySequenceMethods.sq_item` and
:c:member:`~PyMappingMethods.mp_subscript` of :class:`range`. Patch by
Dong-hee Na.
Removed special methods ``__int__``, ``__float__``, ``__floordiv__``,
``__mod__``, ``__divmod__``, ``__rfloordiv__``, ``__rmod__`` and
``__rdivmod__`` of the :class:`complex` class. They always raised
a :exc:`TypeError`.
Star-unpacking is now allowed for with item's targets in the PEG parser.
Fixed potential issues with removing not completely initialized module from
``sys.modules`` when import fails.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment