Skip to content

chore(deps): drop unused numpy and pandas dependencies - #125

Merged
rahlk merged 1 commit into
mainfrom
chore/issue-124-drop-numpy-and-pandas
Aug 18, 2026
Merged

chore(deps): drop unused numpy and pandas dependencies#125
rahlk merged 1 commit into
mainfrom
chore/issue-124-drop-numpy-and-pandas

Conversation

@rahlk

Copy link
Copy Markdown
Contributor

Closes#124.

What

Removes the numpy and pandas entries from [project].dependencies. Neither
is imported anywhere in the analyzer — git grep -I "numpy\|pandas" finds
first-party hits only in the vendored xarray test fixture and in comments in
packaging/homebrew/generate_formula.sh (also updated here).

Why

The declarations carried tight upper caps (numpy>=1.21.0,<1.24.0 below Python
3.11, <2.0.0 above it). Those caps pinned installs to numpy releases with no
prebuilt wheel for some targets — Red Hat UBI images in particular — so
pip install codeanalyzer-python fell back to building numpy from source and
failed. Same failure class as #19, except this dependency buys nothing.

pandas was the only remaining route to numpy on modern interpreters: ray
2.55 declares no numpy dependency, so removing both drops numpy from the
resolved tree entirely on Python 3.11+.

Verification

$ uv tree --python-version 3.12 | grep -i "numpy\|pandas" # no output
$ uv tree --python-version 3.11 | grep -i "numpy\|pandas" # no output
$ uv run python -c "import numpy"
ModuleNotFoundError: No module named 'numpy'
$ uv run python -c "import codeanalyzer" # ok

Full test suite run with numpy absent from the environment.

Not in scope

On Python 3.9/3.10 the ray==2.0.0 pin still pulls numpy in transitively, so
uv tree --python-version 3.9 still reports numpy v1.23.5. Raising that ray
floor carries real compatibility risk and is deliberately left out.

The same change is backported to release/0.3.x and released as 0.3.2 for
consumers pinned to the 0.3 line.

Neither package is imported anywhere in the analyzer -- `git grep` finds
first-party hits only in the vendored xarray test fixture and in a comment
in the Homebrew formula generator. Both were nonetheless declared in
`[project].dependencies` with tight upper caps (`numpy<1.24` below Python
3.11, `numpy<2.0` above it).
Those caps forced resolution onto numpy releases with no prebuilt wheel for
some targets -- Red Hat UBI images in particular -- so `pip install
codeanalyzer-python` fell back to building numpy from source and failed.
On Python 3.11+ numpy now disappears from the resolved tree entirely, since
ray 2.55 declares no numpy dependency and pandas was its only other route.
On Python 3.9/3.10 `ray==2.0.0` still pulls numpy in transitively; raising
that pin carries real compatibility risk and is left for a separate change.
@rahlk
rahlkforce-pushed the chore/issue-124-drop-numpy-and-pandas branch from ebc6adf to fec0f14CompareAugust 18, 2026 14:37
@rahlk
rahlk merged commit 6f02581 into mainAug 18, 2026
@rahlk
rahlk deleted the chore/issue-124-drop-numpy-and-pandas branch August 18, 2026 14:50
Sign up for freeto 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.

Drop unused numpy and pandas dependencies

1 participant

@rahlk