Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ org.jetbrains.compose.experimental.jscanvas.enabled=true
org.jetbrains.compose.experimental.uikit.enabled=true

# Python Build
pythonVersion=3.14.7
pythonVersion=3.15.0
pythonFreeThreaded=false
pythonBuildStandaloneRelease=20260807
pythonBuildStandaloneRelease=20261013
pythonAppleSupportBuild=b11

# GraalVM native-image (sample's nativeCompile task). Liberica NIK is not in a location Gradle's
Expand Down
22 changes: 11 additions & 11 deletions python-checksums.properties
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Python Multiplatform Checksums
android-aarch64-3.14.7=6d50cc3aa66e414a439594089bcdfb5f1264358155c70c1f00471c24cfb477fb
android-aarch64-3.15.0rc1=7d6fb28a69368841656f919a08141b0e3720837ac67987388037ee9d2a5c5492
android-aarch64-3.15.0=571e4cf4e0aee3d1ab54a52ca3d4e6845b85ec0bb327f7debfb873172f445dab
android-x86_64-3.14.7=2c16ce2359565cd8c24f86cfb75630768ba6607e732946b294b969797f583b60
android-x86_64-3.15.0rc1=f048f5c60b538efc64e4c26399a0a21202ce430949d5b2c10369d624548a5dc3
android-x86_64-3.15.0=2413d51948d612cf42baefba25295bb83c2ed84df5726af6fe5bde2dec5d87e7
ios-3.14-b11=b591f3301bd22a4f423c49c746cac9e55558b909fd14d6eb8327ccc62234ab7b
ios-3.15.0rc1-pythonorg=178bf7bef9cd0f18b27cacb98b14332a5ba44c9427543ffb71f8809bc1f11c3c
ios-3.15.0-pythonorg=68e98ab35cc0643ba3a227a8c7768da45c2a5e67dbe1bc26598537e96680fd19
linux-x86_64-3.14.7-20260807=a2478d654ed51d443bae21ec20ad927f116b4f5aae4094ab74918a6aa38f0575
linux-x86_64-3.14.7-20260807-freethreaded=13f80b7fc242814c0be4e2a4d8283f39c7e1c0f3f0d8f6d6a15cedb5b62eb6d3
linux-x86_64-3.15.0rc1-20260807=aeb0d2cfe5e7028170039a95b96d74aa6830efe2fc49808122aa8f835d6e9f31
linux-x86_64-3.15.0rc1-20260807-freethreaded=c04c940dbf8eca39c66c73d8c51330341a5a7f9b3b13f689ec14521c6357a44d
linux-x86_64-3.15.0-20261013=69740dcd9b3480b3d53760f2d3b75582adb14fa54434628dea32480ddede542a
linux-x86_64-3.15.0-20261013-freethreaded=afd020a480ce1767d6ac1b56e97b59c6c06f85e3a95a42f69ae146d25a07689e
macos-aarch64-3.14.7-20260807=532645be202d3df8510ab318ca5faed92060a694c8327144e14fa81f31af0f6d
macos-aarch64-3.14.7-20260807-freethreaded=618fe8d34b0704ce4a8aa2cfa6fa96063d6aa48970a131f19e1591d9785d1111
macos-aarch64-3.15.0rc1-20260807=bfd0fa8be7d7dfb5c75f6848757feb4bb9e4274da634e97e77aa00c8e521a6a0
macos-aarch64-3.15.0rc1-20260807-freethreaded=7dc7e3758b6a77358b24d795e0a7eee3b5f3d9bc5fa0e3e3c65db52898f07815
macos-aarch64-3.15.0-20261013=b4ab2009803cef142e4ebf2ebef225f6875f83cc35caf4eefb437aa9b2b76783
macos-aarch64-3.15.0-20261013-freethreaded=94e34d776cff596017d15fce1b2175d463628a765ddb37412a39aaba6d31bf67
macos-x86_64-3.14.7-20260807=9964e2d618ebea03be8ea3e65ab0ecc0f2b030ce203345b8f92654641fd4de66
macos-x86_64-3.14.7-20260807-freethreaded=746207f0d2644c5c98619f9d0ed37824d9871ea8d27640edc779a46d85038b3b
macos-x86_64-3.15.0rc1-20260807=f36c0921d03468747ed74c434e4b04749a35593718cd641d0f08fa01e9c7885e
macos-x86_64-3.15.0rc1-20260807-freethreaded=69beed4659c78b3683f1ea56c12956c7234f16e0417edf24f7f69c5a9f7b09ec
macos-x86_64-3.15.0-20261013=4760e8fb2821441c0dbc72be49a25400c6ae90be4daa7e2a49617ed09f6a2919
macos-x86_64-3.15.0-20261013-freethreaded=c552d4f10738f35de58be64716ec5104f55337d71e962e2beb09164e98cff1ec
windows-x86_64-3.14.7-20260807=840e368318d1630bd8efbd3f7de8fab32cb4bbd735baef733f9034f2676c6a92
windows-x86_64-3.14.7-20260807-freethreaded=c8323293c9e76e8b244a0e533894512f067dac2a6aa2dfcb3494cbe74b3af58e
windows-x86_64-3.15.0rc1-20260807=bc0d0f3c7b88873688f30bc78da8387a6653a5493424951d3a84c658c973198e
windows-x86_64-3.15.0rc1-20260807-freethreaded=e5998e014f16074ac9f6d61eb2a31ff8ac8bc331b61da2c5acf7d15abf4a2650
windows-x86_64-3.15.0-20261013=743d2269e74a98f7c4281dbc2e8710c171be1965693720aac818ff0157e4d965
windows-x86_64-3.15.0-20261013-freethreaded=aadcd190365f1154854478da313219691ab14cc35497daec66a2149f3571ae36
4 changes: 2 additions & 2 deletions python-multiplatform-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ val generateCoordinates = tasks.register("generateCoordinates") {
val file = rootDir.resolve("../gradle.properties")
if (file.isFile) file.inputStream().use { load(it) }
}
val pythonVersionValue = rootProperties.getProperty("pythonVersion") ?: "3.14.7"
val pbsReleaseValue = rootProperties.getProperty("pythonBuildStandaloneRelease") ?: "20260807"
val pythonVersionValue = rootProperties.getProperty("pythonVersion") ?: "3.15.0"
val pbsReleaseValue = rootProperties.getProperty("pythonBuildStandaloneRelease") ?: "20261013"
val freeThreadedValue = rootProperties.getProperty("pythonFreeThreaded")?.toBoolean() ?: false

// `python-multiplatform` itself is versioned "$pythonVersion-alpha01" -- see that build's own
Expand Down
2 changes: 1 addition & 1 deletion python-multiplatform/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ plugins {

val configuredPythonVersion = project.findProperty("pythonVersion")?.toString() ?: project.rootProject.version.toString()
val pythonFreeThreaded = project.findProperty("pythonFreeThreaded")?.toString()?.toBoolean() ?: false
val pbsRelease = project.findProperty("pythonBuildStandaloneRelease")?.toString() ?: "20260807"
val pbsRelease = project.findProperty("pythonBuildStandaloneRelease")?.toString() ?: "20261013"
val pythonAppleSupportBuild = project.findProperty("pythonAppleSupportBuild")?.toString() ?: "b11"

val pythonVersion = configuredPythonVersion
Expand Down
56 changes: 27 additions & 29 deletions python-multiplatform/src/nativeInterop/cinterop/include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
// is not needed.


// Include Python header files
#include "patchlevel.h"
#include "pyconfig.h"
#include "pymacconfig.h"
// Include Python configuration headers
#include "patchlevel.h" // the Python version
#include "pyconfig.h" // information from configure
#include "pymacconfig.h" // overrides for pyconfig
#include "pyabi.h" // feature/ABI selection


// Include standard header files
Expand All @@ -22,12 +23,13 @@
#include <limits.h> // INT_MAX
#include <math.h> // HUGE_VAL
#include <stdarg.h> // va_list
#include <string.h> // memcpy()
#include <wchar.h> // wchar_t
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> // ssize_t
#endif

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

// gh-111506: The free-threaded build is not compatible with the limited API
// or the stable ABI.
#if defined(Py_LIMITED_API) && defined(Py_GIL_DISABLED)
# error "The limited API is not currently supported in the free-threaded build"
#endif

#if defined(Py_GIL_DISABLED) && defined(_MSC_VER)
# include <intrin.h> // __readgsqword()
#endif
#if !defined(Py_LIMITED_API)
# if defined(Py_GIL_DISABLED)
# if defined(_MSC_VER) || defined(__MINGW32__)
# include <intrin.h> // __readgsqword()
# endif
# endif
#endif // Py_GIL_DISABLED

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

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

// Include Python header files
#include "pyport.h"
#include "exports.h"
#include "pymacro.h"
#include "pymath.h"
#include "pymem.h"
#include "pytypedefs.h"
#include "pybuffer.h"
#include "pystats.h"
#include "pyatomic.h"
#include "lock.h"
#include "cpython/pylock.h"
#include "critical_section.h"
#include "object.h"
#include "refcount.h"
#include "objimpl.h"
#include "typeslots.h"
#include "slots.h"
#include "slots_generated.h"
#include "pyhash.h"
#include "cpython/pydebug.h"
#include "bytearrayobject.h"
Expand All @@ -104,7 +102,7 @@
#include "setobject.h"
#include "methodobject.h"
#include "moduleobject.h"
#include "monitoring.h"
#include "cpython/monitoring.h"
#include "cpython/funcobject.h"
#include "cpython/classobject.h"
#include "fileobject.h"
Expand All @@ -120,6 +118,7 @@
#include "cpython/genobject.h"
#include "descrobject.h"
#include "genericaliasobject.h"
#include "cpython/sentinelobject.h"
#include "warnings.h"
#include "weakrefobject.h"
#include "structseq.h"
Expand Down Expand Up @@ -147,9 +146,8 @@
#include "cpython/pyfpe.h"
#include "cpython/tracemalloc.h"

// Restore warning filter
#ifdef _MSC_VER
#pragma warning(pop)
__pragma(warning(pop)) // warning(disable: 4201)
#endif

#endif /* !Py_PYTHON_H */
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* Like PyObject_CallMethod(), but expect a _Py_Identifier*
as the method name. */
PyAPI_FUNC(PyObject*) _PyObject_CallMethodId(
Py_DEPRECATED(3.15) PyAPI_FUNC(PyObject*) _PyObject_CallMethodId(
PyObject *obj,
_Py_Identifier *name,
const char *format, ...);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
/* Object layout */
typedef struct {
PyObject_VAR_HEAD
Py_ssize_t ob_alloc; /* How many bytes allocated in ob_bytes */
/* How many bytes allocated in ob_bytes

In the current implementation this is equivalent to Py_SIZE(ob_bytes_object).
The value is always loaded and stored atomically for thread safety.
There are API compatibilty concerns with removing so keeping for now. */
Py_ssize_t ob_alloc;
char *ob_bytes; /* Physical backing buffer */
char *ob_start; /* Logical start inside ob_bytes */
Py_ssize_t ob_exports; /* How many buffer exports */
PyObject *ob_bytes_object; /* PyBytes for zero-copy bytes conversion */
} PyByteArrayObject;

PyAPI_DATA(char) _PyByteArray_empty_string[];

/* Macros and static inline functions, trading safety for speed */
#define _PyByteArray_CAST(op) \
(assert(PyByteArray_Check(op)), _Py_CAST(PyByteArrayObject*, op))

static inline char* PyByteArray_AS_STRING(PyObject *op)
{
PyByteArrayObject *self = _PyByteArray_CAST(op);
if (Py_SIZE(self)) {
return self->ob_start;
}
return _PyByteArray_empty_string;
return _PyByteArray_CAST(op)->ob_start;
}
#define PyByteArray_AS_STRING(self) PyByteArray_AS_STRING(_PyObject_CAST(self))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,46 @@ _PyBytes_Join(PyObject *sep, PyObject *iterable)
{
return PyBytes_Join(sep, iterable);
}


// --- PyBytesWriter API -----------------------------------------------------

typedef struct PyBytesWriter PyBytesWriter;

PyAPI_FUNC(PyBytesWriter *) PyBytesWriter_Create(
Py_ssize_t size);
PyAPI_FUNC(void) PyBytesWriter_Discard(
PyBytesWriter *writer);
PyAPI_FUNC(PyObject*) PyBytesWriter_Finish(
PyBytesWriter *writer);
PyAPI_FUNC(PyObject*) PyBytesWriter_FinishWithSize(
PyBytesWriter *writer,
Py_ssize_t size);
PyAPI_FUNC(PyObject*) PyBytesWriter_FinishWithPointer(
PyBytesWriter *writer,
void *buf);

PyAPI_FUNC(void*) PyBytesWriter_GetData(
PyBytesWriter *writer);
PyAPI_FUNC(Py_ssize_t) PyBytesWriter_GetSize(
PyBytesWriter *writer);

PyAPI_FUNC(int) PyBytesWriter_WriteBytes(
PyBytesWriter *writer,
const void *bytes,
Py_ssize_t size);
PyAPI_FUNC(int) PyBytesWriter_Format(
PyBytesWriter *writer,
const char *format,
...);

PyAPI_FUNC(int) PyBytesWriter_Resize(
PyBytesWriter *writer,
Py_ssize_t size);
PyAPI_FUNC(int) PyBytesWriter_Grow(
PyBytesWriter *writer,
Py_ssize_t size);
PyAPI_FUNC(void*) PyBytesWriter_GrowAndUpdatePointer(
PyBytesWriter *writer,
Py_ssize_t size,
void *buf);
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ _PyEval_RequestCodeExtraIndex(freefunc f) {

PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *);
PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *);
PyAPI_FUNC(int) _PyEval_UnpackIndices(PyObject *, PyObject *,
Py_ssize_t,
Py_ssize_t *, Py_ssize_t *);


// Trampoline API
Expand All @@ -35,7 +38,7 @@ typedef struct {
PyAPI_FUNC(int) PyUnstable_PerfMapState_Init(void);
PyAPI_FUNC(int) PyUnstable_WritePerfMapEntry(
const void *code_addr,
unsigned int code_size,
size_t code_size,
const char *entry_name);
PyAPI_FUNC(void) PyUnstable_PerfMapState_Fini(void);
PyAPI_FUNC(int) PyUnstable_CopyPerfMapFile(const char* parent_filename);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,6 @@ typedef struct _line_offsets {
*/
PyAPI_FUNC(int) _PyCode_CheckLineNumber(int lasti, PyCodeAddressRange *bounds);

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

PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts,
PyObject *names, PyObject *lnotab);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ typedef struct {
double imag;
} Py_complex;

// Operations on complex numbers.
/* Operations on complex numbers (soft deprecated
since Python 3.15). */
PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex);
PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex);
PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex);
Expand Down
Loading
Loading