Skip to content

Commit d4fe098

Browse files
authored
Python 3.10.0a0 (GH-20198)
1 parent 9095f76 commit d4fe098

File tree

13 files changed

+951
-834
lines changed

13 files changed

+951
-834
lines changed

Doc/tutorial/interpreter.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ Using the Python Interpreter
1010
Invoking the Interpreter
1111
========================
1212

13-
The Python interpreter is usually installed as :file:`/usr/local/bin/python3.9`
13+
The Python interpreter is usually installed as :file:`/usr/local/bin/python3.10`
1414
on those machines where it is available; putting :file:`/usr/local/bin` in your
1515
Unix shell's search path makes it possible to start it by typing the command:
1616

1717
.. code-block:: text
1818
19-
python3.9
19+
python3.10
2020
2121
to the shell. [#]_ Since the choice of the directory where the interpreter lives
2222
is an installation option, other places are possible; check with your local
2323
Python guru or system administrator. (E.g., :file:`/usr/local/python` is a
2424
popular alternative location.)
2525

2626
On Windows machines where you have installed Python from the :ref:`Microsoft Store
27-
<windows-store>`, the :file:`python3.9` command will be available. If you have
27+
<windows-store>`, the :file:`python3.10` command will be available. If you have
2828
the :ref:`py.exe launcher <launcher>` installed, you can use the :file:`py`
2929
command. See :ref:`setting-envvars` for other ways to launch Python.
3030

@@ -97,8 +97,8 @@ before printing the first prompt:
9797

9898
.. code-block:: shell-session
9999
100-
$ python3.9
101-
Python 3.9 (default, June 4 2019, 09:25:04)
100+
$ python3.10
101+
Python 3.10 (default, June 4 2019, 09:25:04)
102102
[GCC 4.8.2] on linux
103103
Type "help", "copyright", "credits" or "license" for more information.
104104
>>>

Doc/tutorial/stdlib.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ operating system::
1515

1616
>>> import os
1717
>>> os.getcwd() # Return the current working directory
18-
'C:\\Python39'
18+
'C:\\Python310'
1919
>>> os.chdir('/server/accesslogs') # Change current working directory
2020
>>> os.system('mkdir today') # Run the command mkdir in the system shell
2121
0

Doc/tutorial/stdlib2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ applications include caching objects that are expensive to create::
278278
Traceback (most recent call last):
279279
File "<stdin>", line 1, in <module>
280280
d['primary'] # entry was automatically removed
281-
File "C:/python39/lib/weakref.py", line 46, in __getitem__
281+
File "C:/python310/lib/weakref.py", line 46, in __getitem__
282282
o = self.data[key]()
283283
KeyError: 'primary'
284284

Doc/whatsnew/3.10.rst

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
****************************
2+
What's New In Python 3.10
3+
****************************
4+
5+
:Release: |release|
6+
:Date: |today|
7+
8+
.. Rules for maintenance:
9+
10+
* Anyone can add text to this document. Do not spend very much time
11+
on the wording of your changes, because your text will probably
12+
get rewritten to some degree.
13+
14+
* The maintainer will go through Misc/NEWS periodically and add
15+
changes; it's therefore more important to add your changes to
16+
Misc/NEWS than to this file.
17+
18+
* This is not a complete list of every single change; completeness
19+
is the purpose of Misc/NEWS. Some changes I consider too small
20+
or esoteric to include. If such a change is added to the text,
21+
I'll just remove it. (This is another reason you shouldn't spend
22+
too much time on writing your addition.)
23+
24+
* If you want to draw your new text to the attention of the
25+
maintainer, add 'XXX' to the beginning of the paragraph or
26+
section.
27+
28+
* It's OK to just add a fragmentary note about a change. For
29+
example: "XXX Describe the transmogrify() function added to the
30+
socket module." The maintainer will research the change and
31+
write the necessary text.
32+
33+
* You can comment out your additions if you like, but it's not
34+
necessary (especially when a final release is some months away).
35+
36+
* Credit the author of a patch or bugfix. Just the name is
37+
sufficient; the e-mail address isn't necessary.
38+
39+
* It's helpful to add the bug/patch number as a comment:
40+
41+
XXX Describe the transmogrify() function added to the socket
42+
module.
43+
(Contributed by P.Y. Developer in :issue:`12345`.)
44+
45+
This saves the maintainer the effort of going through the Mercurial log
46+
when researching a change.
47+
48+
This article explains the new features in Python 3.10, compared to 3.9.
49+
50+
For full details, see the :source:`Misc/NEWS` file.
51+
52+
.. note::
53+
54+
Prerelease users should be aware that this document is currently in draft
55+
form. It will be updated substantially as Python 3.10 moves towards release,
56+
so it's worth checking back even after reading earlier versions.
57+
58+
59+
Summary -- Release highlights
60+
=============================
61+
62+
.. This section singles out the most important changes in Python 3.10.
63+
Brevity is key.
64+
65+
66+
.. PEP-sized items next.
67+
68+
69+
70+
New Features
71+
============
72+
73+
74+
75+
Other Language Changes
76+
======================
77+
78+
79+
80+
New Modules
81+
===========
82+
83+
* None yet.
84+
85+
86+
Improved Modules
87+
================
88+
89+
90+
Optimizations
91+
=============
92+
93+
94+
Build and C API Changes
95+
=======================
96+
97+
98+
99+
Deprecated
100+
==========
101+
102+
103+
104+
Removed
105+
=======
106+
107+
108+
109+
Porting to Python 3.10
110+
======================
111+
112+
This section lists previously described changes and other bugfixes
113+
that may require changes to your code.
114+
115+

Doc/whatsnew/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ anyone wishing to stay up-to-date after a new release.
1111
.. toctree::
1212
:maxdepth: 2
1313

14+
3.10.rst
1415
3.9.rst
1516
3.8.rst
1617
3.7.rst

Include/patchlevel.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
/* Version parsed out into numeric values */
1818
/*--start constants--*/
1919
#define PY_MAJOR_VERSION 3
20-
#define PY_MINOR_VERSION 9
20+
#define PY_MINOR_VERSION 10
2121
#define PY_MICRO_VERSION 0
2222
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
23-
#define PY_RELEASE_SERIAL 6
23+
#define PY_RELEASE_SERIAL 0
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.9.0a6+"
26+
#define PY_VERSION "3.10.0a0"
2727
/*--end constants--*/
2828

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

Modules/getpath.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -1297,15 +1297,15 @@ calculate_zip_path(PyCalculatePath *calculate)
12971297
PyStatus res;
12981298

12991299
/* Path: <PLATLIBDIR> / "python00.zip" */
1300-
wchar_t *path = joinpath2(calculate->platlibdir_macro, L"python00.zip");
1300+
wchar_t *path = joinpath2(calculate->platlibdir_macro, L"python000.zip");
13011301
if (path == NULL) {
13021302
return _PyStatus_NO_MEMORY();
13031303
}
13041304

13051305
if (calculate->prefix_found > 0) {
13061306
/* Use the reduced prefix returned by Py_GetPrefix()
13071307
1308-
Path: <basename(basename(prefix))> / <PLATLIBDIR> / "python00.zip" */
1308+
Path: <basename(basename(prefix))> / <PLATLIBDIR> / "python000.zip" */
13091309
wchar_t *parent = _PyMem_RawWcsdup(calculate->prefix);
13101310
if (parent == NULL) {
13111311
res = _PyStatus_NO_MEMORY();
@@ -1325,10 +1325,11 @@ calculate_zip_path(PyCalculatePath *calculate)
13251325
goto done;
13261326
}
13271327

1328-
/* Replace "00" with version */
1328+
/* Replace "000" with the version */
13291329
size_t len = wcslen(calculate->zip_path);
1330-
calculate->zip_path[len - 6] = VERSION[0];
1331-
calculate->zip_path[len - 5] = VERSION[2];
1330+
calculate->zip_path[len - 7] = VERSION[0];
1331+
calculate->zip_path[len - 6] = VERSION[2];
1332+
calculate->zip_path[len - 5] = VERSION[3];
13321333

13331334
res = _PyStatus_OK();
13341335

PC/pyconfig.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
269269
file in their Makefile (other compilers are
270270
generally taken care of by distutils.) */
271271
# if defined(_DEBUG)
272-
# pragma comment(lib,"python39_d.lib")
272+
# pragma comment(lib,"python310_d.lib")
273273
# elif defined(Py_LIMITED_API)
274274
# pragma comment(lib,"python3.lib")
275275
# else
276-
# pragma comment(lib,"python39.lib")
276+
# pragma comment(lib,"python310.lib")
277277
# endif /* _DEBUG */
278278
# endif /* _MSC_VER */
279279
# endif /* Py_BUILD_CORE */

0 commit comments

Comments
 (0)