Skip to content

fix(ci): replace deprecated array.shape assignment for NumPy 2.5#7384

Merged
BubbleCal merged 1 commit into
lance-format:mainfrom
zhangyue19921010:fix-numpy-shape-deprecation
Jun 22, 2026
Merged

fix(ci): replace deprecated array.shape assignment for NumPy 2.5#7384
BubbleCal merged 1 commit into
lance-format:mainfrom
zhangyue19921010:fix-numpy-shape-deprecation

Conversation

@zhangyue19921010

@zhangyue19921010 zhangyue19921010 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Unblock CI

DeprecationWarning: Setting the shape on a NumPy array has been deprecated in NumPy 2.5.
As an alternative, you can create a new view using np.reshape (with copy=False if needed).

@github-actions github-actions Bot added bug Something isn't working A-python Python bindings labels Jun 22, 2026
@jerryjch

Copy link
Copy Markdown
Contributor

+1

@LuciferYang LuciferYang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM

@LuciferYang

Copy link
Copy Markdown
Contributor

cc @Xuanwo @jackye1995

@BubbleCal

Copy link
Copy Markdown
Contributor

Thanks!

@BubbleCal
BubbleCal merged commit 0fd0c37 into lance-format:main Jun 22, 2026
18 checks passed
BubbleCal added a commit that referenced this pull request Jun 30, 2026
## Summary

This PR fixes CI-only issues on the `release/v8.0` branch so the v8
backport validation PRs can run against a healthy baseline.

## What changed

- Backports #7384 to replace deprecated NumPy 2.5 `array.shape = -1`
assignments with `reshape(-1)`.
- Pins the Rust `linux-build` coverage job to `nightly-2026-06-24`,
matching the nightly that passed for `v8.0.0-rc.2`.

## Why

- The Python failures on #7519 match the existing `release/v8.0` rc2
failure mode: NumPy 2.5 emits `DeprecationWarning` for setting
`array.shape`, and pytest treats warnings as errors.
- The Rust `linux-build` failure on #7519 reproduces after rerun and is
a nightly rustc ICE with `nightly-2026-06-30`; rc2 passed with
`nightly-2026-06-24`.

## Validation

- `cargo fmt --all`
- `git diff --check origin/release/v8.0...HEAD`
- `cargo fmt --all --check`

Local Python targeted validation was attempted with `uv run pytest
python/tests/test_indices.py -q`, but it stalled in the editable
`pylance` build step before reaching pytest output. The PR CI will run
the full Python matrix.

---------

Co-authored-by: YueZhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-python Python bindings bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants