Skip to content

Commit cc115e5

Browse files
committed
Python 3.10.0rc1
1 parent 5671762 commit cc115e5

70 files changed

Lines changed: 8117 additions & 5289 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Include/patchlevel.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#define PY_MAJOR_VERSION 3
2020
#define PY_MINOR_VERSION 10
2121
#define PY_MICRO_VERSION 0
22-
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA
23-
#define PY_RELEASE_SERIAL 4
22+
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA
23+
#define PY_RELEASE_SERIAL 1
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.10.0b4+"
26+
#define PY_VERSION "3.10.0rc1"
2727
/*--end constants--*/
2828

2929
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

Lib/pydoc_data/topics.py

Lines changed: 61 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Autogenerated by Sphinx on Sat Jul 10 01:50:39 2021
2+
# Autogenerated by Sphinx on Mon Aug 2 20:07:41 2021
33
topics = {'assert': 'The "assert" statement\n'
44
'**********************\n'
55
'\n'
@@ -1313,6 +1313,10 @@
13131313
'In the latter case, sequence repetition is performed; a negative\n'
13141314
'repetition factor yields an empty sequence.\n'
13151315
'\n'
1316+
'This operation can be customized using the special "__mul__()" '
1317+
'and\n'
1318+
'"__rmul__()" methods.\n'
1319+
'\n'
13161320
'The "@" (at) operator is intended to be used for matrix\n'
13171321
'multiplication. No builtin Python types implement this operator.\n'
13181322
'\n'
@@ -1328,6 +1332,10 @@
13281332
'result. Division by zero raises the "ZeroDivisionError" '
13291333
'exception.\n'
13301334
'\n'
1335+
'This operation can be customized using the special "__div__()" '
1336+
'and\n'
1337+
'"__floordiv__()" methods.\n'
1338+
'\n'
13311339
'The "%" (modulo) operator yields the remainder from the division '
13321340
'of\n'
13331341
'the first argument by the second. The numeric arguments are '
@@ -1359,6 +1367,10 @@
13591367
'string formatting is described in the Python Library Reference,\n'
13601368
'section printf-style String Formatting.\n'
13611369
'\n'
1370+
'The *modulo* operation can be customized using the special '
1371+
'"__mod__()"\n'
1372+
'method.\n'
1373+
'\n'
13621374
'The floor division operator, the modulo operator, and the '
13631375
'"divmod()"\n'
13641376
'function are not defined for complex numbers. Instead, convert to '
@@ -1373,9 +1385,16 @@
13731385
'and then added together. In the latter case, the sequences are\n'
13741386
'concatenated.\n'
13751387
'\n'
1388+
'This operation can be customized using the special "__add__()" '
1389+
'and\n'
1390+
'"__radd__()" methods.\n'
1391+
'\n'
13761392
'The "-" (subtraction) operator yields the difference of its '
13771393
'arguments.\n'
1378-
'The numeric arguments are first converted to a common type.\n',
1394+
'The numeric arguments are first converted to a common type.\n'
1395+
'\n'
1396+
'This operation can be customized using the special "__sub__()" '
1397+
'method.\n',
13791398
'bitwise': 'Binary bitwise operations\n'
13801399
'*************************\n'
13811400
'\n'
@@ -1388,14 +1407,18 @@
13881407
'\n'
13891408
'The "&" operator yields the bitwise AND of its arguments, which '
13901409
'must\n'
1391-
'be integers.\n'
1410+
'be integers or one of them must be a custom object overriding\n'
1411+
'"__and__()" or "__rand__()" special methods.\n'
13921412
'\n'
13931413
'The "^" operator yields the bitwise XOR (exclusive OR) of its\n'
1394-
'arguments, which must be integers.\n'
1414+
'arguments, which must be integers or one of them must be a '
1415+
'custom\n'
1416+
'object overriding "__xor__()" or "__rxor__()" special methods.\n'
13951417
'\n'
13961418
'The "|" operator yields the bitwise (inclusive) OR of its '
13971419
'arguments,\n'
1398-
'which must be integers.\n',
1420+
'which must be integers or one of them must be a custom object\n'
1421+
'overriding "__or__()" or "__ror__()" special methods.\n',
13991422
'bltin-code-objects': 'Code Objects\n'
14001423
'************\n'
14011424
'\n'
@@ -1841,7 +1864,11 @@
18411864
' comp_operator ::= "<" | ">" | "==" | ">=" | "<=" | "!="\n'
18421865
' | "is" ["not"] | ["not"] "in"\n'
18431866
'\n'
1844-
'Comparisons yield boolean values: "True" or "False".\n'
1867+
'Comparisons yield boolean values: "True" or "False". Custom '
1868+
'*rich\n'
1869+
'comparison methods* may return non-boolean values. In this '
1870+
'case Python\n'
1871+
'will call "bool()" on such value in boolean contexts.\n'
18451872
'\n'
18461873
'Comparisons can be chained arbitrarily, e.g., "x < y <= z" '
18471874
'is\n'
@@ -3270,11 +3297,11 @@
32703297
'double star pattern must be the last subpattern in the mapping\n'
32713298
'pattern.\n'
32723299
'\n'
3273-
'Duplicate key values in mapping patterns are disallowed. (If all '
3274-
'key\n'
3275-
'patterns are literal patterns this is considered a syntax '
3276-
'error;\n'
3277-
'otherwise this is a runtime error and will raise "ValueError".)\n'
3300+
'Duplicate keys in mapping patterns are disallowed. Duplicate '
3301+
'literal\n'
3302+
'keys will raise a "SyntaxError". Two keys that otherwise have '
3303+
'the same\n'
3304+
'value will raise a "ValueError" at runtime.\n'
32783305
'\n'
32793306
'The following is the logical flow for matching a mapping '
32803307
'pattern\n'
@@ -3292,7 +3319,10 @@
32923319
'\n'
32933320
'3. If duplicate keys are detected in the mapping pattern, the '
32943321
'pattern\n'
3295-
' is considered invalid and "ValueError" is raised.\n'
3322+
' is considered invalid. A "SyntaxError" is raised for '
3323+
'duplicate\n'
3324+
' literal values; or a "ValueError" for named keys of the same '
3325+
'value.\n'
32963326
'\n'
32973327
'Note:\n'
32983328
'\n'
@@ -8373,7 +8403,10 @@
83738403
'"ZeroDivisionError".\n'
83748404
'Raising a negative number to a fractional power results in a '
83758405
'"complex"\n'
8376-
'number. (In earlier versions it raised a "ValueError".)\n',
8406+
'number. (In earlier versions it raised a "ValueError".)\n'
8407+
'\n'
8408+
'This operation can be customized using the special "__pow__()" '
8409+
'method.\n',
83778410
'raise': 'The "raise" statement\n'
83788411
'*********************\n'
83798412
'\n'
@@ -8773,6 +8806,10 @@
87738806
'the\n'
87748807
'second argument.\n'
87758808
'\n'
8809+
'This operation can be customized using the special '
8810+
'"__lshift__()" and\n'
8811+
'"__rshift__()" methods.\n'
8812+
'\n'
87768813
'A right shift by *n* bits is defined as floor division by '
87778814
'"pow(2,n)".\n'
87788815
'A left shift by *n* bits is defined as multiplication with '
@@ -14423,7 +14460,7 @@
1442314460
'| | "s[i:i] = '
1442414461
'[x]") | |\n'
1442514462
'+--------------------------------+----------------------------------+-----------------------+\n'
14426-
'| "s.pop([i])" | retrieves the item at *i* '
14463+
'| "s.pop()" or "s.pop(i)" | retrieves the item at *i* '
1442714464
'and | (2) |\n'
1442814465
'| | also removes it from '
1442914466
'*s* | |\n'
@@ -14886,7 +14923,7 @@
1488614923
'| | "s[i:i] = '
1488714924
'[x]") | |\n'
1488814925
'+--------------------------------+----------------------------------+-----------------------+\n'
14889-
'| "s.pop([i])" | retrieves the item at '
14926+
'| "s.pop()" or "s.pop(i)" | retrieves the item at '
1489014927
'*i* and | (2) |\n'
1489114928
'| | also removes it from '
1489214929
'*s* | |\n'
@@ -14951,15 +14988,21 @@
1495114988
' u_expr ::= power | "-" u_expr | "+" u_expr | "~" u_expr\n'
1495214989
'\n'
1495314990
'The unary "-" (minus) operator yields the negation of its numeric\n'
14954-
'argument.\n'
14991+
'argument; the operation can be overridden with the "__neg__()" '
14992+
'special\n'
14993+
'method.\n'
1495514994
'\n'
1495614995
'The unary "+" (plus) operator yields its numeric argument '
14957-
'unchanged.\n'
14996+
'unchanged;\n'
14997+
'the operation can be overridden with the "__pos__()" special '
14998+
'method.\n'
1495814999
'\n'
1495915000
'The unary "~" (invert) operator yields the bitwise inversion of '
1496015001
'its\n'
1496115002
'integer argument. The bitwise inversion of "x" is defined as\n'
14962-
'"-(x+1)". It only applies to integral numbers.\n'
15003+
'"-(x+1)". It only applies to integral numbers or to custom '
15004+
'objects\n'
15005+
'that override the "__invert__()" special method.\n'
1496315006
'\n'
1496415007
'In all three cases, if the argument does not have the proper type, '
1496515008
'a\n'

Lib/test/test_importlib/test_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ def test_magic_number(self):
859859
# stakeholders such as OS package maintainers must be notified
860860
# in advance. Such exceptional releases will then require an
861861
# adjustment to this test case.
862-
EXPECTED_MAGIC_NUMBER = 3413
862+
EXPECTED_MAGIC_NUMBER = 3439
863863
actual = int.from_bytes(importlib.util.MAGIC_NUMBER[:2], 'little')
864864

865865
msg = (

0 commit comments

Comments
 (0)