Skip to content

Commit 887853d

Browse files
Merge branch 'main' into Py_ABC-UB
2 parents 1acabab + cc6b62a commit 887853d

File tree

125 files changed

+2388
-466
lines changed

Some content is hidden

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

125 files changed

+2388
-466
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ jobs:
205205
free-threading: true
206206
uses: ./.github/workflows/reusable-macos.yml
207207
with:
208-
config_hash: ${{ needs.build-context.outputs.config-hash }}
209208
free-threading: ${{ matrix.free-threading }}
210209
os: ${{ matrix.os }}
211210

@@ -237,7 +236,6 @@ jobs:
237236
bolt: true
238237
uses: ./.github/workflows/reusable-ubuntu.yml
239238
with:
240-
config_hash: ${{ needs.build-context.outputs.config-hash }}
241239
bolt-optimizations: ${{ matrix.bolt }}
242240
free-threading: ${{ matrix.free-threading }}
243241
os: ${{ matrix.os }}
@@ -414,8 +412,6 @@ jobs:
414412
needs: build-context
415413
if: needs.build-context.outputs.run-tests == 'true'
416414
uses: ./.github/workflows/reusable-wasi.yml
417-
with:
418-
config_hash: ${{ needs.build-context.outputs.config-hash }}
419415

420416
test-hypothesis:
421417
name: "Hypothesis tests on Ubuntu"
@@ -600,7 +596,6 @@ jobs:
600596
uses: ./.github/workflows/reusable-san.yml
601597
with:
602598
sanitizer: ${{ matrix.sanitizer }}
603-
config_hash: ${{ needs.build-context.outputs.config-hash }}
604599
free-threading: ${{ matrix.free-threading }}
605600

606601
cross-build-linux:

.github/workflows/reusable-context.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ on: # yamllint disable-line rule:truthy
1717
# || 'falsy-branch'
1818
# }}
1919
#
20-
config-hash:
21-
description: Config hash value for use in cache keys
22-
value: ${{ jobs.compute-changes.outputs.config-hash }} # str
2320
run-docs:
2421
description: Whether to build the docs
2522
value: ${{ jobs.compute-changes.outputs.run-docs }} # bool
@@ -42,7 +39,6 @@ jobs:
4239
runs-on: ubuntu-latest
4340
timeout-minutes: 10
4441
outputs:
45-
config-hash: ${{ steps.config-hash.outputs.hash }}
4642
run-ci-fuzz: ${{ steps.changes.outputs.run-ci-fuzz }}
4743
run-docs: ${{ steps.changes.outputs.run-docs }}
4844
run-tests: ${{ steps.changes.outputs.run-tests }}
@@ -100,8 +96,3 @@ jobs:
10096
GITHUB_EVENT_NAME: ${{ github.event_name }}
10197
CCF_TARGET_REF: ${{ github.base_ref || github.event.repository.default_branch }}
10298
CCF_HEAD_REF: ${{ github.event.pull_request.head.sha || github.sha }}
103-
104-
- name: Compute hash for config cache key
105-
id: config-hash
106-
run: |
107-
echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> "$GITHUB_OUTPUT"

.github/workflows/reusable-macos.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Reusable macOS
33
on:
44
workflow_call:
55
inputs:
6-
config_hash:
7-
required: true
8-
type: string
96
free-threading:
107
required: false
118
type: boolean

.github/workflows/reusable-san.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
sanitizer:
77
required: true
88
type: string
9-
config_hash:
10-
required: true
11-
type: string
129
free-threading:
1310
description: Whether to use free-threaded mode
1411
required: false

.github/workflows/reusable-ubuntu.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Reusable Ubuntu
33
on:
44
workflow_call:
55
inputs:
6-
config_hash:
7-
required: true
8-
type: string
96
bolt-optimizations:
107
description: Whether to enable BOLT optimizations
118
required: false

.github/workflows/reusable-wasi.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: Reusable WASI
22

33
on:
44
workflow_call:
5-
inputs:
6-
config_hash:
7-
required: true
8-
type: string
95

106
env:
117
FORCE_COLOR: 1
@@ -53,7 +49,7 @@ jobs:
5349
- name: "Configure build Python"
5450
run: python3 Tools/wasm/wasi configure-build-python -- --config-cache --with-pydebug
5551
- name: "Make build Python"
56-
run: python3 Tools/wasm/wasi.py make-build-python
52+
run: python3 Tools/wasm/wasi make-build-python
5753
- name: "Configure host"
5854
# `--with-pydebug` inferred from configure-build-python
5955
run: python3 Tools/wasm/wasi configure-host -- --config-cache

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ Tools/unicode/data/
135135
/config.log
136136
/config.status
137137
/config.status.lineno
138-
# hendrikmuhs/ccache-action@v1
139138
/.ccache
140139
/cross-build/
141140
/jit_stencils*.h

Doc/c-api/concrete.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ Other Objects
109109
descriptor.rst
110110
slice.rst
111111
memoryview.rst
112+
picklebuffer.rst
112113
weakref.rst
113114
capsule.rst
114115
frame.rst

Doc/c-api/import.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,24 @@ Importing Modules
333333
strings instead of Python :class:`str` objects.
334334
335335
.. versionadded:: 3.14
336+
337+
.. c:function:: PyObject* PyImport_CreateModuleFromInitfunc(PyObject *spec, PyObject* (*initfunc)(void))
338+
339+
This function is a building block that enables embedders to implement
340+
the :py:meth:`~importlib.abc.Loader.create_module` step of custom
341+
static extension importers (e.g. of statically-linked extensions).
342+
343+
*spec* must be a :class:`~importlib.machinery.ModuleSpec` object.
344+
345+
*initfunc* must be an :ref:`initialization function <extension-export-hook>`,
346+
the same as for :c:func:`PyImport_AppendInittab`.
347+
348+
On success, create and return a module object.
349+
This module will not be initialized; call :c:func:`!PyModule_Exec`
350+
to initialize it.
351+
(Custom importers should do this in their
352+
:py:meth:`~importlib.abc.Loader.exec_module` method.)
353+
354+
On error, return NULL with an exception set.
355+
356+
.. versionadded:: next

Doc/c-api/picklebuffer.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.. highlight:: c
2+
3+
.. _picklebuffer-objects:
4+
5+
.. index::
6+
pair: object; PickleBuffer
7+
8+
Pickle buffer objects
9+
---------------------
10+
11+
.. versionadded:: 3.8
12+
13+
A :class:`pickle.PickleBuffer` object wraps a :ref:`buffer-providing object
14+
<bufferobjects>` for out-of-band data transfer with the :mod:`pickle` module.
15+
16+
17+
.. c:var:: PyTypeObject PyPickleBuffer_Type
18+
19+
This instance of :c:type:`PyTypeObject` represents the Python pickle buffer type.
20+
This is the same object as :class:`pickle.PickleBuffer` in the Python layer.
21+
22+
23+
.. c:function:: int PyPickleBuffer_Check(PyObject *op)
24+
25+
Return true if *op* is a pickle buffer instance.
26+
This function always succeeds.
27+
28+
29+
.. c:function:: PyObject *PyPickleBuffer_FromObject(PyObject *obj)
30+
31+
Create a pickle buffer from the object *obj*.
32+
33+
This function will fail if *obj* doesn't support the :ref:`buffer protocol <bufferobjects>`.
34+
35+
On success, return a new pickle buffer instance.
36+
On failure, set an exception and return ``NULL``.
37+
38+
Analogous to calling :class:`pickle.PickleBuffer` with *obj* in Python.
39+
40+
41+
.. c:function:: const Py_buffer *PyPickleBuffer_GetBuffer(PyObject *picklebuf)
42+
43+
Get a pointer to the underlying :c:type:`Py_buffer` that the pickle buffer wraps.
44+
45+
The returned pointer is valid as long as *picklebuf* is alive and has not been
46+
released. The caller must not modify or free the returned :c:type:`Py_buffer`.
47+
If the pickle buffer has been released, raise :exc:`ValueError`.
48+
49+
On success, return a pointer to the buffer view.
50+
On failure, set an exception and return ``NULL``.
51+
52+
53+
.. c:function:: int PyPickleBuffer_Release(PyObject *picklebuf)
54+
55+
Release the underlying buffer held by the pickle buffer.
56+
57+
Return ``0`` on success. On failure, set an exception and return ``-1``.
58+
59+
Analogous to calling :meth:`pickle.PickleBuffer.release` in Python.

0 commit comments

Comments
 (0)