Avoid deprecated assign to ndarray.shape#8020
Conversation
|
@stefanv, as I said on Zulip, feel very welcome to take over this PR. :) I'm focusing on the typing stuff this week. |
4c0b25d to
9976947
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughUpdated dependency constraints across multiple manifests, removed the Meson Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Use `.reshape(..., copy=False)` instead as recommended by NumPy. I'm a bit scared because our test suite seems to have only triggered one instance of these warnings (in grayreconstruct.py", line 216, in `reconstruction`)?
c571516 to
ba5595f
Compare
|
Will review shortly. |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
environment.ymlmeson.optionspyproject.tomlrequirements/default.txtrequirements/docs.txtrequirements/optional.txtrequirements/optional_free_threaded.txtsrc/meson.buildsrc/skimage/feature/sift.pysrc/skimage/graph/_mcp.pyxsrc/skimage/io/_plugins/pil_plugin.pysrc/skimage/measure/_marching_cubes_lewiner.pysrc/skimage/morphology/grayreconstruct.pysrc/skimage/restoration/_rolling_ball_cy.pyxsrc/skimage/util/_map_array.py
💤 Files with no reviewable changes (1)
- meson.options
| # Do not edit this file; modify pyproject.toml instead. | ||
| numpy>=1.24 | ||
| scipy>=1.11.4 | ||
| numpy>=2.1 |
There was a problem hiding this comment.
What about SPEC0 saying that we still need to support v2.0? Are you anticipating that our next release is after that can be dropped?
There was a problem hiding this comment.
@stefanv I know you mentioned that you needed to update a few dependencies here, but I don't remember why. Could you maybe briefly summarize why?
There was a problem hiding this comment.
I think I had to update NumPy, and then another dependency to match that etc. etc. It was the standard cascade. But I was pretty careful not to pull in very new packages.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
environment.yml (1)
11-12: Consider removing duplicate tifffile entry.
tifffile>=2025.1.10appears both in the base section (line 11) and the docs section (line 40). Since docs dependencies implicitly include base dependencies, the entry on line 40 is redundant.Also applies to: 40-40
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1006efd3-061a-40f7-8f9d-14a375214488
📒 Files selected for processing (2)
environment.ymlpyproject.toml
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pyproject.toml (1)
228-230: Improve warning filter comments to decouple from upstream versions.The comments at lines 227–230 tie suppressions to specific upstream versions, creating maintenance burden. Reword them to track upstream status generically and establish clear removal conditions:
♻️ Suggested wording update
- # Warning caused by matplotlib 3.7.0 because it uses deprecated API of pyparsing 3.3.1 + # Upstream matplotlib emits pyparsing deprecation warnings; remove when matplotlib>=3.10.7 or fixes the deprecated calls. "ignore:.*(parseString|resetCache|enablePackrat|oneOf).*:DeprecationWarning:matplotlib", - # tifffile (v2025.12.20) uses deprecated NumPy API + # Upstream tifffile emits ndarray.shape deprecation warnings; remove when upstream fix is released. "ignore:Setting the shape on a NumPy array:DeprecationWarning:tifffile",The matplotlib case is solvable (fix available in v3.10.7+). The tifffile case awaits upstream action on the ndarray.shape setter issue. Either way, the comments should orient maintainers toward removal conditions rather than version snapshots.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1a3938ca-080d-4152-9823-5644b8c6fc18
📒 Files selected for processing (3)
environment.ymlpyproject.tomlrequirements/default.txt
🚧 Files skipped from review as they are similar to previous changes (1)
- requirements/default.txt
c3459ed to
01a5f66
Compare
* origin/main: (27 commits) Move `_shared` to `_skimage2` (#8102) Port `pad_footprint` & `mirror_footprint` to `skimage2` (#8094) Add rescaling API to skimage2 (#8075) Move `skimage2` implementation into `_skimage2` (#8093) Undo (double) mirroring in `ski2.morphology.dilation` (#8060) Grammar (#8091) Move `ensure_spacing` into `skimage2` (#8067) Ensure that `skimage2` does not eagerly import `skimage` (#8087) Use lazy-loader 0.5 (#8080) MAINT: make ellipse fitting forward compatible (#8054) Avoid deprecated assign to ndarray.shape (#8020) Avoid circular import in `feature/corner.py` (#8077) Turn off coderabbit auto-labeling & label checks (#8070) Fix GIL being re-enabled by C++ extensions (#8059) Fix conventions following docstub and misc. (#8055) Port grayscale morphology operators to skimage2 (#8046) Add revised `peak_local_max` to `skimage2` (#8039) Allow read-only arrays as input to remap (#7535) Add `prescale` parameter to "blob functions" (#7858) Try to make coderabbit respect exisiting type labels (#8042) ...
Description
Closes #8019, closes #8025. Still testing locally because there's no way to trigger the failing nightly job directly – it will run once merged into
mainthough.Checklist
./doc/examplesfor new featuresRelease note
For maintainers and optionally contributors, please refer to the instructions on how to document this PR for the release notes.