Skip to content

Commit 7582ea4

Browse files
authored
Drop support for Python 3.9 (#8830)
1 parent c202928 commit 7582ea4

File tree

8 files changed

+10
-20
lines changed

8 files changed

+10
-20
lines changed

.github/workflows/pip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
uses: pypa/[email protected]
203203
env:
204204
CIBW_BUILD: "cp3*-${{ matrix.platform_tag }}"
205-
CIBW_SKIP: "cp3{5,6,7,8}*"
205+
CIBW_SKIP: "cp3{5,6,7,8,9}*"
206206
# Suppress the git version tag (necessary for TestPyPI)
207207
CIBW_ENVIRONMENT: >
208208
SETUPTOOLS_SCM_OVERRIDES_FOR_HALIDE='{local_scheme="no-local-version"}'

doc/BuildingHalideWithCMake.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ building the core pieces of Halide.
148148
| [flatbuffers] | `~=23.5.26` | `WITH_SERIALIZATION=ON` | |
149149
| [wabt] | `==1.0.36` | `Halide_WASM_BACKEND=wabt` | Does not have a stable API; exact version required. |
150150
| [V8] | trunk | `Halide_WASM_BACKEND=V8` | Difficult to build. See [WebAssembly.md] |
151-
| [Python] | `>=3.9` | `WITH_PYTHON_BINDINGS=ON` | |
151+
| [Python] | `>=3.10` | `WITH_PYTHON_BINDINGS=ON` | |
152152
| [pybind11] | `~=2.11.1` | `WITH_PYTHON_BINDINGS=ON` | |
153153

154154
Halide maintains the following compatibility policy with LLVM: Halide version

doc/Python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* [License](#license)
3232
<!-- TOC -->
3333

34-
Halide provides Python bindings for most of its public API. Python 3.9 (or
34+
Halide provides Python bindings for most of its public API. Python 3.10 (or
3535
higher) is required. The Python bindings are supported on 64-bit Linux, OSX, and
3636
Windows systems.
3737

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ maintainers = [{ name = "Alex Reinking", email = "[email protected]" }]
1313
description = "Halide is a programming language designed to make it easier to write high-performance image and array processing code."
1414
license = { file = "LICENSE.txt" }
1515
readme = "./packaging/pip/README.md"
16-
requires-python = ">=3.9"
16+
requires-python = ">=3.10"
1717
dependencies = [
1818
"imageio>=2",
1919
"numpy>=1.26",
@@ -46,11 +46,11 @@ classifiers = [
4646
"Programming Language :: C++",
4747
"Programming Language :: Python :: 3",
4848
"Programming Language :: Python :: 3 :: Only",
49-
"Programming Language :: Python :: 3.9",
5049
"Programming Language :: Python :: 3.10",
5150
"Programming Language :: Python :: 3.11",
5251
"Programming Language :: Python :: 3.12",
5352
"Programming Language :: Python :: 3.13",
53+
"Programming Language :: Python :: 3.14",
5454
"Programming Language :: Python :: Implementation :: CPython",
5555
"Topic :: Multimedia :: Graphics",
5656
"Topic :: Scientific/Engineering",
@@ -108,8 +108,7 @@ WITH_TUTORIALS = false
108108
# Don't version libHalide.so/dylib -- wheels are zip files that do
109109
# not understand symbolic links. Including version information here
110110
# causes the final wheel to have three copies of our library. Not good.
111-
Halide_VERSION_OVERRIDE = ""
112-
Halide_SOVERSION_OVERRIDE = ""
111+
CMAKE_PLATFORM_NO_VERSIONED_SONAME = true
113112

114113
[[tool.scikit-build.overrides]]
115114
if.platform-system = "^win32"

python_bindings/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ cmake_dependent_option(
4444
# Development.Module and Development.Embed. We don't need the Embed
4545
# part, so only requesting Module avoids failures when Embed is not
4646
# available, as is the case in the manylinux Docker images.
47-
find_package(Python 3.9 REQUIRED Interpreter Development.Module)
47+
find_package(Python 3.10 REQUIRED Interpreter Development.Module)
4848

4949
if (WITH_PYTHON_BINDINGS)
5050
find_package(pybind11 2.11.1 REQUIRED)

python_bindings/src/halide/_generator_helpers.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -865,10 +865,6 @@ def alias_impl(cls):
865865

866866

867867
def generator(name: str = ""):
868-
# This code relies on dicts preserving key-insertion order, which is only
869-
# guaranteed for all Python implementations as of v3.7.
870-
_check(sys.version_info >= (3, 7), "Halide Generators require Python 3.7 or later.")
871-
872868
def generator_impl(cls):
873869
n = name or _fqname(cls)
874870
_check_generator_name_in_use(n)

python_bindings/src/halide/halide_/PyHalide.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,8 @@
2727
#include "PyType.h"
2828
#include "PyVar.h"
2929

30-
#if !defined(PYBIND11_VERSION_HEX) || PYBIND11_VERSION_HEX < 0x02060000
31-
#error "Halide requires PyBind 2.6+"
32-
#endif
33-
34-
// Note: This check will be redundant when PyBind 2.10 becomes the minimum version.
35-
#if PY_VERSION_HEX < 0x03000000
36-
#error "We appear to be compiling against Python 2.x rather than 3.x, which is not supported."
30+
#if !defined(PYBIND11_VERSION_HEX) || PYBIND11_VERSION_HEX < 0x020B0000
31+
#error "Halide requires PyBind 2.11+"
3732
#endif
3833

3934
#ifndef HALIDE_PYBIND_MODULE_NAME

test/autoschedulers/li2018/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (WITH_PYTHON_BINDINGS)
2626
if (Halide_TARGET MATCHES "webgpu")
2727
message(WARNING "li2018_gradient_autoscheduler_test_py is not supported with WebGPU.")
2828
else()
29-
find_package(Python 3.9 REQUIRED COMPONENTS Interpreter Development.Module)
29+
find_package(Python 3.10 REQUIRED COMPONENTS Interpreter Development.Module)
3030

3131
add_test(
3232
NAME li2018_gradient_autoscheduler_test_py

0 commit comments

Comments
 (0)