Skip to content

Commit b9d0d15

Browse files
authored
Merge branch 'main' into bugfix/Incorrect-decoding-of-preamble-in-email-parse
2 parents bfcef66 + ac539e7 commit b9d0d15

File tree

422 files changed

+13113
-5946
lines changed

Some content is hidden

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

422 files changed

+13113
-5946
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:2024.09.25.11038928730",
2+
"image": "ghcr.io/python/devcontainer:2025.05.25.15232270922",
33
"onCreateCommand": [
44
// Install common tooling.
55
"dnf",

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,8 @@ Modules/_xxtestfuzz/ @ammaraskar
331331
**/*templateobject* @lysnikolaou
332332
**/*templatelib* @lysnikolaou
333333
**/*tstring* @lysnikolaou
334+
335+
# Remote debugging
336+
Python/remote_debug.h @pablogsal
337+
Python/remote_debugging.c @pablogsal
338+
Modules/_remote_debugging_module.c @pablogsal @ambv @1st1

.github/workflows/build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ permissions:
1515
contents: read
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
18+
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency
19+
# 'group' must be a key uniquely representing a PR or push event.
20+
# github.workflow is the workflow name
21+
# github.actor is the user invoking the workflow
22+
# github.head_ref is the source branch of the PR or otherwise blank
23+
# github.run_id is a unique number for the current run
24+
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }}
1925
cancel-in-progress: true
2026

2127
env:

.github/workflows/tail-call.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,3 @@ jobs:
137137
CC=clang-20 ./configure --with-tail-call-interp --disable-gil
138138
make all --jobs 4
139139
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
140-

.pre-commit-config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ repos:
4343
exclude: ^Lib/test/test_tomllib/
4444
- id: check-yaml
4545
- id: end-of-file-fixer
46-
types: [python]
46+
types_or: [python, yaml]
4747
exclude: Lib/test/tokenizedata/coding20731.py
48+
- id: end-of-file-fixer
49+
files: '^\.github/CODEOWNERS$'
4850
- id: trailing-whitespace
49-
types_or: [c, inc, python, rst]
51+
types_or: [c, inc, python, rst, yaml]
5052
- id: trailing-whitespace
51-
files: '\.(gram)$'
53+
files: '^\.github/CODEOWNERS|\.(gram)$'
5254

5355
- repo: https://github.com/python-jsonschema/check-jsonschema
5456
rev: 0.33.0

.readthedocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ build:
3232
- make -C Doc venv html
3333
- mkdir _readthedocs
3434
- mv Doc/build/html _readthedocs/html
35-

Doc/c-api/allocation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,6 @@ Allocating Objects on the Heap
153153
154154
.. seealso::
155155
156-
:c:func:`PyModule_Create`
156+
:ref:`moduleobjects`
157157
To allocate and create extension modules.
158158

Doc/c-api/code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ bound into a function.
182182
Type of a code object watcher callback function.
183183
184184
If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked
185-
after `co` has been fully initialized. Otherwise, the callback is invoked
185+
after *co* has been fully initialized. Otherwise, the callback is invoked
186186
before the destruction of *co* takes place, so the prior state of *co*
187187
can be inspected.
188188

Doc/c-api/function.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ There are a few functions specific to Python functions.
169169
unpredictable effects, including infinite recursion.
170170
171171
If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked
172-
after `func` has been fully initialized. Otherwise, the callback is invoked
172+
after *func* has been fully initialized. Otherwise, the callback is invoked
173173
before the modification to *func* takes place, so the prior state of *func*
174174
can be inspected. The runtime is permitted to optimize away the creation of
175175
function objects when possible. In such cases no event will be emitted.

Doc/c-api/intro.rst

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ complete listing.
127127
item defined in the module file. Example::
128128

129129
static struct PyModuleDef spam_module = {
130-
PyModuleDef_HEAD_INIT,
130+
.m_base = PyModuleDef_HEAD_INIT,
131131
.m_name = "spam",
132132
...
133133
};
134134

135135
PyMODINIT_FUNC
136136
PyInit_spam(void)
137137
{
138-
return PyModule_Create(&spam_module);
138+
return PyModuleDef_Init(&spam_module);
139139
}
140140

141141

@@ -838,3 +838,41 @@ after every statement run by the interpreter.)
838838

839839
Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source distribution
840840
for more detailed information.
841+
842+
843+
.. _c-api-tools:
844+
845+
Recommended third party tools
846+
=============================
847+
848+
The following third party tools offer both simpler and more sophisticated
849+
approaches to creating C, C++ and Rust extensions for Python:
850+
851+
* `Cython <https://cython.org/>`_
852+
* `cffi <https://cffi.readthedocs.io>`_
853+
* `HPy <https://hpyproject.org/>`_
854+
* `nanobind <https://github.com/wjakob/nanobind>`_ (C++)
855+
* `Numba <https://numba.pydata.org/>`_
856+
* `pybind11 <https://pybind11.readthedocs.io/>`_ (C++)
857+
* `PyO3 <https://pyo3.rs/>`_ (Rust)
858+
* `SWIG <https://www.swig.org>`_
859+
860+
Using tools such as these can help avoid writing code that is tightly bound to
861+
a particular version of CPython, avoid reference counting errors, and focus
862+
more on your own code than on using the CPython API. In general, new versions
863+
of Python can be supported by updating the tool, and your code will often use
864+
newer and more efficient APIs automatically. Some tools also support compiling
865+
for other implementations of Python from a single set of sources.
866+
867+
These projects are not supported by the same people who maintain Python, and
868+
issues need to be raised with the projects directly. Remember to check that the
869+
project is still maintained and supported, as the list above may become
870+
outdated.
871+
872+
.. seealso::
873+
874+
`Python Packaging User Guide: Binary Extensions <https://packaging.python.org/guides/packaging-binary-extensions/>`_
875+
The Python Packaging User Guide not only covers several available
876+
tools that simplify the creation of binary extensions, but also
877+
discusses the various reasons why creating an extension module may be
878+
desirable in the first place.

0 commit comments

Comments
 (0)