Skip to content

Commit ebf3375

Browse files
authored
Merge pull request #197 from thisisthepy/feat/python-3.15.0
Build: CPython 3.15.0 final (python-build-standalone 20261013)
2 parents 5d7a7cb + c8d5057 commit ebf3375

165 files changed

Lines changed: 17639 additions & 11524 deletions

File tree

Some content is hidden

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

‎gradle.properties‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ org.jetbrains.compose.experimental.jscanvas.enabled=true
2323
org.jetbrains.compose.experimental.uikit.enabled=true
2424

2525
# Python Build
26-
pythonVersion=3.14.7
26+
pythonVersion=3.15.0
2727
pythonFreeThreaded=false
28-
pythonBuildStandaloneRelease=20260807
28+
pythonBuildStandaloneRelease=20261013
2929
pythonAppleSupportBuild=b11
3030

3131
# GraalVM native-image (sample's nativeCompile task). Liberica NIK is not in a location Gradle's

‎python-checksums.properties‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Python Multiplatform Checksums
22
android-aarch64-3.14.7=6d50cc3aa66e414a439594089bcdfb5f1264358155c70c1f00471c24cfb477fb
3-
android-aarch64-3.15.0rc1=7d6fb28a69368841656f919a08141b0e3720837ac67987388037ee9d2a5c5492
3+
android-aarch64-3.15.0=571e4cf4e0aee3d1ab54a52ca3d4e6845b85ec0bb327f7debfb873172f445dab
44
android-x86_64-3.14.7=2c16ce2359565cd8c24f86cfb75630768ba6607e732946b294b969797f583b60
5-
android-x86_64-3.15.0rc1=f048f5c60b538efc64e4c26399a0a21202ce430949d5b2c10369d624548a5dc3
5+
android-x86_64-3.15.0=2413d51948d612cf42baefba25295bb83c2ed84df5726af6fe5bde2dec5d87e7
66
ios-3.14-b11=b591f3301bd22a4f423c49c746cac9e55558b909fd14d6eb8327ccc62234ab7b
7-
ios-3.15.0rc1-pythonorg=178bf7bef9cd0f18b27cacb98b14332a5ba44c9427543ffb71f8809bc1f11c3c
7+
ios-3.15.0-pythonorg=68e98ab35cc0643ba3a227a8c7768da45c2a5e67dbe1bc26598537e96680fd19
88
linux-x86_64-3.14.7-20260807=a2478d654ed51d443bae21ec20ad927f116b4f5aae4094ab74918a6aa38f0575
99
linux-x86_64-3.14.7-20260807-freethreaded=13f80b7fc242814c0be4e2a4d8283f39c7e1c0f3f0d8f6d6a15cedb5b62eb6d3
10-
linux-x86_64-3.15.0rc1-20260807=aeb0d2cfe5e7028170039a95b96d74aa6830efe2fc49808122aa8f835d6e9f31
11-
linux-x86_64-3.15.0rc1-20260807-freethreaded=c04c940dbf8eca39c66c73d8c51330341a5a7f9b3b13f689ec14521c6357a44d
10+
linux-x86_64-3.15.0-20261013=69740dcd9b3480b3d53760f2d3b75582adb14fa54434628dea32480ddede542a
11+
linux-x86_64-3.15.0-20261013-freethreaded=afd020a480ce1767d6ac1b56e97b59c6c06f85e3a95a42f69ae146d25a07689e
1212
macos-aarch64-3.14.7-20260807=532645be202d3df8510ab318ca5faed92060a694c8327144e14fa81f31af0f6d
1313
macos-aarch64-3.14.7-20260807-freethreaded=618fe8d34b0704ce4a8aa2cfa6fa96063d6aa48970a131f19e1591d9785d1111
14-
macos-aarch64-3.15.0rc1-20260807=bfd0fa8be7d7dfb5c75f6848757feb4bb9e4274da634e97e77aa00c8e521a6a0
15-
macos-aarch64-3.15.0rc1-20260807-freethreaded=7dc7e3758b6a77358b24d795e0a7eee3b5f3d9bc5fa0e3e3c65db52898f07815
14+
macos-aarch64-3.15.0-20261013=b4ab2009803cef142e4ebf2ebef225f6875f83cc35caf4eefb437aa9b2b76783
15+
macos-aarch64-3.15.0-20261013-freethreaded=94e34d776cff596017d15fce1b2175d463628a765ddb37412a39aaba6d31bf67
1616
macos-x86_64-3.14.7-20260807=9964e2d618ebea03be8ea3e65ab0ecc0f2b030ce203345b8f92654641fd4de66
1717
macos-x86_64-3.14.7-20260807-freethreaded=746207f0d2644c5c98619f9d0ed37824d9871ea8d27640edc779a46d85038b3b
18-
macos-x86_64-3.15.0rc1-20260807=f36c0921d03468747ed74c434e4b04749a35593718cd641d0f08fa01e9c7885e
19-
macos-x86_64-3.15.0rc1-20260807-freethreaded=69beed4659c78b3683f1ea56c12956c7234f16e0417edf24f7f69c5a9f7b09ec
18+
macos-x86_64-3.15.0-20261013=4760e8fb2821441c0dbc72be49a25400c6ae90be4daa7e2a49617ed09f6a2919
19+
macos-x86_64-3.15.0-20261013-freethreaded=c552d4f10738f35de58be64716ec5104f55337d71e962e2beb09164e98cff1ec
2020
windows-x86_64-3.14.7-20260807=840e368318d1630bd8efbd3f7de8fab32cb4bbd735baef733f9034f2676c6a92
2121
windows-x86_64-3.14.7-20260807-freethreaded=c8323293c9e76e8b244a0e533894512f067dac2a6aa2dfcb3494cbe74b3af58e
22-
windows-x86_64-3.15.0rc1-20260807=bc0d0f3c7b88873688f30bc78da8387a6653a5493424951d3a84c658c973198e
23-
windows-x86_64-3.15.0rc1-20260807-freethreaded=e5998e014f16074ac9f6d61eb2a31ff8ac8bc331b61da2c5acf7d15abf4a2650
22+
windows-x86_64-3.15.0-20261013=743d2269e74a98f7c4281dbc2e8710c171be1965693720aac818ff0157e4d965
23+
windows-x86_64-3.15.0-20261013-freethreaded=aadcd190365f1154854478da313219691ab14cc35497daec66a2149f3571ae36

‎python-multiplatform-gradle-plugin/build.gradle.kts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ val generateCoordinates = tasks.register("generateCoordinates") {
243243
val file = rootDir.resolve("../gradle.properties")
244244
if (file.isFile) file.inputStream().use { load(it) }
245245
}
246-
val pythonVersionValue = rootProperties.getProperty("pythonVersion") ?: "3.14.7"
247-
val pbsReleaseValue = rootProperties.getProperty("pythonBuildStandaloneRelease") ?: "20260807"
246+
val pythonVersionValue = rootProperties.getProperty("pythonVersion") ?: "3.15.0"
247+
val pbsReleaseValue = rootProperties.getProperty("pythonBuildStandaloneRelease") ?: "20261013"
248248
val freeThreadedValue = rootProperties.getProperty("pythonFreeThreaded")?.toBoolean() ?: false
249249

250250
// `python-multiplatform` itself is versioned "$pythonVersion-alpha01" -- see that build's own

‎python-multiplatform/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ plugins {
3838

3939
val configuredPythonVersion = project.findProperty("pythonVersion")?.toString() ?: project.rootProject.version.toString()
4040
val pythonFreeThreaded = project.findProperty("pythonFreeThreaded")?.toString()?.toBoolean() ?: false
41-
val pbsRelease = project.findProperty("pythonBuildStandaloneRelease")?.toString() ?: "20260807"
41+
val pbsRelease = project.findProperty("pythonBuildStandaloneRelease")?.toString() ?: "20261013"
4242
val pythonAppleSupportBuild = project.findProperty("pythonAppleSupportBuild")?.toString() ?: "b11"
4343

4444
val pythonVersion = configuredPythonVersion

‎python-multiplatform/src/nativeInterop/cinterop/include/Python.h‎

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
// is not needed.
1010

1111

12-
// Include Python header files
13-
#include "patchlevel.h"
14-
#include "pyconfig.h"
15-
#include "pymacconfig.h"
12+
// Include Python configuration headers
13+
#include "patchlevel.h" // the Python version
14+
#include "pyconfig.h" // information from configure
15+
#include "pymacconfig.h" // overrides for pyconfig
16+
#include "pyabi.h" // feature/ABI selection
1617

1718

1819
// Include standard header files
@@ -22,12 +23,13 @@
2223
#include <limits.h> // INT_MAX
2324
#include <math.h> // HUGE_VAL
2425
#include <stdarg.h> // va_list
26+
#include <string.h> // memcpy()
2527
#include <wchar.h> // wchar_t
2628
#ifdef HAVE_SYS_TYPES_H
2729
# include <sys/types.h> // ssize_t
2830
#endif
2931

30-
// <errno.h>, <stdio.h>, <stdlib.h> and <string.h> headers are no longer used
32+
// <errno.h>, <stdio.h> and <stdlib.h> headers are no longer used
3133
// by Python, but kept for the backward compatibility of existing third party C
3234
// extensions. They are not included by limited C API version 3.11 and newer.
3335
//
@@ -37,7 +39,6 @@
3739
# include <errno.h> // errno
3840
# include <stdio.h> // FILE*
3941
# include <stdlib.h> // getenv()
40-
# include <string.h> // memcpy()
4142
#endif
4243
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030d0000
4344
# include <ctype.h> // tolower()
@@ -46,43 +47,40 @@
4647
# endif
4748
#endif
4849

49-
// gh-111506: The free-threaded build is not compatible with the limited API
50-
// or the stable ABI.
51-
#if defined(Py_LIMITED_API) && defined(Py_GIL_DISABLED)
52-
# error "The limited API is not currently supported in the free-threaded build"
53-
#endif
54-
55-
#if defined(Py_GIL_DISABLED) && defined(_MSC_VER)
56-
# include <intrin.h> // __readgsqword()
57-
#endif
50+
#if !defined(Py_LIMITED_API)
51+
# if defined(Py_GIL_DISABLED)
52+
# if defined(_MSC_VER) || defined(__MINGW32__)
53+
# include <intrin.h> // __readgsqword()
54+
# endif
55+
# endif
56+
#endif // Py_GIL_DISABLED
5857

59-
#if defined(Py_GIL_DISABLED) && defined(__MINGW32__)
60-
# include <intrin.h> // __readgsqword()
58+
#ifdef _MSC_VER
59+
// Ignore MSC warning C4201: "nonstandard extension used: nameless
60+
// struct/union". (Only generated for C standard versions less than C11, which
61+
// we don't *officially* support.)
62+
__pragma(warning(push))
63+
__pragma(warning(disable: 4201))
6164
#endif
6265

63-
// Suppress known warnings in Python header files.
64-
#if defined(_MSC_VER)
65-
// Warning that alignas behaviour has changed. Doesn't affect us, because we
66-
// never relied on the old behaviour.
67-
#pragma warning(push)
68-
#pragma warning(disable: 5274)
69-
#endif
7066

7167
// Include Python header files
7268
#include "pyport.h"
69+
#include "exports.h"
7370
#include "pymacro.h"
7471
#include "pymath.h"
7572
#include "pymem.h"
7673
#include "pytypedefs.h"
7774
#include "pybuffer.h"
7875
#include "pystats.h"
7976
#include "pyatomic.h"
80-
#include "lock.h"
77+
#include "cpython/pylock.h"
8178
#include "critical_section.h"
8279
#include "object.h"
8380
#include "refcount.h"
8481
#include "objimpl.h"
85-
#include "typeslots.h"
82+
#include "slots.h"
83+
#include "slots_generated.h"
8684
#include "pyhash.h"
8785
#include "cpython/pydebug.h"
8886
#include "bytearrayobject.h"
@@ -104,7 +102,7 @@
104102
#include "setobject.h"
105103
#include "methodobject.h"
106104
#include "moduleobject.h"
107-
#include "monitoring.h"
105+
#include "cpython/monitoring.h"
108106
#include "cpython/funcobject.h"
109107
#include "cpython/classobject.h"
110108
#include "fileobject.h"
@@ -120,6 +118,7 @@
120118
#include "cpython/genobject.h"
121119
#include "descrobject.h"
122120
#include "genericaliasobject.h"
121+
#include "cpython/sentinelobject.h"
123122
#include "warnings.h"
124123
#include "weakrefobject.h"
125124
#include "structseq.h"
@@ -147,9 +146,8 @@
147146
#include "cpython/pyfpe.h"
148147
#include "cpython/tracemalloc.h"
149148

150-
// Restore warning filter
151149
#ifdef _MSC_VER
152-
#pragma warning(pop)
150+
__pragma(warning(pop)) // warning(disable: 4201)
153151
#endif
154152

155153
#endif /* !Py_PYTHON_H */

‎python-multiplatform/src/nativeInterop/cinterop/include/cpython/abstract.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/* Like PyObject_CallMethod(), but expect a _Py_Identifier*
88
as the method name. */
9-
PyAPI_FUNC(PyObject*) _PyObject_CallMethodId(
9+
Py_DEPRECATED(3.15) PyAPI_FUNC(PyObject*) _PyObject_CallMethodId(
1010
PyObject *obj,
1111
_Py_Identifier *name,
1212
const char *format, ...);

‎python-multiplatform/src/nativeInterop/cinterop/include/cpython/bytearrayobject.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
/* Object layout */
66
typedef struct {
77
PyObject_VAR_HEAD
8-
Py_ssize_t ob_alloc; /* How many bytes allocated in ob_bytes */
8+
/* How many bytes allocated in ob_bytes
9+
10+
In the current implementation this is equivalent to Py_SIZE(ob_bytes_object).
11+
The value is always loaded and stored atomically for thread safety.
12+
There are API compatibilty concerns with removing so keeping for now. */
13+
Py_ssize_t ob_alloc;
914
char *ob_bytes; /* Physical backing buffer */
1015
char *ob_start; /* Logical start inside ob_bytes */
1116
Py_ssize_t ob_exports; /* How many buffer exports */
17+
PyObject *ob_bytes_object; /* PyBytes for zero-copy bytes conversion */
1218
} PyByteArrayObject;
1319

14-
PyAPI_DATA(char) _PyByteArray_empty_string[];
15-
1620
/* Macros and static inline functions, trading safety for speed */
1721
#define _PyByteArray_CAST(op) \
1822
(assert(PyByteArray_Check(op)), _Py_CAST(PyByteArrayObject*, op))
1923

2024
static inline char* PyByteArray_AS_STRING(PyObject *op)
2125
{
22-
PyByteArrayObject *self = _PyByteArray_CAST(op);
23-
if (Py_SIZE(self)) {
24-
return self->ob_start;
25-
}
26-
return _PyByteArray_empty_string;
26+
return _PyByteArray_CAST(op)->ob_start;
2727
}
2828
#define PyByteArray_AS_STRING(self) PyByteArray_AS_STRING(_PyObject_CAST(self))
2929

‎python-multiplatform/src/nativeInterop/cinterop/include/cpython/bytesobject.h‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,46 @@ _PyBytes_Join(PyObject *sep, PyObject *iterable)
4040
{
4141
return PyBytes_Join(sep, iterable);
4242
}
43+
44+
45+
// --- PyBytesWriter API -----------------------------------------------------
46+
47+
typedef struct PyBytesWriter PyBytesWriter;
48+
49+
PyAPI_FUNC(PyBytesWriter *) PyBytesWriter_Create(
50+
Py_ssize_t size);
51+
PyAPI_FUNC(void) PyBytesWriter_Discard(
52+
PyBytesWriter *writer);
53+
PyAPI_FUNC(PyObject*) PyBytesWriter_Finish(
54+
PyBytesWriter *writer);
55+
PyAPI_FUNC(PyObject*) PyBytesWriter_FinishWithSize(
56+
PyBytesWriter *writer,
57+
Py_ssize_t size);
58+
PyAPI_FUNC(PyObject*) PyBytesWriter_FinishWithPointer(
59+
PyBytesWriter *writer,
60+
void *buf);
61+
62+
PyAPI_FUNC(void*) PyBytesWriter_GetData(
63+
PyBytesWriter *writer);
64+
PyAPI_FUNC(Py_ssize_t) PyBytesWriter_GetSize(
65+
PyBytesWriter *writer);
66+
67+
PyAPI_FUNC(int) PyBytesWriter_WriteBytes(
68+
PyBytesWriter *writer,
69+
const void *bytes,
70+
Py_ssize_t size);
71+
PyAPI_FUNC(int) PyBytesWriter_Format(
72+
PyBytesWriter *writer,
73+
const char *format,
74+
...);
75+
76+
PyAPI_FUNC(int) PyBytesWriter_Resize(
77+
PyBytesWriter *writer,
78+
Py_ssize_t size);
79+
PyAPI_FUNC(int) PyBytesWriter_Grow(
80+
PyBytesWriter *writer,
81+
Py_ssize_t size);
82+
PyAPI_FUNC(void*) PyBytesWriter_GrowAndUpdatePointer(
83+
PyBytesWriter *writer,
84+
Py_ssize_t size,
85+
void *buf);

‎python-multiplatform/src/nativeInterop/cinterop/include/cpython/ceval.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ _PyEval_RequestCodeExtraIndex(freefunc f) {
2323

2424
PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *);
2525
PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *);
26+
PyAPI_FUNC(int) _PyEval_UnpackIndices(PyObject *, PyObject *,
27+
Py_ssize_t,
28+
Py_ssize_t *, Py_ssize_t *);
2629

2730

2831
// Trampoline API
@@ -35,7 +38,7 @@ typedef struct {
3538
PyAPI_FUNC(int) PyUnstable_PerfMapState_Init(void);
3639
PyAPI_FUNC(int) PyUnstable_WritePerfMapEntry(
3740
const void *code_addr,
38-
unsigned int code_size,
41+
size_t code_size,
3942
const char *entry_name);
4043
PyAPI_FUNC(void) PyUnstable_PerfMapState_Fini(void);
4144
PyAPI_FUNC(int) PyUnstable_CopyPerfMapFile(const char* parent_filename);

‎python-multiplatform/src/nativeInterop/cinterop/include/cpython/code.h‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,6 @@ typedef struct _line_offsets {
282282
*/
283283
PyAPI_FUNC(int) _PyCode_CheckLineNumber(int lasti, PyCodeAddressRange *bounds);
284284

285-
/* Create a comparable key used to compare constants taking in account the
286-
* object type. It is used to make sure types are not coerced (e.g., float and
287-
* complex) _and_ to distinguish 0.0 from -0.0 e.g. on IEEE platforms
288-
*
289-
* Return (type(obj), obj, ...): a tuple with variable size (at least 2 items)
290-
* depending on the type and the value. The type is the first item to not
291-
* compare bytes and str which can raise a BytesWarning exception. */
292-
PyAPI_FUNC(PyObject*) _PyCode_ConstantKey(PyObject *obj);
293-
294285
PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts,
295286
PyObject *names, PyObject *lnotab);
296287

0 commit comments

Comments
 (0)