Python 3.12.7

This commit is contained in:
Thomas Wouters 2024-10-01 04:01:22 +02:00
parent 3b5bc8d228
commit 0b05ead877
40 changed files with 627 additions and 248 deletions

View file

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

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Autogenerated by Sphinx on Fri Sep 6 21:00:45 2024 # Autogenerated by Sphinx on Tue Oct 1 04:02:04 2024
# as part of the release process. # as part of the release process.
topics = {'assert': 'The "assert" statement\n' topics = {'assert': 'The "assert" statement\n'
'**********************\n' '**********************\n'
@ -1094,11 +1094,13 @@ topics = {'assert': 'The "assert" statement\n'
'to the class\n' 'to the class\n'
' where it is defined. *__slots__* declared in parents ' ' where it is defined. *__slots__* declared in parents '
'are available\n' 'are available\n'
' in child classes. However, child subclasses will get a ' ' in child classes. However, instances of a child '
'"__dict__"\n' 'subclass will get a\n'
' and *__weakref__* unless they also define *__slots__* ' ' "__dict__" and *__weakref__* unless the subclass also '
'(which should\n' 'defines\n'
' only contain names of any *additional* slots).\n' ' *__slots__* (which should only contain names of any '
'*additional*\n'
' slots).\n'
'\n' '\n'
'* If a class defines a slot also defined in a base ' '* If a class defines a slot also defined in a base '
'class, the instance\n' 'class, the instance\n'
@ -3571,10 +3573,12 @@ topics = {'assert': 'The "assert" statement\n'
' parameter_list_no_posonly ::= defparameter ("," ' ' parameter_list_no_posonly ::= defparameter ("," '
'defparameter)* ["," [parameter_list_starargs]]\n' 'defparameter)* ["," [parameter_list_starargs]]\n'
' | parameter_list_starargs\n' ' | parameter_list_starargs\n'
' parameter_list_starargs ::= "*" [parameter] ("," ' ' parameter_list_starargs ::= "*" [star_parameter] ("," '
'defparameter)* ["," ["**" parameter [","]]]\n' 'defparameter)* ["," ["**" parameter [","]]]\n'
' | "**" parameter [","]\n' ' | "**" parameter [","]\n'
' parameter ::= identifier [":" expression]\n' ' parameter ::= identifier [":" expression]\n'
' star_parameter ::= identifier [":" ["*"] '
'expression]\n'
' defparameter ::= parameter ["=" expression]\n' ' defparameter ::= parameter ["=" expression]\n'
' funcname ::= identifier\n' ' funcname ::= identifier\n'
'\n' '\n'
@ -3702,27 +3706,31 @@ topics = {'assert': 'The "assert" statement\n'
'expression"\n' 'expression"\n'
'following the parameter name. Any parameter may have an ' 'following the parameter name. Any parameter may have an '
'annotation,\n' 'annotation,\n'
'even those of the form "*identifier" or "**identifier". ' 'even those of the form "*identifier" or "**identifier". (As a '
'Functions may\n' 'special\n'
'have “return” annotation of the form “"-> expression"” after ' 'case, parameters of the form "*identifier" may have an '
'the\n' 'annotation “":\n'
'parameter list. These annotations can be any valid Python ' '*expression"”.) Functions may have “return” annotation of the '
'expression.\n' 'form\n'
'The presence of annotations does not change the semantics of a\n' '"-> expression"” after the parameter list. These annotations '
'function. The annotation values are available as values of a\n' 'can be\n'
'dictionary keyed by the parameters names in the ' 'any valid Python expression. The presence of annotations does '
'"__annotations__"\n' 'not\n'
'attribute of the function object. If the "annotations" import ' 'change the semantics of a function. The annotation values are\n'
'from\n' 'available as values of a dictionary keyed by the parameters '
'"__future__" is used, annotations are preserved as strings at ' 'names in\n'
'runtime\n' 'the "__annotations__" attribute of the function object. If the\n'
'which enables postponed evaluation. Otherwise, they are ' '"annotations" import from "__future__" is used, annotations are\n'
'evaluated\n' 'preserved as strings at runtime which enables postponed '
'when the function definition is executed. In this case ' 'evaluation.\n'
'annotations\n' 'Otherwise, they are evaluated when the function definition is\n'
'may be evaluated in a different order than they appear in the ' 'executed. In this case annotations may be evaluated in a '
'source\n' 'different\n'
'code.\n' 'order than they appear in the source code.\n'
'\n'
'Changed in version 3.11: Parameters of the form “"*identifier"'
'may\n'
'have an annotation “": *expression"”. See **PEP 646**.\n'
'\n' '\n'
'It is also possible to create anonymous functions (functions not ' 'It is also possible to create anonymous functions (functions not '
'bound\n' 'bound\n'
@ -6231,11 +6239,11 @@ topics = {'assert': 'The "assert" statement\n'
'\n' '\n'
'* While annotation scopes have an internal name, that name is ' '* While annotation scopes have an internal name, that name is '
'not\n' 'not\n'
' reflected in the *__qualname__* of objects defined within the ' ' reflected in the *qualified name* of objects defined within '
'scope.\n' 'the\n'
' Instead, the "__qualname__" of such objects is as if the ' ' scope. Instead, the "__qualname__" of such objects is as if '
'object were\n' 'the\n'
' defined in the enclosing scope.\n' ' object were defined in the enclosing scope.\n'
'\n' '\n'
'Added in version 3.12: Annotation scopes were introduced in ' 'Added in version 3.12: Annotation scopes were introduced in '
'Python\n' 'Python\n'
@ -6433,12 +6441,17 @@ topics = {'assert': 'The "assert" statement\n'
'exprlists': 'Expression lists\n' 'exprlists': 'Expression lists\n'
'****************\n' '****************\n'
'\n' '\n'
' expression_list ::= expression ("," expression)* [","]\n' ' starred_expression ::= ["*"] or_expr\n'
' starred_list ::= starred_item ("," starred_item)* ' ' flexible_expression ::= assignment_expression | '
'starred_expression\n'
' flexible_expression_list ::= flexible_expression ("," '
'flexible_expression)* [","]\n'
' starred_expression_list ::= starred_expression ("," '
'starred_expression)* [","]\n'
' expression_list ::= expression ("," expression)* '
'[","]\n' '[","]\n'
' starred_expression ::= expression | (starred_item ",")* ' ' yield_list ::= expression_list | '
'[starred_item]\n' 'starred_expression "," [starred_expression_list]\n'
' starred_item ::= assignment_expression | "*" or_expr\n'
'\n' '\n'
'Except when part of a list or set display, an expression list\n' 'Except when part of a list or set display, an expression list\n'
'containing at least one comma yields a tuple. The length of ' 'containing at least one comma yields a tuple. The length of '
@ -6457,6 +6470,10 @@ topics = {'assert': 'The "assert" statement\n'
'Added in version 3.5: Iterable unpacking in expression lists,\n' 'Added in version 3.5: Iterable unpacking in expression lists,\n'
'originally proposed by **PEP 448**.\n' 'originally proposed by **PEP 448**.\n'
'\n' '\n'
'Added in version 3.11: Any item in an expression list may be '
'starred.\n'
'See **PEP 646**.\n'
'\n'
'A trailing comma is required only to create a one-item tuple, ' 'A trailing comma is required only to create a one-item tuple, '
'such as\n' 'such as\n'
'"1,"; it is optional in all other cases. A single expression ' '"1,"; it is optional in all other cases. A single expression '
@ -7142,18 +7159,22 @@ topics = {'assert': 'The "assert" statement\n'
'percent sign. |\n' 'percent sign. |\n'
' ' ' '
'+-----------+------------------------------------------------------------+\n' '+-----------+------------------------------------------------------------+\n'
' | None | For "float" this is the same as "\'g\'", ' ' | None | For "float" this is like the "\'g\'" type, '
'except that when |\n' 'except that when |\n'
' | | fixed-point notation is used to format the ' ' | | fixed- point notation is used to format '
'result, it |\n' 'the result, it |\n'
' | | always includes at least one digit past ' ' | | always includes at least one digit past '
'the decimal point. |\n' 'the decimal point, |\n'
' | | The precision used is as large as needed ' ' | | and switches to the scientific notation '
'to represent the |\n' 'when "exp >= p - |\n'
' | | given value faithfully. For "Decimal", ' ' | | 1". When the precision is not specified, '
'this is the same |\n' 'the latter will |\n'
' | | as either "\'g\'" or "\'G\'" depending on ' ' | | be as large as needed to represent the '
'the value of |\n' 'given value |\n'
' | | faithfully. For "Decimal", this is the '
'same as either |\n'
' | | "\'g\'" or "\'G\'" depending on the value '
'of |\n'
' | | "context.capitals" for the current decimal ' ' | | "context.capitals" for the current decimal '
'context. The |\n' 'context. The |\n'
' | | overall effect is to match the output of ' ' | | overall effect is to match the output of '
@ -7343,10 +7364,12 @@ topics = {'assert': 'The "assert" statement\n'
' parameter_list_no_posonly ::= defparameter ("," ' ' parameter_list_no_posonly ::= defparameter ("," '
'defparameter)* ["," [parameter_list_starargs]]\n' 'defparameter)* ["," [parameter_list_starargs]]\n'
' | parameter_list_starargs\n' ' | parameter_list_starargs\n'
' parameter_list_starargs ::= "*" [parameter] ("," ' ' parameter_list_starargs ::= "*" [star_parameter] ("," '
'defparameter)* ["," ["**" parameter [","]]]\n' 'defparameter)* ["," ["**" parameter [","]]]\n'
' | "**" parameter [","]\n' ' | "**" parameter [","]\n'
' parameter ::= identifier [":" expression]\n' ' parameter ::= identifier [":" expression]\n'
' star_parameter ::= identifier [":" ["*"] '
'expression]\n'
' defparameter ::= parameter ["=" expression]\n' ' defparameter ::= parameter ["=" expression]\n'
' funcname ::= identifier\n' ' funcname ::= identifier\n'
'\n' '\n'
@ -7474,27 +7497,31 @@ topics = {'assert': 'The "assert" statement\n'
'expression"\n' 'expression"\n'
'following the parameter name. Any parameter may have an ' 'following the parameter name. Any parameter may have an '
'annotation,\n' 'annotation,\n'
'even those of the form "*identifier" or "**identifier". ' 'even those of the form "*identifier" or "**identifier". (As a '
'Functions may\n' 'special\n'
'have “return” annotation of the form “"-> expression"” after ' 'case, parameters of the form "*identifier" may have an '
'the\n' 'annotation “":\n'
'parameter list. These annotations can be any valid Python ' '*expression"”.) Functions may have “return” annotation of the '
'expression.\n' 'form\n'
'The presence of annotations does not change the semantics of a\n' '"-> expression"” after the parameter list. These annotations '
'function. The annotation values are available as values of a\n' 'can be\n'
'dictionary keyed by the parameters names in the ' 'any valid Python expression. The presence of annotations does '
'"__annotations__"\n' 'not\n'
'attribute of the function object. If the "annotations" import ' 'change the semantics of a function. The annotation values are\n'
'from\n' 'available as values of a dictionary keyed by the parameters '
'"__future__" is used, annotations are preserved as strings at ' 'names in\n'
'runtime\n' 'the "__annotations__" attribute of the function object. If the\n'
'which enables postponed evaluation. Otherwise, they are ' '"annotations" import from "__future__" is used, annotations are\n'
'evaluated\n' 'preserved as strings at runtime which enables postponed '
'when the function definition is executed. In this case ' 'evaluation.\n'
'annotations\n' 'Otherwise, they are evaluated when the function definition is\n'
'may be evaluated in a different order than they appear in the ' 'executed. In this case annotations may be evaluated in a '
'source\n' 'different\n'
'code.\n' 'order than they appear in the source code.\n'
'\n'
'Changed in version 3.11: Parameters of the form “"*identifier"'
'may\n'
'have an annotation “": *expression"”. See **PEP 646**.\n'
'\n' '\n'
'It is also possible to create anonymous functions (functions not ' 'It is also possible to create anonymous functions (functions not '
'bound\n' 'bound\n'
@ -8250,7 +8277,8 @@ topics = {'assert': 'The "assert" statement\n'
'in\n' 'in\n'
'square brackets:\n' 'square brackets:\n'
'\n' '\n'
' list_display ::= "[" [starred_list | comprehension] "]"\n' ' list_display ::= "[" [flexible_expression_list | comprehension] '
'"]"\n'
'\n' '\n'
'A list display yields a new list object, the contents being ' 'A list display yields a new list object, the contents being '
'specified\n' 'specified\n'
@ -8501,11 +8529,9 @@ topics = {'assert': 'The "assert" statement\n'
' can introduce new names.\n' ' can introduce new names.\n'
'\n' '\n'
'* While annotation scopes have an internal name, that name is not\n' '* While annotation scopes have an internal name, that name is not\n'
' reflected in the *__qualname__* of objects defined within the ' ' reflected in the *qualified name* of objects defined within the\n'
'scope.\n' ' scope. Instead, the "__qualname__" of such objects is as if the\n'
' Instead, the "__qualname__" of such objects is as if the object ' ' object were defined in the enclosing scope.\n'
'were\n'
' defined in the enclosing scope.\n'
'\n' '\n'
'Added in version 3.12: Annotation scopes were introduced in ' 'Added in version 3.12: Annotation scopes were introduced in '
'Python\n' 'Python\n'
@ -9721,20 +9747,6 @@ topics = {'assert': 'The "assert" statement\n'
'not reported\n' 'not reported\n'
'by the "dir()" built-in function.\n' 'by the "dir()" built-in function.\n'
'\n' '\n'
'object.__dict__\n'
'\n'
' A dictionary or other mapping object used to store an '
'objects\n'
' (writable) attributes.\n'
'\n'
'instance.__class__\n'
'\n'
' The class to which a class instance belongs.\n'
'\n'
'class.__bases__\n'
'\n'
' The tuple of base classes of a class object.\n'
'\n'
'definition.__name__\n' 'definition.__name__\n'
'\n' '\n'
' The name of the class, function, method, descriptor, or ' ' The name of the class, function, method, descriptor, or '
@ -9749,39 +9761,26 @@ topics = {'assert': 'The "assert" statement\n'
'\n' '\n'
' Added in version 3.3.\n' ' Added in version 3.3.\n'
'\n' '\n'
'definition.__module__\n'
'\n'
' The name of the module in which a class or function was '
'defined.\n'
'\n'
'definition.__doc__\n'
'\n'
' The documentation string of a class or function, or '
'"None" if\n'
' undefined.\n'
'\n'
'definition.__type_params__\n' 'definition.__type_params__\n'
'\n' '\n'
' The type parameters of generic classes, functions, and ' ' The type parameters of generic classes, functions, and '
'type\n' 'type\n'
' aliases.\n' ' aliases. For classes and functions that are not generic, '
'this will\n'
' be an empty tuple.\n'
'\n' '\n'
' Added in version 3.12.\n' ' Added in version 3.12.\n',
'\n'
'class.__mro__\n'
'\n'
' This attribute is a tuple of classes that are considered '
'when\n'
' looking for base classes during method resolution.\n'
'\n'
'class.mro()\n'
'\n'
' This method can be overridden by a metaclass to customize '
'the\n'
' method resolution order for its instances. It is called '
'at class\n'
' instantiation, and its result is stored in "__mro__".\n'
'\n'
'class.__subclasses__()\n'
'\n'
' Each class keeps a list of weak references to its '
'immediate\n'
' subclasses. This method returns a list of all those '
'references\n'
' still alive. The list is in definition order. Example:\n'
'\n'
' >>> int.__subclasses__()\n'
" [<class 'bool'>, <enum 'IntEnum'>, <flag 'IntFlag'>, "
"<class 're._constants._NamedIntConstant'>]\n",
'specialnames': 'Special method names\n' 'specialnames': 'Special method names\n'
'********************\n' '********************\n'
'\n' '\n'
@ -10727,11 +10726,13 @@ topics = {'assert': 'The "assert" statement\n'
'the class\n' 'the class\n'
' where it is defined. *__slots__* declared in parents are ' ' where it is defined. *__slots__* declared in parents are '
'available\n' 'available\n'
' in child classes. However, child subclasses will get a ' ' in child classes. However, instances of a child subclass '
'"__dict__"\n' 'will get a\n'
' and *__weakref__* unless they also define *__slots__* ' ' "__dict__" and *__weakref__* unless the subclass also '
'(which should\n' 'defines\n'
' only contain names of any *additional* slots).\n' ' *__slots__* (which should only contain names of any '
'*additional*\n'
' slots).\n'
'\n' '\n'
'* If a class defines a slot also defined in a base class, ' '* If a class defines a slot also defined in a base class, '
'the instance\n' 'the instance\n'
@ -11148,7 +11149,7 @@ topics = {'assert': 'The "assert" statement\n'
'built-in\n' 'built-in\n'
'types), including other ABCs.\n' 'types), including other ABCs.\n'
'\n' '\n'
'class.__instancecheck__(self, instance)\n' 'type.__instancecheck__(self, instance)\n'
'\n' '\n'
' Return true if *instance* should be considered a (direct ' ' Return true if *instance* should be considered a (direct '
'or\n' 'or\n'
@ -11156,7 +11157,7 @@ topics = {'assert': 'The "assert" statement\n'
'implement\n' 'implement\n'
' "isinstance(instance, class)".\n' ' "isinstance(instance, class)".\n'
'\n' '\n'
'class.__subclasscheck__(self, subclass)\n' 'type.__subclasscheck__(self, subclass)\n'
'\n' '\n'
' Return true if *subclass* should be considered a (direct ' ' Return true if *subclass* should be considered a (direct '
'or\n' 'or\n'
@ -13278,7 +13279,8 @@ topics = {'assert': 'The "assert" statement\n'
'*generic\n' '*generic\n'
'class* will generally return a GenericAlias object.\n' 'class* will generally return a GenericAlias object.\n'
'\n' '\n'
' subscription ::= primary "[" expression_list "]"\n' ' subscription ::= primary "[" flexible_expression_list '
'"]"\n'
'\n' '\n'
'When an object is subscripted, the interpreter will ' 'When an object is subscripted, the interpreter will '
'evaluate the\n' 'evaluate the\n'
@ -13297,13 +13299,18 @@ topics = {'assert': 'The "assert" statement\n'
'see\n' 'see\n'
'__class_getitem__ versus __getitem__.\n' '__class_getitem__ versus __getitem__.\n'
'\n' '\n'
'If the expression list contains at least one comma, it will ' 'If the expression list contains at least one comma, or if '
'evaluate\n' 'any of the\n'
'to a "tuple" containing the items of the expression list. ' 'expressions are starred, the expression list will evaluate '
'Otherwise,\n' 'to a\n'
'the expression list will evaluate to the value of the ' '"tuple" containing the items of the expression list. '
'lists sole\n' 'Otherwise, the\n'
'member.\n' 'expression list will evaluate to the value of the lists '
'sole member.\n'
'\n'
'Changed in version 3.11: Expressions in an expression list '
'may be\n'
'starred. See **PEP 646**.\n'
'\n' '\n'
'For built-in objects, there are two types of objects that ' 'For built-in objects, there are two types of objects that '
'support\n' 'support\n'
@ -14052,8 +14059,8 @@ topics = {'assert': 'The "assert" statement\n'
'|====================================================|====================================================|\n' '|====================================================|====================================================|\n'
'| function.__doc__ | The ' '| function.__doc__ | The '
'functions documentation string, or "None" if |\n' 'functions documentation string, or "None" if |\n'
'| | unavailable. ' '| | '
'Not inherited by subclasses. |\n' 'unavailable. |\n'
'+----------------------------------------------------+----------------------------------------------------+\n' '+----------------------------------------------------+----------------------------------------------------+\n'
'| function.__name__ | The ' '| function.__name__ | The '
'functions name. See also: "__name__ |\n' 'functions name. See also: "__name__ |\n'
@ -14423,32 +14430,104 @@ topics = {'assert': 'The "assert" statement\n'
'A class object can be called (see above) to yield a class instance\n' 'A class object can be called (see above) to yield a class instance\n'
'(see below).\n' '(see below).\n'
'\n' '\n'
'Special attributes:\n'
'\n' '\n'
' "__name__"\n' 'Special attributes\n'
' The class name.\n' '------------------\n'
'\n' '\n'
' "__module__"\n' '+----------------------------------------------------+----------------------------------------------------+\n'
' The name of the module in which the class was defined.\n' '| Attribute | '
'Meaning |\n'
'|====================================================|====================================================|\n'
'| type.__name__ | The classs '
'name. See also: "__name__ attributes". |\n'
'+----------------------------------------------------+----------------------------------------------------+\n'
'| type.__qualname__ | The classs '
'*qualified name*. See also: |\n'
'| | '
'"__qualname__ attributes". |\n'
'+----------------------------------------------------+----------------------------------------------------+\n'
'| type.__module__ | The name of '
'the module in which the class was |\n'
'| | '
'defined. |\n'
'+----------------------------------------------------+----------------------------------------------------+\n'
'| type.__dict__ | A "mapping '
'proxy" providing a read-only view of |\n'
'| | the classs '
'namespace. See also: "__dict__ |\n'
'| | '
'attributes". |\n'
'+----------------------------------------------------+----------------------------------------------------+\n'
'| type.__bases__ | A "tuple" '
'containing the classs bases. In most |\n'
'| | cases, for a '
'class defined as "class X(A, B, C)", |\n'
'| | '
'"X.__bases__" will be exactly equal to "(A, B, |\n'
'| | '
'C)". |\n'
'+----------------------------------------------------+----------------------------------------------------+\n'
'| type.__doc__ | The classs '
'documentation string, or "None" if |\n'
'| | undefined. '
'Not inherited by subclasses. |\n'
'+----------------------------------------------------+----------------------------------------------------+\n'
'| type.__annotations__ | A dictionary '
'containing *variable annotations* |\n'
'| | collected '
'during class body execution. For best |\n'
'| | practices on '
'working with "__annotations__", |\n'
'| | please see '
'Annotations Best Practices. Caution: |\n'
'| | Accessing '
'the "__annotations__" attribute of a |\n'
'| | class object '
'directly may yield incorrect results |\n'
'| | in the '
'presence of metaclasses. In addition, the |\n'
'| | attribute '
'may not exist for some classes. Use |\n'
'| | '
'"inspect.get_annotations()" to retrieve class |\n'
'| | annotations '
'safely. |\n'
'+----------------------------------------------------+----------------------------------------------------+\n'
'| type.__type_params__ | A "tuple" '
'containing the type parameters of a |\n'
'| | generic '
'class. Added in version 3.12. |\n'
'+----------------------------------------------------+----------------------------------------------------+\n'
'| type.__mro__ | The "tuple" '
'of classes that are considered when |\n'
'| | looking for '
'base classes during method resolution. |\n'
'+----------------------------------------------------+----------------------------------------------------+\n'
'\n' '\n'
' "__dict__"\n'
' The dictionary containing the classs namespace.\n'
'\n' '\n'
' "__bases__"\n' 'Special methods\n'
' A tuple containing the base classes, in the order of their\n' '---------------\n'
' occurrence in the base class list.\n'
'\n' '\n'
' "__doc__"\n' 'In addition to the special attributes described above, all Python\n'
' The classs documentation string, or "None" if undefined.\n' 'classes also have the following two methods available:\n'
'\n' '\n'
' "__annotations__"\n' 'type.mro()\n'
' A dictionary containing *variable annotations* collected '
'during\n'
' class body execution. For best practices on working with\n'
' "__annotations__", please see Annotations Best Practices.\n'
'\n' '\n'
' "__type_params__"\n' ' This method can be overridden by a metaclass to customize the\n'
' A tuple containing the type parameters of a generic class.\n' ' method resolution order for its instances. It is called at '
'class\n'
' instantiation, and its result is stored in "__mro__".\n'
'\n'
'type.__subclasses__()\n'
'\n'
' Each class keeps a list of weak references to its immediate\n'
' subclasses. This method returns a list of all those references\n'
' still alive. The list is in definition order. Example:\n'
'\n'
' >>> class A: pass\n'
' >>> class B(A): pass\n'
' >>> A.__subclasses__()\n'
" [<class 'B'>]\n"
'\n' '\n'
'\n' '\n'
'Class instances\n' 'Class instances\n'
@ -14488,8 +14567,19 @@ topics = {'assert': 'The "assert" statement\n'
'they have methods with certain special names. See section Special\n' 'they have methods with certain special names. See section Special\n'
'method names.\n' 'method names.\n'
'\n' '\n'
'Special attributes: "__dict__" is the attribute dictionary;\n' '\n'
'"__class__" is the instances class.\n' 'Special attributes\n'
'------------------\n'
'\n'
'object.__class__\n'
'\n'
' The class to which a class instance belongs.\n'
'\n'
'object.__dict__\n'
'\n'
' A dictionary or other mapping object used to store an objects\n'
' (writable) attributes. Not all instances have a "__dict__"\n'
' attribute; see the section on __slots__ for more details.\n'
'\n' '\n'
'\n' '\n'
'I/O objects (also known as file objects)\n' 'I/O objects (also known as file objects)\n'

377
Misc/NEWS.d/3.12.7.rst Normal file
View file

@ -0,0 +1,377 @@
.. date: 2024-09-10-19-23-00
.. gh-issue: 123915
.. nonce: yZMEDO
.. release date: 2024-10-01
.. section: Windows
Ensure that ``Tools\msi\buildrelease.bat`` uses different directories for
AMD64 and ARM64 builds.
..
.. date: 2024-04-24-22-50-33
.. gh-issue: 117505
.. nonce: gcTb_p
.. section: Windows
Fixes an issue with the Windows installer not running ensurepip in a fully
isolated environment. This could cause unexpected interactions with the user
site-packages.
..
.. date: 2024-09-25-12-39-34
.. gh-issue: 124378
.. nonce: Ywwgia
.. section: Tests
Updated ``test_ttk`` to pass with Tcl/Tk 8.6.15.
..
.. date: 2024-08-07-10-42-13
.. gh-issue: 122792
.. nonce: oiTMo9
.. section: Security
Changed IPv4-mapped ``ipaddress.IPv6Address`` to consistently use the mapped
IPv4 address value for deciding properties. Properties which have their
behavior fixed are ``is_multicast``, ``is_reserved``, ``is_link_local``,
``is_global``, and ``is_unspecified``.
..
.. date: 2024-09-27-15-16-04
.. gh-issue: 116850
.. nonce: dBkR0-
.. section: Library
Fix :mod:`argparse` for namespaces with not directly writable dict (e.g.
classes).
..
.. date: 2024-09-26-22-14-12
.. gh-issue: 58573
.. nonce: hozbm9
.. section: Library
Fix conflicts between abbreviated long options in the parent parser and
subparsers in :mod:`argparse`.
..
.. date: 2024-09-26-09-18-09
.. gh-issue: 61181
.. nonce: dwjmch
.. section: Library
Fix support of :ref:`choices` with string value in :mod:`argparse`.
Substrings of the specified string no longer considered valid values.
..
.. date: 2024-09-25-18-08-29
.. gh-issue: 80259
.. nonce: kO5Tw7
.. section: Library
Fix :mod:`argparse` support of positional arguments with ``nargs='?'``,
``default=argparse.SUPPRESS`` and specified ``type``.
..
.. date: 2024-09-25-12-14-58
.. gh-issue: 124498
.. nonce: Ozxs55
.. section: Library
Fix :class:`typing.TypeAliasType` not to be generic, when ``type_params`` is
an empty tuple.
..
.. date: 2024-09-24-12-34-48
.. gh-issue: 124345
.. nonce: s3vKql
.. section: Library
:mod:`argparse` vim supports abbreviated single-dash long options separated
by ``=`` from its value.
..
.. date: 2024-09-23-17-33-47
.. gh-issue: 104860
.. nonce: O86OSc
.. section: Library
Fix disallowing abbreviation of single-dash long options in :mod:`argparse`
with ``allow_abbrev=False``.
..
.. date: 2024-09-21-23-56-41
.. gh-issue: 63143
.. nonce: YKu-LQ
.. section: Library
Fix parsing mutually exclusive arguments in :mod:`argparse`. Arguments with
the value identical to the default value (e.g. booleans, small integers,
empty or 1-character strings) are no longer considered "not present".
..
.. date: 2024-09-21-22-32-21
.. gh-issue: 72795
.. nonce: naLmkX
.. section: Library
Positional arguments with :ref:`nargs` equal to ``'*'`` or
:data:`!argparse.REMAINDER` are no longer required. This allows to use
positional argument with ``nargs='*'`` and without ``default`` in mutually
exclusive group and improves error message about required arguments.
..
.. date: 2024-09-21-19-02-37
.. gh-issue: 59317
.. nonce: OAhNZZ
.. section: Library
Fix parsing positional argument with :ref:`nargs` equal to ``'?'`` or
``'*'`` if it is preceded by an option and another positional argument.
..
.. date: 2024-09-20-12-23-11
.. gh-issue: 53780
.. nonce: mrV1zi
.. section: Library
:mod:`argparse` now ignores the first ``"--"`` (double dash) between an
option and command.
..
.. date: 2024-09-19-20-15-00
.. gh-issue: 124217
.. nonce: j0KlQB
.. section: Library
Add RFC 9637 reserved IPv6 block ``3fff::/20`` in :mod:`ipaddress` module.
..
.. date: 2024-09-19-11-47-39
.. gh-issue: 124248
.. nonce: g7rufd
.. section: Library
Fixed potential crash when using :mod:`struct` to process zero-width 'Pascal
string' fields (``0p``).
..
.. date: 2024-09-19-10-36-18
.. gh-issue: 81691
.. nonce: Hyhp_U
.. section: Library
Fix handling of multiple ``"--"`` (double dashes) in :mod:`argparse`. Only
the first one has now been removed, all subsequent ones are now taken
literally.
..
.. date: 2024-09-19-03-46-59
.. gh-issue: 87041
.. nonce: 9Ox7Bv
.. section: Library
Fix a bug in :mod:`argparse` where lengthy subparser argument help is
incorrectly indented.
..
.. date: 2024-09-17-18-06-42
.. gh-issue: 124171
.. nonce: PHCvRJ
.. section: Library
Add workaround for broken :c:func:`!fmod()` implementations on Windows, that
loose zero sign (e.g. ``fmod(-10, 1)`` returns ``0.0``). Patch by Sergey B
Kirpichev.
..
.. date: 2024-09-13-10-34-19
.. gh-issue: 123934
.. nonce: yMe7mL
.. section: Library
Fix :class:`unittest.mock.MagicMock` reseting magic methods return values
after ``.reset_mock(return_value=True)`` was called.
..
.. date: 2024-09-11-13-33-19
.. gh-issue: 123935
.. nonce: fRZ_56
.. section: Library
Fix parent slots detection for dataclasses that inherit from classes with
``__dictoffset__``.
..
.. date: 2024-09-10-11-26-14
.. gh-issue: 123892
.. nonce: 2gzIrz
.. section: Library
Add ``"_wmi"`` to :data:`sys.stdlib_module_names`. Patch by Victor Stinner.
..
.. date: 2024-08-23-15-49-10
.. gh-issue: 116810
.. nonce: QLBUU8
.. section: Library
Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` when the
:attr:`ssl.SSLSocket.session` property was accessed. Speeds up read and
write access to said property by no longer unnecessarily cloning session
objects via serialization.
..
.. date: 2024-08-15-09-45-34
.. gh-issue: 121735
.. nonce: _1q0qf
.. section: Library
When working with zip archives, importlib.resources now properly honors
module-adjacent references (e.g. ``files(pkg.mod)`` and not just
``files(pkg)``).
..
.. date: 2024-07-03-14-23-04
.. gh-issue: 119004
.. nonce: L5MoUu
.. section: Library
Fix a crash in :ref:`OrderedDict.__eq__ <collections_OrderedDict__eq__>`
when operands are mutated during the check. Patch by Bénédikt Tran.
..
.. bpo: 44864
.. date: 2021-08-24-19-37-46
.. nonce: KzxaDh
.. section: Library
Do not translate user-provided strings in :class:`argparse.ArgumentParser`.
..
.. date: 2024-09-21-23-12-18
.. gh-issue: 112938
.. nonce: OeiDru
.. section: IDLE
Fix uninteruptable hang when Shell gets rapid continuous output.
..
.. date: 2024-09-25-12-05-45
.. gh-issue: 116510
.. nonce: dhn8w8
.. section: Core and Builtins
Fix a bug that can cause a crash when sub-interpreters use "basic"
single-phase extension modules. Shared objects could refer to PyGC_Head
nodes that had been freed as part of interpreter cleanup.
..
.. date: 2024-09-17-22-06-01
.. gh-issue: 124188
.. nonce: aFqNAB
.. section: Core and Builtins
Fix reading and decoding a line from the source file witn non-UTF-8 encoding
for syntax errors raised in the compiler.
..
.. date: 2024-09-10-13-27-16
.. gh-issue: 77894
.. nonce: ZC-Olu
.. section: Core and Builtins
Fix possible crash in the garbage collector when it tries to break a
reference loop containing a :class:`memoryview` object. Now a
:class:`!memoryview` object can only be cleared if there are no buffers that
refer it.
..
.. date: 2024-06-19-21-34-21
.. gh-issue: 98442
.. nonce: cqhjkN
.. section: Core and Builtins
Fix too wide source locations of the cleanup instructions of a with
statement.
..
.. date: 2024-06-14-22-02-25
.. gh-issue: 113993
.. nonce: MiA0vX
.. section: Core and Builtins
Strings interned with :func:`sys.intern` are again garbage-collected when no
longer used, as per the documentation. Strings interned with the C function
:c:func:`PyUnicode_InternInPlace` are still immortal. Internals of the
string interning mechanism have been changed. This may affect performance
and identities of :class:`str` objects.
..
.. date: 2024-07-04-15-41-10
.. gh-issue: 113993
.. nonce: cLSiWV
.. section: C API
:c:func:`PyUnicode_InternInPlace` no longer prevents its argument from being
garbage collected.
Several functions that take ``char *`` are now documented as possibly
preventing string objects from being garbage collected; refer to their
documentation for details: :c:func:`PyUnicode_InternFromString`,
:c:func:`PyDict_SetItemString`, :c:func:`PyObject_SetAttrString`,
:c:func:`PyObject_DelAttrString`, :c:func:`PyUnicode_InternFromString`, and
``PyModule_Add*`` convenience functions.
..
.. date: 2024-09-27-15-58-10
.. gh-issue: 124487
.. nonce: PAZTQf
.. section: Build
Windows builds now use Windows 8.1 as their API baseline (installation
already required Windows 8.1).
..
.. date: 2024-09-11-16-06-42
.. gh-issue: 123917
.. nonce: JuZl0r
.. section: Build
Fix the check for the ``crypt()`` function in the configure script. Patch by
Paul Smith and Victor Stinner.

View file

@ -1,2 +0,0 @@
Fix the check for the ``crypt()`` function in the configure script. Patch by
Paul Smith and Victor Stinner.

View file

@ -1,2 +0,0 @@
Windows builds now use Windows 8.1 as their API baseline (installation
already required Windows 8.1).

View file

@ -1,12 +0,0 @@
:c:func:`PyUnicode_InternInPlace` no longer prevents its argument from being
garbage collected.
Several functions that take ``char *`` are now
documented as possibly preventing string objects from being garbage
collected; refer to their documentation for details:
:c:func:`PyUnicode_InternFromString`,
:c:func:`PyDict_SetItemString`,
:c:func:`PyObject_SetAttrString`,
:c:func:`PyObject_DelAttrString`,
:c:func:`PyUnicode_InternFromString`,
and ``PyModule_Add*`` convenience functions.

View file

@ -1,5 +0,0 @@
Strings interned with :func:`sys.intern` are again garbage-collected when no
longer used, as per the documentation. Strings interned with the C function
:c:func:`PyUnicode_InternInPlace` are still immortal. Internals of the
string interning mechanism have been changed. This may affect performance
and identities of :class:`str` objects.

View file

@ -1,2 +0,0 @@
Fix too wide source locations of the cleanup instructions of a with
statement.

View file

@ -1,4 +0,0 @@
Fix possible crash in the garbage collector when it tries to break a
reference loop containing a :class:`memoryview` object. Now a
:class:`!memoryview` object can only be cleared if there are no buffers that
refer it.

View file

@ -1,2 +0,0 @@
Fix reading and decoding a line from the source file witn non-UTF-8 encoding
for syntax errors raised in the compiler.

View file

@ -1,3 +0,0 @@
Fix a bug that can cause a crash when sub-interpreters use "basic"
single-phase extension modules. Shared objects could refer to PyGC_Head
nodes that had been freed as part of interpreter cleanup.

View file

@ -1 +0,0 @@
Fix uninteruptable hang when Shell gets rapid continuous output.

View file

@ -1 +0,0 @@
Do not translate user-provided strings in :class:`argparse.ArgumentParser`.

View file

@ -1,2 +0,0 @@
Fix a crash in :ref:`OrderedDict.__eq__ <collections_OrderedDict__eq__>`
when operands are mutated during the check. Patch by Bénédikt Tran.

View file

@ -1,3 +0,0 @@
When working with zip archives, importlib.resources now properly honors
module-adjacent references (e.g. ``files(pkg.mod)`` and not just
``files(pkg)``).

View file

@ -1,4 +0,0 @@
Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` when the
:attr:`ssl.SSLSocket.session` property was accessed. Speeds up read and
write access to said property by no longer unnecessarily cloning session
objects via serialization.

View file

@ -1 +0,0 @@
Add ``"_wmi"`` to :data:`sys.stdlib_module_names`. Patch by Victor Stinner.

View file

@ -1,2 +0,0 @@
Fix parent slots detection for dataclasses that inherit from classes with
``__dictoffset__``.

View file

@ -1,2 +0,0 @@
Fix :class:`unittest.mock.MagicMock` reseting magic methods return values
after ``.reset_mock(return_value=True)`` was called.

View file

@ -1,3 +0,0 @@
Add workaround for broken :c:func:`!fmod()` implementations on Windows, that
loose zero sign (e.g. ``fmod(-10, 1)`` returns ``0.0``). Patch by Sergey B
Kirpichev.

View file

@ -1 +0,0 @@
Fix a bug in :mod:`argparse` where lengthy subparser argument help is incorrectly indented.

View file

@ -1,3 +0,0 @@
Fix handling of multiple ``"--"`` (double dashes) in :mod:`argparse`. Only
the first one has now been removed, all subsequent ones are now taken
literally.

View file

@ -1,2 +0,0 @@
Fixed potential crash when using :mod:`struct` to process zero-width
'Pascal string' fields (``0p``).

View file

@ -1 +0,0 @@
Add RFC 9637 reserved IPv6 block ``3fff::/20`` in :mod:`ipaddress` module.

View file

@ -1 +0,0 @@
:mod:`argparse` now ignores the first ``"--"`` (double dash) between an option and command.

View file

@ -1,2 +0,0 @@
Fix parsing positional argument with :ref:`nargs` equal to ``'?'`` or ``'*'``
if it is preceded by an option and another positional argument.

View file

@ -1,4 +0,0 @@
Positional arguments with :ref:`nargs` equal to ``'*'`` or
:data:`!argparse.REMAINDER` are no longer required. This allows to use
positional argument with ``nargs='*'`` and without ``default`` in mutually
exclusive group and improves error message about required arguments.

View file

@ -1,3 +0,0 @@
Fix parsing mutually exclusive arguments in :mod:`argparse`. Arguments with
the value identical to the default value (e.g. booleans, small integers,
empty or 1-character strings) are no longer considered "not present".

View file

@ -1,2 +0,0 @@
Fix disallowing abbreviation of single-dash long options in :mod:`argparse`
with ``allow_abbrev=False``.

View file

@ -1,2 +0,0 @@
:mod:`argparse` vim supports abbreviated single-dash long options separated
by ``=`` from its value.

View file

@ -1,2 +0,0 @@
Fix :class:`typing.TypeAliasType` not to be generic, when ``type_params`` is
an empty tuple.

View file

@ -1,2 +0,0 @@
Fix :mod:`argparse` support of positional arguments with ``nargs='?'``,
``default=argparse.SUPPRESS`` and specified ``type``.

View file

@ -1,2 +0,0 @@
Fix support of :ref:`choices` with string value in :mod:`argparse`. Substrings
of the specified string no longer considered valid values.

View file

@ -1,2 +0,0 @@
Fix conflicts between abbreviated long options in the parent parser and
subparsers in :mod:`argparse`.

View file

@ -1,2 +0,0 @@
Fix :mod:`argparse` for namespaces with not directly writable dict (e.g.
classes).

View file

@ -1,3 +0,0 @@
Changed IPv4-mapped ``ipaddress.IPv6Address`` to consistently use the mapped IPv4
address value for deciding properties. Properties which have their behavior fixed
are ``is_multicast``, ``is_reserved``, ``is_link_local``, ``is_global``, and ``is_unspecified``.

View file

@ -1 +0,0 @@
Updated ``test_ttk`` to pass with Tcl/Tk 8.6.15.

View file

@ -1 +0,0 @@
Fixes an issue with the Windows installer not running ensurepip in a fully isolated environment. This could cause unexpected interactions with the user site-packages.

View file

@ -1 +0,0 @@
Ensure that ``Tools\msi\buildrelease.bat`` uses different directories for AMD64 and ARM64 builds.

View file

@ -1,4 +1,4 @@
This is Python version 3.12.6 This is Python version 3.12.7
============================= =============================
.. image:: https://github.com/python/cpython/workflows/Tests/badge.svg .. image:: https://github.com/python/cpython/workflows/Tests/badge.svg