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

vispy / vispy / 9545646725
75%

Build:
DEFAULT BRANCH: main
Ran 17 Jun 2024 09:56AM UTC
Jobs 4
Files 344
Run time 1min
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: 74.766% (+0.007%) from 74.759%
9545646725

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)

5795 of 10522 branches covered (55.08%)

25 of 30 new or added lines in 10 files covered. (83.33%)

23970 of 32060 relevant lines covered (74.77%)

2.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-2 - 9545646725.1 17 Jun 2024 10:05AM UTC 0
74.01
2 run-1 - 9545646725.2 17 Jun 2024 10:05AM UTC 0
46.53
3 run-4 - 9545646725.3 17 Jun 2024 10:05AM UTC 0
72.31
4 run-3 - 9545646725.4 17 Jun 2024 10:05AM UTC 0
51.95
Source Files on build 9545646725
Detailed source file information is not available for this build.
  • Back to Repo
  • 44dad2f8 on github
  • Prev Build on main (#9484800458)
  • Next Build on main (#9547109075)
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