diff --git a/.github/actions/build-macos/action.yml b/.github/actions/build-macos/action.yml index e63160165..87bac593a 100644 --- a/.github/actions/build-macos/action.yml +++ b/.github/actions/build-macos/action.yml @@ -11,7 +11,7 @@ runs: shell: bash -l {0} run: | pip install --upgrade pip - pip install cmake setuptools nanobind==2.4.0 + pip install cmake setuptools nanobind==2.10.2 pip install -e . -v - name: Generate package stubs diff --git a/.github/actions/setup-linux/action.yml b/.github/actions/setup-linux/action.yml index 969ac99e9..10b993fd0 100644 --- a/.github/actions/setup-linux/action.yml +++ b/.github/actions/setup-linux/action.yml @@ -36,7 +36,7 @@ runs: run: | python -m venv .venv source .venv/bin/activate - pip install setuptools cmake nanobind==2.4.0 + pip install setuptools cmake nanobind==2.10.2 echo PATH=$PATH >> $GITHUB_ENV # Make cmake search .venv for nanobind echo PYTHONPATH=`python -c 'import sys; print(sys.path[-1])'` >> $GITHUB_ENV diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e8eb20c0..f974b147d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,7 +95,7 @@ jobs: shell: bash -l {0} run: | pip install --upgrade pip - pip install cmake setuptools nanobind==2.4.0 + pip install cmake setuptools nanobind==2.10.2 pip install -e . -v - name: Generate package stubs shell: bash -l {0} diff --git a/examples/extensions/pyproject.toml b/examples/extensions/pyproject.toml index 9f0f09752..405234078 100644 --- a/examples/extensions/pyproject.toml +++ b/examples/extensions/pyproject.toml @@ -3,6 +3,6 @@ requires = [ "setuptools>=42", "cmake>=3.25", "mlx>=0.18.0", - "nanobind==2.4.0", + "nanobind==2.10.2", ] build-backend = "setuptools.build_meta" diff --git a/examples/extensions/requirements.txt b/examples/extensions/requirements.txt index a4591df8c..2fa00ac5c 100644 --- a/examples/extensions/requirements.txt +++ b/examples/extensions/requirements.txt @@ -1,4 +1,4 @@ setuptools>=42 cmake>=3.25 mlx>=0.21.0 -nanobind==2.4.0 +nanobind==2.10.2 diff --git a/pyproject.toml b/pyproject.toml index 6fcd5d16c..60b5f6461 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "setuptools>=80", - "nanobind==2.4.0", + "nanobind==2.10.2", "cmake>=3.25", ] build-backend = "setuptools.build_meta" diff --git a/python/src/mlx_func.cpp b/python/src/mlx_func.cpp index 87912fdda..09aceabe9 100644 --- a/python/src/mlx_func.cpp +++ b/python/src/mlx_func.cpp @@ -89,7 +89,8 @@ static PyType_Spec gc_func_spec = { /* .name = */ "mlx.gc_func", /* .basicsize = */ (int)sizeof(gc_func), /* .itemsize = */ 0, - /* .flags = */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | NB_HAVE_VECTORCALL, + /* .flags = */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_HAVE_VECTORCALL, /* .slots = */ gc_func_slots}; static PyTypeObject* gc_func_tp = nullptr; diff --git a/python/src/small_vector.h b/python/src/small_vector.h index c7b268721..2be8dcec1 100644 --- a/python/src/small_vector.h +++ b/python/src/small_vector.h @@ -16,8 +16,7 @@ struct type_caster> { NB_TYPE_CASTER( List, - const_name(NB_TYPING_TUPLE "[") + make_caster::Name + - const_name(", ...]")) + const_name("tuple[") + make_caster::Name + const_name(", ...]")) bool from_python(handle src, uint8_t flags, cleanup_list* cleanup) noexcept { size_t size; diff --git a/setup.py b/setup.py index 1134ddaa3..1678e13ad 100644 --- a/setup.py +++ b/setup.py @@ -255,7 +255,7 @@ if __name__ == "__main__": extras = { "dev": [ - "nanobind==2.4.0", + "nanobind==2.10.2", "numpy", "pre-commit", "setuptools>=80",