diff --git a/.github/workflows/python_wheel_build.yml b/.github/workflows/python_wheel_build.yml index c32ca8d98cc28..0f55e22bc54a5 100644 --- a/.github/workflows/python_wheel_build.yml +++ b/.github/workflows/python_wheel_build.yml @@ -28,7 +28,7 @@ jobs: strategy: fail-fast: false matrix: - python: [cp310, cp311, cp312, cp313, cp314] + python: [cp311, cp312, cp313, cp314] config: # `label` is a unique artifact name for each build - runner: macos-15 @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.10", "3.11", "3.12", "3.13", "3.14"] + python: ["3.11", "3.12", "3.13", "3.14"] test_config: # each runner tests the wheel built on it - runner: macos-15 diff --git a/.github/workflows/root-ci.yml b/.github/workflows/root-ci.yml index 90c7e6664bc00..14b60a49bd153 100644 --- a/.github/workflows/root-ci.yml +++ b/.github/workflows/root-ci.yml @@ -402,6 +402,7 @@ jobs: overrides: ["CMAKE_BUILD_TYPE=Debug"] - image: alma10 - image: ubuntu22 + python_venv: "/py-venv-3.12/ROOT-CI" overrides: ["imt=Off", "CMAKE_BUILD_TYPE=Debug"] - image: ubuntu2404 overrides: ["CMAKE_BUILD_TYPE=Debug"] diff --git a/README/ReleaseNotes/v642/index.md b/README/ReleaseNotes/v642/index.md index b45838cd5bbdb..df0ceee474334 100644 --- a/README/ReleaseNotes/v642/index.md +++ b/README/ReleaseNotes/v642/index.md @@ -105,6 +105,8 @@ Note: if you build ROOT with option `dev=ON`, the header `RConfigure.h` will alr ## Python Interface +ROOT dropped support for Python 3.10, meaning ROOT now requires at least Python 3.11. + ### Connecting Python callables to signals `TQObject::Connect()` now directly accepts a Python callable as the slot, for diff --git a/bindings/pyroot/pythonizations/CMakeLists.txt b/bindings/pyroot/pythonizations/CMakeLists.txt index 04aeb31ac581a..6a72b45733e55 100644 --- a/bindings/pyroot/pythonizations/CMakeLists.txt +++ b/bindings/pyroot/pythonizations/CMakeLists.txt @@ -21,16 +21,12 @@ set(libname ROOTPythonizations) add_library(${libname} SHARED ${cpp_sources}) -# Use what is in the limited API since Python 3.11, if we build with a lower -# Python version, we don't bother using the limited API. -if (Python3_VERSION VERSION_GREATER_EQUAL "3.11") - # On Windows we can't use the stable ABI yet: it requires linking against a - # different libpython, so as long as we don't build all translation units in - # the ROOT Pythonization library with the stable ABI we should not use it. - # Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API. - if(NOT MSVC AND NOT Python3_GIL_DISABLED) - target_compile_options(${libname} PRIVATE -DPy_LIMITED_API=0x030B0000) - endif() +# On Windows we can't use the stable ABI yet: it requires linking against a +# different libpython, so as long as we don't build all translation units in +# the ROOT Pythonization library with the stable ABI we should not use it. +# Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API. +if(NOT MSVC AND NOT Python3_GIL_DISABLED) + target_compile_options(${libname} PRIVATE -DPy_LIMITED_API=0x030B0000) endif() # Set the suffix to '.so' and the prefix to 'lib' diff --git a/bindings/tpython/CMakeLists.txt b/bindings/tpython/CMakeLists.txt index 728bb058efe72..ef759e5d064d3 100644 --- a/bindings/tpython/CMakeLists.txt +++ b/bindings/tpython/CMakeLists.txt @@ -30,16 +30,12 @@ ROOT_STANDARD_LIBRARY_PACKAGE(ROOTTPython Python3::Python ) -# Use what is in the limited API since Python 3.10, if we build with a lower -# Python version, we don't bother using the limited API. -if (Python3_VERSION VERSION_GREATER_EQUAL "3.10") - # On Windows we can't use the stable ABI yet: it requires linking against a - # different libpython, so as long as we don't build all translation units in - # the ROOT Pythonization library with the stable ABI we should not use it. - # Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API. - if(NOT MSVC AND NOT Python3_GIL_DISABLED) - target_compile_options(ROOTTPython PRIVATE -DPy_LIMITED_API=0x030A0000) - endif() +# On Windows we can't use the stable ABI yet: it requires linking against a +# different libpython, so as long as we don't build all translation units in +# the ROOT Pythonization library with the stable ABI we should not use it. +# Free-threaded (Py_GIL_DISABLED) interpreters don't support the limited API. +if(NOT MSVC AND NOT Python3_GIL_DISABLED) + target_compile_options(ROOTTPython PRIVATE -DPy_LIMITED_API=0x030A0000) endif() if(MSVC) diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index 71b257e95ea7e..0787c3c68edac 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -481,7 +481,7 @@ endif() if(tmva-pymva) list(APPEND python_components NumPy) endif() -find_package(Python3 3.10 COMPONENTS ${python_components}) +find_package(Python3 3.11 COMPONENTS ${python_components}) # Detect whether the found Python interpreter is a free-threaded build # (Py_GIL_DISABLED is defined in pyconfig.h). The limited C API is not