Skip to content

Commit 96fdb01

Browse files
committed
Merge branch 'main' into pythongh-126838
2 parents 0cc3a67 + 88dc84b commit 96fdb01

File tree

131 files changed

+2085
-1903
lines changed

Some content is hidden

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

131 files changed

+2085
-1903
lines changed

.github/CODEOWNERS

+12-1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ Programs/_bootstrap_python.c @ericsnowcurrently
8181
Programs/python.c @ericsnowcurrently
8282
Tools/build/generate_global_objects.py @ericsnowcurrently
8383

84+
# Initialization
85+
Doc/library/sys_path_init.rst @FFY00
86+
Doc/c-api/init_config.rst @FFY00
87+
88+
# getpath
89+
**/*getpath* @FFY00
90+
91+
# site
92+
**/*site.py @FFY00
93+
Doc/library/site.rst @FFY00
94+
8495
# Exceptions
8596
Lib/test/test_except*.py @iritkatriel
8697
Objects/exceptions.c @iritkatriel
@@ -97,7 +108,7 @@ Modules/_hacl/** @gpshead
97108
**/*logging* @vsajip
98109

99110
# venv
100-
**/*venv* @vsajip
111+
**/*venv* @vsajip @FFY00
101112

102113
# Launcher
103114
/PC/launcher.c @vsajip

Doc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ check: _ensure-pre-commit
294294

295295
.PHONY: serve
296296
serve:
297-
@echo "The serve target was removed, use htmlview instead (see bpo-36329)"
297+
@echo "The serve target was removed, use htmllive instead (see gh-80510)"
298298

299299
# Targets for daily automated doc build
300300
# By default, Sphinx only rebuilds pages where the page content has changed.

Doc/c-api/marshal.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ binary mode.
1313

1414
Numeric values are stored with the least significant byte first.
1515

16-
The module supports two versions of the data format: version 0 is the
17-
historical version, version 1 shares interned strings in the file, and upon
18-
unmarshalling. Version 2 uses a binary format for floating-point numbers.
19-
``Py_MARSHAL_VERSION`` indicates the current file format (currently 2).
16+
The module supports several versions of the data format; see
17+
the :py:mod:`Python module documentation <marshal>` for details.
2018

19+
.. c:macro:: Py_MARSHAL_VERSION
20+
21+
The current format version. See :py:data:`marshal.version`.
2122

2223
.. c:function:: void PyMarshal_WriteLongToFile(long value, FILE *file, int version)
2324

Doc/deprecations/pending-removal-in-future.rst

-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ although there is currently no date scheduled for their removal.
145145
* ``splitvalue()``
146146
* ``to_bytes()``
147147

148-
* :mod:`urllib.request`: :class:`~urllib.request.URLopener` and
149-
:class:`~urllib.request.FancyURLopener` style of invoking requests is
150-
deprecated. Use newer :func:`~urllib.request.urlopen` functions and methods.
151-
152148
* :mod:`wsgiref`: ``SimpleHandler.stdout.write()`` should not do partial
153149
writes.
154150

Doc/library/asyncio-stream.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ and work with streams:
9292
family=socket.AF_UNSPEC, \
9393
flags=socket.AI_PASSIVE, sock=None, \
9494
backlog=100, ssl=None, reuse_address=None, \
95-
reuse_port=None, ssl_handshake_timeout=None, \
95+
reuse_port=None, keep_alive=None, \
96+
ssl_handshake_timeout=None, \
9697
ssl_shutdown_timeout=None, start_serving=True)
9798
9899
Start a socket server.
@@ -128,6 +129,9 @@ and work with streams:
128129
.. versionchanged:: 3.11
129130
Added the *ssl_shutdown_timeout* parameter.
130131

132+
.. versionchanged:: 3.13
133+
Added the *keep_alive* parameter.
134+
131135

132136
.. rubric:: Unix Sockets
133137

Doc/library/codecs.rst

+7
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,10 @@ is meant to be exhaustive. Notice that spelling alternatives that only differ in
10421042
case or use a hyphen instead of an underscore are also valid aliases; therefore,
10431043
e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec.
10441044

1045+
On Windows, ``cpXXX`` codecs are available for all code pages.
1046+
But only codecs listed in the following table are guarantead to exist on
1047+
other platforms.
1048+
10451049
.. impl-detail::
10461050

10471051
Some common encodings can bypass the codecs lookup machinery to
@@ -1307,6 +1311,9 @@ particular, the following variants typically exist:
13071311
.. versionchanged:: 3.8
13081312
``cp65001`` is now an alias to ``utf_8``.
13091313

1314+
.. versionchanged:: 3.14
1315+
On Windows, ``cpXXX`` codecs are now available for all code pages.
1316+
13101317

13111318
Python Specific Encodings
13121319
-------------------------

Doc/library/marshal.rst

+46-18
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,39 @@ supports a substantially wider range of objects than marshal.
3838
maliciously constructed data. Never unmarshal data received from an
3939
untrusted or unauthenticated source.
4040

41+
There are functions that read/write files as well as functions operating on
42+
bytes-like objects.
43+
4144
.. index:: object; code, code object
4245

4346
Not all Python object types are supported; in general, only objects whose value
4447
is independent from a particular invocation of Python can be written and read by
45-
this module. The following types are supported: booleans, integers, floating-point
46-
numbers, complex numbers, strings, bytes, bytearrays, tuples, lists, sets,
47-
frozensets, dictionaries, and code objects (if *allow_code* is true),
48-
where it should be understood that
49-
tuples, lists, sets, frozensets and dictionaries are only supported as long as
50-
the values contained therein are themselves supported. The
51-
singletons :const:`None`, :const:`Ellipsis` and :exc:`StopIteration` can also be
52-
marshalled and unmarshalled.
53-
For format *version* lower than 3, recursive lists, sets and dictionaries cannot
54-
be written (see below).
48+
this module. The following types are supported:
49+
50+
* Numeric types: :class:`int`, :class:`bool`, :class:`float`, :class:`complex`.
51+
* Strings (:class:`str`) and :class:`bytes`.
52+
:term:`Bytes-like objects <bytes-like object>` like :class:`bytearray` are
53+
marshalled as :class:`!bytes`.
54+
* Containers: :class:`tuple`, :class:`list`, :class:`set`, :class:`frozenset`,
55+
and (since :data:`version` 5), :class:`slice`.
56+
It should be understood that these are supported only if the values contained
57+
therein are themselves supported.
58+
Recursive containers are supported since :data:`version` 3.
59+
* The singletons :const:`None`, :const:`Ellipsis` and :exc:`StopIteration`.
60+
* :class:`code` objects, if *allow_code* is true. See note above about
61+
version dependence.
62+
63+
.. versionchanged:: 3.4
64+
65+
* Added format version 3, which supports marshalling recursive lists, sets
66+
and dictionaries.
67+
* Added format version 4, which supports efficient representations
68+
of short strings.
69+
70+
.. versionchanged:: next
71+
72+
Added format version 5, which allows marshalling slices.
5573

56-
There are functions that read/write files as well as functions operating on
57-
bytes-like objects.
5874

5975
The module defines these functions:
6076

@@ -140,11 +156,24 @@ In addition, the following constants are defined:
140156

141157
.. data:: version
142158

143-
Indicates the format that the module uses. Version 0 is the historical
144-
format, version 1 shares interned strings and version 2 uses a binary format
145-
for floating-point numbers.
146-
Version 3 adds support for object instancing and recursion.
147-
The current version is 4.
159+
Indicates the format that the module uses.
160+
Version 0 is the historical first version; subsequent versions
161+
add new features.
162+
Generally, a new version becomes the default when it is introduced.
163+
164+
======= =============== ====================================================
165+
Version Available since New features
166+
======= =============== ====================================================
167+
1 Python 2.4 Sharing interned strings
168+
------- --------------- ----------------------------------------------------
169+
2 Python 2.5 Binary representation of floats
170+
------- --------------- ----------------------------------------------------
171+
3 Python 3.4 Support for object instancing and recursion
172+
------- --------------- ----------------------------------------------------
173+
4 Python 3.4 Efficient representation of short strings
174+
------- --------------- ----------------------------------------------------
175+
5 Python 3.14 Support for :class:`slice` objects
176+
======= =============== ====================================================
148177

149178

150179
.. rubric:: Footnotes
@@ -154,4 +183,3 @@ In addition, the following constants are defined:
154183
around in a self-contained form. Strictly speaking, "to marshal" means to
155184
convert some data from internal to external form (in an RPC buffer for instance)
156185
and "unmarshalling" for the reverse process.
157-

0 commit comments

Comments
 (0)