Skip to content

Pin NumPy to <2 to avoid NumPy 2 ABI import failures#211

Merged
ttuff merged 1 commit intomainfrom
codex/fix-module-compatibility-with-numpy-2
Mar 28, 2026
Merged

Pin NumPy to <2 to avoid NumPy 2 ABI import failures#211
ttuff merged 1 commit intomainfrom
codex/fix-module-compatibility-with-numpy-2

Conversation

@ttuff
Copy link
Copy Markdown
Contributor

@ttuff ttuff commented Mar 28, 2026

Motivation

  • Prevent runtime import crashes caused by C-extension modules compiled against NumPy 1.x when an environment installs NumPy 2.x by bounding the project's NumPy requirement.

Description

  • Change dependency in pyproject.toml from "numpy" to "numpy<2" to avoid resolving NumPy 2.x until transitive binary dependencies are confirmed compatible (file modified: pyproject.toml).

Testing

  • Verified the updated dependency value with python -c "import tomllib, pathlib; data=tomllib.loads(pathlib.Path('pyproject.toml').read_text()); print(data['project']['dependencies'][0])" which printed numpy<2 (success).
  • Verified package import in the current workspace with PYTHONPATH=src python -c "import cubedynamics; print('import ok')" which printed import ok (success).

Codex Task

@ttuff ttuff merged commit ab66fc3 into main Mar 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant