Skip to content

Commit b494f59

Browse files
committed
Python 3.10.0
1 parent bc4c705 commit b494f59

15 files changed

Lines changed: 169 additions & 597 deletions

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_GAMMA
23-
#define PY_RELEASE_SERIAL 2
22+
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
23+
#define PY_RELEASE_SERIAL 0
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.10.0rc2+"
26+
#define PY_VERSION "3.10.0"
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: 66 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Autogenerated by Sphinx on Tue Sep 7 14:18:15 2021
2+
# Autogenerated by Sphinx on Mon Oct 4 18:28:12 2021
33
topics = {'assert': 'The "assert" statement\n'
44
'**********************\n'
55
'\n'
@@ -936,32 +936,6 @@
936936
'*instance* of the\n'
937937
' owner class.\n'
938938
'\n'
939-
'object.__set_name__(self, owner, name)\n'
940-
'\n'
941-
' Called at the time the owning class *owner* is '
942-
'created. The\n'
943-
' descriptor has been assigned to *name*.\n'
944-
'\n'
945-
' Note:\n'
946-
'\n'
947-
' "__set_name__()" is only called implicitly as part '
948-
'of the "type"\n'
949-
' constructor, so it will need to be called '
950-
'explicitly with the\n'
951-
' appropriate parameters when a descriptor is added '
952-
'to a class\n'
953-
' after initial creation:\n'
954-
'\n'
955-
' class A:\n'
956-
' pass\n'
957-
' descr = custom_descriptor()\n'
958-
' A.attr = descr\n'
959-
" descr.__set_name__(A, 'attr')\n"
960-
'\n'
961-
' See Creating the class object for more details.\n'
962-
'\n'
963-
' New in version 3.6.\n'
964-
'\n'
965939
'The attribute "__objclass__" is interpreted by the '
966940
'"inspect" module as\n'
967941
'specifying the class where this object was defined '
@@ -2847,7 +2821,7 @@
28472821
'have\n'
28482822
' happened.\n'
28492823
'\n'
2850-
' * If the guard evaluates as truthy or missing, the "block" '
2824+
' * If the guard evaluates as true or is missing, the "block" '
28512825
'inside\n'
28522826
' "case_block" is executed.\n'
28532827
'\n'
@@ -2908,12 +2882,12 @@
29082882
'\n'
29092883
'2. If the pattern succeeded, evaluate the "guard".\n'
29102884
'\n'
2911-
' * If the "guard" condition evaluates to “truthy”, the case '
2912-
'block is\n'
2885+
' * If the "guard" condition evaluates as true, the case block '
2886+
'is\n'
29132887
' selected.\n'
29142888
'\n'
2915-
' * If the "guard" condition evaluates to “falsy”, the case '
2916-
'block is\n'
2889+
' * If the "guard" condition evaluates as false, the case block '
2890+
'is\n'
29172891
' not selected.\n'
29182892
'\n'
29192893
' * If the "guard" raises an exception during evaluation, the\n'
@@ -3417,8 +3391,7 @@
34173391
'class\n'
34183392
' "name_or_attr" before matching:\n'
34193393
'\n'
3420-
' I. The equivalent of "getattr(cls, "__match_args__", ())" '
3421-
'is\n'
3394+
' I. The equivalent of "getattr(cls, "__match_args__", ())" is\n'
34223395
' called.\n'
34233396
'\n'
34243397
' * If this raises an exception, the exception bubbles up.\n'
@@ -4148,13 +4121,13 @@
41484121
'\n'
41494122
' If "__new__()" is invoked during object construction and '
41504123
'it returns\n'
4151-
' an instance or subclass of *cls*, then the new '
4152-
'instance’s\n'
4153-
' "__init__()" method will be invoked like '
4154-
'"__init__(self[, ...])",\n'
4155-
' where *self* is the new instance and the remaining '
4156-
'arguments are\n'
4157-
' the same as were passed to the object constructor.\n'
4124+
' an instance of *cls*, then the new instance’s '
4125+
'"__init__()" method\n'
4126+
' will be invoked like "__init__(self[, ...])", where '
4127+
'*self* is the\n'
4128+
' new instance and the remaining arguments are the same as '
4129+
'were\n'
4130+
' passed to the object constructor.\n'
41584131
'\n'
41594132
' If "__new__()" does not return an instance of *cls*, '
41604133
'then the new\n'
@@ -9024,13 +8997,13 @@
90248997
'\n'
90258998
' If "__new__()" is invoked during object construction and '
90268999
'it returns\n'
9027-
' an instance or subclass of *cls*, then the new '
9028-
'instance’s\n'
9029-
' "__init__()" method will be invoked like "__init__(self[, '
9030-
'...])",\n'
9031-
' where *self* is the new instance and the remaining '
9032-
'arguments are\n'
9033-
' the same as were passed to the object constructor.\n'
9000+
' an instance of *cls*, then the new instance’s '
9001+
'"__init__()" method\n'
9002+
' will be invoked like "__init__(self[, ...])", where '
9003+
'*self* is the\n'
9004+
' new instance and the remaining arguments are the same as '
9005+
'were\n'
9006+
' passed to the object constructor.\n'
90349007
'\n'
90359008
' If "__new__()" does not return an instance of *cls*, then '
90369009
'the new\n'
@@ -9698,32 +9671,6 @@
96989671
'of the\n'
96999672
' owner class.\n'
97009673
'\n'
9701-
'object.__set_name__(self, owner, name)\n'
9702-
'\n'
9703-
' Called at the time the owning class *owner* is created. '
9704-
'The\n'
9705-
' descriptor has been assigned to *name*.\n'
9706-
'\n'
9707-
' Note:\n'
9708-
'\n'
9709-
' "__set_name__()" is only called implicitly as part of '
9710-
'the "type"\n'
9711-
' constructor, so it will need to be called explicitly '
9712-
'with the\n'
9713-
' appropriate parameters when a descriptor is added to a '
9714-
'class\n'
9715-
' after initial creation:\n'
9716-
'\n'
9717-
' class A:\n'
9718-
' pass\n'
9719-
' descr = custom_descriptor()\n'
9720-
' A.attr = descr\n'
9721-
" descr.__set_name__(A, 'attr')\n"
9722-
'\n'
9723-
' See Creating the class object for more details.\n'
9724-
'\n'
9725-
' New in version 3.6.\n'
9726-
'\n'
97279674
'The attribute "__objclass__" is interpreted by the "inspect" '
97289675
'module as\n'
97299676
'specifying the class where this object was defined (setting '
@@ -10013,6 +9960,38 @@
100139960
'\n'
100149961
' New in version 3.6.\n'
100159962
'\n'
9963+
'When a class is created, "type.__new__()" scans the class '
9964+
'variables\n'
9965+
'and makes callbacks to those with a "__set_name__()" hook.\n'
9966+
'\n'
9967+
'object.__set_name__(self, owner, name)\n'
9968+
'\n'
9969+
' Automatically called at the time the owning class *owner* '
9970+
'is\n'
9971+
' created. The object has been assigned to *name* in that '
9972+
'class:\n'
9973+
'\n'
9974+
' class A:\n'
9975+
' x = C() # Automatically calls: x.__set_name__(A, '
9976+
"'x')\n"
9977+
'\n'
9978+
' If the class variable is assigned after the class is '
9979+
'created,\n'
9980+
' "__set_name__()" will not be called automatically. If '
9981+
'needed,\n'
9982+
' "__set_name__()" can be called directly:\n'
9983+
'\n'
9984+
' class A:\n'
9985+
' pass\n'
9986+
'\n'
9987+
' c = C()\n'
9988+
' A.x = c # The hook is not called\n'
9989+
" c.__set_name__(A, 'x') # Manually invoke the hook\n"
9990+
'\n'
9991+
' See Creating the class object for more details.\n'
9992+
'\n'
9993+
' New in version 3.6.\n'
9994+
'\n'
100169995
'\n'
100179996
'Metaclasses\n'
100189997
'-----------\n'
@@ -10208,22 +10187,21 @@
1020810187
'When using the default metaclass "type", or any metaclass '
1020910188
'that\n'
1021010189
'ultimately calls "type.__new__", the following additional\n'
10211-
'customisation steps are invoked after creating the class '
10190+
'customization steps are invoked after creating the class '
1021210191
'object:\n'
1021310192
'\n'
10214-
'* first, "type.__new__" collects all of the descriptors in '
10215-
'the class\n'
10216-
' namespace that define a "__set_name__()" method;\n'
10193+
'1. The "type.__new__" method collects all of the attributes '
10194+
'in the\n'
10195+
' class namespace that define a "__set_name__()" method;\n'
1021710196
'\n'
10218-
'* second, all of these "__set_name__" methods are called '
10219-
'with the\n'
10220-
' class being defined and the assigned name of that '
10221-
'particular\n'
10222-
' descriptor;\n'
10197+
'2. Those "__set_name__" methods are called with the class '
10198+
'being\n'
10199+
' defined and the assigned name of that particular '
10200+
'attribute;\n'
1022310201
'\n'
10224-
'* finally, the "__init_subclass__()" hook is called on the '
10225-
'immediate\n'
10226-
' parent of the new class in its method resolution order.\n'
10202+
'3. The "__init_subclass__()" hook is called on the immediate '
10203+
'parent of\n'
10204+
' the new class in its method resolution order.\n'
1022710205
'\n'
1022810206
'After the class object is created, it is passed to the '
1022910207
'class\n'
@@ -13364,11 +13342,8 @@
1336413342
' variables; "f_globals" is used for global variables;\n'
1336513343
' "f_builtins" is used for built-in (intrinsic) names; '
1336613344
'"f_lasti"\n'
13367-
' gives the precise instruction (it represents a wordcode '
13368-
'index,\n'
13369-
' which means that to get an index into the bytecode string of '
13370-
'the\n'
13371-
' code object it needs to be multiplied by 2).\n'
13345+
' gives the precise instruction (this is an index into the\n'
13346+
' bytecode string of the code object).\n'
1337213347
'\n'
1337313348
' Accessing "f_code" raises an auditing event '
1337413349
'"object.__getattr__"\n'

Misc/NEWS.d/3.10.0.rst

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
.. bpo: 45121
2+
.. date: 2021-09-07-17-10-16
3+
.. nonce: iG-Hsf
4+
.. release date: 2021-10-04
5+
.. section: Core and Builtins
6+
7+
Fix issue where ``Protocol.__init__`` raises ``RecursionError`` when it's
8+
called directly or via ``super()``. Patch provided by Yurii Karabas.
9+
10+
..
11+
12+
.. bpo: 45234
13+
.. date: 2021-09-17-11-20-55
14+
.. nonce: qUcTVt
15+
.. section: Library
16+
17+
Fixed a regression in :func:`~shutil.copyfile`, :func:`~shutil.copy`,
18+
:func:`~shutil.copy2` raising :exc:`FileNotFoundError` when source is a
19+
directory, which should raise :exc:`IsADirectoryError`
20+
21+
..
22+
23+
.. bpo: 45216
24+
.. date: 2021-09-18-13-45-19
25+
.. nonce: o56nyt
26+
.. section: Documentation
27+
28+
Remove extra documentation listing methods in ``difflib``. It was rendering
29+
twice in pydoc and was outdated in some places.
30+
31+
..
32+
33+
.. bpo: 45024
34+
.. date: 2021-09-08-17-20-19
35+
.. nonce: dkNPNi
36+
.. section: Documentation
37+
38+
:mod:`collections.abc` documentation has been expanded to explicitly cover
39+
how instance and subclass checks work, with additional doctest examples and
40+
an exhaustive list of ABCs which test membership purely by presence of the
41+
right :term:`special method`\s. Patch by Raymond Hettinger.
42+
43+
..
44+
45+
.. bpo: 45128
46+
.. date: 2021-09-16-17-22-35
47+
.. nonce: Jz6fl2
48+
.. section: Tests
49+
50+
Fix ``test_multiprocessing_fork`` failure due to ``test_logging`` and
51+
``sys.modules`` manipulation.
52+
53+
..
54+
55+
.. bpo: 44860
56+
.. date: 2021-09-08-13-01-37
57+
.. nonce: qXd0kx
58+
.. section: Tests
59+
60+
Update ``test_sysconfig.test_user_similar()`` for the posix_user scheme:
61+
``platlib`` doesn't use :data:`sys.platlibdir`. Patch by Victor Stinner.
62+
63+
..
64+
65+
.. bpo: 45067
66+
.. date: 2021-09-09-16-45-26
67+
.. nonce: mFmY92
68+
.. section: Build
69+
70+
The ncurses function extended_color_content was introduced in 2017
71+
72+
(https://invisible-island.net/ncurses/NEWS.html#index-t20170401). The
73+
74+
ncurses-devel package in CentOS 7 had a older version ncurses resulted in
75+
compilation error. For compiling ncurses with extended color support, we
76+
verify the version of the ncurses library >= 20170401.
77+
78+
..
79+
80+
.. bpo: 45193
81+
.. date: 2021-09-15-03-20-06
82+
.. nonce: G61_GV
83+
.. section: IDLE
84+
85+
Make completion boxes appear on Ubuntu again.
86+
87+
..
88+
89+
.. bpo: 45307
90+
.. date: 2021-09-28-12-00-55
91+
.. nonce: 3ETFfX
92+
.. section: C API
93+
94+
Restore the private C API function :func:`_PyImport_FindExtensionObject`. It
95+
will be removed in Python 3.11.

Misc/NEWS.d/next/Build/2021-09-09-16-45-26.bpo-45067.mFmY92.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

Misc/NEWS.d/next/C API/2021-09-28-12-00-55.bpo-45307.3ETFfX.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

Misc/NEWS.d/next/Core and Builtins/2021-09-07-17-10-16.bpo-45121.iG-Hsf.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

Misc/NEWS.d/next/Documentation/2021-09-08-17-20-19.bpo-45024.dkNPNi.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

Misc/NEWS.d/next/Documentation/2021-09-18-13-45-19.bpo-45216.o56nyt.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

Misc/NEWS.d/next/IDLE/2021-09-15-03-20-06.bpo-45193.G61_GV.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

Misc/NEWS.d/next/Library/2021-09-17-11-20-55.bpo-45234.qUcTVt.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)