• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vispy / vispy / 9545646725 / 3
75%
main: 75%

Build:
DEFAULT BRANCH: main
Ran 17 Jun 2024 10:05AM UTC
Files 344
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jun 2024 09:53AM UTC coverage: 72.314% (+0.008%) from 72.306%
9545646725.3

push

github

web-flow
Add NumPy 2.0 support (#2599)

This introduces numpy 2.0 support. napari has started looking into
support, and ran into a few small issues using vispy testing against it.
See the [napari zulip
thread](https://napari.zulipchat.com/#narrow/stream/212875-general/topic/handling.20the.20numpy.202.2E0.20release/near/381330412)
for some discussion and relevant links.

The process for adding support in this PR was:
* Run the ruff numpy 2.0 support check and fix:
```
ruff check vispy --select NPY201
ruff check vispy --select NPY201 --fix
```
* Run tests, fix issues and warnings
* Update for changes to behavior of the `copy` kwarg in `np.array`
* Add `vispy.util.np_copy_if_needed` value (`False` for numpy < 1.28,
`None` for numpy >= 2.0)
    * Search for `copy=False` used in `no.array` and remove it
* Search for `copy=copy` used in `np.array`, replace with
`copy=vispy.util.np_copy_if_needed`
    * See references for more information
* [NumPy 2.0 Migration
Guide](https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword)
* [SciPy PR doing the same](https://github.com/scipy/scipy/pull/20172)
* [napari PR doing the same](https://github.com/napari/napari/pull/6932)
* Update build configuration for Cython code
* Previously, it was important to link against the oldest compatible
numpy version to ensure
      forward compatibility. This was accomplished by depending on

[oldest-supported-numpy](https://pypi.org/project/oldest-supported-numpy/).
* Now, you can just depend on `numpy>=2.0.0rc1`, and the build will be
compatible with both 1.x
      and 2.x.
* This is updated in the `[build-system]` section of `pyproject.toml`
* See [Depending on
NumPy](https://numpy.org/devdocs/dev/depending_on_numpy.html#numpy-2-0-specific-advice)
for more information


I think this is ready for review, but I'm going to try creating a wheel
and using to run napari tests with numpy 2.0 as well. I'll mark it
no... (continued)

5520 of 10514 branches covered (52.5%)

23184 of 32060 relevant lines covered (72.31%)

0.72 hits per line

Source Files on job run-4 - 9545646725.3
  • Tree
  • List 0
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 9545646725
  • 44dad2f8 on github
  • Prev Job for on main (#9484800458.3)
  • Next Job for on main (#9547109075.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc