Skip to content

Align example projects with the Python 3.10 minimum - #4024

Merged
zcbenz merged 1 commit into
ml-explore:mainfrom
ayaangazali:fix-example-python-minimum
Aug 6, 2026
Merged

zcbenz merged 1 commit into
ml-explore:mainfrom
ayaangazali:fix-example-python-minimum

Conversation

@ayaangazali

Copy link
Copy Markdown
Contributor

Proposed changes

MLX has required Python 3.10 since #2694, but the two example projects still carry the older floors:

  • examples/cmake_project/CMakeLists.txt asks for Python 3.9
  • examples/extensions/setup.py declares python_requires=">=3.8"

For reference, the rest of the tree agrees on 3.10: setup.py uses python_requires=">=3.10", the top level CMakeLists.txt looks for Python 3.10, and install.rst states it in three places.

It is only cosmetic on a supported interpreter, but on 3.8 or 3.9 the example projects currently accept the environment and then fail later when MLX turns out not to be installable, rather than saying up front that the interpreter is too old.

Checked that the cmake example still configures, builds and prints the output its README promises:

-- Found Python: ... (found suitable version "3.12.13", minimum required is "3.10")
-- Found MLX: .../libmlx.dylib
[100%] Built target example
array([2, 4, 6], dtype=int32)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

(two one word changes; verified by building and running the cmake example before and after)


process note as usual: freshman contributor, Claude Code helps me look around, but i traced this by grepping every Python version reference in the tree, found the bump commit that moved the project to 3.10, and confirmed these two were simply left behind rather than intentionally lower. i also rebuilt the example to be sure raising the floor did not break it.

@zcbenz
zcbenz merged commit e534e1a into ml-explore:main Aug 6, 2026
@BrewTestBot BrewTestBot mentioned this pull request Aug 18, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants