Python 3.10.0a6

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz9yiRbEEPPKl+Xhl/+h0BBaL2EcFAmA9GvwACgkQ/+h0BBaL
 2EdANQ//ZXng28iguSWtQl3g9jMaxGHsau/yLgCoGte5gTgnmYfMJW4mL9kH0oKP
 ich0LgZKnyaqhYrW+ynVU4x3LFNm/TbDl0KCumz1bZ5f7ejvEVX7cEPZmyMh3jxc
 GmlnGHrUvlrfsi1ggtzt4neSwgu6/hzR9BkH8j61mC4gE3XdsfuxEOoBQmh2zL2X
 CzZqORBSiddwpheUO81DdxePsJKceJ7LR0N6iIlz1TFuDMnwdOnTjP5eqptzuhYt
 fIbYK7QhzMTX3yC3bIQW/0P4G6vr8osIH+0YG6MXWrWKfhdfSb1ZsDEBNuQVGBeQ
 2ENzsA+SMSOS91gSduAo+CKIJeXZHoAaobbW8/aeZpArVweG8vIeIJDWhmJBMaYr
 Y2cRMAeJ+DrASgFojOc75EW9zAdAFN4CWNIF1Sxna4x0r+0gBtHI/VT9aA73Dw35
 Cb8IdbCtvCY7OQtj06kHLeA4Ze2/kmybPC3UvLHZnbSa7j18X3tAOKa/w+btERxd
 d0sCx2cJ6rha+1VOb1ZzPp3x6k3oEGt1M+4ypcs8MiE2UcjJr0UvJp5/TXZ7JJni
 IyQt4NWJVdR6/GzlKRCUYp1QlIMgoNlM3wLtATHZA81Lhcq92b4UWM8Q651Bwykg
 iqQurUneHICUX15MSMJmCwOXkiJEeeVsoQ4Fw3J3AHo57U0YeMo=
 =t2wD
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz9yiRbEEPPKl+Xhl/+h0BBaL2EcFAmA9Q30ACgkQ/+h0BBaL
 2EfGRQ//YHzcSwr5J6N1kQwbMBvUAkCt26hz1jhSSXfXL8DP5ybK3apAlhaoqH5u
 NKJgARnwf5dwzl7PQ9ifkWmiRfj3/XHR8n551oJBoa6w9enxlWtJFqtrreGa2UD7
 jj3uRuetQUlxHn2E4mpmkY/4x//WfpyZrX2xwH6bd5H+9egty7gSbcxmc10ocG7D
 4xiAa6zv917BK3B3eieimcYGgvgchsWmhBh5CuC/wTxFt4mV5REgQ34xHqcTukXx
 34SVtLcJbkaQzqJgzUd48IVS11peUjxNQ0L4WsP8meadKrZDhu4rwj9PTjtkmn5K
 dhbQbvV5G9lYnelnnliRlJ6HIunED9XE1Sb4cUWpIYGZUMT1ez48ts/+vas3Db3Q
 FRL0EL0IzaNG7elbnM9oozZmCvr9VK485RX92lsE0e6Sub/EsdH0ota/pEpShgbz
 dE06U96HlGyqkl5/D7QK/wNiZ8eHVCs+smvZTvCaGyGopmpluWrl3GiBxUe8f4C4
 fICD9tUYsNKoK9iLtgXga4Ym+eriCm0SjtLxN5F4BaRnJtHaTZKA4LnNkOtwKqG1
 kwvchmpGyOSitXuc1eYYJA59GgRvAs0WiCNpSR6yKLpMu5G+xrO0gu524xWIGFGx
 Iib+mxXzjJZGGg4scYGkd51Bi9PbH8DvujUtqJo4rZZ3vNitgV8=
 =1XC3
 -----END PGP SIGNATURE-----

Merge tag 'v3.10.0a6'

Python 3.10.0a6
This commit is contained in:
Pablo Galindo 2021-03-01 19:41:45 +00:00
commit 4b7f4ff168
57 changed files with 8657 additions and 5144 deletions

View File

@ -365,4 +365,3 @@ whatsnew/changelog,,::,default::DeprecationWarning
library/importlib.metadata,,:main,"EntryPoint(name='wheel', value='wheel.cli:main', group='console_scripts')"
library/importlib.metadata,,`,loading the metadata for packages for the indicated ``context``.
library/re,,`,"`"
library/dis,,:TOS1,TOS[x:TOS1 - 1 - y]

Can't render this file because it contains an unexpected character in line 344 and column 55.

View File

@ -20,10 +20,10 @@
#define PY_MINOR_VERSION 10
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
#define PY_RELEASE_SERIAL 5
#define PY_RELEASE_SERIAL 6
/* Version as a string */
#define PY_VERSION "3.10.0a5+"
#define PY_VERSION "3.10.0a6"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Autogenerated by Sphinx on Tue Feb 2 20:44:10 2021
# Autogenerated by Sphinx on Mon Mar 1 16:48:51 2021
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
@ -2183,6 +2183,7 @@ topics = {'assert': 'The "assert" statement\n'
' | for_stmt\n'
' | try_stmt\n'
' | with_stmt\n'
' | match_stmt\n'
' | funcdef\n'
' | classdef\n'
' | async_with_stmt\n'
@ -2681,6 +2682,737 @@ topics = {'assert': 'The "assert" statement\n'
' statement.\n'
'\n'
'\n'
'The "match" statement\n'
'=====================\n'
'\n'
'New in version 3.10.\n'
'\n'
'The match statement is used for pattern matching. Syntax:\n'
'\n'
' match_stmt ::= \'match\' subject_expr ":" NEWLINE INDENT '
'case_block+ DEDENT\n'
' subject_expr ::= star_named_expression "," '
'star_named_expressions?\n'
' | named_expression\n'
" case_block ::= 'case' patterns [guard] ':' block\n"
'\n'
'Note:\n'
'\n'
' This section uses single quotes to denote soft keywords.\n'
'\n'
'Pattern matching takes a pattern as input (following "case") and '
'a\n'
'subject value (following "match"). The pattern (which may '
'contain\n'
'subpatterns) is matched against the subject value. The outcomes '
'are:\n'
'\n'
'* A match success or failure (also termed a pattern success or\n'
' failure).\n'
'\n'
'* Possible binding of matched values to a name. The '
'prerequisites for\n'
' this are further discussed below.\n'
'\n'
'The "match" and "case" keywords are soft keywords.\n'
'\n'
'See also:\n'
'\n'
' * **PEP 634** Structural Pattern Matching: Specification\n'
'\n'
' * **PEP 636** Structural Pattern Matching: Tutorial\n'
'\n'
'\n'
'Overview\n'
'--------\n'
'\n'
'Heres an overview of the logical flow of a match statement:\n'
'\n'
'1. The subject expression "subject_expr" is evaluated and a '
'resulting\n'
' subject value obtained. If the subject expression contains a '
'comma,\n'
' a tuple is constructed using the standard rules.\n'
'\n'
'2. Each pattern in a "case_block" is attempted to match with '
'the\n'
' subject value. The specific rules for success or failure are\n'
' described below. The match attempt can also bind some or all '
'of the\n'
' standalone names within the pattern. The precise pattern '
'binding\n'
' rules vary per pattern type and are specified below. **Name\n'
' bindings made during a successful pattern match outlive the\n'
' executed block and can be used after the match statement**.\n'
'\n'
' Note:\n'
'\n'
' During failed pattern matches, some subpatterns may '
'succeed.\n'
' Do not rely on bindings being made for a failed match.\n'
' Conversely, do not rely on variables remaining unchanged '
'after\n'
' a failed match. The exact behavior is dependent on\n'
' implementation and may vary. This is an intentional '
'decision\n'
' made to allow different implementations to add '
'optimizations.\n'
'\n'
'3. If the pattern succeeds, the corresponding guard (if present) '
'is\n'
' evaluated. In this case all name bindings are guaranteed to '
'have\n'
' happened.\n'
'\n'
' * If the guard evaluates as truthy or missing, the "block" '
'inside\n'
' "case_block" is executed.\n'
'\n'
' * Otherwise, the next "case_block" is attempted as described '
'above.\n'
'\n'
' * If there are no further case blocks, the match statement '
'is\n'
' completed.\n'
'\n'
'Note:\n'
'\n'
' Users should generally never rely on a pattern being '
'evaluated.\n'
' Depending on implementation, the interpreter may cache values '
'or use\n'
' other optimizations which skip repeated evaluations.\n'
'\n'
'A sample match statement:\n'
'\n'
' >>> flag = False\n'
' >>> match (100, 200):\n'
' ... case (100, 300): # Mismatch: 200 != 300\n'
" ... print('Case 1')\n"
' ... case (100, 200) if flag: # Successful match, but '
'guard fails\n'
" ... print('Case 2')\n"
' ... case (100, y): # Matches and binds y to 200\n'
" ... print(f'Case 3, y: {y}')\n"
' ... case _: # Pattern not attempted\n'
" ... print('Case 4, I match anything!')\n"
' ...\n'
' Case 3, y: 200\n'
'\n'
'In this case, "if flag" is a guard. Read more about that in the '
'next\n'
'section.\n'
'\n'
'\n'
'Guards\n'
'------\n'
'\n'
' guard ::= "if" named_expression\n'
'\n'
'A "guard" (which is part of the "case") must succeed for code '
'inside\n'
'the "case" block to execute. It takes the form: "if" followed '
'by an\n'
'expression.\n'
'\n'
'The logical flow of a "case" block with a "guard" follows:\n'
'\n'
'1. Check that the pattern in the "case" block succeeded. If '
'the\n'
' pattern failed, the "guard" is not evaluated and the next '
'"case"\n'
' block is checked.\n'
'\n'
'2. If the pattern succeeded, evaluate the "guard".\n'
'\n'
' * If the "guard" condition evaluates to “truthy”, the case '
'block is\n'
' selected.\n'
'\n'
' * If the "guard" condition evaluates to “falsy”, the case '
'block is\n'
' not selected.\n'
'\n'
' * If the "guard" raises an exception during evaluation, the\n'
' exception bubbles up.\n'
'\n'
'Guards are allowed to have side effects as they are '
'expressions.\n'
'Guard evaluation must proceed from the first to the last case '
'block,\n'
'one at a time, skipping case blocks whose pattern(s) dont all\n'
'succeed. (I.e., guard evaluation must happen in order.) Guard\n'
'evaluation must stop once a case block is selected.\n'
'\n'
'\n'
'Irrefutable Case Blocks\n'
'-----------------------\n'
'\n'
'An irrefutable case block is a match-all case block. A match\n'
'statement may have at most one irrefutable case block, and it '
'must be\n'
'last.\n'
'\n'
'A case block is considered irrefutable if it has no guard and '
'its\n'
'pattern is irrefutable. A pattern is considered irrefutable if '
'we can\n'
'prove from its syntax alone that it will always succeed. Only '
'the\n'
'following patterns are irrefutable:\n'
'\n'
'* AS Patterns whose left-hand side is irrefutable\n'
'\n'
'* OR Patterns containing at least one irrefutable pattern\n'
'\n'
'* Capture Patterns\n'
'\n'
'* Wildcard Patterns\n'
'\n'
'* parenthesized irrefutable patterns\n'
'\n'
'\n'
'Patterns\n'
'--------\n'
'\n'
'Note:\n'
'\n'
' This section uses grammar notations beyond standard EBNF:\n'
'\n'
' * the notation "SEP.RULE+" is shorthand for "RULE (SEP '
'RULE)*"\n'
'\n'
' * the notation "!RULE" is shorthand for a negative lookahead\n'
' assertion\n'
'\n'
'The top-level syntax for "patterns" is:\n'
'\n'
' patterns ::= open_sequence_pattern | pattern\n'
' pattern ::= as_pattern | or_pattern\n'
' closed_pattern ::= | literal_pattern\n'
' | capture_pattern\n'
' | wildcard_pattern\n'
' | value_pattern\n'
' | group_pattern\n'
' | sequence_pattern\n'
' | mapping_pattern\n'
' | class_pattern\n'
'\n'
'The descriptions below will include a description “in simple '
'terms” of\n'
'what a pattern does for illustration purposes (credits to '
'Raymond\n'
'Hettinger for a document that inspired most of the '
'descriptions). Note\n'
'that these descriptions are purely for illustration purposes and '
'**may\n'
'not** reflect the underlying implementation. Furthermore, they '
'do not\n'
'cover all valid forms.\n'
'\n'
'\n'
'OR Patterns\n'
'~~~~~~~~~~~\n'
'\n'
'An OR pattern is two or more patterns separated by vertical bars '
'"|".\n'
'Syntax:\n'
'\n'
' or_pattern ::= "|".closed_pattern+\n'
'\n'
'Only the final subpattern may be irrefutable, and each '
'subpattern must\n'
'bind the same set of names to avoid ambiguity.\n'
'\n'
'An OR pattern matches each of its subpatterns in turn to the '
'subject\n'
'value, until one succeeds. The OR pattern is then considered\n'
'successful. Otherwise, if none of the subpatterns succeed, the '
'OR\n'
'pattern fails.\n'
'\n'
'In simple terms, "P1 | P2 | ..." will try to match "P1", if it '
'fails\n'
'it will try to match "P2", succeeding immediately if any '
'succeeds,\n'
'failing otherwise.\n'
'\n'
'\n'
'AS Patterns\n'
'~~~~~~~~~~~\n'
'\n'
'An AS pattern matches an OR pattern on the left of the "as" '
'keyword\n'
'against a subject. Syntax:\n'
'\n'
' as_pattern ::= or_pattern "as" capture_pattern\n'
'\n'
'If the OR pattern fails, the AS pattern fails. Otherwise, the '
'AS\n'
'pattern binds the subject to the name on the right of the as '
'keyword\n'
'and succeeds. "capture_pattern" cannot be a a "_".\n'
'\n'
'In simple terms "P as NAME" will match with "P", and on success '
'it\n'
'will set "NAME = <subject>".\n'
'\n'
'\n'
'Literal Patterns\n'
'~~~~~~~~~~~~~~~~\n'
'\n'
'A literal pattern corresponds to most literals in Python. '
'Syntax:\n'
'\n'
' literal_pattern ::= signed_number\n'
' | signed_number "+" NUMBER\n'
' | signed_number "-" NUMBER\n'
' | strings\n'
' | "None"\n'
' | "True"\n'
' | "False"\n'
' | signed_number: NUMBER | "-" NUMBER\n'
'\n'
'The rule "strings" and the token "NUMBER" are defined in the '
'standard\n'
'Python grammar. Triple-quoted strings are supported. Raw '
'strings and\n'
'byte strings are supported. Formatted string literals are not\n'
'supported.\n'
'\n'
'The forms "signed_number \'+\' NUMBER" and "signed_number \'-\' '
'NUMBER"\n'
'are for expressing complex numbers; they require a real number '
'on the\n'
'left and an imaginary number on the right. E.g. "3 + 4j".\n'
'\n'
'In simple terms, "LITERAL" will succeed only if "<subject> ==\n'
'LITERAL". For the singletons "None", "True" and "False", the '
'"is"\n'
'operator is used.\n'
'\n'
'\n'
'Capture Patterns\n'
'~~~~~~~~~~~~~~~~\n'
'\n'
'A capture pattern binds the subject value to a name. Syntax:\n'
'\n'
" capture_pattern ::= !'_' NAME\n"
'\n'
'A single underscore "_" is not a capture pattern (this is what '
'"!\'_\'"\n'
'expresses). And is instead treated as a "wildcard_pattern".\n'
'\n'
'In a given pattern, a given name can only be bound once. E.g. '
'"case\n'
'x, x: ..." is invalid while "case [x] | x: ..." is allowed.\n'
'\n'
'Capture patterns always succeed. The binding follows scoping '
'rules\n'
'established by the assignment expression operator in **PEP '
'572**; the\n'
'name becomes a local variable in the closest containing function '
'scope\n'
'unless theres an applicable "global" or "nonlocal" statement.\n'
'\n'
'In simple terms "NAME" will always succeed and it will set "NAME '
'=\n'
'<subject>".\n'
'\n'
'\n'
'Wildcard Patterns\n'
'~~~~~~~~~~~~~~~~~\n'
'\n'
'A wildcard pattern always succeeds (matches anything) and binds '
'no\n'
'name. Syntax:\n'
'\n'
" wildcard_pattern ::= '_'\n"
'\n'
'"_" is a soft keyword.\n'
'\n'
'In simple terms, "_" will always succeed.\n'
'\n'
'\n'
'Value Patterns\n'
'~~~~~~~~~~~~~~\n'
'\n'
'A value pattern represents a named value in Python. Syntax:\n'
'\n'
' value_pattern ::= attr\n'
' attr ::= name_or_attr "." NAME\n'
' name_or_attr ::= attr | NAME\n'
'\n'
'The dotted name in the pattern is looked up using standard '
'Python name\n'
'resolution rules. The pattern succeeds if the value found '
'compares\n'
'equal to the subject value (using the "==" equality operator).\n'
'\n'
'In simple terms "NAME1.NAME2" will succeed only if "<subject> '
'==\n'
'NAME1.NAME2"\n'
'\n'
'Note:\n'
'\n'
' If the same value occurs multiple times in the same match '
'statement,\n'
' the interpreter may cache the first value found and reuse it '
'rather\n'
' than repeat the same lookup. This cache is strictly tied to a '
'given\n'
' execution of a given match statement.\n'
'\n'
'\n'
'Group Patterns\n'
'~~~~~~~~~~~~~~\n'
'\n'
'A group pattern allows users to add parentheses around patterns '
'to\n'
'emphasize the intended grouping. Otherwise, it has no '
'additional\n'
'syntax. Syntax:\n'
'\n'
" group_pattern ::= '(' pattern ')'\n"
'\n'
'In simple terms "(P)" has the same effect as "P".\n'
'\n'
'\n'
'Sequence Patterns\n'
'~~~~~~~~~~~~~~~~~\n'
'\n'
'A sequence pattern contains several subpatterns to be matched '
'against\n'
'sequence elements. The syntax is similar to the unpacking of a '
'list or\n'
'tuple.\n'
'\n'
' sequence_pattern ::= "[" [maybe_sequence_pattern] "]"\n'
' | "(" [open_sequence_pattern] ")"\n'
' open_sequence_pattern ::= maybe_star_pattern "," '
'[maybe_sequence_pattern]\n'
' maybe_sequence_pattern ::= ",".maybe_star_pattern+ ","?\n'
' maybe_star_pattern ::= star_pattern | pattern\n'
' star_pattern ::= "*" (capture_pattern | '
'wildcard_pattern)\n'
'\n'
'There is no difference if parentheses or square brackets are '
'used for\n'
'sequence patterns (i.e. "(...)" vs "[...]" ).\n'
'\n'
'Note:\n'
'\n'
' A single pattern enclosed in parentheses without a trailing '
'comma\n'
' (e.g. "(3 | 4)") is a group pattern. While a single pattern '
'enclosed\n'
' in square brackets (e.g. "[3 | 4]") is still a sequence '
'pattern.\n'
'\n'
'At most one star subpattern may be in a sequence pattern. The '
'star\n'
'subpattern may occur in any position. If no star subpattern is\n'
'present, the sequence pattern is a fixed-length sequence '
'pattern;\n'
'otherwise it is a variable-length sequence pattern.\n'
'\n'
'The following is the logical flow for matching a sequence '
'pattern\n'
'against a subject value:\n'
'\n'
'1. If the subject value is not an instance of a\n'
' "collections.abc.Sequence" the sequence pattern fails.\n'
'\n'
'2. If the subject value is an instance of "str", "bytes" or\n'
' "bytearray" the sequence pattern fails.\n'
'\n'
'3. The subsequent steps depend on whether the sequence pattern '
'is\n'
' fixed or variable-length.\n'
'\n'
' If the sequence pattern is fixed-length:\n'
'\n'
' 1. If the length of the subject sequence is not equal to the '
'number\n'
' of subpatterns, the sequence pattern fails\n'
'\n'
' 2. Subpatterns in the sequence pattern are matched to their\n'
' corresponding items in the subject sequence from left to '
'right.\n'
' Matching stops as soon as a subpattern fails. If all\n'
' subpatterns succeed in matching their corresponding item, '
'the\n'
' sequence pattern succeeds.\n'
'\n'
' Otherwise, if the sequence pattern is variable-length:\n'
'\n'
' 1. If the length of the subject sequence is less than the '
'number of\n'
' non-star subpatterns, the sequence pattern fails.\n'
'\n'
' 2. The leading non-star subpatterns are matched to their\n'
' corresponding items as for fixed-length sequences.\n'
'\n'
' 3. If the previous step succeeds, the star subpattern matches '
'a\n'
' list formed of the remaining subject items, excluding the\n'
' remaining items corresponding to non-star subpatterns '
'following\n'
' the star subpattern.\n'
'\n'
' 4. Remaining non-star subpatterns are matched to their\n'
' corresponding subject items, as for a fixed-length '
'sequence.\n'
'\n'
' Note:\n'
'\n'
' The length of the subject sequence is obtained via "len()" '
'(i.e.\n'
' via the "__len__()" protocol). This length may be cached '
'by the\n'
' interpreter in a similar manner as value patterns.\n'
'\n'
'In simple terms "[P1, P2, P3,"", P<N>]" matches only if all '
'the\n'
'following happens:\n'
'\n'
'* "isinstance(<subject>, collections.abc.Sequence)"\n'
'\n'
'* "len(subject) == <N>"\n'
'\n'
'* "P1" matches "<subject>[0]" (note that this match can also '
'bind\n'
' names)\n'
'\n'
'* "P2" matches "<subject>[1]" (note that this match can also '
'bind\n'
' names)\n'
'\n'
'* … and so on for the corresponding pattern/element.\n'
'\n'
'\n'
'Mapping Patterns\n'
'~~~~~~~~~~~~~~~~\n'
'\n'
'A mapping pattern contains one or more key-value patterns. The '
'syntax\n'
'is similar to the construction of a dictionary. Syntax:\n'
'\n'
' mapping_pattern ::= "{" [items_pattern] "}"\n'
' items_pattern ::= ",".key_value_pattern+ ","?\n'
' key_value_pattern ::= (literal_pattern | value_pattern) ":" '
'pattern\n'
' | double_star_pattern\n'
' double_star_pattern ::= "**" capture_pattern\n'
'\n'
'At most one double star pattern may be in a mapping pattern. '
'The\n'
'double star pattern must be the last subpattern in the mapping\n'
'pattern.\n'
'\n'
'Duplicate key values in mapping patterns are disallowed. (If all '
'key\n'
'patterns are literal patterns this is considered a syntax '
'error;\n'
'otherwise this is a runtime error and will raise "ValueError".)\n'
'\n'
'The following is the logical flow for matching a mapping '
'pattern\n'
'against a subject value:\n'
'\n'
'1. If the subject value is not an instance of\n'
' "collections.abc.Mapping", the mapping pattern fails.\n'
'\n'
'2. If every key given in the mapping pattern is present in the '
'subject\n'
' mapping, and the pattern for each key matches the '
'corresponding\n'
' item of the subject mapping, the mapping pattern succeeds.\n'
'\n'
'3. If duplicate keys are detected in the mapping pattern, the '
'pattern\n'
' is considered invalid and "ValueError" is raised.\n'
'\n'
'Note:\n'
'\n'
' Key-value pairs are matched using the two-argument form of '
'the\n'
' mapping subjects "get()" method. Matched key-value pairs '
'must\n'
' already be present in the mapping, and not created on-the-fly '
'via\n'
' "__missing__()" or "__getitem__()".\n'
'\n'
'In simple terms "{KEY1: P1, KEY2: P2, ... }" matches only if all '
'the\n'
'following happens:\n'
'\n'
'* "isinstance(<subject>, collections.abc.Mapping)"\n'
'\n'
'* "KEY1 in <subject>"\n'
'\n'
'* "P1" matches "<subject>[KEY1]"\n'
'\n'
'* … and so on for the corresponding KEY/pattern pair.\n'
'\n'
'\n'
'Class Patterns\n'
'~~~~~~~~~~~~~~\n'
'\n'
'A class pattern represents a class and its positional and '
'keyword\n'
'arguments (if any). Syntax:\n'
'\n'
' class_pattern ::= name_or_attr "(" [pattern_arguments '
'","?] ")"\n'
' pattern_arguments ::= positional_patterns ["," '
'keyword_patterns]\n'
' | keyword_patterns\n'
' positional_patterns ::= ",".pattern+\n'
' keyword_patterns ::= ",".keyword_pattern+\n'
' keyword_pattern ::= NAME "=" pattern\n'
'\n'
'The same keyword should not be repeated in class patterns.\n'
'\n'
'The following is the logical flow for matching a mapping '
'pattern\n'
'against a subject value:\n'
'\n'
'1. If "name_or_attr" is not an instance of the builtin "type" , '
'raise\n'
' "TypeError".\n'
'\n'
'2. If the subject value is not an instance of "name_or_attr" '
'(tested\n'
' via "isinstance()"), the class pattern fails.\n'
'\n'
'3. If no pattern arguments are present, the pattern succeeds.\n'
' Otherwise, the subsequent steps depend on whether keyword or\n'
' positional argument patterns are present.\n'
'\n'
' For a number of built-in types (specified below), a single\n'
' positional subpattern is accepted which will match the '
'entire\n'
' subject; for these types no keyword patterns are accepted.\n'
'\n'
' If only keyword patterns are present, they are processed as\n'
' follows, one by one:\n'
'\n'
' I. The keyword is looked up as an attribute on the subject.\n'
'\n'
' * If this raises an exception other than "AttributeError", '
'the\n'
' exception bubbles up.\n'
'\n'
' * If this raises "AttributeError", the class pattern has '
'failed.\n'
'\n'
' * Else, the subpattern associated with the keyword pattern '
'is\n'
' matched against the subjects attribute value. If this '
'fails,\n'
' the class pattern fails; if this succeeds, the match '
'proceeds\n'
' to the next keyword.\n'
'\n'
' II. If all keyword patterns succeed, the class pattern '
'succeeds.\n'
'\n'
' If any positional patterns are present, they are converted '
'to\n'
' keyword patterns using the "__match_args__" attribute on the '
'class\n'
' "name_or_attr" before matching:\n'
'\n'
' I. The equivalent of "getattr(cls, "__match_args__", ()))" '
'is\n'
' called.\n'
'\n'
' * If this raises an exception, the exception bubbles up.\n'
'\n'
' * If the returned value is not a list or tuple, the '
'conversion\n'
' fails and "TypeError" is raised.\n'
'\n'
' * If there are more positional patterns than\n'
' "len(cls.__match_args__)", "TypeError" is raised.\n'
'\n'
' * Otherwise, positional pattern "i" is converted to a '
'keyword\n'
' pattern using "__match_args__[i]" as the keyword.\n'
' "__match_args__[i]" must be a string; if not "TypeError" '
'is\n'
' raised.\n'
'\n'
' * If there are duplicate keywords, "TypeError" is raised.\n'
'\n'
' See also:\n'
'\n'
' Customizing positional arguments in class pattern '
'matching\n'
'\n'
' II. Once all positional patterns have been converted to '
'keyword\n'
' patterns,\n'
' the match proceeds as if there were only keyword '
'patterns.\n'
'\n'
' For the following built-in types the handling of positional\n'
' subpatterns is different:\n'
'\n'
' * "bool"\n'
'\n'
' * "bytearray"\n'
'\n'
' * "bytes"\n'
'\n'
' * "dict"\n'
'\n'
' * "float"\n'
'\n'
' * "frozenset"\n'
'\n'
' * "int"\n'
'\n'
' * "list"\n'
'\n'
' * "set"\n'
'\n'
' * "str"\n'
'\n'
' * "tuple"\n'
'\n'
' These classes accept a single positional argument, and the '
'pattern\n'
' there is matched against the whole object rather than an '
'attribute.\n'
' For example "int(0|1)" matches the value "0", but not the '
'values\n'
' "0.0" or "False".\n'
'\n'
'In simple terms "CLS(P1, attr=P2)" matches only if the '
'following\n'
'happens:\n'
'\n'
'* "isinstance(<subject>, CLS)"\n'
'\n'
'* convert "P1" to a keyword pattern using "CLS.__match_args__"\n'
'\n'
'* For each keyword argument "attr=P2":\n'
' * "hasattr(<subject>, "attr")"\n'
'\n'
' * "P2" matches "<subject>.attr"\n'
'\n'
'* … and so on for the corresponding keyword argument/pattern '
'pair.\n'
'\n'
'See also:\n'
'\n'
' * **PEP 634** Structural Pattern Matching: Specification\n'
'\n'
' * **PEP 636** Structural Pattern Matching: Tutorial\n'
'\n'
'\n'
'Function definitions\n'
'====================\n'
'\n'
@ -6197,6 +6929,28 @@ topics = {'assert': 'The "assert" statement\n'
' async elif if or yield\n'
'\n'
'\n'
'Soft Keywords\n'
'=============\n'
'\n'
'New in version 3.10.\n'
'\n'
'Some identifiers are only reserved under specific contexts. '
'These are\n'
'known as *soft keywords*. The identifiers "match", "case" '
'and "_" can\n'
'syntactically act as keywords in contexts related to the '
'pattern\n'
'matching statement, but this distinction is done at the '
'parser level,\n'
'not when tokenizing.\n'
'\n'
'As soft keywords, their use with pattern matching is possible '
'while\n'
'still preserving compatibility with existing code that uses '
'"match",\n'
'"case" and "_" as identifier names.\n'
'\n'
'\n'
'Reserved classes of identifiers\n'
'===============================\n'
'\n'
@ -9907,6 +10661,52 @@ topics = {'assert': 'The "assert" statement\n'
' statement.\n'
'\n'
'\n'
'Customizing positional arguments in class pattern matching\n'
'==========================================================\n'
'\n'
'When using a class name in a pattern, positional arguments '
'in the\n'
'pattern are not allowed by default, i.e. "case MyClass(x, '
'y)" is\n'
'typically invalid without special support in "MyClass". To '
'be able to\n'
'use that kind of patterns, the class needs to define a\n'
'*__match_args__* attribute.\n'
'\n'
'object.__match_args__\n'
'\n'
' This class variable can be assigned a tuple or list of '
'strings.\n'
' When this class is used in a class pattern with '
'positional\n'
' arguments, each positional argument will be converted '
'into a\n'
' keyword argument, using the corresponding value in '
'*__match_args__*\n'
' as the keyword. The absence of this attribute is '
'equivalent to\n'
' setting it to "()".\n'
'\n'
'For example, if "MyClass.__match_args__" is "("left", '
'"center",\n'
'"right")" that means that "case MyClass(x, y)" is equivalent '
'to "case\n'
'MyClass(left=x, center=y)". Note that the number of '
'arguments in the\n'
'pattern must be smaller than or equal to the number of '
'elements in\n'
'*__match_args__*; if it is larger, the pattern match attempt '
'will\n'
'raise a "TypeError".\n'
'\n'
'New in version 3.10.\n'
'\n'
'See also:\n'
'\n'
' **PEP 634** - Structural Pattern Matching\n'
' The specification for the Python "match" statement.\n'
'\n'
'\n'
'Special method lookup\n'
'=====================\n'
'\n'

538
Misc/NEWS.d/3.10.0a6.rst Normal file
View File

@ -0,0 +1,538 @@
.. bpo: 42967
.. date: 2021-02-14-15-59-16
.. nonce: YApqDS
.. release date: 2021-03-01
.. section: Security
Fix web cache poisoning vulnerability by defaulting the query args separator
to ``&``, and allowing the user to choose a custom separator.
..
.. bpo: 43321
.. date: 2021-02-26-13-17-52
.. nonce: TCS3ph
.. section: Core and Builtins
Fix ``SystemError`` raised when ``PyArg_Parse*()`` is used with ``#`` but
without ``PY_SSIZE_T_CLEAN`` defined.
..
.. bpo: 36346
.. date: 2021-02-22-19-00-00
.. nonce: uAoni0
.. section: Core and Builtins
``PyArg_Parse*()`` functions now emits ``DeprecationWarning`` when ``u`` or
``Z`` format is used. See :pep:`623` for detail.
..
.. bpo: 43277
.. date: 2021-02-20-16-50-22
.. nonce: FXkRXk
.. section: Core and Builtins
Add a new :c:func:`PySet_CheckExact` function to the C-API to check if an
object is an instance of :class:`set` but not an instance of a subtype.
Patch by Pablo Galindo.
..
.. bpo: 42990
.. date: 2021-02-18-15-12-30
.. nonce: toAqBH
.. section: Core and Builtins
The :data:`types.FunctionType` constructor now inherits the current builtins
if the *globals* dictionary has no ``"__builtins__"`` key, rather than using
``{"None": None}`` as builtins: same behavior as :func:`eval` and
:func:`exec` functions. Defining a function with ``def function(...): ...``
in Python is not affected, globals cannot be overriden with this syntax: it
also inherits the current builtins. Patch by Victor Stinner.
..
.. bpo: 42990
.. date: 2021-02-17-19-02-21
.. nonce: SKXHiI
.. section: Core and Builtins
Functions have a new ``__builtins__`` attribute which is used to look for
builtin symbols when a function is executed, instead of looking into
``__globals__['__builtins__']``. Patch by Mark Shannon and Victor Stinner.
..
.. bpo: 43149
.. date: 2021-02-07-03-27-14
.. nonce: 0umPKD
.. section: Core and Builtins
Improve the error message in the parser for exception groups without
parentheses. Patch by Pablo Galindo.
..
.. bpo: 43121
.. date: 2021-02-03-22-33-05
.. nonce: jqcViq
.. section: Core and Builtins
Fixed an incorrect :exc:`SyntaxError` message for missing comma in literals.
Patch by Pablo Galindo.
..
.. bpo: 42819
.. date: 2021-01-04-23-54-34
.. nonce: 4KO6wU
.. section: Core and Builtins
:mod:`readline`: Explicitly disable bracketed paste in the interactive
interpreter, even if it's set in the inputrc, is enabled by default (eg GNU
Readline 8.1), or a user calls ``readline.read_init_file()``. The Python
REPL has not implemented bracketed paste support. Also, bracketed mode
writes the ``"\x1b[?2004h"`` escape sequence into stdout which causes test
failures in applications that don't support it. It can still be explicitly
enabled by calling ``readline.parse_and_bind("set enable-bracketed-paste
on")``. Patch by Dustin Rodrigues.
..
.. bpo: 42808
.. date: 2021-01-02-05-10-58
.. nonce: AOxgxl
.. section: Core and Builtins
Simple calls to ``type(object)`` are now faster due to the ``vectorcall``
calling convention. Patch by Dennis Sweeney.
..
.. bpo: 42217
.. date: 2020-10-31-16-54-00
.. nonce: GdcHe5
.. section: Core and Builtins
Make the compiler merges same co_code and co_linetable objects in a module
like already did for co_consts.
..
.. bpo: 41972
.. date: 2020-10-23-23-17-23
.. nonce: kbAwg4
.. section: Core and Builtins
Substring search functions such as ``str1 in str2`` and ``str2.find(str1)``
now sometimes use the "Two-Way" string comparison algorithm to avoid
quadratic behavior on long strings.
..
.. bpo: 42128
.. date: 2020-10-23-08-54-04
.. nonce: SWmVEm
.. section: Core and Builtins
Implement :pep:`634` (structural pattern matching). Patch by Brandt Bucher.
..
.. bpo: 40692
.. date: 2020-05-19-22-10-05
.. nonce: ajEhrR
.. section: Core and Builtins
In the :class:`concurrent.futures.ProcessPoolExecutor`, validate that
:func:`multiprocess.synchronize` is available on a given platform and rely
on that check in the :mod:`concurrent.futures` test suite so we can run
tests that are unrelated to :class:`ProcessPoolExecutor` on those platforms.
..
.. bpo: 38302
.. date: 2019-09-28-12-23-23
.. nonce: hsCNgX
.. section: Core and Builtins
If :func:`object.__ipow__` returns :const:`NotImplemented`, the operator
will correctly fall back to :func:`object.__pow__` and
:func:`object.__rpow__` as expected.
..
.. bpo: 43316
.. date: 2021-02-25-09-44-36
.. nonce: k9Gyqn
.. section: Library
The ``python -m gzip`` command line application now properly fails when
detecting an unsupported extension. It exits with a non-zero exit code and
prints an error message to stderr.
..
.. bpo: 43317
.. date: 2021-02-25-09-08-55
.. nonce: qrOOpB
.. section: Library
Set the chunk size for the ``gzip`` module main function to
io.DEFAULT_BUFFER_SIZE. This is slightly faster than the 1024 bytes constant
that was used previously.
..
.. bpo: 43146
.. date: 2021-02-23-17-20-16
.. nonce: JAFplg
.. section: Library
Handle None in single-arg versions of :func:`~traceback.print_exception` and
:func:`~traceback.format_exception`.
..
.. bpo: 43260
.. date: 2021-02-20-12-15-29
.. nonce: 6znAas
.. section: Library
Fix TextIOWrapper can not flush internal buffer forever after very large
text is written.
..
.. bpo: 43258
.. date: 2021-02-18-23-30-52
.. nonce: LeU-q8
.. section: Library
Prevent needless allocation of :mod:`sqlite3` aggregate function context
when no rows match an aggregate query. Patch by Erlend E. Aasland.
..
.. bpo: 43251
.. date: 2021-02-18-14-24-42
.. nonce: n6WZDw
.. section: Library
Improve :mod:`sqlite3` error handling: ``sqlite3_column_name()`` failures
now result in :exc:`MemoryError`. Patch by Erlend E. Aasland.
..
.. bpo: 40956
.. date: 2021-02-10-23-29-50
.. nonce: LcAbwG
.. section: Library
Fix segfault in :meth:`sqlite3.Connection.backup` if no argument was
provided. The regression was introduced by GH-23838. Patch by Erlend E.
Aasland.
..
.. bpo: 43172
.. date: 2021-02-10-06-00-53
.. nonce: ZMCJni
.. section: Library
The readline module now passes its tests when built directly against
libedit. Existing irreconcilable API differences remain in
:func:`readline.get_begidx` and :func:`readline.get_endidx` behavior based
on libreadline vs libedit use.
..
.. bpo: 43163
.. date: 2021-02-08-21-13-51
.. nonce: E2MgzH
.. section: Library
Fix a bug in :mod:`codeop` that was causing it to not ask for more input
when multi-line snippets have unclosed parentheses. Patch by Pablo Galindo
..
.. bpo: 43162
.. date: 2021-02-08-16-27-00
.. nonce: t-W7h3
.. section: Library
deprecate unsupported ability to access enum members as attributes of other
enum members
..
.. bpo: 43146
.. date: 2021-02-06-21-21-35
.. nonce: MHtb2v
.. section: Library
Fix recent regression in None argument handling in :mod:`~traceback` module
functions.
..
.. bpo: 43102
.. date: 2021-02-03-22-55-27
.. nonce: TSlZ6J
.. section: Library
The namedtuple __new__ method had its __builtins__ set to None instead of an
actual dictionary. This created problems for introspection tools.
..
.. bpo: 43106
.. date: 2021-02-03-17-06-38
.. nonce: SwcSuU
.. section: Library
Added :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK` and
:data:`~os.O_NOFOLLOW_ANY` for macOS. Patch by Dong-hee Na.
..
.. bpo: 42960
.. date: 2021-01-18-21-07-20
.. nonce: a7Dote
.. section: Library
Adds :data:`resource.RLIMIT_KQUEUES` constant from FreeBSD to the
:mod:`resource` module.
..
.. bpo: 42151
.. date: 2020-10-26-18-01-09
.. nonce: et5f7s
.. section: Library
Make the pure Python implementation of :mod:`xml.etree.ElementTree` behave
the same as the C implementation (:mod:`_elementree`) regarding default
attribute values (by not setting ``specified_attributes=1``).
..
.. bpo: 29753
.. date: 2020-05-02-01-01-30
.. nonce: n2M-AF
.. section: Library
In ctypes, now packed bitfields are calculated properly and the first item
of packed bitfields is now shrank correctly.
..
.. bpo: 27646
.. date: 2021-02-20-00-09-13
.. nonce: HRsmo-
.. section: Documentation
Clarify that 'yield from <expr>' works with any iterable, not just
iterators.
..
.. bpo: 36346
.. date: 2020-06-15-10-45-45
.. nonce: H0sS_i
.. section: Documentation
Update some deprecated unicode APIs which are documented as "will be removed
in 4.0" to "3.12". See :pep:`623` for detail.
..
.. bpo: 43288
.. date: 2021-02-21-11-11-53
.. nonce: LfTvL-
.. section: Tests
Fix test_importlib to correctly skip Unicode file tests if the fileystem
does not support them.
..
.. bpo: 43174
.. date: 2021-02-10-14-11-53
.. nonce: F9zwXQ
.. section: Build
Windows build now uses ``/utf-8`` compiler option.
..
.. bpo: 43103
.. date: 2021-02-02-16-26-44
.. nonce: VWeyP_
.. section: Build
Add a new configure ``--without-static-libpython`` option to not build the
``libpythonMAJOR.MINOR.a`` static library and not install the ``python.o``
object file.
..
.. bpo: 13501
.. date: 2021-01-10-22-25-23
.. nonce: g4L-6R
.. section: Build
The configure script can now use *libedit* instead of *readline* with the
command line option ``--with-readline=editline``.
..
.. bpo: 42603
.. date: 2020-12-08-19-25-20
.. nonce: mXs2dB
.. section: Build
Make configure script use pkg-config to detect the location of Tcl/Tk
headers and libraries, used to build tkinter.
On macOS, a Tcl/Tk configuration provided by pkg-config will be preferred
over Tcl/Tk frameworks installed in ``/{System/,}Library/Frameworks``. If
both exist and the latter is preferred, the appropriate ``--with-tcltk-*``
configuration options need to be explicitly set.
..
.. bpo: 39448
.. date: 2020-01-24-12-54-22
.. nonce: k4pv14
.. section: Build
Add the "regen-frozen" makefile target that regenerates the code for the
frozen ``__hello__`` module.
..
.. bpo: 43155
.. date: 2021-02-10-04-16-51
.. nonce: O1tURk
.. section: Windows
:c:func:`PyCMethod_New` is now present in ``python3.lib``.
..
.. bpo: 41837
.. date: 2021-02-28-22-49-46
.. nonce: 9fqyXC
.. section: macOS
Update macOS installer build to use OpenSSL 1.1.1j.
..
.. bpo: 43283
.. date: 2021-02-21-16-30-10
.. nonce: DLBwYn
.. section: IDLE
Document why printing to IDLE's Shell is often slower than printing to a
system terminal and that it can be made faster by pre-formatting a single
string before printing.
..
.. bpo: 43278
.. date: 2021-02-21-15-30-38
.. nonce: DMPaWH
.. section: C API
Always put compiler and system information on the first line of the REPL
welcome message.
..
.. bpo: 43270
.. date: 2021-02-19-14-28-26
.. nonce: UKx4XN
.. section: C API
Remove the private ``_PyErr_OCCURRED()`` macro: use the public
:c:func:`PyErr_Occurred` function instead.
..
.. bpo: 35134
.. date: 2021-02-18-18-46-42
.. nonce: dFpEDT
.. section: C API
Move odictobject.h, parser_interface.h, picklebufobject.h, pydebug.h, and
pyfpe.h into the cpython/ directory. They must not be included directly, as
they are already included by Python.h: :ref:`Include Files <api-includes>`.
..
.. bpo: 35134
.. date: 2021-02-17-18-51-26
.. nonce: YoQdk8
.. section: C API
Move pyarena.h, pyctype.h, and pytime.h into the cpython/ directory. They
must not be included directly, as they are already included by Python.h:
:ref:`Include Files <api-includes>`.
..
.. bpo: 40170
.. date: 2021-02-16-22-29-39
.. nonce: ahHmOo
.. section: C API
:c:func:`PyExceptionClass_Name` is now always declared as a function, in
order to hide implementation details. The macro accessed
:c:member:`PyTypeObject.tp_name` directly. Patch by Erlend E. Aasland.
..
.. bpo: 43239
.. date: 2021-02-16-17-30-16
.. nonce: FQqOGz
.. section: C API
The :c:func:`PyCFunction_New` function is now exported in the ABI when
compiled with ``-fvisibility=hidden``.
..
.. bpo: 40170
.. date: 2021-02-15-15-06-43
.. nonce: ZYeSii
.. section: C API
:c:func:`PyIter_Check` is now always declared as a function, in order to
hide implementation details. The macro accessed
:c:member:`PyTypeObject.tp_iternext` directly. Patch by Erlend E. Aasland.
..
.. bpo: 40170
.. date: 2021-02-15-13-41-14
.. nonce: r2FAtl
.. section: C API
Convert :c:func:`PyDescr_IsData` macro to a function to hide implementation
details: The macro accessed :c:member:`PyTypeObject.tp_descr_set` directly.
Patch by Erlend E. Aasland.
..
.. bpo: 43181
.. date: 2021-02-11-11-37-14
.. nonce: ydv33S
.. section: C API
Convert :c:func:`PyObject_TypeCheck` macro to a static inline function.
Patch by Erlend E. Aasland.

View File

@ -1,2 +0,0 @@
Add the "regen-frozen" makefile target that regenerates the code for the
frozen ``__hello__`` module.

View File

@ -1,7 +0,0 @@
Make configure script use pkg-config to detect the location of Tcl/Tk
headers and libraries, used to build tkinter.
On macOS, a Tcl/Tk configuration provided by pkg-config will be preferred
over Tcl/Tk frameworks installed in ``/{System/,}Library/Frameworks``.
If both exist and the latter is preferred, the appropriate
``--with-tcltk-*`` configuration options need to be explicitly set.

View File

@ -1,2 +0,0 @@
The configure script can now use *libedit* instead of *readline* with the
command line option ``--with-readline=editline``.

View File

@ -1,3 +0,0 @@
Add a new configure ``--without-static-libpython`` option to not build the
``libpythonMAJOR.MINOR.a`` static library and not install the ``python.o``
object file.

View File

@ -1 +0,0 @@
Windows build now uses ``/utf-8`` compiler option.

View File

@ -1,2 +0,0 @@
Convert :c:func:`PyObject_TypeCheck` macro to a static inline function. Patch by
Erlend E. Aasland.

View File

@ -1,3 +0,0 @@
Convert :c:func:`PyDescr_IsData` macro to a function to hide implementation
details: The macro accessed :c:member:`PyTypeObject.tp_descr_set` directly.
Patch by Erlend E. Aasland.

View File

@ -1,3 +0,0 @@
:c:func:`PyIter_Check` is now always declared as a function, in order to hide implementation
details. The macro accessed :c:member:`PyTypeObject.tp_iternext` directly.
Patch by Erlend E. Aasland.

View File

@ -1,2 +0,0 @@
The :c:func:`PyCFunction_New` function is now exported in the ABI when
compiled with ``-fvisibility=hidden``.

View File

@ -1,3 +0,0 @@
:c:func:`PyExceptionClass_Name` is now always declared as a function, in
order to hide implementation details. The macro accessed
:c:member:`PyTypeObject.tp_name` directly. Patch by Erlend E. Aasland.

View File

@ -1,3 +0,0 @@
Move pyarena.h, pyctype.h, and pytime.h into the cpython/ directory. They
must not be included directly, as they are already included by Python.h:
:ref:`Include Files <api-includes>`.

View File

@ -1,3 +0,0 @@
Move odictobject.h, parser_interface.h, picklebufobject.h, pydebug.h, and
pyfpe.h into the cpython/ directory. They must not be included directly, as
they are already included by Python.h: :ref:`Include Files <api-includes>`.

View File

@ -1,2 +0,0 @@
Remove the private ``_PyErr_OCCURRED()`` macro: use the public
:c:func:`PyErr_Occurred` function instead.

View File

@ -1 +0,0 @@
Always put compiler and system information on the first line of the REPL welcome message.

View File

@ -1 +0,0 @@
If :func:`object.__ipow__` returns :const:`NotImplemented`, the operator will correctly fall back to :func:`object.__pow__` and :func:`object.__rpow__` as expected.

View File

@ -1 +0,0 @@
In the :class:`concurrent.futures.ProcessPoolExecutor`, validate that :func:`multiprocess.synchronize` is available on a given platform and rely on that check in the :mod:`concurrent.futures` test suite so we can run tests that are unrelated to :class:`ProcessPoolExecutor` on those platforms.

View File

@ -1 +0,0 @@
Implement :pep:`634` (structural pattern matching). Patch by Brandt Bucher.

View File

@ -1 +0,0 @@
Substring search functions such as ``str1 in str2`` and ``str2.find(str1)`` now sometimes use the "Two-Way" string comparison algorithm to avoid quadratic behavior on long strings.

View File

@ -1 +0,0 @@
Make the compiler merges same co_code and co_linetable objects in a module like already did for co_consts.

View File

@ -1,2 +0,0 @@
Simple calls to ``type(object)`` are now faster due to the
``vectorcall`` calling convention. Patch by Dennis Sweeney.

View File

@ -1,8 +0,0 @@
:mod:`readline`: Explicitly disable bracketed paste in the interactive
interpreter, even if it's set in the inputrc, is enabled by default (eg GNU
Readline 8.1), or a user calls ``readline.read_init_file()``. The Python REPL
has not implemented bracketed paste support. Also, bracketed mode writes the
``"\x1b[?2004h"`` escape sequence into stdout which causes test failures in
applications that don't support it. It can still be explicitly enabled by
calling ``readline.parse_and_bind("set enable-bracketed-paste on")``. Patch by
Dustin Rodrigues.

View File

@ -1,2 +0,0 @@
Fixed an incorrect :exc:`SyntaxError` message for missing comma in literals.
Patch by Pablo Galindo.

View File

@ -1,2 +0,0 @@
Improve the error message in the parser for exception groups without
parentheses. Patch by Pablo Galindo.

View File

@ -1,3 +0,0 @@
Functions have a new ``__builtins__`` attribute which is used to look for
builtin symbols when a function is executed, instead of looking into
``__globals__['__builtins__']``. Patch by Mark Shannon and Victor Stinner.

View File

@ -1,7 +0,0 @@
The :data:`types.FunctionType` constructor now inherits the current builtins if
the *globals* dictionary has no ``"__builtins__"`` key, rather than using
``{"None": None}`` as builtins: same behavior as :func:`eval` and :func:`exec`
functions. Defining a function with ``def function(...): ...`` in Python is
not affected, globals cannot be overriden with this syntax: it also inherits
the current builtins.
Patch by Victor Stinner.

View File

@ -1,3 +0,0 @@
Add a new :c:func:`PySet_CheckExact` function to the C-API to check if an
object is an instance of :class:`set` but not an instance of a subtype.
Patch by Pablo Galindo.

View File

@ -1,2 +0,0 @@
``PyArg_Parse*()`` functions now emits ``DeprecationWarning`` when ``u`` or
``Z`` format is used. See :pep:`623` for detail.

View File

@ -1,2 +0,0 @@
Fix ``SystemError`` raised when ``PyArg_Parse*()`` is used with ``#`` but
without ``PY_SSIZE_T_CLEAN`` defined.

View File

@ -1,2 +0,0 @@
Update some deprecated unicode APIs which are documented as "will be removed
in 4.0" to "3.12". See :pep:`623` for detail.

View File

@ -1,2 +0,0 @@
Clarify that 'yield from <expr>' works with any iterable, not just
iterators.

View File

@ -1,3 +0,0 @@
Document why printing to IDLE's Shell is often slower than printing to a
system terminal and that it can be made faster by pre-formatting a single
string before printing.

View File

@ -1 +0,0 @@
In ctypes, now packed bitfields are calculated properly and the first item of packed bitfields is now shrank correctly.

View File

@ -1,3 +0,0 @@
Make the pure Python implementation of :mod:`xml.etree.ElementTree` behave
the same as the C implementation (:mod:`_elementree`) regarding default
attribute values (by not setting ``specified_attributes=1``).

View File

@ -1 +0,0 @@
Adds :data:`resource.RLIMIT_KQUEUES` constant from FreeBSD to the :mod:`resource` module.

View File

@ -1,2 +0,0 @@
Added :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK`
and :data:`~os.O_NOFOLLOW_ANY` for macOS. Patch by Dong-hee Na.

View File

@ -1,2 +0,0 @@
The namedtuple __new__ method had its __builtins__ set to None instead
of an actual dictionary. This created problems for introspection tools.

View File

@ -1 +0,0 @@
Fix recent regression in None argument handling in :mod:`~traceback` module functions.

View File

@ -1,2 +0,0 @@
deprecate unsupported ability to access enum members as attributes of other
enum members

View File

@ -1,2 +0,0 @@
Fix a bug in :mod:`codeop` that was causing it to not ask for more input
when multi-line snippets have unclosed parentheses. Patch by Pablo Galindo

View File

@ -1,4 +0,0 @@
The readline module now passes its tests when built directly against
libedit. Existing irreconcilable API differences remain in
:func:`readline.get_begidx` and :func:`readline.get_endidx` behavior based
on libreadline vs libedit use.

View File

@ -1,3 +0,0 @@
Fix segfault in :meth:`sqlite3.Connection.backup` if no argument was
provided. The regression was introduced by GH-23838. Patch by
Erlend E. Aasland.

View File

@ -1,2 +0,0 @@
Improve :mod:`sqlite3` error handling: ``sqlite3_column_name()`` failures
now result in :exc:`MemoryError`. Patch by Erlend E. Aasland.

View File

@ -1,2 +0,0 @@
Prevent needless allocation of :mod:`sqlite3` aggregate function context
when no rows match an aggregate query. Patch by Erlend E. Aasland.

View File

@ -1,2 +0,0 @@
Fix TextIOWrapper can not flush internal buffer forever after very large
text is written.

View File

@ -1 +0,0 @@
Handle None in single-arg versions of :func:`~traceback.print_exception` and :func:`~traceback.format_exception`.

View File

@ -1,3 +0,0 @@
Set the chunk size for the ``gzip`` module main function to
io.DEFAULT_BUFFER_SIZE. This is slightly faster than the 1024 bytes constant
that was used previously.

View File

@ -1,3 +0,0 @@
The ``python -m gzip`` command line application now properly fails when
detecting an unsupported extension. It exits with a non-zero exit code and
prints an error message to stderr.

View File

@ -1 +0,0 @@
Fix web cache poisoning vulnerability by defaulting the query args separator to ``&``, and allowing the user to choose a custom separator.

View File

@ -1,2 +0,0 @@
Fix test_importlib to correctly skip Unicode file tests if the fileystem
does not support them.

View File

@ -1 +0,0 @@
:c:func:`PyCMethod_New` is now present in ``python3.lib``.

View File

@ -1 +0,0 @@
Update macOS installer build to use OpenSSL 1.1.1j.

View File

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

12335
configure vendored

File diff suppressed because it is too large Load Diff