Python 3.10.2

This commit is contained in:
Pablo Galindo 2022-01-13 18:47:56 +00:00
parent 3ce6945f5f
commit a58ebcc701
No known key found for this signature in database
GPG key ID: FFE87404168BD847
43 changed files with 620 additions and 333 deletions

View file

@ -18,12 +18,12 @@
/*--start constants--*/
#define PY_MAJOR_VERSION 3
#define PY_MINOR_VERSION 10
#define PY_MICRO_VERSION 1
#define PY_MICRO_VERSION 2
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
#define PY_RELEASE_SERIAL 0
/* Version as a string */
#define PY_VERSION "3.10.1+"
#define PY_VERSION "3.10.2"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Autogenerated by Sphinx on Mon Dec 6 17:57:38 2021
# Autogenerated by Sphinx on Thu Jan 13 18:49:56 2022
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
@ -1007,7 +1007,7 @@ topics = {'assert': 'The "assert" statement\n'
'"super(B,\n'
' obj).m()" searches "obj.__class__.__mro__" for the '
'base class "A"\n'
' immediately preceding "B" and then invokes the '
' immediately following "B" and then invokes the '
'descriptor with the\n'
' call: "A.__dict__[\'m\'].__get__(obj, '
'obj.__class__)".\n'
@ -1038,14 +1038,15 @@ topics = {'assert': 'The "assert" statement\n'
'can be\n'
'overridden by instances.\n'
'\n'
'Python methods (including "staticmethod()" and '
'"classmethod()") are\n'
'implemented as non-data descriptors. Accordingly, '
'instances can\n'
'redefine and override methods. This allows individual '
'instances to\n'
'acquire behaviors that differ from other instances of '
'the same class.\n'
'Python methods (including those decorated with '
'"@staticmethod" and\n'
'"@classmethod") are implemented as non-data '
'descriptors. Accordingly,\n'
'instances can redefine and override methods. This '
'allows individual\n'
'instances to acquire behaviors that differ from other '
'instances of the\n'
'same class.\n'
'\n'
'The "property()" function is implemented as a data '
'descriptor.\n'
@ -1058,12 +1059,12 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'*__slots__* allow us to explicitly declare data members '
'(like\n'
'properties) and deny the creation of *__dict__* and '
'properties) and deny the creation of "__dict__" and '
'*__weakref__*\n'
'(unless explicitly declared in *__slots__* or available '
'in a parent.)\n'
'\n'
'The space saved over using *__dict__* can be '
'The space saved over using "__dict__" can be '
'significant. Attribute\n'
'lookup speed can be significantly improved as well.\n'
'\n'
@ -1075,7 +1076,7 @@ topics = {'assert': 'The "assert" statement\n'
'*__slots__*\n'
' reserves space for the declared variables and '
'prevents the\n'
' automatic creation of *__dict__* and *__weakref__* '
' automatic creation of "__dict__" and *__weakref__* '
'for each\n'
' instance.\n'
'\n'
@ -1084,11 +1085,11 @@ topics = {'assert': 'The "assert" statement\n'
'--------------------------\n'
'\n'
'* When inheriting from a class without *__slots__*, the '
'*__dict__* and\n'
'"__dict__" and\n'
' *__weakref__* attribute of the instances will always '
'be accessible.\n'
'\n'
'* Without a *__dict__* variable, instances cannot be '
'* Without a "__dict__" variable, instances cannot be '
'assigned new\n'
' variables not listed in the *__slots__* definition. '
'Attempts to\n'
@ -1102,28 +1103,28 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'* Without a *__weakref__* variable for each instance, '
'classes defining\n'
' *__slots__* do not support weak references to its '
'instances. If weak\n'
' reference support is needed, then add '
' *__slots__* do not support "weak references" to its '
'instances. If\n'
' weak reference support is needed, then add '
'"\'__weakref__\'" to the\n'
' sequence of strings in the *__slots__* declaration.\n'
'\n'
'* *__slots__* are implemented at the class level by '
'creating\n'
' descriptors (Implementing Descriptors) for each '
'variable name. As a\n'
' result, class attributes cannot be used to set default '
'values for\n'
' instance variables defined by *__slots__*; otherwise, '
'the class\n'
' attribute would overwrite the descriptor assignment.\n'
' descriptors for each variable name. As a result, '
'class attributes\n'
' cannot be used to set default values for instance '
'variables defined\n'
' by *__slots__*; otherwise, the class attribute would '
'overwrite the\n'
' descriptor assignment.\n'
'\n'
'* The action of a *__slots__* declaration is not limited '
'to the class\n'
' where it is defined. *__slots__* declared in parents '
'are available\n'
' in child classes. However, child subclasses will get a '
'*__dict__*\n'
'"__dict__"\n'
' and *__weakref__* unless they also define *__slots__* '
'(which should\n'
' only contain names of any *additional* slots).\n'
@ -1143,13 +1144,19 @@ topics = {'assert': 'The "assert" statement\n'
' “variable-length” built-in types such as "int", '
'"bytes" and "tuple".\n'
'\n'
'* Any non-string iterable may be assigned to '
'*__slots__*. Mappings may\n'
' also be used; however, in the future, special meaning '
'may be\n'
' assigned to the values corresponding to each key.\n'
'* Any non-string *iterable* may be assigned to '
'*__slots__*.\n'
'\n'
'* *__class__* assignment works only if both classes have '
'* If a "dictionary" is used to assign *__slots__*, the '
'dictionary keys\n'
' will be used as the slot names. The values of the '
'dictionary can be\n'
' used to provide per-attribute docstrings that will be '
'recognised by\n'
' "inspect.getdoc()" and displayed in the output of '
'"help()".\n'
'\n'
'* "__class__" assignment works only if both classes have '
'the same\n'
' *__slots__*.\n'
'\n'
@ -1161,10 +1168,10 @@ topics = {'assert': 'The "assert" statement\n'
'violations\n'
' raise "TypeError".\n'
'\n'
'* If an iterator is used for *__slots__* then a '
'descriptor is created\n'
' for each of the iterators values. However, the '
'*__slots__*\n'
'* If an *iterator* is used for *__slots__* then a '
'*descriptor* is\n'
' created for each of the iterators values. However, '
'the *__slots__*\n'
' attribute will be an empty iterator.\n',
'attribute-references': 'Attribute references\n'
'********************\n'
@ -2378,33 +2385,6 @@ topics = {'assert': 'The "assert" statement\n'
':= a to b do"; e.g., "list(range(3))" returns the list "[0, 1, '
'2]".\n'
'\n'
'Note:\n'
'\n'
' There is a subtlety when the sequence is being modified by the '
'loop\n'
' (this can only occur for mutable sequences, e.g. lists). An\n'
' internal counter is used to keep track of which item is used '
'next,\n'
' and this is incremented on each iteration. When this counter '
'has\n'
' reached the length of the sequence the loop terminates. This '
'means\n'
' that if the suite deletes the current (or a previous) item '
'from the\n'
' sequence, the next item will be skipped (since it gets the '
'index of\n'
' the current item which has already been treated). Likewise, '
'if the\n'
' suite inserts an item in the sequence before the current item, '
'the\n'
' current item will be treated again the next time through the '
'loop.\n'
' This can lead to nasty bugs that can be avoided by making a\n'
' temporary copy using a slice of the whole sequence, e.g.,\n'
'\n'
' for x in a[:]:\n'
' if x < 0: a.remove(x)\n'
'\n'
'\n'
'The "try" statement\n'
'===================\n'
@ -4622,17 +4602,16 @@ topics = {'assert': 'The "assert" statement\n'
'debugger will pause execution just before the first line of the\n'
'module.\n'
'\n'
'The typical usage to break into the debugger from a running '
'program is\n'
'to insert\n'
'The typical usage to break into the debugger is to insert:\n'
'\n'
' import pdb; pdb.set_trace()\n'
'\n'
'at the location you want to break into the debugger. You can '
'then\n'
'step through the code following this statement, and continue '
'running\n'
'without the debugger using the "continue" command.\n'
'at the location you want to break into the debugger, and then '
'run the\n'
'program. You can then step through the code following this '
'statement,\n'
'and continue running without the debugger using the "continue"\n'
'command.\n'
'\n'
'New in version 3.7: The built-in "breakpoint()", when called '
'with\n'
@ -5894,30 +5873,7 @@ topics = {'assert': 'The "assert" statement\n'
'all by the loop. Hint: the built-in function "range()" returns an\n'
'iterator of integers suitable to emulate the effect of Pascals "for '
'i\n'
':= a to b do"; e.g., "list(range(3))" returns the list "[0, 1, 2]".\n'
'\n'
'Note:\n'
'\n'
' There is a subtlety when the sequence is being modified by the '
'loop\n'
' (this can only occur for mutable sequences, e.g. lists). An\n'
' internal counter is used to keep track of which item is used next,\n'
' and this is incremented on each iteration. When this counter has\n'
' reached the length of the sequence the loop terminates. This '
'means\n'
' that if the suite deletes the current (or a previous) item from '
'the\n'
' sequence, the next item will be skipped (since it gets the index '
'of\n'
' the current item which has already been treated). Likewise, if '
'the\n'
' suite inserts an item in the sequence before the current item, the\n'
' current item will be treated again the next time through the loop.\n'
' This can lead to nasty bugs that can be avoided by making a\n'
' temporary copy using a slice of the whole sequence, e.g.,\n'
'\n'
' for x in a[:]:\n'
' if x < 0: a.remove(x)\n',
':= a to b do"; e.g., "list(range(3))" returns the list "[0, 1, 2]".\n',
'formatstrings': 'Format String Syntax\n'
'********************\n'
'\n'
@ -8574,61 +8530,62 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'The following methods can be defined to implement '
'container objects.\n'
'Containers usually are sequences (such as lists or tuples) '
'or mappings\n'
'(like dictionaries), but can represent other containers as '
'well. The\n'
'first set of methods is used either to emulate a sequence '
'or to\n'
'emulate a mapping; the difference is that for a sequence, '
'the\n'
'allowable keys should be the integers *k* for which "0 <= '
'k < N" where\n'
'*N* is the length of the sequence, or slice objects, which '
'define a\n'
'range of items. It is also recommended that mappings '
'provide the\n'
'methods "keys()", "values()", "items()", "get()", '
'"clear()",\n'
'"setdefault()", "pop()", "popitem()", "copy()", and '
'"update()"\n'
'behaving similar to those for Pythons standard dictionary '
'Containers usually are *sequences* (such as "lists" or '
'"tuples") or\n'
'*mappings* (like "dictionaries"), but can represent other '
'containers\n'
'as well. The first set of methods is used either to '
'emulate a\n'
'sequence or to emulate a mapping; the difference is that '
'for a\n'
'sequence, the allowable keys should be the integers *k* '
'for which "0\n'
'<= k < N" where *N* is the length of the sequence, or '
'"slice" objects,\n'
'which define a range of items. It is also recommended '
'that mappings\n'
'provide the methods "keys()", "values()", "items()", '
'"get()",\n'
'"clear()", "setdefault()", "pop()", "popitem()", "copy()", '
'and\n'
'"update()" behaving similar to those for Pythons '
'standard\n'
'"dictionary" objects. The "collections.abc" module '
'provides a\n'
'"MutableMapping" *abstract base class* to help create '
'those methods\n'
'from a base set of "__getitem__()", "__setitem__()", '
'"__delitem__()",\n'
'and "keys()". Mutable sequences should provide methods '
'"append()",\n'
'"count()", "index()", "extend()", "insert()", "pop()", '
'"remove()",\n'
'"reverse()" and "sort()", like Python standard "list" '
'objects.\n'
'The "collections.abc" module provides a "MutableMapping" '
'abstract base\n'
'class to help create those methods from a base set of '
'"__getitem__()",\n'
'"__setitem__()", "__delitem__()", and "keys()". Mutable '
'sequences\n'
'should provide methods "append()", "count()", "index()", '
'"extend()",\n'
'"insert()", "pop()", "remove()", "reverse()" and "sort()", '
'like Python\n'
'standard list objects. Finally, sequence types should '
'implement\n'
'addition (meaning concatenation) and multiplication '
'Finally, sequence types should implement addition '
'(meaning\n'
'repetition) by defining the methods "__add__()", '
'"__radd__()",\n'
'"__iadd__()", "__mul__()", "__rmul__()" and "__imul__()" '
'described\n'
'below; they should not define other numerical operators. '
'concatenation) and multiplication (meaning repetition) by '
'defining the\n'
'methods "__add__()", "__radd__()", "__iadd__()", '
'"__mul__()",\n'
'"__rmul__()" and "__imul__()" described below; they should '
'not define\n'
'other numerical operators. It is recommended that both '
'mappings and\n'
'sequences implement the "__contains__()" method to allow '
'efficient use\n'
'of the "in" operator; for mappings, "in" should search the '
'mappings\n'
'keys; for sequences, it should search through the values. '
'It is\n'
'recommended that both mappings and sequences implement '
'further recommended that both mappings and sequences '
'implement the\n'
'"__iter__()" method to allow efficient iteration through '
'the\n'
'"__contains__()" method to allow efficient use of the "in" '
'operator;\n'
'for mappings, "in" should search the mappings keys; for '
'sequences, it\n'
'should search through the values. It is further '
'recommended that both\n'
'mappings and sequences implement the "__iter__()" method '
'to allow\n'
'efficient iteration through the container; for mappings, '
'"__iter__()"\n'
'should iterate through the objects keys; for sequences, '
'it should\n'
'iterate through the values.\n'
'container; for mappings, "__iter__()" should iterate '
'through the\n'
'objects keys; for sequences, it should iterate through '
'the values.\n'
'\n'
'object.__len__(self)\n'
'\n'
@ -9789,7 +9746,7 @@ topics = {'assert': 'The "assert" statement\n'
'"super(B,\n'
' obj).m()" searches "obj.__class__.__mro__" for the base '
'class "A"\n'
' immediately preceding "B" and then invokes the descriptor '
' immediately following "B" and then invokes the descriptor '
'with the\n'
' call: "A.__dict__[\'m\'].__get__(obj, obj.__class__)".\n'
'\n'
@ -9819,13 +9776,14 @@ topics = {'assert': 'The "assert" statement\n'
'be\n'
'overridden by instances.\n'
'\n'
'Python methods (including "staticmethod()" and '
'"classmethod()") are\n'
'implemented as non-data descriptors. Accordingly, instances '
'can\n'
'redefine and override methods. This allows individual '
'instances to\n'
'acquire behaviors that differ from other instances of the '
'Python methods (including those decorated with '
'"@staticmethod" and\n'
'"@classmethod") are implemented as non-data descriptors. '
'Accordingly,\n'
'instances can redefine and override methods. This allows '
'individual\n'
'instances to acquire behaviors that differ from other '
'instances of the\n'
'same class.\n'
'\n'
'The "property()" function is implemented as a data '
@ -9839,12 +9797,12 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'*__slots__* allow us to explicitly declare data members '
'(like\n'
'properties) and deny the creation of *__dict__* and '
'properties) and deny the creation of "__dict__" and '
'*__weakref__*\n'
'(unless explicitly declared in *__slots__* or available in a '
'parent.)\n'
'\n'
'The space saved over using *__dict__* can be significant. '
'The space saved over using "__dict__" can be significant. '
'Attribute\n'
'lookup speed can be significantly improved as well.\n'
'\n'
@ -9856,7 +9814,7 @@ topics = {'assert': 'The "assert" statement\n'
'*__slots__*\n'
' reserves space for the declared variables and prevents '
'the\n'
' automatic creation of *__dict__* and *__weakref__* for '
' automatic creation of "__dict__" and *__weakref__* for '
'each\n'
' instance.\n'
'\n'
@ -9865,11 +9823,11 @@ topics = {'assert': 'The "assert" statement\n'
'~~~~~~~~~~~~~~~~~~~~~~~~~~\n'
'\n'
'* When inheriting from a class without *__slots__*, the '
'*__dict__* and\n'
'"__dict__" and\n'
' *__weakref__* attribute of the instances will always be '
'accessible.\n'
'\n'
'* Without a *__dict__* variable, instances cannot be '
'* Without a "__dict__" variable, instances cannot be '
'assigned new\n'
' variables not listed in the *__slots__* definition. '
'Attempts to\n'
@ -9882,28 +9840,28 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'* Without a *__weakref__* variable for each instance, '
'classes defining\n'
' *__slots__* do not support weak references to its '
'instances. If weak\n'
' reference support is needed, then add "\'__weakref__\'" to '
'the\n'
' *__slots__* do not support "weak references" to its '
'instances. If\n'
' weak reference support is needed, then add '
'"\'__weakref__\'" to the\n'
' sequence of strings in the *__slots__* declaration.\n'
'\n'
'* *__slots__* are implemented at the class level by '
'creating\n'
' descriptors (Implementing Descriptors) for each variable '
'name. As a\n'
' result, class attributes cannot be used to set default '
'values for\n'
' instance variables defined by *__slots__*; otherwise, the '
'class\n'
' attribute would overwrite the descriptor assignment.\n'
' descriptors for each variable name. As a result, class '
'attributes\n'
' cannot be used to set default values for instance '
'variables defined\n'
' by *__slots__*; otherwise, the class attribute would '
'overwrite the\n'
' descriptor assignment.\n'
'\n'
'* The action of a *__slots__* declaration is not limited to '
'the class\n'
' where it is defined. *__slots__* declared in parents are '
'available\n'
' in child classes. However, child subclasses will get a '
'*__dict__*\n'
'"__dict__"\n'
' and *__weakref__* unless they also define *__slots__* '
'(which should\n'
' only contain names of any *additional* slots).\n'
@ -9923,13 +9881,18 @@ topics = {'assert': 'The "assert" statement\n'
' “variable-length” built-in types such as "int", "bytes" '
'and "tuple".\n'
'\n'
'* Any non-string iterable may be assigned to *__slots__*. '
'Mappings may\n'
' also be used; however, in the future, special meaning may '
'be\n'
' assigned to the values corresponding to each key.\n'
'* Any non-string *iterable* may be assigned to *__slots__*.\n'
'\n'
'* *__class__* assignment works only if both classes have the '
'* If a "dictionary" is used to assign *__slots__*, the '
'dictionary keys\n'
' will be used as the slot names. The values of the '
'dictionary can be\n'
' used to provide per-attribute docstrings that will be '
'recognised by\n'
' "inspect.getdoc()" and displayed in the output of '
'"help()".\n'
'\n'
'* "__class__" assignment works only if both classes have the '
'same\n'
' *__slots__*.\n'
'\n'
@ -9941,9 +9904,9 @@ topics = {'assert': 'The "assert" statement\n'
'violations\n'
' raise "TypeError".\n'
'\n'
'* If an iterator is used for *__slots__* then a descriptor '
'is created\n'
' for each of the iterators values. However, the '
'* If an *iterator* is used for *__slots__* then a '
'*descriptor* is\n'
' created for each of the iterators values. However, the '
'*__slots__*\n'
' attribute will be an empty iterator.\n'
'\n'
@ -9952,7 +9915,7 @@ topics = {'assert': 'The "assert" statement\n'
'==========================\n'
'\n'
'Whenever a class inherits from another class, '
'*__init_subclass__* is\n'
'"__init_subclass__()" is\n'
'called on that class. This way, it is possible to write '
'classes which\n'
'change the behavior of subclasses. This is closely related '
@ -10152,10 +10115,10 @@ topics = {'assert': 'The "assert" statement\n'
'come from\n'
'the class definition). The "__prepare__" method should be '
'implemented\n'
'as a "classmethod()". The namespace returned by '
'"__prepare__" is\n'
'passed in to "__new__", but when the final class object is '
'created the\n'
'as a "classmethod". The namespace returned by "__prepare__" '
'is passed\n'
'in to "__new__", but when the final class object is created '
'the\n'
'namespace is copied into a new "dict".\n'
'\n'
'If the metaclass has no "__prepare__" attribute, then the '
@ -10532,60 +10495,60 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'The following methods can be defined to implement container '
'objects.\n'
'Containers usually are sequences (such as lists or tuples) '
'or mappings\n'
'(like dictionaries), but can represent other containers as '
'well. The\n'
'first set of methods is used either to emulate a sequence or '
'to\n'
'emulate a mapping; the difference is that for a sequence, '
'the\n'
'allowable keys should be the integers *k* for which "0 <= k '
'< N" where\n'
'*N* is the length of the sequence, or slice objects, which '
'define a\n'
'range of items. It is also recommended that mappings '
'provide the\n'
'methods "keys()", "values()", "items()", "get()", '
'"clear()",\n'
'"setdefault()", "pop()", "popitem()", "copy()", and '
'"update()"\n'
'behaving similar to those for Pythons standard dictionary '
'Containers usually are *sequences* (such as "lists" or '
'"tuples") or\n'
'*mappings* (like "dictionaries"), but can represent other '
'containers\n'
'as well. The first set of methods is used either to emulate '
'a\n'
'sequence or to emulate a mapping; the difference is that for '
'a\n'
'sequence, the allowable keys should be the integers *k* for '
'which "0\n'
'<= k < N" where *N* is the length of the sequence, or '
'"slice" objects,\n'
'which define a range of items. It is also recommended that '
'mappings\n'
'provide the methods "keys()", "values()", "items()", '
'"get()",\n'
'"clear()", "setdefault()", "pop()", "popitem()", "copy()", '
'and\n'
'"update()" behaving similar to those for Pythons standard\n'
'"dictionary" objects. The "collections.abc" module provides '
'a\n'
'"MutableMapping" *abstract base class* to help create those '
'methods\n'
'from a base set of "__getitem__()", "__setitem__()", '
'"__delitem__()",\n'
'and "keys()". Mutable sequences should provide methods '
'"append()",\n'
'"count()", "index()", "extend()", "insert()", "pop()", '
'"remove()",\n'
'"reverse()" and "sort()", like Python standard "list" '
'objects.\n'
'The "collections.abc" module provides a "MutableMapping" '
'abstract base\n'
'class to help create those methods from a base set of '
'"__getitem__()",\n'
'"__setitem__()", "__delitem__()", and "keys()". Mutable '
'sequences\n'
'should provide methods "append()", "count()", "index()", '
'"extend()",\n'
'"insert()", "pop()", "remove()", "reverse()" and "sort()", '
'like Python\n'
'standard list objects. Finally, sequence types should '
'implement\n'
'addition (meaning concatenation) and multiplication '
'(meaning\n'
'repetition) by defining the methods "__add__()", '
'"__radd__()",\n'
'"__iadd__()", "__mul__()", "__rmul__()" and "__imul__()" '
'described\n'
'below; they should not define other numerical operators. It '
'is\n'
'recommended that both mappings and sequences implement the\n'
'"__contains__()" method to allow efficient use of the "in" '
'operator;\n'
'for mappings, "in" should search the mappings keys; for '
'sequences, it\n'
'should search through the values. It is further recommended '
'that both\n'
'mappings and sequences implement the "__iter__()" method to '
'allow\n'
'efficient iteration through the container; for mappings, '
'"__iter__()"\n'
'should iterate through the objects keys; for sequences, it '
'should\n'
'iterate through the values.\n'
'Finally, sequence types should implement addition (meaning\n'
'concatenation) and multiplication (meaning repetition) by '
'defining the\n'
'methods "__add__()", "__radd__()", "__iadd__()", '
'"__mul__()",\n'
'"__rmul__()" and "__imul__()" described below; they should '
'not define\n'
'other numerical operators. It is recommended that both '
'mappings and\n'
'sequences implement the "__contains__()" method to allow '
'efficient use\n'
'of the "in" operator; for mappings, "in" should search the '
'mappings\n'
'keys; for sequences, it should search through the values. '
'It is\n'
'further recommended that both mappings and sequences '
'implement the\n'
'"__iter__()" method to allow efficient iteration through '
'the\n'
'container; for mappings, "__iter__()" should iterate through '
'the\n'
'objects keys; for sequences, it should iterate through the '
'values.\n'
'\n'
'object.__len__(self)\n'
'\n'
@ -11493,9 +11456,9 @@ topics = {'assert': 'The "assert" statement\n'
' >>> from keyword import iskeyword\n'
'\n'
" >>> 'hello'.isidentifier(), iskeyword('hello')\n"
' True, False\n'
' (True, False)\n'
" >>> 'def'.isidentifier(), iskeyword('def')\n"
' True, True\n'
' (True, True)\n'
'\n'
'str.islower()\n'
'\n'
@ -11846,7 +11809,7 @@ topics = {'assert': 'The "assert" statement\n'
" >>> ' 1 2 3 '.split()\n"
" ['1', '2', '3']\n"
'\n'
'str.splitlines([keepends])\n'
'str.splitlines(keepends=False)\n'
'\n'
' Return a list of the lines in the string, breaking at '
'line\n'
@ -13203,14 +13166,14 @@ topics = {'assert': 'The "assert" statement\n'
'"async\n'
' for" statement to execute the body of the function.\n'
'\n'
' Calling the asynchronous iterators "aiterator.__anext__()"\n'
' method will return an *awaitable* which when awaited will\n'
' execute until it provides a value using the "yield" '
'expression.\n'
' When the function executes an empty "return" statement or '
'falls\n'
' off the end, a "StopAsyncIteration" exception is raised and '
' Calling the asynchronous iterators "aiterator.__anext__" '
'method\n'
' will return an *awaitable* which when awaited will execute '
'until\n'
' it provides a value using the "yield" expression. When the\n'
' function executes an empty "return" statement or falls off '
'the\n'
' end, a "StopAsyncIteration" exception is raised and the\n'
' asynchronous iterator will have reached the end of the set '
'of\n'
' values to be yielded.\n'
@ -13754,9 +13717,9 @@ topics = {'assert': 'The "assert" statement\n'
'"dict"\n'
'constructor.\n'
'\n'
'class dict(**kwarg)\n'
'class dict(mapping, **kwarg)\n'
'class dict(iterable, **kwarg)\n'
'class dict(**kwargs)\n'
'class dict(mapping, **kwargs)\n'
'class dict(iterable, **kwargs)\n'
'\n'
' Return a new dictionary initialized from an optional '
'positional\n'
@ -14406,6 +14369,14 @@ topics = {'assert': 'The "assert" statement\n'
'Comparisons in\n'
'the language reference.)\n'
'\n'
'Forward and reversed iterators over mutable sequences access '
'values\n'
'using an index. That index will continue to march forward (or\n'
'backward) even if the underlying sequence is mutated. The '
'iterator\n'
'terminates only when an "IndexError" or a "StopIteration" is\n'
'encountered (or when the index drops below zero).\n'
'\n'
'Notes:\n'
'\n'
'1. While the "in" and "not in" operations are used only for '
@ -14877,7 +14848,8 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
' The arguments to the range constructor must be integers '
'(either\n'
' built-in "int" or any object that implements the "__index__"\n'
' built-in "int" or any object that implements the '
'"__index__()"\n'
' special method). If the *step* argument is omitted, it '
'defaults to\n'
' "1". If the *start* argument is omitted, it defaults to "0". '

393
Misc/NEWS.d/3.10.2.rst Normal file
View file

@ -0,0 +1,393 @@
.. bpo: 46347
.. date: 2022-01-11-13-57-00
.. nonce: Gd8M-S
.. release date: 2022-01-13
.. section: Core and Builtins
Fix memory leak in PyEval_EvalCodeEx.
..
.. bpo: 46289
.. date: 2022-01-07-23-32-03
.. nonce: NnjpVc
.. section: Core and Builtins
ASDL declaration of ``FormattedValue`` has changed to reflect ``conversion``
field is not optional.
..
.. bpo: 46237
.. date: 2022-01-07-19-33-05
.. nonce: 9A6Hpq
.. section: Core and Builtins
Fix the line number of tokenizer errors inside f-strings. Patch by Pablo
Galindo.
..
.. bpo: 46006
.. date: 2022-01-05-17-13-47
.. nonce: hdH5Vn
.. section: Core and Builtins
Fix a regression when a type method like ``__init__()`` is modified in a
subinterpreter. Fix a regression in ``_PyUnicode_EqualToASCIIId()`` and type
``update_slot()``. Revert the change which made the Unicode dictionary of
interned strings compatible with subinterpreters: the internal interned
dictionary is shared again by all interpreters. Patch by Victor Stinner.
..
.. bpo: 46085
.. date: 2021-12-30-00-23-41
.. nonce: bDuJqu
.. section: Core and Builtins
Fix iterator cache mechanism of :class:`OrderedDict`.
..
.. bpo: 46110
.. date: 2021-12-18-02-37-07
.. nonce: B6hAfu
.. section: Core and Builtins
Add a maximum recursion check to the PEG parser to avoid stack overflow.
Patch by Pablo Galindo
..
.. bpo: 46054
.. date: 2021-12-12-05-30-21
.. nonce: 2P-foG
.. section: Core and Builtins
Fix parser error when parsing non-utf8 characters in source files. Patch by
Pablo Galindo.
..
.. bpo: 46042
.. date: 2021-12-11-17-40-34
.. nonce: aqYxku
.. section: Core and Builtins
Improve the location of the caret in :exc:`SyntaxError` exceptions emitted
by the symbol table. Patch by Pablo Galindo.
..
.. bpo: 46025
.. date: 2021-12-09-11-41-35
.. nonce: pkEvW9
.. section: Core and Builtins
Fix a crash in the :mod:`atexit` module involving functions that unregister
themselves before raising exceptions. Patch by Pablo Galindo.
..
.. bpo: 46009
.. date: 2021-12-08-11-06-53
.. nonce: cL8pH0
.. section: Core and Builtins
Restore behavior from 3.9 and earlier when sending non-None to newly started
generator. In 3.9 this did not affect the state of the generator. In 3.10.0
and 3.10.1 ``gen_func().send(0)`` is equivalent to
``gen_func().throw(TypeError(...)`` which exhausts the generator. In 3.10.2
onward, the behavior has been reverted to that of 3.9.
..
.. bpo: 46000
.. date: 2021-12-07-11-42-44
.. nonce: v_ru3k
.. section: Core and Builtins
Improve compatibility of the :mod:`curses` module with NetBSD curses.
..
.. bpo: 46004
.. date: 2021-12-07-11-24-24
.. nonce: TTEU1p
.. section: Core and Builtins
Fix the :exc:`SyntaxError` location for errors involving for loops with
invalid targets. Patch by Pablo Galindo
..
.. bpo: 42918
.. date: 2021-12-06-15-32-12
.. nonce: Czpgtg
.. section: Core and Builtins
Fix bug where the built-in :func:`compile` function did not always raise a
:exc:`SyntaxError` when passed multiple statements in 'single' mode. Patch
by Weipeng Hong.
..
.. bpo: 40479
.. date: 2022-01-07-15-20-19
.. nonce: EKfr3F
.. section: Library
Fix :mod:`hashlib` *usedforsecurity* option to work correctly with OpenSSL
3.0.0 in FIPS mode.
..
.. bpo: 46070
.. date: 2022-01-07-13-51-22
.. nonce: -axLUW
.. section: Library
Fix possible segfault when importing the :mod:`asyncio` module from
different sub-interpreters in parallel. Patch by Erlend E. Aasland.
..
.. bpo: 46278
.. date: 2022-01-06-13-38-00
.. nonce: wILA80
.. section: Library
Reflect ``context`` argument in ``AbstractEventLoop.call_*()`` methods. Loop
implementations already support it.
..
.. bpo: 46239
.. date: 2022-01-03-12-59-20
.. nonce: ySVSEy
.. section: Library
Improve error message when importing :mod:`asyncio.windows_events` on
non-Windows.
..
.. bpo: 20369
.. date: 2021-12-17-12-06-40
.. nonce: zzLuBz
.. section: Library
:func:`concurrent.futures.wait` no longer blocks forever when given
duplicate Futures. Patch by Kumar Aditya.
..
.. bpo: 46105
.. date: 2021-12-16-14-30-36
.. nonce: pprB1K
.. section: Library
Honor spec when generating requirement specs with urls and extras
(importlib_metadata 4.8.3).
..
.. bpo: 26952
.. date: 2021-12-14-13-18-45
.. nonce: hjhISq
.. section: Library
:mod:`argparse` raises :exc:`ValueError` with clear message when trying to
render usage for an empty mutually-exclusive group. Previously it raised a
cryptic :exc:`IndexError`.
..
.. bpo: 27718
.. date: 2021-12-11-22-51-30
.. nonce: MgQiGl
.. section: Library
Fix help for the :mod:`signal` module. Some functions (e.g. ``signal()`` and
``getsignal()``) were omitted.
..
.. bpo: 46032
.. date: 2021-12-11-15-45-07
.. nonce: HmciLT
.. section: Library
The ``registry()`` method of :func:`functools.singledispatch` functions
checks now the first argument or the first parameter annotation and raises a
TypeError if it is not supported. Previously unsupported "types" were
ignored (e.g. ``typing.List[int]``) or caused an error at calling time (e.g.
``list[int]``).
..
.. bpo: 46018
.. date: 2021-12-09-00-44-42
.. nonce: hkTI7v
.. section: Library
Ensure that :func:`math.expm1` does not raise on underflow.
..
.. bpo: 45755
.. date: 2021-12-07-21-55-22
.. nonce: bRqKGa
.. section: Library
:mod:`typing` generic aliases now reveal the class attributes of the
original generic class when passed to ``dir()``. This was the behavior up to
Python 3.6, but was changed in 3.7-3.9.
..
.. bpo: 13236
.. date: 2021-11-30-13-52-02
.. nonce: FmJIkO
.. section: Library
:class:`unittest.TextTestResult` and :class:`unittest.TextTestRunner` flush
now the output stream more often.
..
.. bpo: 42378
.. date: 2021-07-25-08-17-55
.. nonce: WIhUZK
.. section: Library
Fixes the issue with log file being overwritten when
:class:`logging.FileHandler` is used in :mod:`atexit` with *filemode* set to
``'w'``. Note this will cause the message in *atexit* not being logged if
the log stream is already closed due to shutdown of logging.
..
.. bpo: 46120
.. date: 2021-12-21-12-45-57
.. nonce: PE0DmJ
.. section: Documentation
State that ``|`` is preferred for readability over ``Union`` in the
:mod:`typing` docs.
..
.. bpo: 46040
.. date: 2021-12-11-20-03-09
.. nonce: qrsG0C
.. section: Documentation
Fix removal Python version for ``@asyncio.coroutine``, the correct value is
3.11.
..
.. bpo: 19737
.. date: 2021-11-28-22-43-21
.. nonce: cOOubB
.. section: Documentation
Update the documentation for the :func:`globals` function.
..
.. bpo: 45840
.. date: 2021-11-19-02-02-32
.. nonce: A51B2S
.. section: Documentation
Improve cross-references in the documentation for the data model.
..
.. bpo: 46205
.. date: 2022-01-07-14-06-12
.. nonce: dnc2OC
.. section: Tests
Fix hang in runtest_mp due to race condition
..
.. bpo: 46263
.. date: 2022-01-06-15-45-34
.. nonce: bJXek6
.. section: Tests
Fix test_capi on FreeBSD 14-dev: instruct jemalloc to not fill freed memory
with junk byte.
..
.. bpo: 46150
.. date: 2021-12-23-13-42-15
.. nonce: RhtADs
.. section: Tests
Now ``fakename`` in ``test_pathlib.PosixPathTest.test_expanduser`` is
checked to be non-existent.
..
.. bpo: 46129
.. date: 2021-12-19-12-20-57
.. nonce: I3MunH
.. section: Tests
Rewrite ``asyncio.locks`` tests with
:class:`unittest.IsolatedAsyncioTestCase` usage.
..
.. bpo: 46114
.. date: 2021-12-17-14-46-19
.. nonce: 9iyZ_9
.. section: Tests
Fix test case for OpenSSL 3.0.1 version. OpenSSL 3.0 uses ``0xMNN00PP0L``.
..
.. bpo: 46263
.. date: 2022-01-05-02-58-10
.. nonce: xiv8NU
.. section: Build
``configure`` no longer sets ``MULTIARCH`` on FreeBSD platforms.
..
.. bpo: 46106
.. date: 2021-12-20-07-10-41
.. nonce: 5qcv3L
.. section: Build
Updated OpenSSL to 1.1.1m in Windows builds, macOS installer builds, and CI.
Patch by Kumar Aditya.
..
.. bpo: 40477
.. date: 2022-01-02-21-56-53
.. nonce: W3nnM6
.. section: macOS
The Python Launcher app for macOS now properly launches scripts and, if
necessary, the Terminal app when running on recent macOS releases.
..
.. bpo: 46236
.. date: 2022-01-05-10-16-16
.. nonce: pcmVQw
.. section: C API
Fix a bug in :c:func:`PyFunction_GetAnnotations` that caused it to return a
``tuple`` instead of a ``dict``.

View file

@ -1,2 +0,0 @@
Updated OpenSSL to 1.1.1m in Windows builds, macOS installer builds, and CI.
Patch by Kumar Aditya.

View file

@ -1 +0,0 @@
``configure`` no longer sets ``MULTIARCH`` on FreeBSD platforms.

View file

@ -1 +0,0 @@
Fix a bug in :c:func:`PyFunction_GetAnnotations` that caused it to return a ``tuple`` instead of a ``dict``.

View file

@ -1,3 +0,0 @@
Fix bug where the built-in :func:`compile` function did not always raise a
:exc:`SyntaxError` when passed multiple statements in 'single' mode. Patch by
Weipeng Hong.

View file

@ -1,2 +0,0 @@
Fix the :exc:`SyntaxError` location for errors involving for loops with
invalid targets. Patch by Pablo Galindo

View file

@ -1 +0,0 @@
Improve compatibility of the :mod:`curses` module with NetBSD curses.

View file

@ -1,5 +0,0 @@
Restore behavior from 3.9 and earlier when sending non-None to newly started
generator. In 3.9 this did not affect the state of the generator. In 3.10.0
and 3.10.1 ``gen_func().send(0)`` is equivalent to
``gen_func().throw(TypeError(...)`` which exhausts the generator. In 3.10.2
onward, the behavior has been reverted to that of 3.9.

View file

@ -1,2 +0,0 @@
Fix a crash in the :mod:`atexit` module involving functions that unregister
themselves before raising exceptions. Patch by Pablo Galindo.

View file

@ -1,2 +0,0 @@
Improve the location of the caret in :exc:`SyntaxError` exceptions emitted
by the symbol table. Patch by Pablo Galindo.

View file

@ -1,2 +0,0 @@
Fix parser error when parsing non-utf8 characters in source files. Patch by
Pablo Galindo.

View file

@ -1,2 +0,0 @@
Add a maximum recursion check to the PEG parser to avoid stack overflow.
Patch by Pablo Galindo

View file

@ -1 +0,0 @@
Fix iterator cache mechanism of :class:`OrderedDict`.

View file

@ -1,5 +0,0 @@
Fix a regression when a type method like ``__init__()`` is modified in a
subinterpreter. Fix a regression in ``_PyUnicode_EqualToASCIIId()`` and type
``update_slot()``. Revert the change which made the Unicode dictionary of
interned strings compatible with subinterpreters: the internal interned
dictionary is shared again by all interpreters. Patch by Victor Stinner.

View file

@ -1,2 +0,0 @@
Fix the line number of tokenizer errors inside f-strings. Patch by Pablo
Galindo.

View file

@ -1,2 +0,0 @@
ASDL declaration of ``FormattedValue`` has changed to reflect ``conversion``
field is not optional.

View file

@ -1 +0,0 @@
Fix memory leak in PyEval_EvalCodeEx.

View file

@ -1 +0,0 @@
Improve cross-references in the documentation for the data model.

View file

@ -1 +0,0 @@
Update the documentation for the :func:`globals` function.

View file

@ -1,2 +0,0 @@
Fix removal Python version for ``@asyncio.coroutine``, the correct value is
3.11.

View file

@ -1 +0,0 @@
State that ``|`` is preferred for readability over ``Union`` in the :mod:`typing` docs.

View file

@ -1,4 +0,0 @@
Fixes the issue with log file being overwritten when
:class:`logging.FileHandler` is used in :mod:`atexit` with *filemode* set to
``'w'``. Note this will cause the message in *atexit* not being logged if
the log stream is already closed due to shutdown of logging.

View file

@ -1,2 +0,0 @@
:class:`unittest.TextTestResult` and :class:`unittest.TextTestRunner` flush
now the output stream more often.

View file

@ -1,3 +0,0 @@
:mod:`typing` generic aliases now reveal the class attributes of the
original generic class when passed to ``dir()``. This was the behavior up to
Python 3.6, but was changed in 3.7-3.9.

View file

@ -1 +0,0 @@
Ensure that :func:`math.expm1` does not raise on underflow.

View file

@ -1,5 +0,0 @@
The ``registry()`` method of :func:`functools.singledispatch` functions
checks now the first argument or the first parameter annotation and raises a
TypeError if it is not supported. Previously unsupported "types" were
ignored (e.g. ``typing.List[int]``) or caused an error at calling time (e.g.
``list[int]``).

View file

@ -1,2 +0,0 @@
Fix help for the :mod:`signal` module. Some functions (e.g. ``signal()`` and
``getsignal()``) were omitted.

View file

@ -1 +0,0 @@
:mod:`argparse` raises :exc:`ValueError` with clear message when trying to render usage for an empty mutually-exclusive group. Previously it raised a cryptic :exc:`IndexError`.

View file

@ -1,2 +0,0 @@
Honor spec when generating requirement specs with urls and extras
(importlib_metadata 4.8.3).

View file

@ -1 +0,0 @@
:func:`concurrent.futures.wait` no longer blocks forever when given duplicate Futures. Patch by Kumar Aditya.

View file

@ -1,2 +0,0 @@
Improve error message when importing :mod:`asyncio.windows_events` on
non-Windows.

View file

@ -1,2 +0,0 @@
Reflect ``context`` argument in ``AbstractEventLoop.call_*()`` methods. Loop
implementations already support it.

View file

@ -1,2 +0,0 @@
Fix possible segfault when importing the :mod:`asyncio` module from
different sub-interpreters in parallel. Patch by Erlend E. Aasland.

View file

@ -1,2 +0,0 @@
Fix :mod:`hashlib` *usedforsecurity* option to work correctly with OpenSSL
3.0.0 in FIPS mode.

View file

@ -1 +0,0 @@
Fix test case for OpenSSL 3.0.1 version. OpenSSL 3.0 uses ``0xMNN00PP0L``.

View file

@ -1,2 +0,0 @@
Rewrite ``asyncio.locks`` tests with
:class:`unittest.IsolatedAsyncioTestCase` usage.

View file

@ -1,2 +0,0 @@
Now ``fakename`` in ``test_pathlib.PosixPathTest.test_expanduser`` is checked
to be non-existent.

View file

@ -1,2 +0,0 @@
Fix test_capi on FreeBSD 14-dev: instruct jemalloc to not fill freed memory
with junk byte.

View file

@ -1 +0,0 @@
Fix hang in runtest_mp due to race condition

View file

@ -1,2 +0,0 @@
The Python Launcher app for macOS now properly launches scripts and, if
necessary, the Terminal app when running on recent macOS releases.

View file

@ -1,4 +1,4 @@
This is Python version 3.10.1
This is Python version 3.10.2
=============================
.. image:: https://travis-ci.com/python/cpython.svg?branch=master