diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7b1bee82c..e6fdb989d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,21 +46,9 @@ jobs: instance: macos-15 suffix: -macos-aarch64-none - python: ["3.10", "3.11", "3.12", "3.13", "3.14"] + python: ["3.11", "3.12", "3.13", "3.14", "3.15"] exclude: - # Fails with initfs_encoding error - - os: - category: windows - platform: x86 - python: "3.10" - - # Fails to find pytest - - os: - category: windows - platform: x64 - python: '3.10' - # fails to call mono methods - os: category: windows diff --git a/pyproject.toml b/pyproject.toml index 0966038cd..db1fb1eb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ dependencies = [ "clr_loader>=0.3.1,<0.4.0" ] -requires-python = ">=3.10, <3.15" +requires-python = ">=3.11, <3.16" classifiers = [ "Development Status :: 5 - Production/Stable", @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Operating System :: MacOS :: MacOS X", @@ -36,8 +37,7 @@ dynamic = ["version"] dev = [ "pytest >= 6", "find_libpython >= 0.3", - "numpy >=2 ; python_version >= '3.10'", - "numpy <2 ; python_version < '3.10'", + "numpy >=2", ] doc = [ "sphinx", diff --git a/src/runtime/Native/TypeOffset310.cs b/src/runtime/Native/TypeOffset315.cs similarity index 87% rename from src/runtime/Native/TypeOffset310.cs rename to src/runtime/Native/TypeOffset315.cs index fc0ca1e8c..69b983c9d 100644 --- a/src/runtime/Native/TypeOffset310.cs +++ b/src/runtime/Native/TypeOffset315.cs @@ -2,7 +2,7 @@ // Auto-generated by geninterop.py. // DO NOT MODIFY BY HAND. -// Python 3.10: ABI flags: '' +// Python 3.15: ABI flags: '' // ReSharper disable InconsistentNaming // ReSharper disable IdentifierTypo @@ -20,11 +20,11 @@ namespace Python.Runtime Scope = "type")] [StructLayout(LayoutKind.Sequential)] - internal class TypeOffset310 : GeneratedTypeOffsets, ITypeOffsets + internal class TypeOffset315 : GeneratedTypeOffsets, ITypeOffsets { - public TypeOffset310() { } + public TypeOffset315() { } // Auto-generated from PyHeapTypeObject in Python.h - public int ob_refcnt { get; private set; } + public int ob_refcnt_full { get; private set; } public int ob_type { get; private set; } public int ob_size { get; private set; } public int tp_name { get; private set; } @@ -75,6 +75,15 @@ public TypeOffset310() { } public int tp_version_tag { get; private set; } public int tp_finalize { get; private set; } public int tp_vectorcall { get; private set; } + // This is an error in our generator: + // + // The fields below are actually not pointers (like we incorrectly + // assume for all other fields) but instead a char (1 byte) and a short + // (2 bytes). By dropping one of the fields, we still get the correct + // overall size of the struct. + public int tp_watched { get; private set; } + // public int tp_versions_used { get; private set; } + public int tp_iteritem { get; private set; } public int am_await { get; private set; } public int am_aiter { get; private set; } public int am_anext { get; private set; } @@ -135,6 +144,11 @@ public TypeOffset310() { } public int qualname { get; private set; } public int ht_cached_keys { get; private set; } public int ht_module { get; private set; } + public int _ht_tpname { get; private set; } + public int ht_token { get; private set; } + public int spec_cache_getitem { get; private set; } + public int getitem_version { get; private set; } + public int init { get; private set; } } } diff --git a/src/runtime/PythonEngine.cs b/src/runtime/PythonEngine.cs index 264835fff..12413d7cb 100644 --- a/src/runtime/PythonEngine.cs +++ b/src/runtime/PythonEngine.cs @@ -134,8 +134,8 @@ public static string PythonPath } } - public static Version MinSupportedVersion => new(3, 7); - public static Version MaxSupportedVersion => new(3, 14, int.MaxValue, int.MaxValue); + public static Version MinSupportedVersion => new(3, 10); + public static Version MaxSupportedVersion => new(3, 15, int.MaxValue, int.MaxValue); public static bool IsSupportedVersion(Version version) => version >= MinSupportedVersion && version <= MaxSupportedVersion; public static string Version diff --git a/src/runtime/Runtime.Delegates.cs b/src/runtime/Runtime.Delegates.cs index dc4a4b0a9..190d3d6de 100644 --- a/src/runtime/Runtime.Delegates.cs +++ b/src/runtime/Runtime.Delegates.cs @@ -245,7 +245,6 @@ static Delegates() catch (MissingMethodException) { } PyObject_GC_Track = (delegate* unmanaged[Cdecl])GetFunctionByName(nameof(PyObject_GC_Track), GetUnmanagedDll(_PythonDll)); PyObject_GC_UnTrack = (delegate* unmanaged[Cdecl])GetFunctionByName(nameof(PyObject_GC_UnTrack), GetUnmanagedDll(_PythonDll)); - _PyObject_Dump = (delegate* unmanaged[Cdecl])GetFunctionByName(nameof(_PyObject_Dump), GetUnmanagedDll(_PythonDll)); PyMem_Malloc = (delegate* unmanaged[Cdecl])GetFunctionByName(nameof(PyMem_Malloc), GetUnmanagedDll(_PythonDll)); PyMem_Realloc = (delegate* unmanaged[Cdecl])GetFunctionByName(nameof(PyMem_Realloc), GetUnmanagedDll(_PythonDll)); PyMem_Free = (delegate* unmanaged[Cdecl])GetFunctionByName(nameof(PyMem_Free), GetUnmanagedDll(_PythonDll)); @@ -513,7 +512,6 @@ static Delegates() internal static delegate* unmanaged[Cdecl] PyObject_GC_IsTracked { get; } internal static delegate* unmanaged[Cdecl] PyObject_GC_Track { get; } internal static delegate* unmanaged[Cdecl] PyObject_GC_UnTrack { get; } - internal static delegate* unmanaged[Cdecl] _PyObject_Dump { get; } internal static delegate* unmanaged[Cdecl] PyMem_Malloc { get; } internal static delegate* unmanaged[Cdecl] PyMem_Realloc { get; } internal static delegate* unmanaged[Cdecl] PyMem_Free { get; } diff --git a/src/runtime/Runtime.cs b/src/runtime/Runtime.cs index 399608733..8e8c02255 100644 --- a/src/runtime/Runtime.cs +++ b/src/runtime/Runtime.cs @@ -1653,8 +1653,6 @@ internal static bool PyObject_GC_IsTracked(BorrowedReference ob) internal static void PyObject_GC_UnTrack(BorrowedReference ob) => Delegates.PyObject_GC_UnTrack(ob); - internal static void _PyObject_Dump(BorrowedReference ob) => Delegates._PyObject_Dump(ob); - //==================================================================== // Python memory API //==================================================================== diff --git a/uv.lock b/uv.lock index f007f9151..dc8660941 100644 --- a/uv.lock +++ b/uv.lock @@ -1,6 +1,6 @@ version = 1 revision = 3 -requires-python = ">=3.10, <3.15" +requires-python = ">=3.10, <3.16" resolution-markers = [ "python_full_version >= '3.12'", "python_full_version == '3.11.*'",