Commit 450ceea3 authored by Ned Deily's avatar Ned Deily

Update PyDoc topics and NEWS blurbs for 3.7.0a1

parent 380c5fbc
# -*- coding: utf-8 -*-
# Autogenerated by Sphinx on Mon Sep 12 10:47:11 2016
topics = {'assert': '\n'
'The "assert" statement\n'
# Autogenerated by Sphinx on Tue Sep 19 00:59:47 2017
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
'Assert statements are a convenient way to insert debugging '
......@@ -39,8 +38,7 @@ topics = {'assert': '\n'
'Assignments to "__debug__" are illegal. The value for the '
'built-in\n'
'variable is determined when the interpreter starts.\n',
'assignment': '\n'
'Assignment statements\n'
'assignment': 'Assignment statements\n'
'*********************\n'
'\n'
'Assignment statements are used to (re)bind names to values and '
......@@ -405,8 +403,7 @@ topics = {'assert': '\n'
'See also: **PEP 526** - Variable and attribute annotation '
'syntax\n'
' **PEP 484** - Type hints\n',
'atom-identifiers': '\n'
'Identifiers (Names)\n'
'atom-identifiers': 'Identifiers (Names)\n'
'*******************\n'
'\n'
'An identifier occurring as an atom is a name. See '
......@@ -446,8 +443,7 @@ topics = {'assert': '\n'
'happen. If the class name consists only of underscores, '
'no\n'
'transformation is done.\n',
'atom-literals': '\n'
'Literals\n'
'atom-literals': 'Literals\n'
'********\n'
'\n'
'Python supports string and bytes literals and various '
......@@ -476,8 +472,7 @@ topics = {'assert': '\n'
'may obtain\n'
'the same object or a different object with the same '
'value.\n',
'attribute-access': '\n'
'Customizing attribute access\n'
'attribute-access': 'Customizing attribute access\n'
'****************************\n'
'\n'
'The following methods can be defined to customize the '
......@@ -747,23 +742,15 @@ topics = {'assert': '\n'
'__slots__\n'
'=========\n'
'\n'
'By default, instances of classes have a dictionary for '
'attribute\n'
'storage. This wastes space for objects having very few '
'instance\n'
'variables. The space consumption can become acute when '
'creating large\n'
'numbers of instances.\n'
'*__slots__* allow us to explicitly declare data members '
'(like\n'
'properties) and deny the creation of *__dict__* and '
'*__weakref__*\n'
'(unless explicitly declared in *__slots__* or available '
'in a parent.)\n'
'\n'
'The default can be overridden by defining *__slots__* in '
'a class\n'
'definition. The *__slots__* declaration takes a sequence '
'of instance\n'
'variables and reserves just enough space in each '
'instance to hold a\n'
'value for each variable. Space is saved because '
'*__dict__* is not\n'
'created for each instance.\n'
'The space saved over using *__dict__* can be '
'significant.\n'
'\n'
'object.__slots__\n'
'\n'
......@@ -783,9 +770,9 @@ topics = {'assert': '\n'
'\n'
'* When inheriting from a class without *__slots__*, the '
'*__dict__*\n'
' attribute of that class will always be accessible, so '
'a *__slots__*\n'
' definition in the subclass is meaningless.\n'
' and *__weakref__* attribute of the instances will '
'always be\n'
' accessible.\n'
'\n'
'* Without a *__dict__* variable, instances cannot be '
'assigned new\n'
......@@ -819,13 +806,16 @@ topics = {'assert': '\n'
'the class\n'
' attribute would overwrite the descriptor assignment.\n'
'\n'
'* The action of a *__slots__* declaration is limited to '
'the class\n'
' where it is defined. As a result, subclasses will '
'have a *__dict__*\n'
' unless they also define *__slots__* (which must only '
'contain names\n'
' of any *additional* slots).\n'
'* The action of a *__slots__* declaration is not limited '
'to the\n'
' class where it is defined. *__slots__* declared in '
'parents are\n'
' available in child classes. However, child subclasses '
'will get a\n'
' *__dict__* and *__weakref__* unless they also define '
'*__slots__*\n'
' (which should only contain names of any *additional* '
'slots).\n'
'\n'
'* If a class defines a slot also defined in a base '
'class, the\n'
......@@ -850,9 +840,16 @@ topics = {'assert': '\n'
'\n'
'* *__class__* assignment works only if both classes have '
'the same\n'
' *__slots__*.\n',
'attribute-references': '\n'
'Attribute references\n'
' *__slots__*.\n'
'\n'
'* Multiple inheritance with multiple slotted parent '
'classes can be\n'
' used, but only one parent is allowed to have '
'attributes created by\n'
' slots (the other bases must have empty slot layouts) - '
'violations\n'
' raise "TypeError".\n',
'attribute-references': 'Attribute references\n'
'********************\n'
'\n'
'An attribute reference is a primary followed by a '
......@@ -875,8 +872,7 @@ topics = {'assert': '\n'
'determined by the object. Multiple evaluations of '
'the same attribute\n'
'reference may yield different objects.\n',
'augassign': '\n'
'Augmented assignment statements\n'
'augassign': 'Augmented assignment statements\n'
'*******************************\n'
'\n'
'Augmented assignment is the combination, in a single statement, '
......@@ -940,8 +936,7 @@ topics = {'assert': '\n'
'about\n'
'class and instance attributes applies as for regular '
'assignments.\n',
'binary': '\n'
'Binary arithmetic operations\n'
'binary': 'Binary arithmetic operations\n'
'****************************\n'
'\n'
'The binary arithmetic operations have the conventional priority\n'
......@@ -1029,8 +1024,7 @@ topics = {'assert': '\n'
'The "-" (subtraction) operator yields the difference of its '
'arguments.\n'
'The numeric arguments are first converted to a common type.\n',
'bitwise': '\n'
'Binary bitwise operations\n'
'bitwise': 'Binary bitwise operations\n'
'*************************\n'
'\n'
'Each of the three bitwise operations has a different priority '
......@@ -1050,8 +1044,7 @@ topics = {'assert': '\n'
'The "|" operator yields the bitwise (inclusive) OR of its '
'arguments,\n'
'which must be integers.\n',
'bltin-code-objects': '\n'
'Code Objects\n'
'bltin-code-objects': 'Code Objects\n'
'************\n'
'\n'
'Code objects are used by the implementation to '
......@@ -1074,8 +1067,7 @@ topics = {'assert': '\n'
'\n'
'See The standard type hierarchy for more '
'information.\n',
'bltin-ellipsis-object': '\n'
'The Ellipsis Object\n'
'bltin-ellipsis-object': 'The Ellipsis Object\n'
'*******************\n'
'\n'
'This object is commonly used by slicing (see '
......@@ -1087,8 +1079,7 @@ topics = {'assert': '\n'
'"Ellipsis" singleton.\n'
'\n'
'It is written as "Ellipsis" or "...".\n',
'bltin-null-object': '\n'
'The Null Object\n'
'bltin-null-object': 'The Null Object\n'
'***************\n'
'\n'
"This object is returned by functions that don't "
......@@ -1100,8 +1091,7 @@ topics = {'assert': '\n'
'same singleton.\n'
'\n'
'It is written as "None".\n',
'bltin-type-objects': '\n'
'Type Objects\n'
'bltin-type-objects': 'Type Objects\n'
'************\n'
'\n'
'Type objects represent the various object types. An '
......@@ -1113,8 +1103,7 @@ topics = {'assert': '\n'
'all standard built-in types.\n'
'\n'
'Types are written like this: "<class \'int\'>".\n',
'booleans': '\n'
'Boolean operations\n'
'booleans': 'Boolean operations\n'
'******************\n'
'\n'
' or_test ::= and_test | or_test "or" and_test\n'
......@@ -1163,8 +1152,7 @@ topics = {'assert': '\n'
'its\n'
'argument (for example, "not \'foo\'" produces "False" rather '
'than "\'\'".)\n',
'break': '\n'
'The "break" statement\n'
'break': 'The "break" statement\n'
'*********************\n'
'\n'
' break_stmt ::= "break"\n'
......@@ -1185,8 +1173,7 @@ topics = {'assert': '\n'
'clause, that "finally" clause is executed before really leaving '
'the\n'
'loop.\n',
'callable-types': '\n'
'Emulating callable objects\n'
'callable-types': 'Emulating callable objects\n'
'**************************\n'
'\n'
'object.__call__(self[, args...])\n'
......@@ -1195,8 +1182,7 @@ topics = {'assert': '\n'
'this method\n'
' is defined, "x(arg1, arg2, ...)" is a shorthand for\n'
' "x.__call__(arg1, arg2, ...)".\n',
'calls': '\n'
'Calls\n'
'calls': 'Calls\n'
'*****\n'
'\n'
'A call calls a callable object (e.g., a *function*) with a '
......@@ -1217,7 +1203,8 @@ topics = {'assert': '\n'
' ("," "*" expression | "," '
'keyword_item)*\n'
' keywords_arguments ::= (keyword_item | "**" expression)\n'
' ("," keyword_item | "**" expression)*\n'
' ("," keyword_item | "," "**" '
'expression)*\n'
' keyword_item ::= identifier "=" expression\n'
'\n'
'An optional trailing comma may be present after the positional and\n'
......@@ -1316,7 +1303,7 @@ topics = {'assert': '\n'
' 2 1\n'
' >>> f(a=1, *(2,))\n'
' Traceback (most recent call last):\n'
' File "<stdin>", line 1, in ?\n'
' File "<stdin>", line 1, in <module>\n'
" TypeError: f() got multiple values for keyword argument 'a'\n"
' >>> f(1, *(2,))\n'
' 1 2\n'
......@@ -1382,8 +1369,7 @@ topics = {'assert': '\n'
' The class must define a "__call__()" method; the effect is then '
'the\n'
' same as if that method was called.\n',
'class': '\n'
'Class definitions\n'
'class': 'Class definitions\n'
'*****************\n'
'\n'
'A class definition defines a class object (see section The '
......@@ -1469,8 +1455,7 @@ topics = {'assert': '\n'
'\n'
'See also: **PEP 3115** - Metaclasses in Python 3 **PEP 3129** -\n'
' Class Decorators\n',
'comparisons': '\n'
'Comparisons\n'
'comparisons': 'Comparisons\n'
'***********\n'
'\n'
'Unlike C, all comparison operations in Python have the same '
......@@ -1623,7 +1608,7 @@ topics = {'assert': '\n'
'restriction that\n'
' ranges do not support order comparison. Equality '
'comparison across\n'
' these types results in unequality, and ordering comparison '
' these types results in inequality, and ordering comparison '
'across\n'
' these types raises "TypeError".\n'
'\n'
......@@ -1687,7 +1672,7 @@ topics = {'assert': '\n'
'they\n'
' have equal *(key, value)* pairs. Equality comparison of the '
'keys and\n'
' elements enforces reflexivity.\n'
' values enforces reflexivity.\n'
'\n'
' Order comparisons ("<", ">", "<=", and ">=") raise '
'"TypeError".\n'
......@@ -1762,6 +1747,12 @@ topics = {'assert': '\n'
' to sequences, but not to sets or mappings). See also the\n'
' "total_ordering()" decorator.\n'
'\n'
'* The "hash()" result should be consistent with equality. '
'Objects\n'
' that are equal should either have the same hash value, or '
'be marked\n'
' as unhashable.\n'
'\n'
'Python does not enforce these consistency rules. In fact, '
'the\n'
'not-a-number values are an example for not following these '
......@@ -1773,9 +1764,9 @@ topics = {'assert': '\n'
'\n'
'The operators "in" and "not in" test for membership. "x in '
's"\n'
'evaluates to true if *x* is a member of *s*, and false '
'otherwise. "x\n'
'not in s" returns the negation of "x in s". All built-in '
'evaluates to "True" if *x* is a member of *s*, and "False" '
'otherwise.\n'
'"x not in s" returns the negation of "x in s". All built-in '
'sequences\n'
'and set types support this as well as dictionary, for which '
'"in" tests\n'
......@@ -1786,30 +1777,32 @@ topics = {'assert': '\n'
'for e in\n'
'y)".\n'
'\n'
'For the string and bytes types, "x in y" is true if and only '
'if *x* is\n'
'a substring of *y*. An equivalent test is "y.find(x) != '
'-1". Empty\n'
'strings are always considered to be a substring of any other '
'string,\n'
'so """ in "abc"" will return "True".\n'
'For the string and bytes types, "x in y" is "True" if and '
'only if *x*\n'
'is a substring of *y*. An equivalent test is "y.find(x) != '
'-1".\n'
'Empty strings are always considered to be a substring of any '
'other\n'
'string, so """ in "abc"" will return "True".\n'
'\n'
'For user-defined classes which define the "__contains__()" '
'method, "x\n'
'in y" is true if and only if "y.__contains__(x)" is true.\n'
'in y" returns "True" if "y.__contains__(x)" returns a true '
'value, and\n'
'"False" otherwise.\n'
'\n'
'For user-defined classes which do not define "__contains__()" '
'but do\n'
'define "__iter__()", "x in y" is true if some value "z" with '
'"x == z"\n'
'is produced while iterating over "y". If an exception is '
'define "__iter__()", "x in y" is "True" if some value "z" '
'with "x ==\n'
'z" is produced while iterating over "y". If an exception is '
'raised\n'
'during the iteration, it is as if "in" raised that '
'exception.\n'
'\n'
'Lastly, the old-style iteration protocol is tried: if a class '
'defines\n'
'"__getitem__()", "x in y" is true if and only if there is a '
'"__getitem__()", "x in y" is "True" if and only if there is a '
'non-\n'
'negative integer index *i* such that "x == y[i]", and all '
'lower\n'
......@@ -1833,8 +1826,7 @@ topics = {'assert': '\n'
'is determined using the "id()" function. "x is not y" yields '
'the\n'
'inverse truth value. [4]\n',
'compound': '\n'
'Compound statements\n'
'compound': 'Compound statements\n'
'*******************\n'
'\n'
'Compound statements contain (groups of) other statements; they '
......@@ -2613,7 +2605,8 @@ topics = {'assert': '\n'
'functions, even if they do not contain "await" or "async" '
'keywords.\n'
'\n'
'It is a "SyntaxError" to use "yield" expressions in "async def"\n'
'It is a "SyntaxError" to use "yield from" expressions in "async '
'def"\n'
'coroutines.\n'
'\n'
'An example of a coroutine function:\n'
......@@ -2724,8 +2717,7 @@ topics = {'assert': '\n'
' body is transformed into the namespace\'s "__doc__" item '
'and\n'
" therefore the class's *docstring*.\n",
'context-managers': '\n'
'With Statement Context Managers\n'
'context-managers': 'With Statement Context Managers\n'
'*******************************\n'
'\n'
'A *context manager* is an object that defines the '
......@@ -2787,8 +2779,7 @@ topics = {'assert': '\n'
' The specification, background, and examples for the '
'Python "with"\n'
' statement.\n',
'continue': '\n'
'The "continue" statement\n'
'continue': 'The "continue" statement\n'
'************************\n'
'\n'
' continue_stmt ::= "continue"\n'
......@@ -2805,8 +2796,7 @@ topics = {'assert': '\n'
'"finally" clause, that "finally" clause is executed before '
'really\n'
'starting the next loop cycle.\n',
'conversions': '\n'
'Arithmetic conversions\n'
'conversions': 'Arithmetic conversions\n'
'**********************\n'
'\n'
'When a description of an arithmetic operator below uses the '
......@@ -2832,8 +2822,7 @@ topics = {'assert': '\n'
"left argument to the '%' operator). Extensions must define "
'their own\n'
'conversion behavior.\n',
'customization': '\n'
'Basic customization\n'
'customization': 'Basic customization\n'
'*******************\n'
'\n'
'object.__new__(cls[, ...])\n'
......@@ -2855,11 +2844,11 @@ topics = {'assert': '\n'
' Typical implementations create a new instance of the '
'class by\n'
' invoking the superclass\'s "__new__()" method using\n'
' "super(currentclass, cls).__new__(cls[, ...])" with '
'appropriate\n'
' arguments and then modifying the newly-created instance '
'as\n'
' necessary before returning it.\n'
' "super().__new__(cls[, ...])" with appropriate arguments '
'and then\n'
' modifying the newly-created instance as necessary before '
'returning\n'
' it.\n'
'\n'
' If "__new__()" returns an instance of *cls*, then the '
'new\n'
......@@ -2894,7 +2883,7 @@ topics = {'assert': '\n'
' any, must explicitly call it to ensure proper '
'initialization of the\n'
' base class part of the instance; for example:\n'
' "BaseClass.__init__(self, [args...])".\n'
' "super().__init__([args...])".\n'
'\n'
' Because "__new__()" and "__init__()" work together in '
'constructing\n'
......@@ -3043,8 +3032,8 @@ topics = {'assert': '\n'
'\n'
'object.__bytes__(self)\n'
'\n'
' Called by "bytes()" to compute a byte-string '
'representation of an\n'
' Called by bytes to compute a byte-string representation '
'of an\n'
' object. This should return a "bytes" object.\n'
'\n'
'object.__format__(self, format_spec)\n'
......@@ -3077,6 +3066,11 @@ topics = {'assert': '\n'
'"object" itself\n'
' raises a "TypeError" if passed any non-empty string.\n'
'\n'
' Changed in version 3.7: "object.__format__(x, \'\')" is '
'now\n'
' equivalent to "str(x)" rather than "format(str(self), '
'\'\')".\n'
'\n'
'object.__lt__(self, other)\n'
'object.__le__(self, other)\n'
'object.__eq__(self, other)\n'
......@@ -3152,15 +3146,18 @@ topics = {'assert': '\n'
'on members\n'
' of hashed collections including "set", "frozenset", and '
'"dict".\n'
' "__hash__()" should return an integer. The only '
'required property\n'
' "__hash__()" should return an integer. The only required '
'property\n'
' is that objects which compare equal have the same hash '
'value; it is\n'
' advised to somehow mix together (e.g. using exclusive '
'or) the hash\n'
' values for the components of the object that also play a '
'part in\n'
' comparison of objects.\n'
' advised to mix together the hash values of the '
'components of the\n'
' object that also play a part in comparison of objects by '
'packing\n'
' them into a tuple and hashing the tuple. Example:\n'
'\n'
' def __hash__(self):\n'
' return hash((self.name, self.nick, self.color))\n'
'\n'
' Note: "hash()" truncates the value returned from an '
"object's\n"
......@@ -3211,8 +3208,8 @@ topics = {'assert': '\n'
'attempts to\n'
' retrieve their hash value, and will also be correctly '
'identified as\n'
' unhashable when checking "isinstance(obj, '
'collections.Hashable)".\n'
' unhashable when checking "isinstance(obj,\n'
' collections.abc.Hashable)".\n'
'\n'
' If a class that overrides "__eq__()" needs to retain '
'the\n'
......@@ -3229,8 +3226,8 @@ topics = {'assert': '\n'
'that\n'
' explicitly raises a "TypeError" would be incorrectly '
'identified as\n'
' hashable by an "isinstance(obj, collections.Hashable)" '
'call.\n'
' hashable by an "isinstance(obj, '
'collections.abc.Hashable)" call.\n'
'\n'
' Note: By default, the "__hash__()" values of str, bytes '
'and\n'
......@@ -3272,8 +3269,7 @@ topics = {'assert': '\n'
' neither "__len__()" nor "__bool__()", all its instances '
'are\n'
' considered true.\n',
'debugger': '\n'
'"pdb" --- The Python Debugger\n'
'debugger': '"pdb" --- The Python Debugger\n'
'*****************************\n'
'\n'
'**Source code:** Lib/pdb.py\n'
......@@ -3360,7 +3356,7 @@ topics = {'assert': '\n'
' >>> import mymodule\n'
' >>> mymodule.test()\n'
' Traceback (most recent call last):\n'
' File "<stdin>", line 1, in ?\n'
' File "<stdin>", line 1, in <module>\n'
' File "./mymodule.py", line 4, in test\n'
' test2()\n'
' File "./mymodule.py", line 3, in test2\n'
......@@ -3702,7 +3698,7 @@ topics = {'assert': '\n'
' end). This is because any time you resume execution (even '
'with a\n'
' simple next or step), you may encounter another '
'breakpoint--which\n'
'breakpointwhich\n'
' could have its own command list, leading to ambiguities about '
'which\n'
' list to execute.\n'
......@@ -3938,8 +3934,7 @@ topics = {'assert': '\n'
'[1] Whether a frame is considered to originate in a certain '
'module\n'
' is determined by the "__name__" in the frame globals.\n',
'del': '\n'
'The "del" statement\n'
'del': 'The "del" statement\n'
'*******************\n'
'\n'
' del_stmt ::= "del" target_list\n'
......@@ -3968,8 +3963,7 @@ topics = {'assert': '\n'
'Changed in version 3.2: Previously it was illegal to delete a name\n'
'from the local namespace if it occurs as a free variable in a nested\n'
'block.\n',
'dict': '\n'
'Dictionary displays\n'
'dict': 'Dictionary displays\n'
'*******************\n'
'\n'
'A dictionary display is a possibly empty series of key/datum pairs\n'
......@@ -4013,8 +4007,7 @@ topics = {'assert': '\n'
'should be *hashable*, which excludes all mutable objects.) Clashes\n'
'between duplicate keys are not detected; the last datum (textually\n'
'rightmost in the display) stored for a given key value prevails.\n',
'dynamic-features': '\n'
'Interaction with dynamic features\n'
'dynamic-features': 'Interaction with dynamic features\n'
'*********************************\n'
'\n'
'Name resolution of free variables occurs at runtime, not '
......@@ -4027,16 +4020,6 @@ topics = {'assert': '\n'
' i = 42\n'
' f()\n'
'\n'
'There are several cases where Python statements are '
'illegal when used\n'
'in conjunction with nested scopes that contain free '
'variables.\n'
'\n'
'If a variable is referenced in an enclosing scope, it is '
'illegal to\n'
'delete the name. An error will be reported at compile '
'time.\n'
'\n'
'The "eval()" and "exec()" functions do not have access '
'to the full\n'
'environment for resolving names. Names may be resolved '
......@@ -4050,8 +4033,7 @@ topics = {'assert': '\n'
'override the global and local namespace. If only one '
'namespace is\n'
'specified, it is used for both.\n',
'else': '\n'
'The "if" statement\n'
'else': 'The "if" statement\n'
'******************\n'
'\n'
'The "if" statement is used for conditional execution:\n'
......@@ -4068,8 +4050,7 @@ topics = {'assert': '\n'
'(and no other part of the "if" statement is executed or evaluated).\n'
'If all expressions are false, the suite of the "else" clause, if\n'
'present, is executed.\n',
'exceptions': '\n'
'Exceptions\n'
'exceptions': 'Exceptions\n'
'**********\n'
'\n'
'Exceptions are a means of breaking out of the normal flow of '
......@@ -4145,8 +4126,7 @@ topics = {'assert': '\n'
' these operations is not available at the time the module '
'is\n'
' compiled.\n',
'execmodel': '\n'
'Execution model\n'
'execmodel': 'Execution model\n'
'***************\n'
'\n'
'\n'
......@@ -4343,6 +4323,13 @@ topics = {'assert': '\n'
'Builtins and restricted execution\n'
'---------------------------------\n'
'\n'
'**CPython implementation detail:** Users should not touch\n'
'"__builtins__"; it is strictly an implementation detail. '
'Users\n'
'wanting to override values in the builtins namespace should '
'"import"\n'
'the "builtins" module and modify its attributes appropriately.\n'
'\n'
'The builtins namespace associated with the execution of a code '
'block\n'
'is actually found by looking up the name "__builtins__" in its '
......@@ -4355,16 +4342,7 @@ topics = {'assert': '\n'
'in any\n'
'other module, "__builtins__" is an alias for the dictionary of '
'the\n'
'"builtins" module itself. "__builtins__" can be set to a '
'user-created\n'
'dictionary to create a weak form of restricted execution.\n'
'\n'
'**CPython implementation detail:** Users should not touch\n'
'"__builtins__"; it is strictly an implementation detail. '
'Users\n'
'wanting to override values in the builtins namespace should '
'"import"\n'
'the "builtins" module and modify its attributes appropriately.\n'
'"builtins" module itself.\n'
'\n'
'\n'
'Interaction with dynamic features\n'
......@@ -4380,14 +4358,6 @@ topics = {'assert': '\n'
' i = 42\n'
' f()\n'
'\n'
'There are several cases where Python statements are illegal '
'when used\n'
'in conjunction with nested scopes that contain free variables.\n'
'\n'
'If a variable is referenced in an enclosing scope, it is '
'illegal to\n'
'delete the name. An error will be reported at compile time.\n'
'\n'
'The "eval()" and "exec()" functions do not have access to the '
'full\n'
'environment for resolving names. Names may be resolved in the '
......@@ -4477,8 +4447,7 @@ topics = {'assert': '\n'
' these operations is not available at the time the module '
'is\n'
' compiled.\n',
'exprlists': '\n'
'Expression lists\n'
'exprlists': 'Expression lists\n'
'****************\n'
'\n'
' expression_list ::= expression ( "," expression )* [","]\n'
......@@ -4515,8 +4484,7 @@ topics = {'assert': '\n'
'value of that expression. (To create an empty tuple, use an '
'empty pair\n'
'of parentheses: "()".)\n',
'floating': '\n'
'Floating point literals\n'
'floating': 'Floating point literals\n'
'***********************\n'
'\n'
'Floating point literals are described by the following lexical\n'
......@@ -4552,8 +4520,7 @@ topics = {'assert': '\n'
'Changed in version 3.6: Underscores are now allowed for '
'grouping\n'
'purposes in literals.\n',
'for': '\n'
'The "for" statement\n'
'for': 'The "for" statement\n'
'*******************\n'
'\n'
'The "for" statement is used to iterate over the elements of a '
......@@ -4625,8 +4592,7 @@ topics = {'assert': '\n'
'\n'
' for x in a[:]:\n'
' if x < 0: a.remove(x)\n',
'formatstrings': '\n'
'Format String Syntax\n'
'formatstrings': 'Format String Syntax\n'
'********************\n'
'\n'
'The "str.format()" method and the "Formatter" class share '
......@@ -5066,9 +5032,9 @@ topics = {'assert': '\n'
'be formatted\n'
'with the floating point presentation types listed below '
'(except "\'n\'"\n'
'and None). When doing so, "float()" is used to convert the '
'integer to\n'
'a floating point number before formatting.\n'
'and "None"). When doing so, "float()" is used to convert '
'the integer\n'
'to a floating point number before formatting.\n'
'\n'
'The available presentation types for floating point and '
'decimal values\n'
......@@ -5345,8 +5311,7 @@ topics = {'assert': '\n'
' 9 9 11 1001\n'
' 10 A 12 1010\n'
' 11 B 13 1011\n',
'function': '\n'
'Function definitions\n'
'function': 'Function definitions\n'
'********************\n'
'\n'
'A function definition defines a user-defined function object '
......@@ -5515,8 +5480,7 @@ topics = {'assert': '\n'
'\n'
' **PEP 3107** - Function Annotations\n'
' The original specification for function annotations.\n',
'global': '\n'
'The "global" statement\n'
'global': 'The "global" statement\n'
'**********************\n'
'\n'
' global_stmt ::= "global" identifier ("," identifier)*\n'
......@@ -5547,8 +5511,8 @@ topics = {'assert': '\n'
'change\n'
'the meaning of the program.\n'
'\n'
'**Programmer\'s note:** the "global" is a directive to the '
'parser. It\n'
'**Programmer\'s note:** "global" is a directive to the parser. '
'It\n'
'applies only to code parsed at the same time as the "global"\n'
'statement. In particular, a "global" statement contained in a '
'string\n'
......@@ -5560,8 +5524,7 @@ topics = {'assert': '\n'
'code containing the function call. The same applies to the '
'"eval()"\n'
'and "compile()" functions.\n',
'id-classes': '\n'
'Reserved classes of identifiers\n'
'id-classes': 'Reserved classes of identifiers\n'
'*******************************\n'
'\n'
'Certain classes of identifiers (besides keywords) have '
......@@ -5609,8 +5572,7 @@ topics = {'assert': '\n'
' to help avoid name clashes between "private" attributes of '
'base and\n'
' derived classes. See section Identifiers (Names).\n',
'identifiers': '\n'
'Identifiers and keywords\n'
'identifiers': 'Identifiers and keywords\n'
'************************\n'
'\n'
'Identifiers (also referred to as *names*) are described by '
......@@ -5758,8 +5720,7 @@ topics = {'assert': '\n'
' to help avoid name clashes between "private" attributes of '
'base and\n'
' derived classes. See section Identifiers (Names).\n',
'if': '\n'
'The "if" statement\n'
'if': 'The "if" statement\n'
'******************\n'
'\n'
'The "if" statement is used for conditional execution:\n'
......@@ -5775,8 +5736,7 @@ topics = {'assert': '\n'
'(and no other part of the "if" statement is executed or evaluated).\n'
'If all expressions are false, the suite of the "else" clause, if\n'
'present, is executed.\n',
'imaginary': '\n'
'Imaginary literals\n'
'imaginary': 'Imaginary literals\n'
'******************\n'
'\n'
'Imaginary literals are described by the following lexical '
......@@ -5796,8 +5756,7 @@ topics = {'assert': '\n'
'\n'
' 3.14j 10.j 10j .001j 1e100j 3.14e-10j '
'3.14_15_93j\n',
'import': '\n'
'The "import" statement\n'
'import': 'The "import" statement\n'
'**********************\n'
'\n'
' import_stmt ::= "import" module ["as" name] ( "," module '
......@@ -6058,13 +6017,13 @@ topics = {'assert': '\n'
'\n'
' **PEP 236** - Back to the __future__\n'
' The original proposal for the __future__ mechanism.\n',
'in': '\n'
'Membership test operations\n'
'in': 'Membership test operations\n'
'**************************\n'
'\n'
'The operators "in" and "not in" test for membership. "x in s"\n'
'evaluates to true if *x* is a member of *s*, and false otherwise. "x\n'
'not in s" returns the negation of "x in s". All built-in sequences\n'
'evaluates to "True" if *x* is a member of *s*, and "False" otherwise.\n'
'"x not in s" returns the negation of "x in s". All built-in '
'sequences\n'
'and set types support this as well as dictionary, for which "in" '
'tests\n'
'whether the dictionary has a given key. For container types such as\n'
......@@ -6072,30 +6031,29 @@ topics = {'assert': '\n'
'expression "x in y" is equivalent to "any(x is e or x == e for e in\n'
'y)".\n'
'\n'
'For the string and bytes types, "x in y" is true if and only if *x* '
'is\n'
'a substring of *y*. An equivalent test is "y.find(x) != -1". Empty\n'
'strings are always considered to be a substring of any other string,\n'
'so """ in "abc"" will return "True".\n'
'For the string and bytes types, "x in y" is "True" if and only if *x*\n'
'is a substring of *y*. An equivalent test is "y.find(x) != -1".\n'
'Empty strings are always considered to be a substring of any other\n'
'string, so """ in "abc"" will return "True".\n'
'\n'
'For user-defined classes which define the "__contains__()" method, "x\n'
'in y" is true if and only if "y.__contains__(x)" is true.\n'
'in y" returns "True" if "y.__contains__(x)" returns a true value, and\n'
'"False" otherwise.\n'
'\n'
'For user-defined classes which do not define "__contains__()" but do\n'
'define "__iter__()", "x in y" is true if some value "z" with "x == z"\n'
'is produced while iterating over "y". If an exception is raised\n'
'define "__iter__()", "x in y" is "True" if some value "z" with "x ==\n'
'z" is produced while iterating over "y". If an exception is raised\n'
'during the iteration, it is as if "in" raised that exception.\n'
'\n'
'Lastly, the old-style iteration protocol is tried: if a class defines\n'
'"__getitem__()", "x in y" is true if and only if there is a non-\n'
'"__getitem__()", "x in y" is "True" if and only if there is a non-\n'
'negative integer index *i* such that "x == y[i]", and all lower\n'
'integer indices do not raise "IndexError" exception. (If any other\n'
'exception is raised, it is as if "in" raised that exception).\n'
'\n'
'The operator "not in" is defined to have the inverse true value of\n'
'"in".\n',
'integers': '\n'
'Integer literals\n'
'integers': 'Integer literals\n'
'****************\n'
'\n'
'Integer literals are described by the following lexical '
......@@ -6141,8 +6099,7 @@ topics = {'assert': '\n'
'Changed in version 3.6: Underscores are now allowed for '
'grouping\n'
'purposes in literals.\n',
'lambda': '\n'
'Lambdas\n'
'lambda': 'Lambdas\n'
'*******\n'
'\n'
' lambda_expr ::= "lambda" [parameter_list]: expression\n'
......@@ -6165,8 +6122,7 @@ topics = {'assert': '\n'
'Note that functions created with lambda expressions cannot '
'contain\n'
'statements or annotations.\n',
'lists': '\n'
'List displays\n'
'lists': 'List displays\n'
'*************\n'
'\n'
'A list display is a possibly empty series of expressions enclosed '
......@@ -6183,8 +6139,7 @@ topics = {'assert': '\n'
'from left to right and placed into the list object in that order.\n'
'When a comprehension is supplied, the list is constructed from the\n'
'elements resulting from the comprehension.\n',
'naming': '\n'
'Naming and binding\n'
'naming': 'Naming and binding\n'
'******************\n'
'\n'
'\n'
......@@ -6341,6 +6296,12 @@ topics = {'assert': '\n'
'Builtins and restricted execution\n'
'=================================\n'
'\n'
'**CPython implementation detail:** Users should not touch\n'
'"__builtins__"; it is strictly an implementation detail. Users\n'
'wanting to override values in the builtins namespace should '
'"import"\n'
'the "builtins" module and modify its attributes appropriately.\n'
'\n'
'The builtins namespace associated with the execution of a code '
'block\n'
'is actually found by looking up the name "__builtins__" in its '
......@@ -6353,15 +6314,7 @@ topics = {'assert': '\n'
'any\n'
'other module, "__builtins__" is an alias for the dictionary of '
'the\n'
'"builtins" module itself. "__builtins__" can be set to a '
'user-created\n'
'dictionary to create a weak form of restricted execution.\n'
'\n'
'**CPython implementation detail:** Users should not touch\n'
'"__builtins__"; it is strictly an implementation detail. Users\n'
'wanting to override values in the builtins namespace should '
'"import"\n'
'the "builtins" module and modify its attributes appropriately.\n'
'"builtins" module itself.\n'
'\n'
'\n'
'Interaction with dynamic features\n'
......@@ -6377,14 +6330,6 @@ topics = {'assert': '\n'
' i = 42\n'
' f()\n'
'\n'
'There are several cases where Python statements are illegal when '
'used\n'
'in conjunction with nested scopes that contain free variables.\n'
'\n'
'If a variable is referenced in an enclosing scope, it is illegal '
'to\n'
'delete the name. An error will be reported at compile time.\n'
'\n'
'The "eval()" and "exec()" functions do not have access to the '
'full\n'
'environment for resolving names. Names may be resolved in the '
......@@ -6397,8 +6342,7 @@ topics = {'assert': '\n'
'override the global and local namespace. If only one namespace '
'is\n'
'specified, it is used for both.\n',
'nonlocal': '\n'
'The "nonlocal" statement\n'
'nonlocal': 'The "nonlocal" statement\n'
'************************\n'
'\n'
' nonlocal_stmt ::= "nonlocal" identifier ("," identifier)*\n'
......@@ -6429,8 +6373,7 @@ topics = {'assert': '\n'
'\n'
' **PEP 3104** - Access to Names in Outer Scopes\n'
' The specification for the "nonlocal" statement.\n',
'numbers': '\n'
'Numeric literals\n'
'numbers': 'Numeric literals\n'
'****************\n'
'\n'
'There are three types of numeric literals: integers, floating '
......@@ -6444,8 +6387,7 @@ topics = {'assert': '\n'
'is actually an expression composed of the unary operator \'"-"\' '
'and the\n'
'literal "1".\n',
'numeric-types': '\n'
'Emulating numeric types\n'
'numeric-types': 'Emulating numeric types\n'
'***********************\n'
'\n'
'The following methods can be defined to emulate numeric '
......@@ -6621,8 +6563,7 @@ topics = {'assert': '\n'
' "__index__()" is defined "__int__()" should also be '
'defined, and\n'
' both should return the same value.\n',
'objects': '\n'
'Objects, values and types\n'
'objects': 'Objects, values and types\n'
'*************************\n'
'\n'
"*Objects* are Python's abstraction for data. All data in a "
......@@ -6750,8 +6691,7 @@ topics = {'assert': '\n'
'created empty lists. (Note that "c = d = []" assigns the same '
'object\n'
'to both "c" and "d".)\n',
'operator-summary': '\n'
'Operator precedence\n'
'operator-summary': 'Operator precedence\n'
'*******************\n'
'\n'
'The following table summarizes the operator precedence '
......@@ -6812,7 +6752,9 @@ topics = {'assert': '\n'
'Addition and subtraction |\n'
'+-------------------------------------------------+---------------------------------------+\n'
'| "*", "@", "/", "//", "%" | '
'Multiplication, matrix multiplication |\n'
'Multiplication, matrix |\n'
'| | '
'multiplication, division, floor |\n'
'| | '
'division, remainder [5] |\n'
'+-------------------------------------------------+---------------------------------------+\n'
......@@ -6924,8 +6866,7 @@ topics = {'assert': '\n'
'arithmetic\n'
' or bitwise unary operator on its right, that is, '
'"2**-1" is "0.5".\n',
'pass': '\n'
'The "pass" statement\n'
'pass': 'The "pass" statement\n'
'********************\n'
'\n'
' pass_stmt ::= "pass"\n'
......@@ -6938,8 +6879,7 @@ topics = {'assert': '\n'
' def f(arg): pass # a function that does nothing (yet)\n'
'\n'
' class C: pass # a class with no methods (yet)\n',
'power': '\n'
'The power operator\n'
'power': 'The power operator\n'
'******************\n'
'\n'
'The power operator binds more tightly than unary operators on its\n'
......@@ -6973,8 +6913,7 @@ topics = {'assert': '\n'
'Raising a negative number to a fractional power results in a '
'"complex"\n'
'number. (In earlier versions it raised a "ValueError".)\n',
'raise': '\n'
'The "raise" statement\n'
'raise': 'The "raise" statement\n'
'*********************\n'
'\n'
' raise_stmt ::= "raise" [expression ["from" expression]]\n'
......@@ -7024,7 +6963,7 @@ topics = {'assert': '\n'
' ...\n'
' Traceback (most recent call last):\n'
' File "<stdin>", line 2, in <module>\n'
' ZeroDivisionError: int division or modulo by zero\n'
' ZeroDivisionError: division by zero\n'
'\n'
' The above exception was the direct cause of the following '
'exception:\n'
......@@ -7046,7 +6985,7 @@ topics = {'assert': '\n'
' ...\n'
' Traceback (most recent call last):\n'
' File "<stdin>", line 2, in <module>\n'
' ZeroDivisionError: int division or modulo by zero\n'
' ZeroDivisionError: division by zero\n'
'\n'
' During handling of the above exception, another exception '
'occurred:\n'
......@@ -7055,12 +6994,31 @@ topics = {'assert': '\n'
' File "<stdin>", line 4, in <module>\n'
' RuntimeError: Something bad happened\n'
'\n'
'Exception chaining can be explicitly suppressed by specifying '
'"None"\n'
'in the "from" clause:\n'
'\n'
' >>> try:\n'
' ... print(1 / 0)\n'
' ... except:\n'
' ... raise RuntimeError("Something bad happened") from None\n'
' ...\n'
' Traceback (most recent call last):\n'
' File "<stdin>", line 4, in <module>\n'
' RuntimeError: Something bad happened\n'
'\n'
'Additional information on exceptions can be found in section\n'
'Exceptions, and information about handling exceptions is in '
'section\n'
'The try statement.\n',
'return': '\n'
'The "return" statement\n'
'The try statement.\n'
'\n'
'Changed in version 3.3: "None" is now permitted as "Y" in "raise X\n'
'from Y".\n'
'\n'
'New in version 3.3: The "__suppress_context__" attribute to '
'suppress\n'
'automatic display of the exception context.\n',
'return': 'The "return" statement\n'
'**********************\n'
'\n'
' return_stmt ::= "return" [expression_list]\n'
......@@ -7087,9 +7045,15 @@ topics = {'assert': '\n'
'generator is done and will cause "StopIteration" to be raised. '
'The\n'
'returned value (if any) is used as an argument to construct\n'
'"StopIteration" and becomes the "StopIteration.value" attribute.\n',
'sequence-types': '\n'
'Emulating container types\n'
'"StopIteration" and becomes the "StopIteration.value" attribute.\n'
'\n'
'In an asynchronous generator function, an empty "return" '
'statement\n'
'indicates that the asynchronous generator is done and will cause\n'
'"StopAsyncIteration" to be raised. A non-empty "return" statement '
'is\n'
'a syntax error in an asynchronous generator function.\n',
'sequence-types': 'Emulating container types\n'
'*************************\n'
'\n'
'The following methods can be defined to implement '
......@@ -7114,7 +7078,7 @@ topics = {'assert': '\n'
'"update()"\n'
"behaving similar to those for Python's standard dictionary "
'objects.\n'
'The "collections" module provides a "MutableMapping" '
'The "collections.abc" module provides a "MutableMapping" '
'abstract base\n'
'class to help create those methods from a base set of '
'"__getitem__()",\n'
......@@ -7161,6 +7125,16 @@ topics = {'assert': '\n'
' returns zero is considered to be false in a Boolean '
'context.\n'
'\n'
' **CPython implementation detail:** In CPython, the '
'length is\n'
' required to be at most "sys.maxsize". If the length is '
'larger than\n'
' "sys.maxsize" some features (such as "len()") may '
'raise\n'
' "OverflowError". To prevent raising "OverflowError" by '
'truth value\n'
' testing, an object must define a "__bool__()" method.\n'
'\n'
'object.__length_hint__(self)\n'
'\n'
' Called to implement "operator.length_hint()". Should '
......@@ -7310,8 +7284,7 @@ topics = {'assert': '\n'
' iteration protocol via "__getitem__()", see this '
'section in the\n'
' language reference.\n',
'shifting': '\n'
'Shifting operations\n'
'shifting': 'Shifting operations\n'
'*******************\n'
'\n'
'The shifting operations have lower priority than the arithmetic\n'
......@@ -7328,15 +7301,8 @@ topics = {'assert': '\n'
'A right shift by *n* bits is defined as floor division by '
'"pow(2,n)".\n'
'A left shift by *n* bits is defined as multiplication with '
'"pow(2,n)".\n'
'\n'
'Note: In the current implementation, the right-hand operand is\n'
' required to be at most "sys.maxsize". If the right-hand '
'operand is\n'
' larger than "sys.maxsize" an "OverflowError" exception is '
'raised.\n',
'slicings': '\n'
'Slicings\n'
'"pow(2,n)".\n',
'slicings': 'Slicings\n'
'********\n'
'\n'
'A slicing selects a range of items in a sequence object (e.g., '
......@@ -7387,8 +7353,7 @@ topics = {'assert': '\n'
'as lower bound, upper bound and stride, respectively, '
'substituting\n'
'"None" for missing expressions.\n',
'specialattrs': '\n'
'Special Attributes\n'
'specialattrs': 'Special Attributes\n'
'******************\n'
'\n'
'The implementation adds a few special read-only attributes '
......@@ -7473,8 +7438,7 @@ topics = {'assert': '\n'
'[5] To format only a tuple you should therefore provide a\n'
' singleton tuple whose only element is the tuple to be '
'formatted.\n',
'specialnames': '\n'
'Special method names\n'
'specialnames': 'Special method names\n'
'********************\n'
'\n'
'A class can implement certain operations that are invoked by '
......@@ -7540,11 +7504,11 @@ topics = {'assert': '\n'
' Typical implementations create a new instance of the '
'class by\n'
' invoking the superclass\'s "__new__()" method using\n'
' "super(currentclass, cls).__new__(cls[, ...])" with '
'appropriate\n'
' arguments and then modifying the newly-created instance '
'as\n'
' necessary before returning it.\n'
' "super().__new__(cls[, ...])" with appropriate arguments '
'and then\n'
' modifying the newly-created instance as necessary before '
'returning\n'
' it.\n'
'\n'
' If "__new__()" returns an instance of *cls*, then the '
'new\n'
......@@ -7579,7 +7543,7 @@ topics = {'assert': '\n'
' any, must explicitly call it to ensure proper '
'initialization of the\n'
' base class part of the instance; for example:\n'
' "BaseClass.__init__(self, [args...])".\n'
' "super().__init__([args...])".\n'
'\n'
' Because "__new__()" and "__init__()" work together in '
'constructing\n'
......@@ -7726,8 +7690,8 @@ topics = {'assert': '\n'
'\n'
'object.__bytes__(self)\n'
'\n'
' Called by "bytes()" to compute a byte-string '
'representation of an\n'
' Called by bytes to compute a byte-string representation '
'of an\n'
' object. This should return a "bytes" object.\n'
'\n'
'object.__format__(self, format_spec)\n'
......@@ -7760,6 +7724,11 @@ topics = {'assert': '\n'
'itself\n'
' raises a "TypeError" if passed any non-empty string.\n'
'\n'
' Changed in version 3.7: "object.__format__(x, \'\')" is '
'now\n'
' equivalent to "str(x)" rather than "format(str(self), '
'\'\')".\n'
'\n'
'object.__lt__(self, other)\n'
'object.__le__(self, other)\n'
'object.__eq__(self, other)\n'
......@@ -7839,11 +7808,14 @@ topics = {'assert': '\n'
'property\n'
' is that objects which compare equal have the same hash '
'value; it is\n'
' advised to somehow mix together (e.g. using exclusive or) '
'the hash\n'
' values for the components of the object that also play a '
'part in\n'
' comparison of objects.\n'
' advised to mix together the hash values of the components '
'of the\n'
' object that also play a part in comparison of objects by '
'packing\n'
' them into a tuple and hashing the tuple. Example:\n'
'\n'
' def __hash__(self):\n'
' return hash((self.name, self.nick, self.color))\n'
'\n'
' Note: "hash()" truncates the value returned from an '
"object's\n"
......@@ -7893,8 +7865,8 @@ topics = {'assert': '\n'
'attempts to\n'
' retrieve their hash value, and will also be correctly '
'identified as\n'
' unhashable when checking "isinstance(obj, '
'collections.Hashable)".\n'
' unhashable when checking "isinstance(obj,\n'
' collections.abc.Hashable)".\n'
'\n'
' If a class that overrides "__eq__()" needs to retain the\n'
' implementation of "__hash__()" from a parent class, the '
......@@ -7910,8 +7882,8 @@ topics = {'assert': '\n'
'that\n'
' explicitly raises a "TypeError" would be incorrectly '
'identified as\n'
' hashable by an "isinstance(obj, collections.Hashable)" '
'call.\n'
' hashable by an "isinstance(obj, '
'collections.abc.Hashable)" call.\n'
'\n'
' Note: By default, the "__hash__()" values of str, bytes '
'and\n'
......@@ -8221,23 +8193,14 @@ topics = {'assert': '\n'
'__slots__\n'
'---------\n'
'\n'
'By default, instances of classes have a dictionary for '
'attribute\n'
'storage. This wastes space for objects having very few '
'instance\n'
'variables. The space consumption can become acute when '
'creating large\n'
'numbers of instances.\n'
'*__slots__* allow us to explicitly declare data members '
'(like\n'
'properties) and deny the creation of *__dict__* and '
'*__weakref__*\n'
'(unless explicitly declared in *__slots__* or available in a '
'parent.)\n'
'\n'
'The default can be overridden by defining *__slots__* in a '
'class\n'
'definition. The *__slots__* declaration takes a sequence of '
'instance\n'
'variables and reserves just enough space in each instance to '
'hold a\n'
'value for each variable. Space is saved because *__dict__* '
'is not\n'
'created for each instance.\n'
'The space saved over using *__dict__* can be significant.\n'
'\n'
'object.__slots__\n'
'\n'
......@@ -8257,9 +8220,9 @@ topics = {'assert': '\n'
'\n'
'* When inheriting from a class without *__slots__*, the '
'*__dict__*\n'
' attribute of that class will always be accessible, so a '
'*__slots__*\n'
' definition in the subclass is meaningless.\n'
' and *__weakref__* attribute of the instances will always '
'be\n'
' accessible.\n'
'\n'
'* Without a *__dict__* variable, instances cannot be '
'assigned new\n'
......@@ -8291,13 +8254,16 @@ topics = {'assert': '\n'
'class\n'
' attribute would overwrite the descriptor assignment.\n'
'\n'
'* The action of a *__slots__* declaration is limited to the '
'class\n'
' where it is defined. As a result, subclasses will have a '
'*__dict__*\n'
' unless they also define *__slots__* (which must only '
'contain names\n'
' of any *additional* slots).\n'
'* The action of a *__slots__* declaration is not limited to '
'the\n'
' class where it is defined. *__slots__* declared in '
'parents are\n'
' available in child classes. However, child subclasses will '
'get a\n'
' *__dict__* and *__weakref__* unless they also define '
'*__slots__*\n'
' (which should only contain names of any *additional* '
'slots).\n'
'\n'
'* If a class defines a slot also defined in a base class, '
'the\n'
......@@ -8324,6 +8290,14 @@ topics = {'assert': '\n'
'same\n'
' *__slots__*.\n'
'\n'
'* Multiple inheritance with multiple slotted parent classes '
'can be\n'
' used, but only one parent is allowed to have attributes '
'created by\n'
' slots (the other bases must have empty slot layouts) - '
'violations\n'
' raise "TypeError".\n'
'\n'
'\n'
'Customizing class creation\n'
'==========================\n'
......@@ -8503,9 +8477,10 @@ topics = {'assert': '\n'
'defined at the\n'
'class scope. Class variables must be accessed through the '
'first\n'
'parameter of instance or class methods, and cannot be '
'accessed at all\n'
'from static methods.\n'
'parameter of instance or class methods, or through the '
'implicit\n'
'lexically scoped "__class__" reference described in the next '
'section.\n'
'\n'
'\n'
'Creating the class object\n'
......@@ -8535,6 +8510,38 @@ topics = {'assert': '\n'
'passed to the\n'
'method.\n'
'\n'
'**CPython implementation detail:** In CPython 3.6 and later, '
'the\n'
'"__class__" cell is passed to the metaclass as a '
'"__classcell__" entry\n'
'in the class namespace. If present, this must be propagated '
'up to the\n'
'"type.__new__" call in order for the class to be '
'initialised\n'
'correctly. Failing to do so will result in a '
'"DeprecationWarning" in\n'
'Python 3.6, and a "RuntimeWarning" in the future.\n'
'\n'
'When using the default metaclass "type", or any metaclass '
'that\n'
'ultimately calls "type.__new__", the following additional\n'
'customisation steps are invoked after creating the class '
'object:\n'
'\n'
'* first, "type.__new__" collects all of the descriptors in '
'the class\n'
' namespace that define a "__set_name__()" method;\n'
'\n'
'* second, all of these "__set_name__" methods are called '
'with the\n'
' class being defined and the assigned name of that '
'particular\n'
' descriptor; and\n'
'\n'
'* finally, the "__init_subclass__()" hook is called on the '
'immediate\n'
' parent of the new class in its method resolution order.\n'
'\n'
'After the class object is created, it is passed to the '
'class\n'
'decorators included in the class definition (if any) and the '
......@@ -8562,7 +8569,7 @@ topics = {'assert': '\n'
'\n'
'The potential uses for metaclasses are boundless. Some ideas '
'that have\n'
'been explored include logging, interface checking, '
'been explored include enum, logging, interface checking, '
'automatic\n'
'delegation, automatic property creation, proxies, '
'frameworks, and\n'
......@@ -8701,7 +8708,7 @@ topics = {'assert': '\n'
'"update()"\n'
"behaving similar to those for Python's standard dictionary "
'objects.\n'
'The "collections" module provides a "MutableMapping" '
'The "collections.abc" module provides a "MutableMapping" '
'abstract base\n'
'class to help create those methods from a base set of '
'"__getitem__()",\n'
......@@ -8747,6 +8754,15 @@ topics = {'assert': '\n'
' returns zero is considered to be false in a Boolean '
'context.\n'
'\n'
' **CPython implementation detail:** In CPython, the length '
'is\n'
' required to be at most "sys.maxsize". If the length is '
'larger than\n'
' "sys.maxsize" some features (such as "len()") may raise\n'
' "OverflowError". To prevent raising "OverflowError" by '
'truth value\n'
' testing, an object must define a "__bool__()" method.\n'
'\n'
'object.__length_hint__(self)\n'
'\n'
' Called to implement "operator.length_hint()". Should '
......@@ -9229,8 +9245,7 @@ topics = {'assert': '\n'
'special method *must* be set on the class object itself in '
'order to be\n'
'consistently invoked by the interpreter).\n',
'string-methods': '\n'
'String Methods\n'
'string-methods': 'String Methods\n'
'**************\n'
'\n'
'Strings implement all of the common sequence operations, '
......@@ -9467,12 +9482,11 @@ topics = {'assert': '\n'
'characters\n'
' and there is at least one character, false otherwise. '
'Decimal\n'
' characters are those from general category "Nd". This '
'category\n'
' includes digit characters, and all characters that can '
'be used to\n'
' form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC '
'DIGIT ZERO.\n'
' characters are those that can be used to form numbers '
'in base 10,\n'
' e.g. U+0660, ARABIC-INDIC DIGIT ZERO. Formally a '
'decimal character\n'
' is a character in the Unicode General Category "Nd".\n'
'\n'
'str.isdigit()\n'
'\n'
......@@ -9482,10 +9496,13 @@ topics = {'assert': '\n'
'include decimal\n'
' characters and digits that need special handling, such '
'as the\n'
' compatibility superscript digits. Formally, a digit is '
'a character\n'
' that has the property value Numeric_Type=Digit or\n'
' Numeric_Type=Decimal.\n'
' compatibility superscript digits. This covers digits '
'which cannot\n'
' be used to form numbers in base 10, like the Kharosthi '
'numbers.\n'
' Formally, a digit is a character that has the property '
'value\n'
' Numeric_Type=Digit or Numeric_Type=Decimal.\n'
'\n'
'str.isidentifier()\n'
'\n'
......@@ -9570,13 +9587,13 @@ topics = {'assert': '\n'
'str.join(iterable)\n'
'\n'
' Return a string which is the concatenation of the '
'strings in the\n'
' *iterable* *iterable*. A "TypeError" will be raised if '
'there are\n'
' any non-string values in *iterable*, including "bytes" '
'objects.\n'
' The separator between elements is the string providing '
'this method.\n'
'strings in\n'
' *iterable*. A "TypeError" will be raised if there are '
'any non-\n'
' string values in *iterable*, including "bytes" '
'objects. The\n'
' separator between elements is the string providing this '
'method.\n'
'\n'
'str.ljust(width[, fillchar])\n'
'\n'
......@@ -9626,7 +9643,7 @@ topics = {'assert': '\n'
' Unicode ordinals (integers) or characters (strings of '
'length 1) to\n'
' Unicode ordinals, strings (of arbitrary lengths) or '
'None.\n'
'"None".\n'
' Character keys will then be converted to ordinals.\n'
'\n'
' If there are two arguments, they must be strings of '
......@@ -9637,7 +9654,7 @@ topics = {'assert': '\n'
'is a third\n'
' argument, it must be a string, whose characters will be '
'mapped to\n'
' None in the result.\n'
' "None" in the result.\n'
'\n'
'str.partition(sep)\n'
'\n'
......@@ -10031,8 +10048,7 @@ topics = {'assert': '\n'
" '00042'\n"
' >>> "-42".zfill(5)\n'
" '-0042'\n",
'strings': '\n'
'String and Bytes literals\n'
'strings': 'String and Bytes literals\n'
'*************************\n'
'\n'
'String literals are described by the following lexical '
......@@ -10266,8 +10282,7 @@ topics = {'assert': '\n'
'followed by a newline is interpreted as those two characters as '
'part\n'
'of the literal, *not* as a line continuation.\n',
'subscriptions': '\n'
'Subscriptions\n'
'subscriptions': 'Subscriptions\n'
'*************\n'
'\n'
'A subscription selects an item of a sequence (string, tuple '
......@@ -10324,32 +10339,26 @@ topics = {'assert': '\n'
"A string's items are characters. A character is not a "
'separate data\n'
'type but a string of exactly one character.\n',
'truth': '\n'
'Truth Value Testing\n'
'truth': 'Truth Value Testing\n'
'*******************\n'
'\n'
'Any object can be tested for truth value, for use in an "if" or\n'
'"while" condition or as operand of the Boolean operations below. '
'The\n'
'following values are considered false:\n'
'\n'
'* "None"\n'
'\n'
'* "False"\n'
'"while" condition or as operand of the Boolean operations below.\n'
'\n'
'* zero of any numeric type, for example, "0", "0.0", "0j".\n'
'By default, an object is considered true unless its class defines\n'
'either a "__bool__()" method that returns "False" or a "__len__()"\n'
'method that returns zero, when called with the object. [1] Here '
'are\n'
'most of the built-in objects considered false:\n'
'\n'
'* any empty sequence, for example, "\'\'", "()", "[]".\n'
'* constants defined to be false: "None" and "False".\n'
'\n'
'* any empty mapping, for example, "{}".\n'
'* zero of any numeric type: "0", "0.0", "0j", "Decimal(0)",\n'
' "Fraction(0, 1)"\n'
'\n'
'* instances of user-defined classes, if the class defines a\n'
' "__bool__()" or "__len__()" method, when that method returns the\n'
' integer zero or "bool" value "False". [1]\n'
'\n'
'All other values are considered true --- so objects of many types '
'are\n'
'always true.\n'
'* empty sequences and collections: "\'\'", "()", "[]", "{}", '
'"set()",\n'
' "range(0)"\n'
'\n'
'Operations and built-in functions that have a Boolean result '
'always\n'
......@@ -10357,8 +10366,7 @@ topics = {'assert': '\n'
'otherwise stated. (Important exception: the Boolean operations '
'"or"\n'
'and "and" always return one of their operands.)\n',
'try': '\n'
'The "try" statement\n'
'try': 'The "try" statement\n'
'*******************\n'
'\n'
'The "try" statement specifies exception handlers and/or cleanup code\n'
......@@ -10505,8 +10513,7 @@ topics = {'assert': '\n'
'Exceptions, and information on using the "raise" statement to '
'generate\n'
'exceptions may be found in section The raise statement.\n',
'types': '\n'
'The standard type hierarchy\n'
'types': 'The standard type hierarchy\n'
'***************************\n'
'\n'
'Below is a list of the types that are built into Python. '
......@@ -10706,11 +10713,11 @@ topics = {'assert': '\n'
'8-bit\n'
' bytes, represented by integers in the range 0 <= x < 256.\n'
' Bytes literals (like "b\'abc\'") and the built-in '
'function\n'
' "bytes()" can be used to construct bytes objects. Also,\n'
' bytes objects can be decoded to strings via the '
'"decode()"\n'
' method.\n'
'"bytes()"\n'
' constructor can be used to create bytes objects. Also, '
'bytes\n'
' objects can be decoded to strings via the "decode()" '
'method.\n'
'\n'
' Mutable sequences\n'
' Mutable sequences can be changed after they are created. '
......@@ -10736,7 +10743,7 @@ topics = {'assert': '\n'
' the built-in "bytearray()" constructor. Aside from being\n'
' mutable (and hence unhashable), byte arrays otherwise '
'provide\n'
' the same interface and functionality as immutable bytes\n'
' the same interface and functionality as immutable "bytes"\n'
' objects.\n'
'\n'
' The extension module "array" provides an additional example '
......@@ -10902,7 +10909,11 @@ topics = {'assert': '\n'
'| Read-only |\n'
' | | contain bindings for the '
'| |\n'
" | | function's free variables. "
" | | function's free variables. See "
'| |\n'
' | | below for information on the '
'| |\n'
' | | "cell_contents" attribute. '
'| |\n'
' '
'+---------------------------+---------------------------------+-------------+\n'
......@@ -10941,6 +10952,9 @@ topics = {'assert': '\n'
' attributes on built-in functions may be supported in the\n'
' future.*\n'
'\n'
' A cell object has the attribute "cell_contents". This can be\n'
' used to get the value of the cell, as well as set the value.\n'
'\n'
" Additional information about a function's definition can be\n"
' retrieved from its code object; see the description of '
'internal\n'
......@@ -11064,6 +11078,27 @@ topics = {'assert': '\n'
'statements.\n'
' See also the Coroutine Objects section.\n'
'\n'
' Asynchronous generator functions\n'
' A function or method which is defined using "async def" and\n'
' which uses the "yield" statement is called a *asynchronous\n'
' generator function*. Such a function, when called, returns '
'an\n'
' asynchronous iterator object which can be used in an "async '
'for"\n'
' statement to execute the body of the function.\n'
'\n'
' Calling the asynchronous iterator\'s "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 '
'the\n'
' asynchronous iterator will have reached the end of the set '
'of\n'
' values to be yielded.\n'
'\n'
' Built-in functions\n'
' A built-in function object is a wrapper around a C function.\n'
' Examples of built-in functions are "len()" and "math.sin()"\n'
......@@ -11200,14 +11235,14 @@ topics = {'assert': '\n'
'the\n'
' dictionary containing the class\'s namespace; "__bases__" is a '
'tuple\n'
' (possibly empty or a singleton) containing the base classes, in '
'the\n'
' order of their occurrence in the base class list; "__doc__" is '
'the\n'
" class's documentation string, or None if undefined;\n"
' "__annotations__" (optional) is a dictionary containing '
'*variable\n'
' annotations* collected during class body execution.\n'
' containing the base classes, in the order of their occurrence '
'in\n'
' the base class list; "__doc__" is the class\'s documentation '
'string,\n'
' or "None" if undefined; "__annotations__" (optional) is a\n'
' dictionary containing *variable annotations* collected during '
'class\n'
' body execution.\n'
'\n'
'Class instances\n'
' A class instance is created by calling a class object (see '
......@@ -11363,17 +11398,26 @@ topics = {'assert': '\n'
' bytecode string of the code object).\n'
'\n'
' Special writable attributes: "f_trace", if not "None", is a\n'
' function called at the start of each source code line (this '
'is\n'
' used by the debugger); "f_lineno" is the current line number '
'of\n'
' the frame --- writing to this from within a trace function '
'jumps\n'
' to the given line (only for the bottom-most frame). A '
'debugger\n'
' can implement a Jump command (aka Set Next Statement) by '
' function called for various events during code execution '
'(this\n'
' is used by the debugger). Normally an event is triggered for\n'
' each new source line - this can be disabled by setting\n'
' "f_trace_lines" to "False".\n'
'\n'
' Implementations *may* allow per-opcode events to be requested '
'by\n'
' setting "f_trace_opcodes" to "True". Note that this may lead '
'to\n'
' undefined interpreter behaviour if exceptions raised by the\n'
' trace function escape to the function being traced.\n'
'\n'
' "f_lineno" is the current line number of the frame --- '
'writing\n'
' to f_lineno.\n'
' to this from within a trace function jumps to the given line\n'
' (only for the bottom-most frame). A debugger can implement '
'a\n'
' Jump command (aka Set Next Statement) by writing to '
'f_lineno.\n'
'\n'
' Frame objects support one method:\n'
'\n'
......@@ -11487,8 +11531,7 @@ topics = {'assert': '\n'
' under "User-defined methods". Class method objects are '
'created\n'
' by the built-in "classmethod()" constructor.\n',
'typesfunctions': '\n'
'Functions\n'
'typesfunctions': 'Functions\n'
'*********\n'
'\n'
'Function objects are created by function definitions. The '
......@@ -11505,8 +11548,7 @@ topics = {'assert': '\n'
'different object types.\n'
'\n'
'See Function definitions for more information.\n',
'typesmapping': '\n'
'Mapping Types --- "dict"\n'
'typesmapping': 'Mapping Types --- "dict"\n'
'************************\n'
'\n'
'A *mapping* object maps *hashable* values to arbitrary '
......@@ -11863,8 +11905,7 @@ topics = {'assert': '\n'
" {'bacon'}\n"
" >>> keys ^ {'sausage', 'juice'}\n"
" {'juice', 'sausage', 'bacon', 'spam'}\n",
'typesmethods': '\n'
'Methods\n'
'typesmethods': 'Methods\n'
'*******\n'
'\n'
'Methods are functions that are called using the attribute '
......@@ -11921,8 +11962,7 @@ topics = {'assert': '\n'
" 'my name is method'\n"
'\n'
'See The standard type hierarchy for more information.\n',
'typesmodules': '\n'
'Modules\n'
'typesmodules': 'Modules\n'
'*******\n'
'\n'
'The only special operation on a module is attribute access: '
......@@ -11959,8 +11999,7 @@ topics = {'assert': '\n'
'written as\n'
'"<module \'os\' from '
'\'/usr/local/lib/pythonX.Y/os.pyc\'>".\n',
'typesseq': '\n'
'Sequence Types --- "list", "tuple", "range"\n'
'typesseq': 'Sequence Types --- "list", "tuple", "range"\n'
'*******************************************\n'
'\n'
'There are three basic sequence types: lists, tuples, and range\n'
......@@ -11993,7 +12032,7 @@ topics = {'assert': '\n'
'comparison operations. The "+" (concatenation) and "*" '
'(repetition)\n'
'operations have the same priority as the corresponding numeric\n'
'operations.\n'
'operations. [3]\n'
'\n'
'+----------------------------+----------------------------------+------------+\n'
'| Operation | Result '
......@@ -12108,9 +12147,9 @@ topics = {'assert': '\n'
'\n'
'3. If *i* or *j* is negative, the index is relative to the end '
'of\n'
' the string: "len(s) + i" or "len(s) + j" is substituted. But '
'note\n'
' that "-0" is still "0".\n'
' sequence *s*: "len(s) + i" or "len(s) + j" is substituted. '
'But\n'
' note that "-0" is still "0".\n'
'\n'
'4. The slice of *s* from *i* to *j* is defined as the sequence '
'of\n'
......@@ -12129,12 +12168,17 @@ topics = {'assert': '\n'
' (j-i)/k". In other words, the indices are "i", "i+k", '
'"i+2*k",\n'
' "i+3*k" and so on, stopping when *j* is reached (but never\n'
' including *j*). If *i* or *j* is greater than "len(s)", use\n'
' "len(s)". If *i* or *j* are omitted or "None", they become '
'"end"\n'
' values (which end depends on the sign of *k*). Note, *k* '
'cannot be\n'
' zero. If *k* is "None", it is treated like "1".\n'
' including *j*). When *k* is positive, *i* and *j* are '
'reduced to\n'
' "len(s)" if they are greater. When *k* is negative, *i* and '
'*j* are\n'
' reduced to "len(s) - 1" if they are greater. If *i* or *j* '
'are\n'
' omitted or "None", they become "end" values (which end '
'depends on\n'
' the sign of *k*). Note, *k* cannot be zero. If *k* is '
'"None", it\n'
' is treated like "1".\n'
'\n'
'6. Concatenating immutable sequences always results in a new\n'
' object. This means that building up a sequence by repeated\n'
......@@ -12291,8 +12335,8 @@ topics = {'assert': '\n'
'+--------------------------------+----------------------------------+-----------------------+\n'
'| "s.remove(x)" | remove the first item from '
'*s* | (3) |\n'
'| | where "s[i] == '
'x" | |\n'
'| | where "s[i]" is equal to '
'*x* | |\n'
'+--------------------------------+----------------------------------+-----------------------+\n'
'| "s.reverse()" | reverses the items of *s* '
'in | (4) |\n'
......@@ -12379,7 +12423,7 @@ topics = {'assert': '\n'
'operations.\n'
' Lists also provide the following additional method:\n'
'\n'
' sort(*, key=None, reverse=None)\n'
' sort(*, key=None, reverse=False)\n'
'\n'
' This method sorts the list in place, using only "<" '
'comparisons\n'
......@@ -12652,8 +12696,7 @@ topics = {'assert': '\n'
' * The linspace recipe shows how to implement a lazy version '
'of\n'
' range that suitable for floating point applications.\n',
'typesseq-mutable': '\n'
'Mutable Sequence Types\n'
'typesseq-mutable': 'Mutable Sequence Types\n'
'**********************\n'
'\n'
'The operations in the following table are defined on '
......@@ -12747,8 +12790,8 @@ topics = {'assert': '\n'
'+--------------------------------+----------------------------------+-----------------------+\n'
'| "s.remove(x)" | remove the first item '
'from *s* | (3) |\n'
'| | where "s[i] == '
'x" | |\n'
'| | where "s[i]" is equal '
'to *x* | |\n'
'+--------------------------------+----------------------------------+-----------------------+\n'
'| "s.reverse()" | reverses the items of '
'*s* in | (4) |\n'
......@@ -12793,8 +12836,7 @@ topics = {'assert': '\n'
'referenced multiple\n'
' times, as explained for "s * n" under Common Sequence '
'Operations.\n',
'unary': '\n'
'Unary arithmetic and bitwise operations\n'
'unary': 'Unary arithmetic and bitwise operations\n'
'***************************************\n'
'\n'
'All unary arithmetic and bitwise operations have the same '
......@@ -12816,8 +12858,7 @@ topics = {'assert': '\n'
'In all three cases, if the argument does not have the proper type, '
'a\n'
'"TypeError" exception is raised.\n',
'while': '\n'
'The "while" statement\n'
'while': 'The "while" statement\n'
'*********************\n'
'\n'
'The "while" statement is used for repeated execution as long as an\n'
......@@ -12841,8 +12882,7 @@ topics = {'assert': '\n'
'executed in the first suite skips the rest of the suite and goes '
'back\n'
'to testing the expression.\n',
'with': '\n'
'The "with" statement\n'
'with': 'The "with" statement\n'
'********************\n'
'\n'
'The "with" statement is used to wrap the execution of a block with\n'
......@@ -12915,8 +12955,7 @@ topics = {'assert': '\n'
' The specification, background, and examples for the Python '
'"with"\n'
' statement.\n',
'yield': '\n'
'The "yield" statement\n'
'yield': 'The "yield" statement\n'
'*********************\n'
'\n'
' yield_stmt ::= yield_expression\n'
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Prevent missing 'getentropy' declaration warning on macOS. Patch by Gareth
Rees.
Remove redundant include search directory option for building outside the
source tree.
A full copy of libffi is no longer bundled for use when building _ctypes on
non-OSX UNIX platforms. An installed copy of libffi is now required when
building _ctypes on such platforms.
setup.py now detects system libffi with multiarch wrapper.
Fixed build with Estonian locale (python-config and distclean targets in
Makefile). Patch by Arfrever Frehtes Taifersar Arahesis.
Add configure check for siginfo_t.si_band, which Cygwin does not provide.
Patch by Masayuki Yamamoto with review and rebase by Erik Bray.
Fix building extensions modules on Cygwin. Patch by Roumen Petrov, based on
original patch by Jason Tishler.
Fix building the _struct module on Cygwin by passing ``NULL`` instead of
``&PyType_Type`` to PyVarObject_HEAD_INIT. Patch by Masayuki Yamamoto.
Update Windows build and OS X installers to use OpenSSL 1.0.2j.
Update Windows build and OS X installers to use SQLite 3.14.2.
Fix missing extensions modules when cross compiling.
Rename --with-optimiations to --enable-optimizations.
Fix out-of-tree building on AIX. Patch by Tristan Carel and Michael
Haubenwallner.
Do not define sys.implementation._multiarch on Android.
Do not add the directory for installing C header files and the directory for
installing object code libraries to the cross compilation search paths.
Original patch by Thomas Petazzoni.
Fix the compilation error that occurs because if_nameindex() is available on
Android API level 24, but the if_nameindex structure is not defined.
lockf() is available on Android API level 24, but the F_LOCK macro is not
defined in android-ndk-r13.
Removes hard dependency on hg.exe from PCBuild/build.bat
Fix implicit declaration of function _setmode. Patch by Masayuki Yamamoto
Set Android compilation and link flags.
Prohibit implicit C function declarations: use -Werror=implicit-function-
declaration when possible (GCC and Clang, but it depends on the compiler
version). Patch written by Chi Hsuan Yen.
Update Windows build and OS X installers to use OpenSSL 1.0.2k.
sys.version and the platform module python_build(), python_branch(), and
python_revision() functions now use git information rather than hg when
building from a repo.
Fix ``--enable-optimization`` didn't work.
Don't regenerate generated files based on file modification time anymore:
the action is now explicit. Replace ``make touch`` with ``make regen-all``.
Prevent unnecessary rebuilding of Python during ``make test``, ``make
install`` and some other make targets when configured with ``--enable-
optimizations``.
Fix out-of-tree builds of Python when configured with ``--with--dtrace``.
Add ``--with-assertions`` configure flag to explicitly enable C ``assert()``
checks. Defaults to off. ``--with-pydebug`` implies ``--with-assertions``.
Support the *disabled* marker in Setup files. Extension modules listed after
this marker are not built at all, neither by the Makefile nor by setup.py.
Locate msbuild.exe on Windows when building rather than vcvarsall.bat
Fix compile error when compiling --without-threads.
Patch by Masayuki Yamamoto.
Per PEP 11, support for the IRIX operating system was removed.
Remove support for building --without-threads.
This option is not really useful anymore in the 21st century. Removing lots
of conditional paths allows us to simplify the code base, including in
difficult to maintain low-level internal code.
Allow --with-lto to be used on all builds, not just `make profile-opt`.
Deprecated undocumented functions PyUnicode_AsEncodedObject(),
PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and
PyUnicode_AsEncodedUnicode().
Compiler warnings are now emitted if use most of deprecated functions.
Private variable _Py_PackageContext is now of type ``const char *`` rather
of ``char *``.
The fields name and doc of structures PyMemberDef, PyGetSetDef,
PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of
type ``const char *`` rather of ``char *``.
PyUnicode_CompareWithASCIIString() now never raises exceptions.
The index parameters *start* and *end* of PyUnicode_FindChar() are now
adjusted to behave like ``str[start:end]``.
All stable API extensions added after Python 3.2 are now available only when
Py_LIMITED_API is set to the PY_VERSION_HEX value of the minimum Python
version supporting this API.
The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8() is now of
type ``const char *`` rather of ``char *``.
Fixed the declaration of some public API functions. PyArg_VaParse() and
PyArg_VaParseTupleAndKeywords() were not available in limited API.
PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and Py_BuildValue()
were not available in limited API of version < 3.3 when PY_SSIZE_T_CLEAN is
defined.
Function PySlice_GetIndicesEx() is deprecated and replaced with a macro if
Py_LIMITED_API is not set or set to the value between 0x03050400 and
0x03060000 (not including) or 0x03060100 or higher. Added functions
PySlice_Unpack() and PySlice_AdjustIndices().
The type of results of PyThread_start_new_thread() and
PyThread_get_thread_ident(), and the id parameter of
PyThreadState_SetAsyncExc() changed from "long" to "unsigned long".
Deprecate PyOS_AfterFork() and add PyOS_BeforeFork(),
PyOS_AfterFork_Parent() and PyOS_AfterFork_Child().
PyUnicode_AsWideCharString() now raises a ValueError if the second argument
is NULL and the wchar_t\* string contains null characters.
Remove own implementation for thread-local storage.
CPython has provided the own implementation for thread-local storage (TLS)
on Python/thread.c, it's used in the case which a platform has not supplied
native TLS. However, currently all supported platforms (Windows and pthreads)
have provided native TLS and defined the Py_HAVE_NATIVE_TLS macro with
unconditional in any case.
Added the ``Py_UNREACHABLE()`` macro for code paths which are never expected
to be reached. This and a few other useful macros are now documented in the
C API manual.
Speed-up method calls: add LOAD_METHOD and CALL_METHOD opcodes.
Fix asynchronous generators aclose() and athrow() to handle
StopAsyncIteration propagation properly.
Fix a refleak in code that raises DeprecationWarning.
Raise DeprecationWarning when async and await keywords are used as
variable/attribute/class/function name.
Fix dict.pop() for splitted dictionary when trying to remove a "pending key"
(Not yet inserted in split-table). Patch by Xiang Zhang.
Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize
memcpy().
Fix a regression in zipimport's compile_source(). zipimport should use the
same optimization level as the interpreter.
Upgrade internal unicode databases to Unicode version 9.0.0.
Clean up redundant code in long_rshift function. Thanks Oren Milman.
Remove some redundant assignments to ob_size in longobject.c. Thanks Oren
Milman.
Fallback on reading /dev/urandom device when the getrandom() syscall fails
with EPERM, for example when blocked by SECCOMP.
Now __set_name__ is looked up on the class instead of the instance.
Single var-positional argument of tuple subtype was passed unscathed to the
C-defined function. Now it is converted to exact tuple.
Fix incorrect type in complex(1.0, {2:3}) error message. Patch by Soumya
Sharma.
Fixed misleading error message when ImportError called with invalid keyword
args.
ImportError.__init__ now resets not specified attributes.
String constants now interned recursively in tuples and frozensets.
Fix crash when GC runs during weakref callbacks.
String constants with null character no longer interned.
Dict reduces possibility of 2nd conflict in hash table when hashes have same
lower bits.
Fixed possible crash when AST is changed in process of compiling it.
PyType_Ready() now checks that tp_name is not NULL. Original patch by Niklas
Koep.
Resolving special methods of uninitialized type now causes implicit
initialization of the type instead of a fail.
Creating instances of range_iterator by calling range_iterator type now is
disallowed. Calling iter() on range instance is the only way. Patch by Oren
Milman.
The type of long range iterator is now registered as Iterator. Patch by Oren
Milman.
Added sanity checks and tests for PyUnicode_CopyCharacters(). Patch by Xiang
Zhang.
Added C implementation of asyncio.Future. Original patch by Yury Selivanov.
Fixed possible memory leak in _PyTraceback_Add() and exception loss in
PyTraceBack_Here().
Improved exception reporting for problematic __set_name__ attributes.
Fixed of-by-one error in the peephole optimizer that caused keeping
unreachable code.
Fixed potential crash in PyUnicode_AsDecodedObject() in debug build.
dict.update() no longer allocate unnecessary large memory.
Deprecation warning for invalid str and byte escape sequences now prints
better information about where the error occurs. Patch by Serhiy Storchaka
and Eric Smith.
PyDict_SetDefault didn't combine split table when needed. Patch by Xiang
Zhang.
Optimize iterating split table values. Patch by Xiang Zhang.
Sped up converting int to float by reusing faster bits counting
implementation. Patch by Adrian Wielgosik.
Extra slash no longer added to sys.path components in case of empty compile-
time PYTHONPATH components.
Improve speed of the STORE_DEREF opcode by 40%.
Fixed crash in Py_DecodeLocale() in debug build on Mac OS X when decode
astral characters. Patch by Xiang Zhang.
Fix not getting the locale's charset upon initializing the interpreter, on
platforms that do not have langinfo.
Fix the set_inheritable() file descriptor method on platforms that do not
have the ioctl FIOCLEX and FIONCLEX commands.
The with-statement now checks for __enter__ before it checks for __exit__.
This gives less confusing error messages when both methods are missing.
Patch by Jonathan Ellington.
Show sys.version when -V option is supplied twice.
Optimize _PyDict_NewPresized() to create correct size dict. Improve speed of
dict literal with constant keys up to 30%.
Fix error position of the unicode error in ASCII and Latin1 encoders when a
string returned by the error handler contains multiple non-encodable
characters (non-ASCII for the ASCII codec, characters out of the
U+0000-U+00FF range for Latin1).
Fix a bug in the implementation ``yield from`` when checking if the next
instruction is YIELD_FROM. Regression introduced by WORDCODE (issue #26647).
More than 255 arguments can now be passed to a function.
Remove the ``PyEval_GetCallStats()`` function and deprecate the untested and
undocumented ``sys.callstats()`` function. Remove the ``CALL_PROFILE``
special build: use the :func:`sys.setprofile` function, :mod:`cProfile` or
:mod:`profile` to profile function calls.
Modifying the class __dict__ inside the __set_name__ method of a descriptor
that is used inside that class no longer prevents calling the __set_name__
method of other descriptors.
Rather than silently producing a class that doesn't support zero-argument
``super()`` in methods, failing to pass the new ``__classcell__`` namespace
entry up to ``type.__new__`` now results in a ``DeprecationWarning`` and a
class that supports zero-argument ``super()``.
Fix the cross compilation of xxlimited when Python has been built with
Py_DEBUG defined.
Fixed setting the offset attribute of SyntaxError by
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
f-string expressions are no longer accepted as docstrings and by
ast.literal_eval() even if they do not include expressions.
Fix a memory leak in split-table dictionaries: setattr() must not convert
combined table into split table. Patch written by INADA Naoki.
functools.lru_cache() was susceptible to an obscure reentrancy bug
triggerable by a monkey-patched len() function.
On Android, operating system data is now always encoded/decoded to/from
UTF-8, instead of the locale encoding to avoid inconsistencies with
os.fsencode() and os.fsdecode() which are already using UTF-8.
The preferred encoding is UTF-8 on Android. Patch written by Chi Hsuan Yen.
Python function can now have more than 255 parameters.
collections.namedtuple() now supports tuples with more than 255 elements.
Fixed bytes formatting of octals with zero padding in alternate form.
Correct the positioning of the syntax error caret for indented blocks.
Based on patch by Michael Layzell.
Do not include <sys/random.h> if it does not exist.
bytes.fromhex() and bytearray.fromhex() now ignore all ASCII whitespace, not
only spaces. Patch by Robert Xiao.
Call _PyObject_GC_TRACK() lazily when calling Python function. Calling
function is up to 5% faster.
Fix regression in bytes(x) when x.__index__() raises Exception.
Fix memory leak and use-after-free in os module (path_converter).
Fixed a crash when pass the iterable keyword argument to sorted().
Fixed possible BytesWarning when compare the code objects. Warnings could be
emitted at compile time.
Prevent RunMainFromImporter overwriting sys.path[0].
If max_line_length=None is specified while using the Compat32 policy, it is
no longer ignored. Patch by Mircea Cosbuc.
Improve from-import error message with location
Set the 'path' and 'name' attribute on ImportError for ``from ... import
...``.
Fixed use-after-free problem in key sharing dict.
Add ``docstring`` field to Module, ClassDef, FunctionDef, and
AsyncFunctionDef ast nodes. docstring is not first stmt in their body
anymore. It affects ``co_firstlineno`` and ``co_lnotab`` of code object for
module and class.
Fixed possibly dereferencing undefined pointers when creating weakref
objects.
Fix incorrect handling of signed zeros in complex constructor for complex
subclasses and for inputs having a __complex__ method. Patch by Serhiy
Storchaka.
Fix stack_effect computation for CALL_FUNCTION_EX. Patch by Matthieu
Dartiailh.
Support __rmod__ for subclasses of str being called before str.__mod__.
Patch by Martijn Pieters.
Fix minor regression of PyEval_CallObjectWithKeywords. It should raise
TypeError when kwargs is not a dict. But it might cause segv when args=NULL
and kwargs is not a dict.
Fixes to memory allocation in _PyCode_SetExtra. Patch by Brian Coleman.
``bool(range)`` works even if ``len(range)`` raises :exc:`OverflowError`.
Set correct __cause__ for errors about invalid awaitables returned from
__aiter__ and __anext__.
bool(), float(), list() and tuple() no longer take keyword arguments. The
first argument of int() can now be passes only as positional argument.
Fix a regression that bytes format may fail when containing zero bytes
inside.
Escaped percent "%%" in the format string for classic string formatting no
longer allows any characters between two percents.
The ``sys.path[0]`` initialization change for bpo-29139 caused a regression
by revealing an inconsistency in how sys.path is initialized when executing
``__main__`` from a zipfile, directory, or other import location. The
interpreter now consistently avoids ever adding the import location's parent
directory to ``sys.path``, and ensures no other ``sys.path`` entries are
inadvertently modified when inserting the import location named on the
command line.
Fix an oversight that %b format for bytes should support objects follow the
buffer protocol.
Fix a memory leak when an ImportError is raised during from import.
Show correct error messages when any of the pthread_* calls in
thread_pthread.h fails.
The deprecation warning is emitted if __complex__ returns an instance of a
strict subclass of complex. In a future versions of Python this can be an
error.
Add a unique ID to PyInterpreterState. This makes it easier to identify
each subinterpreter.
Fixed the slowing down to 25 times in the searching of some unlucky Unicode
characters.
Shift operation now has less opportunity to raise OverflowError. ValueError
always is raised rather than OverflowError for negative counts. Shifting
zero with non-negative count always returns zero.
Fixed error messages in the index() method of tuple, list and deque when
pass indices of wrong type.
Fix memory usage regression of set and frozenset object.
Fixed default implementations of __reduce__ and __reduce_ex__().
object.__reduce__() no longer takes arguments, object.__reduce_ex__() now
requires one argument.
README.rst is now included in the list of distutils standard READMEs and
therefore included in source distributions.
len() now raises ValueError rather than OverflowError if __len__() returned
a large negative integer.
sys.getsizeof() on a code object now returns the sizes which includes the
code struct and sizes of objects which it references. Patch by Dong-hee Na.
Circular imports involving absolute imports with binding a submodule to a
name are now supported.
``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than
``format(str(self), '')``.
If a KeyboardInterrupt happens when the interpreter is in the middle of
resuming a chain of nested 'yield from' or 'await' calls, it's now correctly
delivered to the innermost frame.
Fixed type.__setattr__() and type.__delattr__() for non-interned attribute
names. Based on patch by Eryk Sun.
Fixed various segfaults with dict when input collections are mutated during
searching, inserting or comparing. Based on patches by Duane Griffin and
Tim Mitchell.
Tokens needed for parsing in Python moved to C. ``COMMENT``, ``NL`` and
``ENCODING``. This way the tokens and tok_names in the token module don't
get changed when you import the tokenize module.
itertools.islice now accepts integer-like objects (having an __index__
method) as start, stop, and slice arguments
Allows setting cell values for __closure__. Patch by Lisa Roach.
Implement PEP 538 (legacy C locale coercion). This means that when a
suitable coercion target locale is available, both the core interpreter and
locale-aware C extensions will assume the use of UTF-8 as the default text
encoding, rather than ASCII.
The compiler now produces more optimal code for complex condition
expressions in the "if", "while" and "assert" statement, the "if"
expression, and generator expressions and comprehensions.
Removed a too-strict assertion that failed for certain f-strings, such as
eval("f'\\\n'") and eval("f'\\\r'").
``print`` now shows expected input in custom error message when used as a
Python 2 statement. Patch by Sanyam Khurana.
Move co_extra_freefuncs from per-thread to per-interpreter to avoid crashes.
The internal unicodedata database has been upgraded to Unicode 10.0.
Fixed a race condition when import a submodule from a package.
Make sure the 'Missing parentheses' syntax error message is only applied to
SyntaxError, not to subclasses. Patch by Martijn Pieters.
Avoid blocking in pthread_mutex_lock() when PyThread_acquire_lock() is asked
not to block.
Improve signal delivery.
Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-
unsafe functions. The tests I'm adding here fail without the rest of the
patch, on Linux and OS X. This means our signal delivery logic had defects
(some signals could be lost).
Relative import from unloaded package now reimports the package instead of
failing with SystemError. Relative import from non-package now fails with
ImportError rather than SystemError.
Use _Py_atomic API for concurrency-sensitive signal state.
str.format_map() now passes key lookup exceptions through.
Previously any exception was replaced with a KeyError exception.
Avoid masking original TypeError in call with * unpacking when other
arguments are passed.
Fix potential crash during GC caused by ``tp_dealloc`` which doesn't call
``PyObject_GC_UnTrack()``.
Add a non-dummy implementation of _Py_atomic_store and _Py_atomic_load on
MSVC.
``print`` now shows correct usage hint for using Python 2 redirection
syntax. Patch by Sanyam Khurana.
Fix a crash in some methods of `io.TextIOWrapper`, when the decoder's state
is invalid. Patch by Oren Milman.
Fix an assertion failure in the write() method of `io.TextIOWrapper`, when
the encoder doesn't return a bytes object. Patch by Oren Milman.
Fix an assertion failure in `zipimport.zipimporter.get_data` on Windows,
when the return value of ``pathname.replace('/','\\')`` isn't a string.
Patch by Oren Milman.
Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray
plans to remove the functions from sys/types.h.
Fix possible undefined behavior in _PyObject_FastCall_Prepend.
Consolidate CPython's global runtime state under a single struct. This
improves discoverability of the runtime state.
Location information (``lineno`` and ``col_offset``) in f-strings is now
(mostly) correct. This fixes tools like flake8 from showing warnings on the
wrong line (typically the first line of the file).
Fix several possible instances of undefined behavior due to floating-point
demotions.
For finer control of tracing behaviour when testing the interpreter, two new
frame attributes have been added to control the emission of particular trace
events: ``f_trace_lines`` (``True`` by default) to turn off per-line trace
events; and ``f_trace_opcodes`` (``False`` by default) to turn on per-opcode
trace events.
Raise a TypeError instead of SystemError in case warnings.onceregistry is
not a dictionary. Patch by Oren Milman.
Switch to the abstract API when dealing with ``PyInterpreterState.modules``.
This allows later support for all dict subclasses and other Mapping
implementations. Also add a ``PyImport_GetModule()`` function to reduce
a bunch of duplicated code.
Change direct usage of PyInterpreterState.modules to PyImport_GetModuleDict().
Also introduce more uniformity in other code that deals with sys.modules.
This helps reduce complications when working on sys.modules.
Fix assertion failures in case of a bad warnings.filters or
warnings.defaultaction. Patch by Oren Milman.
Fix an assertion failure in `PyErr_WriteUnraisable()` in case of an
exception with a bad ``__module__`` attribute. Patch by Oren Milman.
Fix an assertion failure in `subprocess.Popen()` on Windows, in case the env
argument has a bad keys() method. Patch by Oren Milman.
Fix an assertion failure in `ctypes` class definition, in case the class has
an attribute whose name is specified in ``_anonymous_`` but not in
``_fields_``. Patch by Oren Milman.
Documented command-line interface of zipfile.
The data model reference and the porting section in the 3.6 What's New guide
now cover the additional ``__classcell__`` handling needed for custom
metaclasses to fully support PEP 487 and zero-argument ``super()``.
Fix Python 2 syntax in code for building the documentation.
Add canonical header link on each page to corresponding major version of the
documentation. Patch by Matthias Bussonnier.
Document smtpd.py as effectively deprecated and add a pointer to aiosmtpd, a
third-party asyncio-based replacement.
Link the documentation to its source file on GitHub.
Improve the documentation for, and links to, template strings by emphasizing
their utility for internationalization, and by clarifying some usage
constraints. (See also: bpo-20314, bpo-12518)
Add missing info of code object in inspect documentation.
the link targets for :func:`bytes` and :func:`bytearray` are now their
respective type definitions, rather than the corresponding builtin function
entries. Use :ref:`bytes <func-bytes>` and :ref:`bytearray <func-bytearray>`
to reference the latter.
In order to ensure this and future cross-reference updates are applied
automatically, the daily documentation builds now disable the default output
caching features in Sphinx.
Add missing attribute related constants in curses documentation.
Clarify doc on truth value testing. Original patch by Peter Thomassen.
Allow the pydoc server to bind to arbitrary hostnames.
Add RFC 7525 and Mozilla server side TLS links to SSL documentation.
Fix incomplete code snippet in the ZeroMQSocketListener and
ZeroMQSocketHandler examples and adapt them to Python 3.
Add 10% to coverage of IDLE's test_configdialog. Update and augment
description of the configuration system.
IDLE colors f-string prefixes (but not invalid ur prefixes).
Add _utest option to textview; add new tests. Increase coverage to 100%.
Patches by Louie Lu and Terry Jan Reedy.
Help-about: use pep8 names and add tests. Increase coverage to 100%. Patches
by Louie Lu, Cheryl Sabella, and Terry Jan Reedy.
Add docstrings for textview.py and use PEP8 names. Patches by Cheryl Sabella
and Terry Jan Reedy.
Fix reference leaks in IDLE tests. Patches by Louie Lu and Terry Jan Reedy.
Add doc subsubsection about IDLE failure to start. Popup no-connection
message directs users to this section.
Fix several problems with IDLE's autocompletion box. The following should
now work: clicking on selection box items; using the scrollbar; selecting an
item by hitting Return. Hangs on MacOSX should no longer happen. Patch by
Louie Lu.
IDLE: Verify user-entered key sequences by trying to bind them with tk. Add
tests for all 3 validation functions. Original patch by G Polo. Tests added
by Cheryl Sabella.
Review and change idlelib.configdialog names.
Lowercase method and attribute names.
Replace 'colour' with 'color', expand overly cryptic names, delete unneeded underscores.
Replace ``import *`` with specific imports. Patches by Cheryl Sabella.
IDLE no longer deletes a character after commenting out a region by a key
shortcut. Add ``return 'break'`` for this and other potential conflicts
between IDLE and default key bindings.
IDLE's basic custom key entry dialog now detects duplicates properly.
Original patch by Saimadhav Heblikar.
IDLE: add docstrings to grep module. Patch by Cheryl Sabella
IDLE: Make several improvements to parenmatch. Add 'parens' style to
highlight both opener and closer. Make 'default' style, which is not
default, a synonym for 'opener'. Make time-delay work the same with all
styles. Add help for config dialog extensions tab, including help for
parenmatch. Add new tests. Original patch by Charles Wohlganger.
IDLE: Improve textview with docstrings, PEP8 names, and more tests. Patch by
Cheryl Sabella.
IDLE: configdialog - Add docstrings and fix comments. Patch by Cheryl
Sabella.
IDLE: Factor ConfigChanges class from configdialog, put in config; test. *
In config, put dump test code in a function; run it and unittest in 'if
__name__ == '__main__'. * Add class config.ConfigChanges based on
changes_class_v4.py on bpo issue. * Add class test_config.ChangesTest,
partly using configdialog_tests_v1.py. * Revise configdialog to use
ConfigChanges; see tracker msg297804. * Revise test_configdialog to match
configdialog changes. * Remove configdialog functions unused or moved to
ConfigChanges. Cheryl Sabella contributed parts of the patch.
IDLE: call config.IdleConf.GetUserCfgDir only once.
IDLE: In Settings dialog, select font with Up, Down keys as well as mouse.
Initial patch by Louie Lu.
IDLE: Remove unused variables in configdialog. One is a duplicate, one is
set but cannot be altered by users. Patch by Cheryl Sabella.
IDLE: Add docstrings to browser.py. Patch by Cheryl Sabella.
IDLE: Add tests for ConfigParser subclasses in config. Patch by Louie Lu.
IDLE: Document ConfigDialog tk Vars, methods, and widgets in docstrings This
will facilitate improving the dialog and splitting up the class. Original
patch by Cheryl Sabella.
Document coverage details for idlelib tests.
* Add section to idlelib/idle-test/README.txt.
* Include check that branches are taken both ways.
* Exclude IDLE-specific code that does not run during unit tests.
Add tests for idlelib.config.IdleConf.
Increase coverage from 46% to 96%.
Patch by Louie Lu.
IDLE: replace 'colour' with 'color' in configdialog.
IDLE - Improve configdialog font page and tests.
In configdialog: Document causal pathways in create_font_tab docstring. Simplify some attribute names. Move set_samples calls to var_changed_font (idea from Cheryl Sabella). Move related functions to positions after the create widgets function.
In test_configdialog: Fix test_font_set so not order dependent. Fix renamed test_indent_scale so it tests the widget. Adjust tests for movement of set_samples call. Add tests for load functions. Put all font tests in one class and tab indent tests in another. Except for two lines, these tests completely cover the related functions.
IDLE -- Factor a VarTrace class out of ConfigDialog.
Instance tracers manages pairs consisting of a tk variable and a
callback function. When tracing is turned on, setting the variable
calls the function. Test coverage for the new class is 100%.
IDLE - Finish rearranging methods of ConfigDialog Grouping methods
pertaining to each tab and the buttons will aid writing tests and improving
the tabs and will enable splitting the groups into classes.
IDLE - Use ttk widgets in ConfigDialog.
Patches by Terry Jan Reedy and Cheryl Sabella.
IDLE - Factor FontPage(Frame) class from ConfigDialog.
Slightly modified tests continue to pass. Fix General tests. Patch mostly by
Cheryl Sabella.
Factor GenPage(Frame) class from ConfigDialog. The slightly modified tests
continue to pass. Patch by Cheryl Sabella.
IDLE - Add an outline of a TabPage class in configdialog.
Update existing classes to match outline.
Initial patch by Cheryl Sabella.
IDLE: Calltips use `inspect.signature` instead of `inspect.getfullargspec`.
This improves calltips for builtins converted to use Argument Clinic.
Patch by Louie Lu.
Add tests for configdialog keys tab. Patch by Cheryl Sabella.
IDLE -- stop leaks in test_configdialog. Initial patch by Victor Stinner.
IDLE: Factor KeysPage(Frame) class from ConfigDialog. The slightly
modified tests continue to pass. Patch by Cheryl Sabella.
Add tests for configdialog highlight tab. Patch by Cheryl Sabella.
IDLE: Factor HighPage(Frame) class from ConfigDialog. Patch by Cheryl
Sabella.
Convert IDLE's built-in 'extensions' to regular features.
About 10 IDLE features were implemented as supposedly optional
extensions. Their different behavior could be confusing or worse for
users and not good for maintenance. Hence the conversion.
The main difference for users is that user configurable key bindings
for builtin features are now handled uniformly. Now, editing a binding
in a keyset only affects its value in the keyset. All bindings are
defined together in the system-specific default keysets in config-
extensions.def. All custom keysets are saved as a whole in config-
extension.cfg. All take effect as soon as one clicks Apply or Ok.
The affected events are '<<force-open-completions>>', '<<expand-word>>',
'<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>',
'<<run-module>>', '<<check-module>>', and '<<zoom-height>>'. Any
(global) customizations made before 3.6.3 will not affect their keyset-
specific customization after 3.6.3. and vice versa.
Inital patch by Charles Wohlganger.
IDLE - Do not modify tkinter.message in test_configdialog.
IDLE - Add docstrings and tests for outwin subclass of editor.
Move some data and functions from the class to module level. Patch by Cheryl
Sabella.
Rearrange IDLE condigdialog GenPage into Window, Editor, and Help sections.
IDLE -- fix tk entry box tests by deleting first. Adding to an int entry is
not the same as deleting and inserting because int('') will fail.
Document how IDLE runs tkinter programs. IDLE calls tcl/tk update in the
background in order to make live
interaction and experimentatin with tkinter applications much easier.
IDLE - make tests pass with zzdummy extension disabled by default.
IDLE - Improve rstrip entry in doc. Strip trailing whitespace strips more
than blank spaces. Multiline string literals are not skipped.
IDLE - Update non-key options in former extension classes. When applying
configdialog changes, call .reload for each feature class. Change ParenMatch
so updated options affect existing instances attached to existing editor
windows.
IDLE code context -- fix code update and font update timers.
Canceling timers prevents a warning message when test_idle completes.
path.resolve(strict=False) no longer cuts the path after the first element
not present in the filesystem. Patch by Antoine Pietri.
inspect.unwrap() will now only try to unwrap an object
sys.getrecursionlimit() times, to protect against objects which create a new
object on every attribute access.
ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract base classes to
use keyword parameters in __init_subclass__. Patch by Nate Soares.
Reading a corrupt config file left configparser in an invalid state.
Original patch by Florian Höch.
Remove UNIX socket from FS before binding. Patch by Коренберг Марк.
Fix asyncio to support formatting of non-python coroutines.
Deprecate passing asyncio.Handles to run_in_executor.
Speedup asyncio.StreamReader.readexactly. Patch by Коренберг Марк.
Raise RuntimeError when transport's FD is used with add_reader, add_writer,
etc.
Refuse monitoring processes if the child watcher has no loop attached. Patch
by Vincent Michel.
Remove vestigial MacOS 9 macurl2path module and its tests.
Fix selectors incorrectly retain invalid file descriptors. Patch by Mark
Williams.
Fix callbacks race in asyncio.SelectorLoop.sock_connect.
Fix slow pipes IO in asyncio. Patch by INADA Naoki.
Inspect functools.partial in asyncio.Handle.__repr__. Patch by iceboy.
Handle when SO_REUSEPORT isn't properly supported. Patch by Seth Michael
Larson.
Fix socket accept exhaustion during high TCP traffic. Patch by Kevin Conway.
Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp().
Fix a crash in parse_envlist() when env contains byte strings. Patch by Eryk
Sun.
Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by Gergely Imreh
and Markus Holtermann.
Get antigravity over HTTPS. Patch by Kaartic Sivaraam.
Prevent codecs.escape_encode() from raising SystemError when an empty
bytestring is passed.
Warning message emitted by using inline flags in the middle of regular
expression now contains a (truncated) regex pattern. Patch by Tim Graham.
Check for ERROR_ACCESS_DENIED in Windows implementation of os.stat(). Patch
by Eryk Sun.
Fix UnboundLocalError in socket._sendfile_use_sendfile.
RobotFileParser now correctly returns default values for crawl_delay and
request_rate. Initial patch by Peter Wirtz.
Fix memory leak on Windows in the os module (fix path_converter() function).
Fix a memory leak in os.getrandom() when the getrandom() is interrupted by a
signal and a signal handler raises a Python exception.
Allow falsy values to be used for msg parameter of subTest().
In the traceback module, restore the formatting of exception messages like
"Exception: None". This fixes a regression introduced in 3.5a2.
Fixed support of default root window in the tkinter.tix module. Added the
master parameter in the DisplayStyle constructor.
Fix invalid exception handling in Lib/ctypes/macholib/dyld.py. Patch by
Madison May.
random.choices() now has k as a keyword-only argument to improve the
readability of common cases and come into line with the signature used in
other languages.
Fixed possible crash in sqlite3.Connection.create_collation() if pass
invalid string-like object as a name. Patch by Xiang Zhang.
Fixed possible use after free in the decompress() methods of the
LZMADecompressor and BZ2Decompressor classes. Original patch by John Leitch.
Fixed calendar functions for extreme months: 0001-01 and 9999-12.
Methods itermonthdays() and itermonthdays2() are reimplemented so that they
don't call itermonthdates() which can cause datetime.date under/overflow.
Stop using localtime() and gmtime() in the time module.
Introduced platform independent _PyTime_localtime API that is similar to
POSIX localtime_r, but available on all platforms. Patch by Ed Schouten.
Fix function declaration (C flags) for the getiterator() method of
xml.etree.ElementTree.Element.
Fixed possible crashes when unpickle itertools objects from incorrect pickle
data. Based on patch by John Leitch.
Improved error message when passing a non-iterable as a var-positional
argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
Optimized merging var-keyword arguments and improved error message when
passing a non-mapping as a var-keyword argument.
Deprecated silent truncations in socket.htons and socket.ntohs. Original
patch by Oren Milman.
gzip now supports pathlib. Patch by Ethan Furman.
bz2 module now supports pathlib. Initial patch by Ethan Furman.
Fixed writing non-BMP characters with binary format in plistlib.
unittest.mock Mock autospec functions now properly support assert_called,
assert_not_called, and assert_called_once.
The disassembler now decodes FORMAT_VALUE argument.
Fixed bytes path support in os.scandir() on Windows. Patch by Eryk Sun.
Fix references leaked by pdb in the handling of SIGINT handlers.
Make webbrowser support Chrome on Mac OS X. Patch by Ned Batchelder.
Distutils.sdist now looks for README and setup.py files with case
sensitivity. This behavior matches that found in Setuptools 6.0 and later.
See `setuptools 100 <https://github.com/pypa/setuptools/issues/100>`_ for
rationale.
timeit autorange now uses a single loop iteration if the benchmark takes
less than 10 seconds, instead of 10 iterations. "python3 -m timeit -s
'import time' 'time.sleep(1)'" now takes 4 seconds instead of 40 seconds.
timeit now repeats the benchmarks 5 times instead of only 3 to make
benchmarks more reliable.
timeit: remove ``-c/--clock`` and ``-t/--time`` command line options which
were deprecated since Python 3.3.
Fix error building socket module when multithreading is disabled.
In the "io" module, the argument to BufferedReader and BytesIO's read1()
methods is now optional and can be -1, matching the BufferedIOBase
specification.
Fix C implemented asyncio.Future didn't work on Windows.
Optimize csv.DictWriter for large number of columns. Patch by Mariatta
Wijaya.
Command-line interface of the zipfile module now uses argparse. Added
support of long options.
timeit now uses the sequence 1, 2, 5, 10, 20, 50,... instead of 1, 10,
100,... for autoranging.
re.sub() now raises an error for invalid numerical group reference in
replacement template even if the pattern is not found in the string. Error
message for invalid group reference now includes the group index and the
position of the reference. Based on patch by SilentGhost.
shutil.make_archive() no longer adds entry "./" to ZIP archive.
Fixed HList.header_exists() in tkinter.tix module by addin a workaround to
Tix library bug.
Generated names for Tkinter widgets now start by the "!" prefix for
readability.
Fix iterator of C implemented asyncio.Future doesn't accept non-None value
is passed to it.send(val).
os.fwalk() no longer fails on broken links.
The textwrap.TextWrapper class now honors non-breaking spaces. Based on
patch by Kaarle Ritvanen.
calendar.TextCalendar.prmonth() no longer prints a space at the start of new
line after printing a month's calendar. Patch by Xiang Zhang.
calendar.TextCalendar.prweek() no longer prints a space after a weeks's
calendar. calendar.TextCalendar.pryear() no longer prints redundant newline
after a year's calendar. Based on patch by Xiang Zhang.
Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused by
representing the scale as float value internally in Tk. tkinter.IntVar now
works if float value is set to underlying Tk variable.
The webbrowser in an X environment now prefers using the default browser
directly. Also, the webbrowser register() function now has a documented
'preferred' argument, to specify browsers to be returned by get() with no
arguments. Patch by David Steele
The webbrowser module now supports Firefox 36+ and derived browsers. Based
on patch by Oleg Broytman.
tarfile.open() with mode "r" or "r:" now tries to open a tar file with
compression before trying to open it without compression. Otherwise it had
50% chance failed with ignore_zeros=True.
Fixed segfault in curses's addch() with ncurses6.
LZMA compressor and decompressor no longer raise exceptions if given empty
data twice. Patch by Benjamin Fogle.
Fixed possible crash in _io.TextIOWrapper deallocator when the garbage
collector is invoked in other thread. Based on patch by Sebastian Cufre.
Fixed possible DoS and arbitrary code execution when handle plural form
selections in the gettext module. The expression parser now supports exact
syntax supported by GNU gettext.
Makes Path.resolve() succeed on paths that do not exist. Patch by Vajrasky
Kok
In the "http.server" module, parse the protocol version if possible, to
avoid using HTTP 0.9 in some error responses.
In ctypes, prevent a crash calling the from_buffer() and from_buffer_copy()
methods on abstract classes like Array.
Remove the subprocess.Popen.wait endtime parameter. It was deprecated in
3.4 and undocumented prior to that.
Regular expression patterns, _sre.SRE_Pattern objects created by
re.compile(), become comparable (only x==y and x!=y operators). This change
should fix the issue #18383: don't duplicate warning filters when the
warnings module is reloaded (thing usually only done in unit tests).
Restored the __reduce__() methods of datetime objects.
Add new :data:`socket.TCP_CONGESTION` (Linux 2.6.13) and
:data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written by
Omar Sandoval.
Add sys.getandroidapilevel(): return the build time API version of Android
as an integer. Function only available on Android.
To assist with upgrades from 2.7, the previously documented deprecation of
``inspect.getfullargspec()`` has been reversed. This decision may be
revisited again after the Python 2.7 branch is no longer officially
supported.
Fix a regression introduced in warnings.catch_warnings(): call
warnings.showwarning() if it was overridden inside the context manager.
Unknown escapes consisting of ``'\'`` and an ASCII letter in re.sub()
replacement templates regular expressions now are errors.
dbm.dumb now supports reading read-only files and no longer writes the index
file when it is not changed. A deprecation warning is now emitted if the
index file is missed and recreated in the 'r' and 'w' modes (will be an
error in future Python releases).
The chown() method of the tarfile.TarFile class does not fail now when the
grp module cannot be imported, as for example on Android platforms.
multiprocessing.set_forkserver_preload() would crash the forkserver process
if a preloaded module instantiated some multiprocessing objects such as
locks.
subprocess.Popen uses /system/bin/sh on Android as the shell, instead of
/bin/sh.
Fixed a crash in resource.prlimit() when passing a sequence that doesn't own
its elements as limits.
Fix bugs in WeakValueDictionary.setdefault() and WeakValueDictionary.pop()
when a GC collection happens in another thread.
Fixed a crash when deallocate deep ElementTree.
old keys should not remove new values from WeakValueDictionary when
collecting from another thread.
curses.ascii predicates now work correctly with negative integers.
Fixed recursion errors in large or resized curses.textpad.Textbox. Based on
patch by Tycho Andersen.
Prevent infinite loop in pathlib.resolve() on Windows
Update authorizer constants in sqlite3 module. Patch by Dingyuan Wang.
inspect.getframeinfo() now correctly shows the first line of a context.
Patch by Sam Breese.
Fix unittest.mock._Call helper: don't ignore the name parameter anymore.
Patch written by Jiajun Huang.
In urllib.request, suffixes in no_proxy environment variable with leading
dots could match related hostnames again (e.g. .b.c matches a.b.c). Patch by
Milan Oberkirch.
The unittest.mock.sentinel attributes now preserve their identity when they
are copied or pickled.
Fixed race condition in C implementation of functools.lru_cache. KeyError
could be raised when cached function with full cache was simultaneously
called from differen threads with the same uncached arguments.
Removed support of deprecated undocumented keyword arguments in methods of
regular expression objects.
A format string argument for string.Formatter.format() is now positional-
only.
Removed deprecated features in the http.cookies module.
Fixed infinite recursion in the repr of uninitialized ctypes.CDLL instances.
Removed support of deprecated argument "exclude" in tarfile.TarFile.add().
Removed deprecated function ntpath.splitunc().
Fixed the comparison of mock.MagickMock with mock.ANY.
Fix a regression in argparse that help messages would wrap at non-breaking
spaces.
Fix subprocess.Popen.wait() when the child process has exited to a stopped
instead of terminated state (ex: when under ptrace).
The help of a builtin or extension class now includes the constructor
signature if __text_signature__ is provided for the class.
The extend() method is now called instead of the append() method when
unpickle collections.deque and other list-like objects. This can speed up
unpickling to 2 times.
Unused install_misc command is now removed. It has been documented as
unused since 2000. Patch by Eric N. Vander Weele.
Add WrapperDescriptorType, MethodWrapperType, and MethodDescriptorType
built-in types to types module. Original patch by Manuel Krebber.
Fixed out-of-bounds buffer access in the group() method of the match object.
Based on patch by WGH.
Prevent infinite loop in pathlib.Path.mkdir
Fix datetime.fromtimestamp() regression introduced in Python 3.6.0: check
minimum and maximum years.
Various updates to typing module: typing.Counter, typing.ChainMap, improved
ABC caching, etc. Original PRs by Jelle Zijlstra, Ivan Levkivskyi, Manuel
Krebber, and Łukasz Langa.
importlib.reload() now raises ModuleNotFoundError if the module lacks a
spec.
locale.format_string now supports the 'monetary' keyword argument, and
locale.format is deprecated.
Fixed different behaviour of Decimal.from_float() for _decimal and
_pydecimal. Thanks Andrew Nester.
Improve some deprecations in importlib. Some deprecated methods now emit
DeprecationWarnings and have better descriptive messages.
Add uuid.SafeUUID and uuid.UUID.is_safe to relay information from the
platform about whether generated UUIDs are generated with a multiprocessing
safe method.
Fix file object leak in aifc.open() when file is given as a filesystem path
and is not in valid AIFF format. Patch by Anthony Zhang.
Altering a kwarg dictionary passed to functools.partial() no longer affects
a partial object after creation.
urrlib.parse.quote is now based on RFC 3986 and hence includes '~' in the
set of characters that is not quoted by default. Patch by Christian Theune
and Ratnadeep Debnath.
get_extra_info() raises exception if get called on closed ssl transport.
Patch by Nikolay Kim.
Start a transaction implicitly before a DML statement. Patch by Aviv
Palivoda.
Add a test that checks that cwd parameter of Popen() accepts PathLike
objects. Patch by Sayan Chowdhury.
Fix assertion error in threading._DummyThread.is_alive().
Method register_function() of xmlrpc.server.SimpleXMLRPCDispatcher and its
subclasses can now be used as a decorator.
SimpleXMLRPCDispatcher no longer chains KeyError (or any other exception) to
exception(s) raised in the dispatched methods. Patch by Petr Motejlek.
Fix asyncio to support instantiation of new event loops in child processes.
Fix Task.current_task and Task.all_tasks implemented in C to accept None
argument as their pure Python implementation.
asyncio.subprocess.SubprocessStreamProtocol no longer closes before all
pipes are closed.
Fix out of bound iteration in asyncio.Future.remove_done_callback
implemented in C.
Migrate sqlite3 module to _v2 API. Patch by Aviv Palivoda.
Allow use of path-like object as a single argument in ConfigParser.read().
Patch by David Ellis.
Add new :data:`socket.TCP_NOTSENT_LOWAT` (Linux 3.12) constant. Patch by
Nathaniel J. Smith.
Added support for bytes paths in os.fwalk().
index() and count() methods of collections.abc.Sequence now check identity
before checking equality when do comparisons.
The zipfile module now accepts path-like objects for external paths.
Speed up importing the webbrowser module. webbrowser.register() is now
thread-safe.
Fix a bug that prevented array 'Q', 'L' and 'I' from accepting big intables
(objects that have __int__) as elements.
os.stat() and os.DirEntry.inode() now convert inode (st_ino) using unsigned
integers.
Use C library implementation for math functions erf() and erfc().
Using non-integer value for selecting a plural form in gettext is now
deprecated.
Fixed possible failing or crashing input() if attributes "encoding" or
"errors" of sys.stdin or sys.stdout are not set or are not strings.
Fix crashes in partial.__repr__ if the keys of partial.keywords are not
strings. Patch by Michael Seifert.
Fixed crashes in repr of recursive buffered file-like objects.
faulthandler: Restore the old sigaltstack during teardown. Patch by
Christophe Zeitouny.
The mode argument of os.makedirs() no longer affects the file permission
bits of newly-created intermediate-level directories.
Release references to tasks, their arguments and their results as soon as
they are finished in multiprocessing.Pool.
Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when the OS gives
priority to errors such as EACCES over EEXIST.
The zipapp module now supports general path-like objects, not just
pathlib.Path.
unittest.TestCase.assertRaises() now manually breaks a reference cycle to
not keep objects alive longer than expected.
Fixed a bug in pools in multiprocessing.pool that raising an exception at
the very first of an iterable may swallow the exception or make the program
hang. Patch by Davin Potts and Xiang Zhang.
Added support of file descriptors in os.scandir() on Unix. os.fwalk() is
sped up by 2 times by using os.scandir().
Fixed multiple crashes in ElementTree caused by race conditions and wrong
types.
Element.getiterator() and the html parameter of XMLParser() were deprecated
only in the documentation (since Python 3.2 and 3.4 correspondintly). Now
using them emits a deprecation warning.
Sped up reading encrypted ZIP files by 2 times.
Fix a crash in itertools.chain.from_iterable when encountering long runs of
empty iterables.
Fixed memory leaks in the replace() method of datetime and time objects when
pass out of bound fold argument.
Fixed comparison check for ipaddress.ip_interface objects. Patch by Sanjay
Sundaresan.
Support If-Modified-Since HTTP header (browser cache). Patch by Pierre
Quentel.
Improve struct.pack_into() exception messages for problems with the buffer
size and offset. Patch by Andrew Nester.
Add math.remainder operation, implementing remainder as specified in IEEE
754.
re.escape() now escapes only regex special characters.
Pickling and copying ImportError now preserves name and path attributes.
Allowed calling the close() method of the zip entry writer object multiple
times. Writing to a closed writer now always produces a ValueError.
Test that sqlite3 trace callback is not called multiple times when schema is
changing. Indirectly fixed by switching to use sqlite3_prepare_v2() in
bpo-9303. Patch by Aviv Palivoda.
Fixed arbitrary unchaining of RuntimeError exceptions in
contextlib.contextmanager. Patch by Siddharth Velankar.
Fixed race condition in pathlib mkdir with flags parents=True. Patch by
Armin Rigo.
_io._IOBase.readlines will check if it's closed first when hint is present.
Compiled regular expression and match objects in the re module now support
copy.copy() and copy.deepcopy() (they are considered atomic).
Fix PathLike support for shutil.unpack_archive. Patch by Jelle Zijlstra.
Fixed crashes in IOBase methods __next__() and readlines() when readline()
or __next__() respectively return non-sizeable object. Fixed possible other
errors caused by not checking results of PyObject_Size(), PySequence_Size(),
or PyMapping_Size().
Column widths in the output of dis.dis() are now adjusted for large line
numbers and instruction offsets.
Fixed leaks and crashes in errors handling in the parser module.
Preserve generator state when _random.Random.setstate() raises an exception.
Patch by Bryan Olson.
inspect.isabstract() now works during __init_subclass__. Patch by Nate
Soares.
unittest's assertAlmostEqual and assertNotAlmostEqual provide a better
message in case of failure which includes the difference between left and
right arguments. (patch by Giampaolo Rodola')
The seek() and tell() methods of io.FileIO now set the internal seekable
attribute to avoid one syscall on open() (in buffered or text mode).
Fix getsockname() for unbound AF_UNIX sockets on Linux.
Various updates to typing module: add typing.NoReturn type, use
WrapperDescriptorType, minor bug-fixes. Original PRs by Jim Fasarakis-
Hilliard and Ivan Levkivskyi.
binascii.b2a_uu() and uu.encode() now support using ``'`'`` as zero instead
of space.
Avoid KeyboardInterrupt tracebacks in forkserver helper process when Ctrl-C
is received.
Compiled regular expression objects with the re.LOCALE flag no longer depend
on the locale at compile time. Only the locale at matching time affects the
result of matching.
Removed the __init__ methods of _json's scanner and encoder. Misusing them
could cause memory leaks or crashes. Now scanner and encoder objects are
completely initialized in the __new__ methods.
rewrite cgi.parse_multipart, reusing the FieldStorage class and making its
results consistent with those of FieldStorage for multipart/form-data
requests. Patch by Pierre Quentel.
Fix range checking in GB18030 decoder. Original patch by Ma Lin.
Optimized case-insensitive matching and searching of regular expressions.
Weaken the condition of deprecation warnings for inline modifiers. Now
allowed several subsequential inline modifiers at the start of the pattern
(e.g. ``'(?i)(?s)...'``). In verbose mode whitespaces and comments now are
allowed before and between inline modifiers (e.g. ``'(?x) (?i) (?s)...'``).
Enhanced regular expressions optimization. This increased the performance of
matching some patterns up to 25 times.
contextlib.AbstractContextManager now supports anti-registration by setting
__enter__ = None or __exit__ = None, following the pattern introduced in
bpo-25958. Patch by Jelle Zijlstra.
Fixed ``Task.cancel()`` can be ignored when the task is running coroutine
and the coroutine returned without any more ``await``.
Compiling regular expression in debug mode on CPython now displays the
compiled bytecode in human readable form.
The :mod:`macpath` is now deprecated and will be removed in Python 3.8.
Removed previously deprecated in Python 2.4 classes Plist, Dict and
_InternalDict in the plistlib module. Dict values in the result of
functions readPlist() and readPlistFromBytes() are now normal dicts. You no
longer can use attribute access to access items of these dictionaries.
imaplib and poplib now catch the Windows socket WSAEINVAL error (code 10022)
on shutdown(SHUT_RDWR): An invalid operation was attempted. This error
occurs sometimes on SSL connections.
Warnings emitted when compile a regular expression now always point to the
line in the user code. Previously they could point into inners of the re
module if emitted from inside of groups or conditionals.
Fix AttributeError when using SimpleQueue.empty() under *spawn* and
*forkserver* start methods.
importlib.find_spec() raises ModuleNotFoundError instead of AttributeError
if the specified parent module is not a package (i.e. lacks a __path__
attribute).
inspect.signature() now supports callables with variable-argument parameters
wrapped with partialmethod. Patch by Dong-hee Na.
Fix handling escape characters in HZ codec. Based on patch by Ma Lin.
multiprocessing.Queue._feed background running thread do not break from main
loop on exception.
Deprecate invalid ctypes call protection on Windows. Patch by Mariatta
Wijaya.
Fix the problem that logging.handlers.SysLogHandler cannot handle IPv6
addresses.
Fix possible overflow when organize struct.pack_into error message. Patch
by Yuan Liu.
Add TextIOWrapper.reconfigure() and a TextIOWrapper.write_through attribute.
faulthandler now correctly filters and displays exception codes on Windows
Addded empty __slots__ to abc.ABC. This allows subclassers to deny __dict__
and __weakref__ creation. Patch by Aaron Hall.
On Windows, subprocess.Popen.communicate() now also ignore EINVAL on
stdin.write() if the child process is still running but closed the pipe.
modify() method of poll(), epoll() and devpoll() based classes of selectors
module is around 10% faster. Patch by Giampaolo Rodola'.
Fix waiter cancellation in asyncio.Lock. Patch by Mathieu Sornay.
Closing transport during handshake process leaks open socket. Patch by
Nikolay Kim
Fix ssl sockets leaks when connection is aborted in asyncio/ssl
implementation. Patch by Michaël Sghaïer.
re.compile() no longer raises a BytesWarning when compiling a bytes instance
with misplaced inline modifier. Patch by Roy Williams.
Updates to typing module: Add generic AsyncContextManager, add support for
ContextManager on all versions. Original PRs by Jelle Zijlstra and Ivan
Levkivskyi
multiprocessing.Queue.get() with a timeout now polls its reader in non-
blocking mode if it succeeded to acquire the lock but the acquire took
longer than the timeout.
selectors does not take KeyboardInterrupt and SystemExit into account,
leaving a fd in a bad state in case of error. Patch by Giampaolo Rodola'.
The dis.dis() function now is able to disassemble nested code objects.
Fix path calculation in `imp.load_package()`, fixing it for cases when a
package is only shipped with bytecodes. Patch by Alexandru Ardelean.
Don't log exceptions if Task/Future "cancel()" method was called.
The traceback no longer displayed for SystemExit raised in a callback
registered by atexit.
Fix multiprocessing.Process.exitcode to return the opposite of the signal
number when the process is killed by a signal (instead of 255) when using
the "forkserver" method.
Avoid race condition in multiprocessing cleanup.
pkgutil.walk_packages function now raises ValueError if *path* is a string.
Patch by Sanyam Khurana.
lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings.
Fix race condition between signal delivery and wakeup file descriptor.
Patch by Nathaniel Smith.
Functional API of enum allows to create empty enums. Patched by Dong-hee Na
Fixed the lgettext() family of functions in the gettext module. They now
always return bytes.
Fix concurrent.futures.thread.ThreadPoolExecutor threads to have a non
repr() based thread name by default when no thread_name_prefix is supplied.
They will now identify themselves as "ThreadPoolExecutor-y_n".
struct.Struct.format type is now :class:`str` instead of :class:`bytes`.
The description of a unittest subtest now preserves the order of keyword
arguments of TestCase.subTest().
Prohibited the '=' character in environment variable names in
``os.putenv()`` and ``os.spawn*()``.
os.listdir() and os.scandir() now emit bytes names when called with bytes-
like argument.
ftplib.FTP.putline() now throws ValueError on commands that contains CR or
LF. Patch by Dong-hee Na.
Fix a segmentation fault in _hashopenssl when standard hash functions
such as md5 are not available in the linked OpenSSL library. As in
some special FIPS-140 build environments.
Add a ``close()`` method to ``multiprocessing.Process``.
Fix email header value parser dropping folding white space in certain cases.
Add missing parameter "n" on multiprocessing.Condition.notify().
The doc claims multiprocessing.Condition behaves like threading.Condition,
but its notify() method lacked the optional "n" argument (to specify the
number of sleepers to wake up) that threading.Condition.notify() accepts.
Avoid importing ``sysconfig`` from ``site`` to improve startup speed. Python
startup is about 5% faster on Linux and 30% faster on macOS.
Fix bug when modifying os.environ while iterating over it
signal.setitimer() may disable the timer when passed a tiny value.
Tiny values (such as 1e-6) are valid non-zero values for setitimer(), which
is specified as taking microsecond-resolution intervals. However, on some
platform, our conversion routine could convert 1e-6 into a zero interval,
therefore disabling the timer instead of (re-)scheduling it.
Use keywords in the ``repr`` of ``datetime.timedelta``.
Fix out of bounds write in `asyncio.CFuture.remove_done_callback()`.
Added multiprocessing.Process.kill method to terminate using the SIGKILL
signal on Unix.
Fix segfault in readline when using readline's history-size option. Patch
by Nir Soffer.
Fix multiprocessing.Queue.join_thread(): it now waits until the thread
completes, even if the thread was started by the same process which created
the queue.
Change ``ttk.OptionMenu`` radiobuttons to be unique across instances of
``OptionMenu``.
Remove obsolete code in readline module for platforms where GNU readline is
older than 2.1 or where select() is not available.
Fix multiprocessing.sharedctypes to recognize typecodes ``'q'`` and ``'Q'``.
Fix decrementing a borrowed reference in tracemalloc.
Fix ``unittest.mock``'s autospec to not fail on method-bound builtin
functions. Patch by Aaron Gallagher.
Fix too many fds in processes started with the "forkserver" method.
A child process would inherit as many fds as the number of still-running
children.
Fix shared memory performance regression in multiprocessing in 3.x.
Shared memory used anonymous memory mappings in 2.x, while 3.x mmaps actual
files. Try to be careful to do as little disk I/O as possible.
Fix handling of long oids in ssl. Based on patch by Christian Heimes.
Added a ``setStream`` method to ``logging.StreamHandler`` to allow the
stream to be set after creation.
Added support for CAN ISO-TP protocol in the socket module.
``pathlib.Path`` objects now include an ``is_mount()`` method (only
implemented on POSIX). This is similar to ``os.path.ismount(p)``. Patch by
Cooper Ry Lees.
Allow `logging.config.fileConfig` to accept kwargs and/or args.
Fix `copyreg._slotnames()` mangled attribute calculation for classes whose
name begins with an underscore. Patch by Shane Harvey.
ttk: fix the destroy() method of LabeledScale and OptionMenu classes.
Call the parent destroy() method even if the used attribute doesn't
exist. The LabeledScale.destroy() method now also explicitly clears label and
scale attributes to help the garbage collector to destroy all widgets.
Optimize array.array comparison. It is now from 10x up to 70x faster when
comparing arrays holding values of the same integer type.
\ No newline at end of file
Add an ``include_file`` parameter to ``zipapp.create_archive()``
socketserver.ForkingMixIn.server_close() now waits until all child processes
completed to prevent leaking zombie processes.
Fixed miscellaneous errors in asyncio speedup module.
There are a number of uninformative asserts in the `multiprocessing` module,
as noted in issue 5001. This change fixes two of the most potentially
problematic ones, since they are in error-reporting code, in the
`multiprocessing.managers.convert_to_error` function. (It also makes more
informative a ValueError message.) The only potentially problematic change
is that the AssertionError is now a TypeError; however, this should also
help distinguish it from an AssertionError being *reported* by the
function/its caller (such as in issue 31169). - Patch by Allen W. Smith
(drallensmith on github).
`dis` now works with asynchronous generator and coroutine objects. Patch by
George Collins based on diagnosis by Luciano Ramalho.
Non-daemonic threads created by a multiprocessing.Process are now joined on
child exit.
The ssl and hashlib modules now call OPENSSL_add_all_algorithms_noconf() on
OpenSSL < 1.1.0. The function detects CPU features and enables optimizations
on some CPU architectures such as POWER8. Patch is based on research from
Gustavo Serra Scalet.
Many asserts in `multiprocessing` are now more informative, and some error types have been changed to more specific ones.
pydoc: the stop() method of the private ServerThread class now waits until
DocServer.serve_until_quit() completes and then explicitly sets its
docserver attribute to None to break a reference cycle.
configparser: reading defaults in the ``ConfigParser()`` constructor is now
using ``read_dict()``, making its behavior consistent with the rest of the
parser. Non-string keys and values in the defaults dictionary are now being
implicitly converted to strings. Patch by James Tocknell.
xmlrpc.server now explicitly breaks reference cycles when using
sys.exc_info() in code handling exceptions.
concurrent.futures: WorkItem.run() used by ThreadPoolExecutor now breaks a
reference cycle between an exception object and the WorkItem object.
Update some methods in the _pyio module to also accept integer types. Patch
by Oren Milman.
The subprocess module now sets the filename when FileNotFoundError
is raised on POSIX systems due to the executable or cwd not being found.
``AF_VSOCK`` has been added to the socket interface which allows
communication between virtual machines and their host.
Fix ctypes producing wrong PEP 3118 type codes for integer types.
Fix ``fileinput.FileInput(files, inplace=True)`` when ``files`` contain
``pathlib.Path`` objects.
The ``map()`` and ``as_completed()`` iterators in ``concurrent.futures``
now avoid keeping a reference to yielded objects.
\ No newline at end of file
concurrent.futures.ProcessPoolExecutor.shutdown() now explicitly closes the
call queue. Moreover, shutdown(wait=True) now also join the call queue
thread, to prevent leaking a dangling thread.
``string.Template`` subclasses can optionally define ``braceidpattern`` if
they want to specify different placeholder patterns inside and outside the
braces. If None (the default) it falls back to ``idpattern``.
expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of partial
characters for UTF-8 input (libexpat bug 115):
https://github.com/libexpat/libexpat/issues/115
Micro-optimize :func:`asyncio._get_running_loop` to become up to 10% faster.
Fix string concatenation bug in rare error path in the subprocess module
A new function ``argparse.ArgumentParser.parse_intermixed_args`` provides the
ability to parse command lines where there user intermixes options and
positional arguments.
SSLSocket.sendall() now uses memoryview to create slices of data. This fixes
support for all bytes-like object. It is also more efficient and avoids
costly copies.
The SSL module now raises SSLCertVerificationError when OpenSSL fails to
verify the peer's certificate. The exception contains more information about
the error.
ssl.SSLContext() now uses OpenSSL error information when a context cannot be
instantiated.
Make return types of SSLContext.wrap_bio() and SSLContext.wrap_socket()
customizable.
Improves SSL error handling to avoid losing error numbers.
Changed the implementation strategy for collections.namedtuple() to
substantially reduce the use of exec() in favor of precomputed methods. As a
result, the *verbose* parameter and *_source* attribute are no longer
supported. The benefits include 1) having a smaller memory footprint for
applications using multiple named tuples, 2) faster creation of the named
tuple class (approx 4x to 6x depending on how it is measured), and 3) minor
speed-ups for instance creation using __new__, _make, and _replace. (The
primary patch contributor is Jelle Zijlstra with further improvements by
INADA Naoki, Serhiy Storchaka, and Raymond Hettinger.)
socketserver.ThreadingMixIn now keeps a list of non-daemonic threads to wait
until all these threads complete in server_close().
SSLContext.check_hostname now automatically sets SSLContext.verify_mode to
ssl.CERT_REQUIRED instead of failing with a ValueError.
socket.create_connection() now fixes manually a reference cycle: clear the
variable storing the last exception on success.
The C accelerator module of ElementTree ignored exceptions raised when
looking up TreeBuilder target methods in XMLParser().
Speed improvements to the ``typing`` module. Original PRs by Ivan
Levkivskyi and Mitar.
typing.get_type_hints now finds the right globalns for classes and modules
by default (when no ``globalns`` was specified by the caller).
``random.seed()`` now works with bytes in version=1
xml.etree: Fix a crash when a parser is part of a reference cycle.
.. original section: Library
Update expat copy from 2.1.1 to 2.2.0 to get fixes of CVE-2016-0718 and
CVE-2016-4472. See https://sourceforge.net/p/expat/bugs/537/ for more
information.
.. original section: Library
Fix urllib.parse.splithost() to correctly parse fragments. For example,
``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the
``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an
authentification (``login@host``).
.. original section: Library
Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple security
vulnerabilities including: CVE-2017-9233 (External entity infinite loop
DoS), CVE-2016-9063 (Integer overflow, re-fix), CVE-2016-0718 (Fix
regression bugs from 2.2.0's fix to CVE-2016-0718) and CVE-2012-0876
(Counter hash flooding with SipHash). Note: the CVE-2016-5300 (Use os-
specific entropy sources like getrandom) doesn't impact Python, since Python
already gets entropy from the OS to set the expat secret using
``XML_SetHashSalt()``.
.. original section: Library
Prevent environment variables injection in subprocess on Windows. Prevent
passing other environment variables and command arguments.
Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to get security
fixes.
Add fuzz tests for float(str), int(str), unicode(str); for oss-fuzz.
SSLObject.version() now correctly returns None when handshake over BIO has
not been performed yet.
Add the support.setswitchinterval() function to fix test_functools hanging
on the Android armv7 qemu emulator.
Adds _testconsole module to test console input.
regrtest: fix the parser of command line arguments.
Fix test_posix for Android where 'id -G' is entirely wrong or missing the
effective gid.
Various caches now are cleared before running every test file.
Now test.support.rmtree is able to remove unwritable or unreadable
directories.
Fix the test_socket failures on Android - getservbyname(), getservbyport()
and getaddrinfo() are broken on some Android API levels.
Fix the tests that bind() a unix socket and raise PermissionError on Android
for a non-root user.
Disallow -j0 to be combined with -T/-l in regrtest command line arguments.
Use proper command line parsing in _testembed
Enhanced functions swap_attr() and swap_item() in the test.support module.
They now work when delete replaced attribute or item inside the with
statement. The old value of the attribute or item (or None if it doesn't
exist) now will be assigned to the target of the "as" clause, if there is
one.
test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid random
side effects on following tests. Initial patch written by Grzegorz Grzywacz.
Add the `set_nomemory(start, stop)` and `remove_mem_hooks()` functions to
the _testcapi module.
regrtest: Exclude tzdata from regrtest --all. When running the test suite
using --use=all / -u all, exclude tzdata since it makes test_datetime too
slow (15-20 min on some buildbots) which then times out on some buildbots.
Fix also regrtest command line parser to allow passing -u extralargefile to
run test_zipfile64.
Address ALPN callback changes for OpenSSL 1.1.0f. The latest version behaves
like OpenSSL 1.0.2 and no longer aborts handshake.
Prefer PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER protocols for SSLContext.
test.support.HOST is now "localhost", a new HOSTv4 constant has been added
for your ``127.0.0.1`` needs, similar to the existing HOSTv6 constant.
The zipfile module CLI now prints usage to stderr. Patch by Stephen J.
Turnbull.
The pybench and pystone microbenchmark have been removed from Tools. Please
use the new Python benchmark suite https://github.com/python/performance
which is more reliable and includes a portable version of pybench working on
Python 2 and Python 3.
Fix python-gdb.py didn't support new dict implementation.
python-gdb.py now supports also ``method-wrapper`` (``wrapperobject``)
objects.
Argument Clinic now uses the converter `bool(accept={int})` rather than
`int` for semantical booleans. This avoids repeating the default value for
Python and C and will help in converting to `bool` in future.
Added the slice index converter in Argument Clinic.
gdb integration commands (py-bt, etc.) work on optimized shared builds now,
too. PEP 523 introduced _PyEval_EvalFrameDefault which inlines
PyEval_EvalFrameEx on non-debug shared builds. This broke the ability to
use py-bt, py-up, and a few other Python-specific gdb integrations. The
problem is fixed by only looking for _PyEval_EvalFrameDefault frames in
python-gdb.py. Original patch by Bruno "Polaco" Penteado.
Windows ._pth file should allow import site
_PyIO_get_console_type fails for various paths
WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle
WindowsConsoleIO readall() fails if first line starts with Ctrl+Z
launcher.msi has different product codes between 32-bit and 64-bit
Improvements to help manuals on Windows.
Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk Sun)
Adds signed catalog files for stdlib on Windows.
Fixes mishandled buffer reallocation in getpathp.c
Deprecate WindowsRegistryFinder and disable it by default
winreg does not truncate string correctly (Patch by Eryk Sun)
The build process on Windows no longer depends on Subversion, instead
pulling external code from GitHub via a Python script. If Python 3.6 is not
found on the system (via ``py -3.6``), NuGet is used to download a copy of
32-bit Python.
Fix socket deprecation warnings in socketmodule.c. Patch by Segev Finer.
Adds list options (-0, -0p) to py.exe launcher. Contributed by Steve Barnes.
Allow requiring 64-bit interpreters from py.exe using -64 suffix. Contributed
by Steve (Gadget) Barnes.
Add a missing xmlns to python.manifest so that it matches the schema.
Pre-build OpenSSL, Tcl and Tk and include the binaries in the build.
os.cpu_count() now returns the correct number of processors on Windows
when the number of logical processors is greater than 64.
Change to building with MSVC v141 (included with Visual Studio 2017)
zlib is no longer bundled in the CPython source, instead it is downloaded on
demand just like bz2, lzma, OpenSSL, Tcl/Tk, and SQLite.
Adds detection of Visual Studio 2017 to distutils on Windows.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment