Skip to content

Commit 2328ab4

Browse files
committed
Merge branch 'main' into gh-134889-fix-format-simple
2 parents 84ad796 + e598eec commit 2328ab4

File tree

138 files changed

+3620
-1572
lines changed

Some content is hidden

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

138 files changed

+3620
-1572
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"image": "ghcr.io/python/devcontainer:2025.05.25.15232270922",
2+
"image": "ghcr.io/python/devcontainer:2025.05.29.15334414373",
33
"onCreateCommand": [
44
// Install common tooling.
55
"dnf",

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,10 @@ Python/frozen_modules/MANIFEST
171171
/python
172172
!/Python/
173173

174+
# People's custom https://docs.anthropic.com/en/docs/claude-code/memory configs.
175+
/.claude/
176+
CLAUDE.local.md
177+
178+
#### main branch only stuff below this line, things to backport go above. ####
174179
# main branch only: ABI files are not checked/maintained.
175180
Doc/data/python*.abi

Doc/c-api/lifecycle.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,14 @@ that must be true for *B* to occur after *A*.
5555
.. image:: lifecycle.dot.svg
5656
:align: center
5757
:class: invert-in-dark-mode
58-
:alt: Diagram showing events in an object's life. Explained in detail
59-
below.
58+
:alt: Diagram showing events in an object's life. Explained in detail below.
6059
6160
.. only:: latex
6261
6362
.. image:: lifecycle.dot.pdf
6463
:align: center
6564
:class: invert-in-dark-mode
66-
:alt: Diagram showing events in an object's life. Explained in detail
67-
below.
65+
:alt: Diagram showing events in an object's life. Explained in detail below.
6866
6967
.. container::
7068
:name: life-events-graph-description

Doc/c-api/stable.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ It is generally intended for specialized, low-level tools like debuggers.
5151
Projects that use this API are expected to follow
5252
CPython development and spend extra effort adjusting to changes.
5353

54+
.. _stable-application-binary-interface:
5455

5556
Stable Application Binary Interface
5657
===================================

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,19 @@ Pending removal in Python 3.19
66
* Implicitly switching to the MSVC-compatible struct layout by setting
77
:attr:`~ctypes.Structure._pack_` but not :attr:`~ctypes.Structure._layout_`
88
on non-Windows platforms.
9+
10+
* :mod:`hashlib`:
11+
12+
- In hash function constructors such as :func:`~hashlib.new` or the
13+
direct hash-named constructors such as :func:`~hashlib.md5` and
14+
:func:`~hashlib.sha256`, their optional initial data parameter could
15+
also be passed a keyword argument named ``data=`` or ``string=`` in
16+
various :mod:`!hashlib` implementations.
17+
18+
Support for the ``string`` keyword argument name is now deprecated
19+
and slated for removal in Python 3.19.
20+
21+
Before Python 3.13, the ``string`` keyword parameter was not correctly
22+
supported depending on the backend implementation of hash functions.
23+
Prefer passing the initial data as a positional argument for maximum
24+
backwards compatibility.

Doc/extending/windows.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ When creating DLLs in Windows, you can use the CPython library in two ways:
121121
:file:`Python.h` triggers an implicit, configure-aware link with the
122122
library. The header file chooses :file:`pythonXY_d.lib` for Debug,
123123
:file:`pythonXY.lib` for Release, and :file:`pythonX.lib` for Release with
124-
the `Limited API <stable-application-binary-interface>`_ enabled.
124+
the :ref:`Limited API <stable-application-binary-interface>` enabled.
125125

126126
To build two DLLs, spam and ni (which uses C functions found in spam), you
127127
could use these commands::

Doc/howto/urllib2.rst

Lines changed: 19 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -245,75 +245,27 @@ codes in the 100--299 range indicate success, you will usually only see error
245245
codes in the 400--599 range.
246246

247247
:attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary of
248-
response codes in that shows all the response codes used by :rfc:`2616`. The
249-
dictionary is reproduced here for convenience ::
248+
response codes that shows all the response codes used by :rfc:`2616`.
249+
An excerpt from the dictionary is shown below ::
250250

251-
# Table mapping response codes to messages; entries have the
252-
# form {code: (shortmessage, longmessage)}.
253251
responses = {
254-
100: ('Continue', 'Request received, please continue'),
255-
101: ('Switching Protocols',
256-
'Switching to new protocol; obey Upgrade header'),
257-
258-
200: ('OK', 'Request fulfilled, document follows'),
259-
201: ('Created', 'Document created, URL follows'),
260-
202: ('Accepted',
261-
'Request accepted, processing continues off-line'),
262-
203: ('Non-Authoritative Information', 'Request fulfilled from cache'),
263-
204: ('No Content', 'Request fulfilled, nothing follows'),
264-
205: ('Reset Content', 'Clear input form for further input.'),
265-
206: ('Partial Content', 'Partial content follows.'),
266-
267-
300: ('Multiple Choices',
268-
'Object has several resources -- see URI list'),
269-
301: ('Moved Permanently', 'Object moved permanently -- see URI list'),
270-
302: ('Found', 'Object moved temporarily -- see URI list'),
271-
303: ('See Other', 'Object moved -- see Method and URL list'),
272-
304: ('Not Modified',
273-
'Document has not changed since given time'),
274-
305: ('Use Proxy',
275-
'You must use proxy specified in Location to access this '
276-
'resource.'),
277-
307: ('Temporary Redirect',
278-
'Object moved temporarily -- see URI list'),
279-
280-
400: ('Bad Request',
281-
'Bad request syntax or unsupported method'),
282-
401: ('Unauthorized',
283-
'No permission -- see authorization schemes'),
284-
402: ('Payment Required',
285-
'No payment -- see charging schemes'),
286-
403: ('Forbidden',
287-
'Request forbidden -- authorization will not help'),
288-
404: ('Not Found', 'Nothing matches the given URI'),
289-
405: ('Method Not Allowed',
290-
'Specified method is invalid for this server.'),
291-
406: ('Not Acceptable', 'URI not available in preferred format.'),
292-
407: ('Proxy Authentication Required', 'You must authenticate with '
293-
'this proxy before proceeding.'),
294-
408: ('Request Timeout', 'Request timed out; try again later.'),
295-
409: ('Conflict', 'Request conflict.'),
296-
410: ('Gone',
297-
'URI no longer exists and has been permanently removed.'),
298-
411: ('Length Required', 'Client must specify Content-Length.'),
299-
412: ('Precondition Failed', 'Precondition in headers is false.'),
300-
413: ('Request Entity Too Large', 'Entity is too large.'),
301-
414: ('Request-URI Too Long', 'URI is too long.'),
302-
415: ('Unsupported Media Type', 'Entity body in unsupported format.'),
303-
416: ('Requested Range Not Satisfiable',
304-
'Cannot satisfy request range.'),
305-
417: ('Expectation Failed',
306-
'Expect condition could not be satisfied.'),
307-
308-
500: ('Internal Server Error', 'Server got itself in trouble'),
309-
501: ('Not Implemented',
310-
'Server does not support this operation'),
311-
502: ('Bad Gateway', 'Invalid responses from another server/proxy.'),
312-
503: ('Service Unavailable',
313-
'The server cannot process the request due to a high load'),
314-
504: ('Gateway Timeout',
315-
'The gateway server did not receive a timely response'),
316-
505: ('HTTP Version Not Supported', 'Cannot fulfill request.'),
252+
...
253+
<HTTPStatus.OK: 200>: ('OK', 'Request fulfilled, document follows'),
254+
...
255+
<HTTPStatus.FORBIDDEN: 403>: ('Forbidden',
256+
'Request forbidden -- authorization will '
257+
'not help'),
258+
<HTTPStatus.NOT_FOUND: 404>: ('Not Found',
259+
'Nothing matches the given URI'),
260+
...
261+
<HTTPStatus.IM_A_TEAPOT: 418>: ("I'm a Teapot",
262+
'Server refuses to brew coffee because '
263+
'it is a teapot'),
264+
...
265+
<HTTPStatus.SERVICE_UNAVAILABLE: 503>: ('Service Unavailable',
266+
'The server cannot process the '
267+
'request due to a high load'),
268+
...
317269
}
318270

319271
When an error is raised the server responds by returning an HTTP error code

0 commit comments

Comments
 (0)