Skip to content

Commit ad41900

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 0dc364d + 9d34623 commit ad41900

File tree

129 files changed

+2790
-1081
lines changed

Some content is hidden

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

129 files changed

+2790
-1081
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"image": "ghcr.io/python/wasicontainer:latest",
3+
"onCreateCommand": [
4+
// Install common tooling.
5+
"dnf",
6+
"install",
7+
"-y",
8+
// For umask fix below.
9+
"/usr/bin/setfacl"
10+
],
11+
"updateContentCommand": {
12+
// Using the shell for `nproc` usage.
13+
"python": "python3 Tools/wasm/wasi build --quiet -- --with-pydebug -C"
14+
},
15+
"postCreateCommand": {
16+
// https://github.com/orgs/community/discussions/26026
17+
"umask fix: workspace": ["sudo", "setfacl", "-bnR", "."],
18+
"umask fix: /tmp": ["sudo", "setfacl", "-bnR", "/tmp"]
19+
},
20+
"customizations": {
21+
"vscode": {
22+
"extensions": [
23+
// Highlighting for Parser/Python.asdl.
24+
"brettcannon.zephyr-asdl",
25+
// Highlighting for configure.ac.
26+
"maelvalais.autoconf",
27+
// C auto-complete.
28+
"ms-vscode.cpptools",
29+
// Python auto-complete.
30+
"ms-python.python"
31+
],
32+
"settings": {
33+
"C_Cpp.default.compilerPath": "/usr/bin/clang",
34+
"C_Cpp.default.cStandard": "c11",
35+
"C_Cpp.default.defines": [
36+
"CONFIG_64",
37+
"Py_BUILD_CORE"
38+
],
39+
"C_Cpp.default.includePath": [
40+
"${workspaceFolder}/*",
41+
"${workspaceFolder}/Include/**"
42+
],
43+
// https://github.com/microsoft/vscode-cpptools/issues/10732
44+
"C_Cpp.errorSquiggles": "disabled",
45+
"editor.insertSpaces": true,
46+
"editor.rulers": [
47+
80
48+
],
49+
"editor.tabSize": 4,
50+
"editor.trimAutoWhitespace": true,
51+
"files.associations": {
52+
"*.h": "c"
53+
},
54+
"files.encoding": "utf8",
55+
"files.eol": "\n",
56+
"files.insertFinalNewline": true,
57+
"files.trimTrailingWhitespace": true,
58+
"python.analysis.diagnosticSeverityOverrides": {
59+
// Complains about shadowing the stdlib w/ the stdlib.
60+
"reportShadowedImports": "none",
61+
// Doesn't like _frozen_importlib.
62+
"reportMissingImports": "none"
63+
},
64+
"python.analysis.extraPaths": [
65+
"Lib"
66+
],
67+
"[restructuredtext]": {
68+
"editor.tabSize": 3
69+
}
70+
}
71+
}
72+
}
73+
}

.github/workflows/reusable-wasi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
runs-on: ubuntu-24.04
1717
timeout-minutes: 60
1818
env:
19-
WASMTIME_VERSION: 22.0.0
20-
WASI_SDK_VERSION: 24
19+
WASMTIME_VERSION: 38.0.2
20+
WASI_SDK_VERSION: 25
2121
WASI_SDK_PATH: /opt/wasi-sdk
2222
CROSS_BUILD_PYTHON: cross-build/build
2323
CROSS_BUILD_WASI: cross-build/wasm32-wasip1

Doc/c-api/arg.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ There are three ways strings and buffers can be converted to C:
160160
``w*`` (read-write :term:`bytes-like object`) [Py_buffer]
161161
This format accepts any object which implements the read-write buffer
162162
interface. It fills a :c:type:`Py_buffer` structure provided by the caller.
163-
The buffer may contain embedded null bytes. The caller have to call
163+
The buffer may contain embedded null bytes. The caller has to call
164164
:c:func:`PyBuffer_Release` when it is done with the buffer.
165165

166166
``es`` (:class:`str`) [const char \*encoding, char \*\*buffer]

Doc/c-api/capsule.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
1515
.. c:type:: PyCapsule
1616
1717
This subtype of :c:type:`PyObject` represents an opaque value, useful for C
18-
extension modules who need to pass an opaque value (as a :c:expr:`void*`
18+
extension modules which need to pass an opaque value (as a :c:expr:`void*`
1919
pointer) through Python code to other C code. It is often used to make a C
2020
function pointer defined in one module available to other modules, so the
2121
regular import mechanism can be used to access C APIs defined in dynamically

Doc/c-api/code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ may change without deprecation warnings.
289289
290290
.. c:function:: Py_ssize_t PyUnstable_Eval_RequestCodeExtraIndex(freefunc free)
291291
292-
Return a new an opaque index value used to adding data to code objects.
292+
Return a new opaque index value used to adding data to code objects.
293293
294294
You generally call this function once (per interpreter) and use the result
295295
with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate

Doc/c-api/codec.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Codec registry and support functions
77
88
Register a new codec search function.
99
10-
As side effect, this tries to load the :mod:`!encodings` package, if not yet
10+
As a side effect, this tries to load the :mod:`!encodings` package, if not yet
1111
done, to make sure that it is always first in the list of search functions.
1212
1313
.. c:function:: int PyCodec_Unregister(PyObject *search_function)

Doc/c-api/module.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ Module Objects
102102
Return a pointer to the :c:type:`PyModuleDef` struct from which the module was
103103
created, or ``NULL`` if the module wasn't created from a definition.
104104
105+
On error, return ``NULL`` with an exception set.
106+
Use :c:func:`PyErr_Occurred` to tell this case apart from a mising
107+
:c:type:`!PyModuleDef`.
108+
105109
106110
.. c:function:: PyObject* PyModule_GetFilenameObject(PyObject *module)
107111

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Pending removal in Python 3.20
88
- :mod:`argparse`
99
- :mod:`csv`
1010
- :mod:`!ctypes.macholib`
11+
- :mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)
1112
- :mod:`imaplib`
1213
- :mod:`ipaddress`
1314
- :mod:`json`

Doc/faq/general.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ How do I get documentation on Python?
186186
-------------------------------------
187187

188188
The standard documentation for the current stable version of Python is available
189-
at https://docs.python.org/3/. PDF, plain text, and downloadable HTML versions are
189+
at https://docs.python.org/3/. EPUB, plain text, and downloadable HTML versions are
190190
also available at https://docs.python.org/3/download.html.
191191

192192
The documentation is written in reStructuredText and processed by `the Sphinx

Doc/library/annotationlib.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,29 @@ Functions
340340

341341
* VALUE: :attr:`!object.__annotations__` is tried first; if that does not exist,
342342
the :attr:`!object.__annotate__` function is called if it exists.
343+
343344
* FORWARDREF: If :attr:`!object.__annotations__` exists and can be evaluated successfully,
344345
it is used; otherwise, the :attr:`!object.__annotate__` function is called. If it
345346
does not exist either, :attr:`!object.__annotations__` is tried again and any error
346347
from accessing it is re-raised.
348+
349+
* When calling :attr:`!object.__annotate__` it is first called with :attr:`~Format.FORWARDREF`.
350+
If this is not implemented, it will then check if :attr:`~Format.VALUE_WITH_FAKE_GLOBALS`
351+
is supported and use that in the fake globals environment.
352+
If neither of these formats are supported, it will fall back to using :attr:`~Format.VALUE`.
353+
If :attr:`~Format.VALUE` fails, the error from this call will be raised.
354+
347355
* STRING: If :attr:`!object.__annotate__` exists, it is called first;
348356
otherwise, :attr:`!object.__annotations__` is used and stringified
349357
using :func:`annotations_to_string`.
350358

359+
* When calling :attr:`!object.__annotate__` it is first called with :attr:`~Format.STRING`.
360+
If this is not implemented, it will then check if :attr:`~Format.VALUE_WITH_FAKE_GLOBALS`
361+
is supported and use that in the fake globals environment.
362+
If neither of these formats are supported, it will fall back to using :attr:`~Format.VALUE`
363+
with the result converted using :func:`annotations_to_string`.
364+
If :attr:`~Format.VALUE` fails, the error from this call will be raised.
365+
351366
Returns a dict. :func:`!get_annotations` returns a new dict every time
352367
it's called; calling it twice on the same object will return two
353368
different but equivalent dicts.

0 commit comments

Comments
 (0)