Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-vispy for openSUSE:Factory checked in at 2024-07-01 11:21:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-vispy (Old) and /work/SRC/openSUSE:Factory/.python-vispy.new.18349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-vispy" Mon Jul 1 11:21:25 2024 rev:14 rq:1184121 version:0.14.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-vispy/python-vispy.changes 2024-03-20 21:20:16.303109492 +0100 +++ /work/SRC/openSUSE:Factory/.python-vispy.new.18349/python-vispy.changes 2024-07-01 11:22:07.994913836 +0200 @@ -1,0 +2,8 @@ +Sun Jun 30 19:00:31 UTC 2024 - Dirk Müller <[email protected]> + +- update to 0.14.3: + * Clip step size based on maximum detail on an 8K monitor + * Fix integral computation in attenuated mip + * Reset VertexAttribDivisor even if None + +------------------------------------------------------------------- Old: ---- vispy-0.14.2.tar.gz New: ---- vispy-0.14.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-vispy.spec ++++++ --- /var/tmp/diff_new_pack.Kz4yTI/_old 2024-07-01 11:22:09.050952309 +0200 +++ /var/tmp/diff_new_pack.Kz4yTI/_new 2024-07-01 11:22:09.054952455 +0200 @@ -19,7 +19,7 @@ %define demodatacommit 5a3db84 %define test_data_tag test-data-10 Name: python-vispy -Version: 0.14.2 +Version: 0.14.3 Release: 0 Summary: Interactive visualization in Python License: BSD-3-Clause ++++++ vispy-0.14.2.tar.gz -> vispy-0.14.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/.github/workflows/main.yml new/vispy-0.14.3/.github/workflows/main.yml --- old/vispy-0.14.2/.github/workflows/main.yml 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/.github/workflows/main.yml 2024-06-17 14:07:25.000000000 +0200 @@ -23,8 +23,9 @@ name: OpenGL checks runs-on: ubuntu-latest defaults: + # use login shell to make use of .bash_profile /.bashrc run: - shell: bash -l {0} + shell: bash --login -e {0} steps: - name: Install OpenGL run: | @@ -66,7 +67,8 @@ python make test lineendings - name: Lint with flake8 run: | - python make test flake + # FIXME: deliberately ignore linting errors for now + python make test flake || true # FIXME: Re-enable this when all docstrings are fixed # - name: Test docstring parameters # run: | @@ -79,7 +81,7 @@ defaults: # use login shell to make use of .bash_profile /.bashrc run: - shell: bash -l {0} + shell: bash --login -e {0} steps: - uses: actions/checkout@v4 with: @@ -145,7 +147,7 @@ retention-days: 1 - name: deploy website if: github.event_name == 'push' - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: personal_token: ${{ secrets.VISPY_WEBSITE_TOKEN }} publish_dir: doc/_build/html @@ -163,7 +165,7 @@ defaults: # use login shell to make use of .bash_profile /.bashrc run: - shell: bash -l {0} + shell: bash --login -e {0} strategy: fail-fast: false matrix: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/.github/workflows/wheels.yml new/vispy-0.14.3/.github/workflows/wheels.yml --- old/vispy-0.14.2/.github/workflows/wheels.yml 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/.github/workflows/wheels.yml 2024-06-17 14:07:25.000000000 +0200 @@ -27,9 +27,9 @@ if: ${{ matrix.arch == 'aarch64' }} uses: docker/setup-qemu-action@v3 - name: Build wheels - uses: pypa/[email protected] + uses: pypa/[email protected] env: - CIBW_SKIP: "cp36-* pp* *-win32 *-manylinux_i686 *-musllinux*" + CIBW_SKIP: "pp* *-win32 *-manylinux_i686 *-musllinux*" CIBW_ARCHS_LINUX: ${{ matrix.arch }} CIBW_TEST_REQUIRES: "pytest pytest-sugar meshio pillow sphinx_gallery imageio" CIBW_TEST_COMMAND: "python -c \"import vispy; vispy.test('nobackend')\"" @@ -61,7 +61,7 @@ - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.7' + python-version: '3.9' - name: Build sdist run: | python -m pip install --upgrade pip setuptools build wheel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/CHANGELOG.md new/vispy-0.14.3/CHANGELOG.md --- old/vispy-0.14.2/CHANGELOG.md 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/CHANGELOG.md 2024-06-17 14:07:25.000000000 +0200 @@ -1,5 +1,27 @@ # Release Notes + +## [v0.14.3](https://github.com/vispy/vispy/tree/v0.14.3) (2024-06-17) + +**Enhancements:** + +- Clip step size based on maximum detail on an 8K monitor [\#2589](https://github.com/vispy/vispy/pull/2589) ([jni](https://github.com/jni)) + +**Fixed bugs:** + +- Fix integral computation in attenuated mip [\#2588](https://github.com/vispy/vispy/pull/2588) ([jni](https://github.com/jni)) +- Reset VertexAttribDivisor even if None [\#2583](https://github.com/vispy/vispy/pull/2583) ([aganders3](https://github.com/aganders3)) + +**Merged pull requests:** + +- Fix CI: failing tests and linting errors not failing checks [\#2597](https://github.com/vispy/vispy/pull/2597) ([aganders3](https://github.com/aganders3)) +- Bump pypa/cibuildwheel from 2.18.0 to 2.18.1 [\#2586](https://github.com/vispy/vispy/pull/2586) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pypa/cibuildwheel from 2.17.0 to 2.18.0 [\#2584](https://github.com/vispy/vispy/pull/2584) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump peaceiris/actions-gh-pages from 3 to 4 [\#2582](https://github.com/vispy/vispy/pull/2582) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Fix gallery link in README.rst [\#2579](https://github.com/vispy/vispy/pull/2579) ([inigoalonso](https://github.com/inigoalonso)) +- Bump pypa/cibuildwheel from 2.16.5 to 2.17.0 [\#2578](https://github.com/vispy/vispy/pull/2578) ([dependabot[bot]](https://github.com/apps/dependabot)) + + ## [v0.14.2](https://github.com/vispy/vispy/tree/v0.14.2) (2024-03-14) **Enhancements:** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/PKG-INFO new/vispy-0.14.3/PKG-INFO --- old/vispy-0.14.2/PKG-INFO 2024-03-14 16:42:02.000000000 +0100 +++ new/vispy-0.14.3/PKG-INFO 2024-06-17 14:07:38.940639500 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vispy -Version: 0.14.2 +Version: 0.14.3 Summary: Interactive visualization in Python Home-page: http://vispy.org Download-URL: https://pypi.python.org/pypi/vispy @@ -19,27 +19,54 @@ Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: POSIX Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 Classifier: Framework :: IPython Provides: vispy -Requires-Python: >=3.8 +Requires-Python: >=3.9 Description-Content-Type: text/x-rst +License-File: LICENSE.txt +Requires-Dist: numpy +Requires-Dist: freetype-py +Requires-Dist: hsluv +Requires-Dist: kiwisolver +Requires-Dist: packaging Provides-Extra: ipython-static +Requires-Dist: ipython; extra == "ipython-static" Provides-Extra: pyglet +Requires-Dist: pyglet>=1.2; extra == "pyglet" Provides-Extra: pyqt5 +Requires-Dist: pyqt5; extra == "pyqt5" Provides-Extra: pyqt6 +Requires-Dist: pyqt6; extra == "pyqt6" Provides-Extra: pyside +Requires-Dist: PySide; extra == "pyside" Provides-Extra: pyside2 +Requires-Dist: PySide2; extra == "pyside2" Provides-Extra: pyside6 +Requires-Dist: PySide6; extra == "pyside6" +Provides-Extra: glfw +Requires-Dist: glfw; extra == "glfw" Provides-Extra: sdl2 +Requires-Dist: PySDL2; extra == "sdl2" Provides-Extra: wx +Requires-Dist: wxPython; extra == "wx" Provides-Extra: tk +Requires-Dist: pyopengltk; extra == "tk" Provides-Extra: doc +Requires-Dist: pydata-sphinx-theme; extra == "doc" +Requires-Dist: numpydoc; extra == "doc" +Requires-Dist: sphinxcontrib-apidoc; extra == "doc" +Requires-Dist: sphinx-gallery; extra == "doc" +Requires-Dist: myst-parser; extra == "doc" +Requires-Dist: pillow; extra == "doc" +Requires-Dist: pytest; extra == "doc" +Requires-Dist: pyopengl; extra == "doc" Provides-Extra: io -License-File: LICENSE.txt +Requires-Dist: meshio; extra == "io" +Requires-Dist: Pillow; extra == "io" VisPy: interactive scientific visualization in Python ----------------------------------------------------- @@ -180,7 +207,7 @@ - `Chat room <https://gitter.im/vispy/vispy>`__ - `Developer chat room <https://gitter.im/vispy/vispy-dev>`__ - `Wiki <http://github.com/vispy/vispy/wiki>`__ -- `Gallery <http://vispy.org/gallery.html>`__ +- `Gallery <http://vispy.org/gallery/index.html>`__ - `Documentation <http://vispy.readthedocs.org>`__ .. |Build Status| image:: https://github.com/vispy/vispy/workflows/CI/badge.svg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/README.rst new/vispy-0.14.3/README.rst --- old/vispy-0.14.2/README.rst 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/README.rst 2024-06-17 14:07:25.000000000 +0200 @@ -137,7 +137,7 @@ - `Chat room <https://gitter.im/vispy/vispy>`__ - `Developer chat room <https://gitter.im/vispy/vispy-dev>`__ - `Wiki <http://github.com/vispy/vispy/wiki>`__ -- `Gallery <http://vispy.org/gallery.html>`__ +- `Gallery <http://vispy.org/gallery/index.html>`__ - `Documentation <http://vispy.readthedocs.org>`__ .. |Build Status| image:: https://github.com/vispy/vispy/workflows/CI/badge.svg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/doc/conf.py new/vispy-0.14.3/doc/conf.py --- old/vispy-0.14.2/doc/conf.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/doc/conf.py 2024-06-17 14:07:25.000000000 +0200 @@ -15,7 +15,8 @@ import sys import os import re -import warnings +from pathlib import Path + import vispy # If extensions (or modules to document with autodoc) are in another directory, @@ -49,8 +50,6 @@ apidoc_separate_modules = True # Sphinx Gallery -from sphinx_gallery.sorting import FileNameSortKey - # the following files are ignored from gallery processing ignore_files = ['plotting/export.py', 'gloo/geometry_shader.py', @@ -67,7 +66,7 @@ 'image_scrapers': ('vispy',), 'reset_modules': tuple(), # remove default matplotlib/seaborn resetters 'first_notebook_cell': '%gui qt', # tell notebooks to use Qt backend - 'within_subsection_order': FileNameSortKey, + 'within_subsection_order': "FileNameSortKey", } # Let vispy.app.application:Application.run know that we are generating gallery images os.environ["_VISPY_RUNNING_GALLERY_EXAMPLES"] = "1" @@ -142,41 +141,42 @@ # a list of builtin themes. html_theme = 'pydata_sphinx_theme' -# Tell the theme where the code lives - - -def _custom_edit_url(github_user, github_repo, github_version, doc_path, file_name, default_edit_page_url_template): - """Create custom 'edit' URLs for API modules since they are dynamically generated.""" - if file_name.startswith("api/"): - # this is a dynamically generated API page, link to actual Python source - modpath = os.sep.join(os.path.splitext(file_name[4:])[0].split(".")) - if modpath == "modules": - # main package listing - modpath = "vispy" - rel_modpath = os.path.join("..", modpath) - if os.path.isdir(rel_modpath): - doc_path = modpath + "/" - file_name = "__init__.py" - elif os.path.isfile(rel_modpath + ".py"): - doc_path = os.path.dirname(modpath) - file_name = os.path.basename(modpath) + ".py" - else: - warnings.warn(f"Not sure how to generate the API URL for: {file_name}") - return default_edit_page_url_template.format(github_user=github_user, - github_repo=github_repo, - github_version=github_version, - doc_path=doc_path, - file_name=file_name) - +# Create custom 'edit' URLs for API modules since they are dynamically generated. +# We precompute this so the values in the `html_context` are static, and it can be cached +# `modules.rst` is a special case, and we link it to the main `vispy` package +edit_link_paths = {"api/modules.rst": "vispy/__init__.py"} +for root, dirs, files in os.walk("../vispy"): + # remove leading "../" + root = Path(root).relative_to("..") + if root.name == "__pycache__": + continue + for file in files: + full_path = root / file + if full_path.name == "__init__.py": + package_name = ".".join(root.parts) + apidoc_file_name = "api" / Path(package_name + ".rst") + elif full_path.suffix == ".py": + module_name = ".".join(full_path.with_suffix("").parts) + apidoc_file_name = "api" / Path(module_name + ".rst") + edit_link_paths[str(apidoc_file_name)] = full_path + +edit_page_url_template = """\ +{%- if file_name in edit_link_paths %} + {% set file_name = edit_link_paths[file_name] %} + https://github.com/{{github_user}}/{{github_repo}}/edit/{{github_version}}/{{file_name}} +{%- else %} + {# the last slash between doc_path and file_name is not needed for non-apidoc files #} + https://github.com/{{github_user}}/{{github_repo}}/edit/{{github_version}}/{{doc_path}}{{file_name}} +{%- endif %} +""" html_context = { "github_user": "vispy", "github_repo": "vispy", "github_version": "main", "doc_path": "doc", - "edit_page_url_template": "{{ vispy_custom_edit_url(github_user, github_repo, github_version, doc_path, file_name, default_edit_page_url_template) }}", - "default_edit_page_url_template": "https://github.com/{github_user}/{github_repo}/edit/{github_version}/{doc_path}{file_name}", - "vispy_custom_edit_url": _custom_edit_url, + "edit_link_paths": edit_link_paths, + "edit_page_url_template": edit_page_url_template, } # Theme options are theme-specific and customize the look and feel of a theme diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/pyproject.toml new/vispy-0.14.3/pyproject.toml --- old/vispy-0.14.2/pyproject.toml 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/pyproject.toml 2024-06-17 14:07:25.000000000 +0200 @@ -1,8 +1,9 @@ [build-system] requires = [ "wheel", - "oldest-supported-numpy", "setuptools>=42", + # see https://numpy.org/devdocs/dev/depending_on_numpy.html#numpy-2-0-specific-advice + "numpy>=2.0.0rc2", "setuptools_scm[toml]>=7.1", "Cython>=3.0.0" ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/setup.py new/vispy-0.14.3/setup.py --- old/vispy-0.14.2/setup.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/setup.py 2024-06-17 14:07:25.000000000 +0200 @@ -96,7 +96,7 @@ long_description_content_type='text/x-rst', platforms='any', provides=['vispy'], - python_requires='>=3.8', + python_requires='>=3.9', install_requires=install_requires, extras_require={ 'ipython-static': ['ipython'], @@ -106,6 +106,7 @@ 'pyside': ['PySide'], 'pyside2': ['PySide2'], 'pyside6': ['PySide6'], + 'glfw': ['glfw'], 'sdl2': ['PySDL2'], 'wx': ['wxPython'], 'tk': ['pyopengltk'], @@ -150,10 +151,10 @@ 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Framework :: IPython' ], ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/geometry/__init__.py new/vispy-0.14.3/vispy/geometry/__init__.py --- old/vispy-0.14.2/vispy/geometry/__init__.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/geometry/__init__.py 2024-06-17 14:07:25.000000000 +0200 @@ -16,7 +16,7 @@ from .rect import Rect # noqa from .triangulation import Triangulation, triangulate # noqa from .torusknot import TorusKnot # noqa -from .calculations import (_calculate_normals, _fast_cross_3d, # noqa +from .calculations import (_calculate_normals, _cross_2d, _fast_cross_3d, # noqa resize) # noqa from .generation import (create_arrow, create_box, create_cone, # noqa create_cube, create_cylinder, create_grid_mesh, # noqa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/geometry/calculations.py new/vispy-0.14.3/vispy/geometry/calculations.py --- old/vispy-0.14.2/vispy/geometry/calculations.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/geometry/calculations.py 2024-06-17 14:07:25.000000000 +0200 @@ -7,8 +7,33 @@ import numpy as np -############################################################################### -# These fast normal calculation routines are adapted from mne-python +def _cross_2d(x, y): + """Compute the z-component of the cross product of (arrays of) 2D vectors. + + This is meant to replicate the 2D functionality of np.cross(), which is + deprecated in numpy 2.0. + + x and y must have broadcastable shapes, with the last dimension being 2. + + Parameters + ---------- + x : array + Input array 1, shape (..., 2). + y : array + Input array 2, shape (..., 2). + + Returns + ------- + z : array + z-component of cross products of x and y. + + See: https://github.com/numpy/numpy/issues/26620 + """ + if x.shape[-1] != 2 or y.shape[-1] != 2: + raise ValueError("Input arrays must have shape (..., 2)") + + return x[..., 0] * y[..., 1] - x[..., 1] * y[..., 0] + def _fast_cross_3d(x, y): """Compute cross product between list of 3D vectors @@ -47,6 +72,9 @@ return np.cross(x, y) +############################################################################### +# These fast normal calculation routines are adapted from mne-python + def _calculate_normals(rr, tris): """Efficiently compute vertex normals for triangulated surface""" # ensure highest precision for our summation/vectorization "trick" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/geometry/triangulation.py new/vispy-0.14.3/vispy/geometry/triangulation.py --- old/vispy-0.14.2/vispy/geometry/triangulation.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/geometry/triangulation.py 2024-06-17 14:07:25.000000000 +0200 @@ -7,6 +7,8 @@ from collections import OrderedDict +from .calculations import _cross_2d + class Triangulation(object): """Constrained delaunay triangulation @@ -676,7 +678,7 @@ A = self.pts[a] B = self.pts[b] C = self.pts[c] - return np.cross(B-A, C-B) > 0 + return _cross_2d(B - A, C - B) > 0 def _edges_intersect(self, edge1, edge2): """Return 1 if edges intersect completely (endpoints excluded)""" @@ -739,7 +741,7 @@ """ v1 = self.pts[point] - self.pts[edge[0]] v2 = self.pts[edge[1]] - self.pts[edge[0]] - c = np.cross(v1, v2) # positive if v1 is CW from v2 + c = _cross_2d(v1, v2) # positive if v1 is CW from v2 return 1 if c > 0 else (-1 if c < 0 else 0) def _add_tri(self, a, b, c): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/gloo/buffer.py new/vispy-0.14.3/vispy/gloo/buffer.py --- old/vispy-0.14.2/vispy/gloo/buffer.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/gloo/buffer.py 2024-06-17 14:07:25.000000000 +0200 @@ -10,7 +10,7 @@ import weakref from . globject import GLObject -from ..util import logger +from ..util import logger, np_copy_if_needed # ------------------------------------------------------------ Buffer class --- @@ -70,7 +70,7 @@ data is actually uploaded to GPU memory. Asking explicitly for a copy will prevent this behavior. """ - data = np.array(data, copy=copy) + data = np.array(data, copy=copy or np_copy_if_needed) nbytes = data.nbytes if offset < 0: @@ -98,7 +98,7 @@ data is actually uploaded to GPU memory. Asking explicitly for a copy will prevent this behavior. """ - data = np.array(data, copy=copy) + data = np.array(data, copy=copy or np_copy_if_needed) nbytes = data.nbytes if nbytes != self._nbytes: @@ -283,7 +283,7 @@ # Make sure data is an array if not isinstance(data, np.ndarray): - data = np.array(data, dtype=self.dtype, copy=False) + data = np.array(data, dtype=self.dtype) # Make sure data is big enough if data.size < stop - start: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/gloo/gl/tests/test_functionality.py new/vispy-0.14.3/vispy/gloo/gl/tests/test_functionality.py --- old/vispy-0.14.2/vispy/gloo/gl/tests/test_functionality.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/gloo/gl/tests/test_functionality.py 2024-06-17 14:07:25.000000000 +0200 @@ -192,8 +192,10 @@ N = quad.shape[0] * 4 # buf3 contains coordinates in device coordinates for four quadrants -buf3 = np.row_stack([quad + (0, 0, 0), quad + (0, 1, 0), - quad + (1, 1, 0), quad + (1, 0, 0)]).astype(np.float32) +buf3 = np.vstack([ + quad + (0, 0, 0), quad + (0, 1, 0), + quad + (1, 1, 0), quad + (1, 0, 0), +]).astype(np.float32) # buf2 is texture coords. Note that this is a view on buf2 buf2 = ((buf3+1.0)*0.5)[:, :2] # not C-contiguous diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/gloo/glir.py new/vispy-0.14.3/vispy/gloo/glir.py --- old/vispy-0.14.2/vispy/gloo/glir.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/gloo/glir.py 2024-06-17 14:07:25.000000000 +0200 @@ -1283,8 +1283,13 @@ gl.glBindBuffer(gl.GL_ARRAY_BUFFER, vbo_handle) gl.glEnableVertexAttribArray(attr_handle) func(attr_handle, *args) - if divisor is not None: - gl.glVertexAttribDivisor(attr_handle, divisor) + if hasattr(gl, "glVertexAttribDivisor"): + gl.glVertexAttribDivisor(attr_handle, divisor or 0) + elif divisor is not None: + logger.warning( + 'Instanced rendering is not supported by the current' + f'backend ("{gl.current_backend.__name__}")' + ) else: gl.glBindBuffer(gl.GL_ARRAY_BUFFER, 0) gl.glDisableVertexAttribArray(attr_handle) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/gloo/texture.py new/vispy-0.14.3/vispy/gloo/texture.py --- old/vispy-0.14.2/vispy/gloo/texture.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/gloo/texture.py 2024-06-17 14:07:25.000000000 +0200 @@ -11,6 +11,7 @@ from .globject import GLObject from .util import check_enum +from ..util import np_copy_if_needed def get_dtype_limits(dtype): @@ -29,7 +30,7 @@ new_min, new_max = get_dtype_limits(dtype) if new_max >= old_max and new_min <= old_min: # no need to clip - return np.array(data, dtype=dtype, copy=copy) + return np.array(data, dtype=dtype, copy=copy or np_copy_if_needed) else: # to reduce copying, we clip into a pre-generated array of the right dtype new_data = np.empty_like(data, dtype=dtype) @@ -158,7 +159,7 @@ if data is not None: if shape is not None: raise ValueError('Texture needs data or shape, not both.') - data = np.array(data, copy=False) + data = np.array(data) # So we can test the combination self._resize(data.shape, format, internalformat) self._set_data(data) @@ -427,7 +428,7 @@ # Make sure data is an array if not isinstance(data, np.ndarray): - data = np.array(data, copy=False) + data = np.array(data) # Make sure data is big enough if data.shape != shape: data = np.resize(data, shape) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/testing/_runners.py new/vispy-0.14.3/vispy/testing/_runners.py --- old/vispy-0.14.2/vispy/testing/_runners.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/testing/_runners.py 2024-06-17 14:07:25.000000000 +0200 @@ -164,7 +164,9 @@ print('Running flake8... ') # if end='', first error gets ugly sys.stdout.flush() try: - main() + # flake8 used to exit on failure, but instead `main` now returns an exit code + # see https://github.com/PyCQA/flake8/pull/1461 + raise SystemExit(main()) except SystemExit as ex: if ex.code in (None, 0): pass # do not exit yet, we want to print a success msg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/util/__init__.py new/vispy-0.14.3/vispy/util/__init__.py --- old/vispy-0.14.2/vispy/util/__init__.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/util/__init__.py 2024-06-17 14:07:25.000000000 +0200 @@ -15,3 +15,18 @@ from . import transforms # noqa from .wrappers import use, run_subprocess # noqa from .bunch import SimpleBunch # noqa + +from typing import Optional + +import numpy as np + +# `copy` keyword semantics changed in NumPy 2.0 +# this maintains compatibility with older versions +# if/when NumPy 2.0 becomes the minimum version, we can remove this +# we don't worry about early dev versions of NumPy 2.0 (that may or may not have the kwarg) here +# see: +# https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword +# https://github.com/scipy/scipy/pull/20172 +np_copy_if_needed: Optional[bool] = None +if np.lib.NumpyVersion(np.__version__) < "1.28.0": + np_copy_if_needed = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/version.py new/vispy-0.14.3/vispy/version.py --- old/vispy-0.14.2/vispy/version.py 2024-03-14 16:42:02.000000000 +0100 +++ new/vispy-0.14.3/vispy/version.py 2024-06-17 14:07:38.000000000 +0200 @@ -1,4 +1,16 @@ # file generated by setuptools_scm # don't change, don't track in version control -__version__ = version = '0.14.2' -__version_tuple__ = version_tuple = (0, 14, 2) +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Tuple, Union + VERSION_TUPLE = Tuple[Union[int, str], ...] +else: + VERSION_TUPLE = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE + +__version__ = version = '0.14.3' +__version_tuple__ = version_tuple = (0, 14, 3) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/visuals/_scalable_textures.py new/vispy-0.14.3/vispy/visuals/_scalable_textures.py --- old/vispy-0.14.2/vispy/visuals/_scalable_textures.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/visuals/_scalable_textures.py 2024-06-17 14:07:25.000000000 +0200 @@ -6,6 +6,7 @@ import numpy as np from vispy.gloo.texture import Texture2D, Texture3D, convert_dtype_and_clip +from vispy.util import np_copy_if_needed def get_default_clim_from_dtype(dtype): @@ -298,7 +299,7 @@ @staticmethod def _scale_data_on_cpu(data, clim, copy=True): - data = np.array(data, dtype=np.float32, copy=copy) + data = np.array(data, dtype=np.float32, copy=copy or np_copy_if_needed) if clim[0] != clim[1]: # we always must copy the data if we change it here, otherwise it might change # unexpectedly the data held outside of here diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/visuals/collections/array_list.py new/vispy-0.14.3/vispy/visuals/collections/array_list.py --- old/vispy-0.14.2/vispy/visuals/collections/array_list.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/visuals/collections/array_list.py 2024-06-17 14:07:25.000000000 +0200 @@ -73,7 +73,7 @@ if isinstance(data[0], (list, tuple)): itemsize = [len(sublist) for sublist in data] data = [item for sublist in data for item in sublist] - self._data = np.array(data, copy=False) + self._data = np.array(data) self._size = self._data.size # Default is one group with all data inside @@ -88,7 +88,7 @@ _itemsize = np.ones( self._count, dtype=int) * (self._size // self._count) else: - _itemsize = np.array(itemsize, copy=False) + _itemsize = np.array(itemsize) self._count = len(itemsize) if _itemsize.sum() != self._size: raise ValueError("Cannot partition data as requested") @@ -302,7 +302,7 @@ itemsize = [len(sublist) for sublist in data] data = [item for sublist in data for item in sublist] - data = np.array(data, copy=False).ravel() + data = np.array(data).ravel() size = data.size # Check item size and get item number @@ -313,7 +313,7 @@ _count = size // itemsize _itemsize = np.ones(_count, dtype=int) * (size // _count) else: - _itemsize = np.array(itemsize, copy=False) + _itemsize = np.array(itemsize) _count = len(itemsize) if _itemsize.sum() != size: raise ValueError("Cannot partition data as requested") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/visuals/image.py new/vispy-0.14.3/vispy/visuals/image.py --- old/vispy-0.14.2/vispy/visuals/image.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/visuals/image.py 2024-06-17 14:07:25.000000000 +0200 @@ -16,6 +16,7 @@ from .visual import Visual from ..io import load_spatial_filters from ._scalable_textures import CPUScaledTexture2D, GPUScaledTexture2D +from ..util import np_copy_if_needed _VERTEX_SHADER = """ @@ -380,7 +381,7 @@ texture_format : str or None """ - data = np.array(image, copy=copy) + data = np.array(image, copy=copy or np_copy_if_needed) if np.iscomplexobj(data): raise TypeError( "Complex data types not supported. Please use 'ComplexImage' instead" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/visuals/text/_sdf_cpu.pyx new/vispy-0.14.3/vispy/visuals/text/_sdf_cpu.pyx --- old/vispy-0.14.2/vispy/visuals/text/_sdf_cpu.pyx 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/visuals/text/_sdf_cpu.pyx 2024-06-17 14:07:25.000000000 +0200 @@ -7,6 +7,8 @@ from libc.math cimport sqrt cimport cython +np.import_array() + __all__ = ['_get_distance_field'] dtype = np.float32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy/visuals/volume.py new/vispy-0.14.3/vispy/visuals/volume.py --- old/vispy-0.14.2/vispy/visuals/volume.py 2024-03-14 16:41:46.000000000 +0100 +++ new/vispy-0.14.3/vispy/visuals/volume.py 2024-06-17 14:07:25.000000000 +0200 @@ -417,8 +417,8 @@ // Scale and clamp accumulation in `sumval` by contrast limits so that: // * attenuation value does not depend on data values // * negative values do not amplify instead of attenuate - sumval = sumval + clamp((val - clim.x) / (clim.y - clim.x), 0.0, 1.0); - scale = exp(-u_attenuation * (sumval - 1) / u_relative_step_size); + sumval = sumval + u_relative_step_size * clamp((val - clim.x) / (clim.y - clim.x), 0.0, 1.0); + scale = exp(-u_attenuation * (sumval - 1)); if( maxval > scale * clim.y ) { // stop if no chance of finding a higher maxval iter = nsteps; @@ -1165,9 +1165,40 @@ @relative_step_size.setter def relative_step_size(self, value): + """Set the relative step size used during raycasting. + + Very small values give increased detail when rendering volumes with + few voxels, but values that are too small give worse performance + (framerate), in extreme cases causing a GPU hang and for the process + to be killed by the OS. See discussion at: + + https://github.com/vispy/vispy/pull/2587 + + For this reason, this setter issues a warning when the value is + smaller than ``side_len / (2 * MAX_CANVAS_SIZE)``, where ``side_len`` + is the smallest side of the volume and ``MAX_CANVAS_SIZE`` is what + we consider to be the largest likely monitor resolution along its + longest side: 7680 pixels, equivalent to an 8K monitor. + + This setter also raises a ValueError when the value is 0 or negative. + """ value = float(value) - if value < 0.1: - raise ValueError('relative_step_size cannot be smaller than 0.1') + side_len = np.min(self._vol_shape) + MAX_CANVAS_SIZE = 7680 + minimum_val = side_len / (2 * MAX_CANVAS_SIZE) + if value <= 0: + raise ValueError('relative_step_size cannot be 0 or negative.') + elif value < minimum_val: + warnings.warn( + f'To display a volume of shape {self._vol_shape} without ' + f'artifacts, you need a step size no smaller than {side_len} /' + f'(2 * {MAX_CANVAS_SIZE}) = {minimum_val:,.3g}. To prevent ' + 'extreme degradation in rendering performance, the provided ' + f'value of {value} is being clipped to {minimum_val:,.3g}. If ' + 'you believe you need a smaller step size, please raise an ' + 'issue at https://github.com/vispy/vispy/issues.' + ) + value = minimum_val self._relative_step_size = value self.shared_program['u_relative_step_size'] = value diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy.egg-info/PKG-INFO new/vispy-0.14.3/vispy.egg-info/PKG-INFO --- old/vispy-0.14.2/vispy.egg-info/PKG-INFO 2024-03-14 16:42:02.000000000 +0100 +++ new/vispy-0.14.3/vispy.egg-info/PKG-INFO 2024-06-17 14:07:38.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vispy -Version: 0.14.2 +Version: 0.14.3 Summary: Interactive visualization in Python Home-page: http://vispy.org Download-URL: https://pypi.python.org/pypi/vispy @@ -19,27 +19,54 @@ Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: POSIX Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 Classifier: Framework :: IPython Provides: vispy -Requires-Python: >=3.8 +Requires-Python: >=3.9 Description-Content-Type: text/x-rst +License-File: LICENSE.txt +Requires-Dist: numpy +Requires-Dist: freetype-py +Requires-Dist: hsluv +Requires-Dist: kiwisolver +Requires-Dist: packaging Provides-Extra: ipython-static +Requires-Dist: ipython; extra == "ipython-static" Provides-Extra: pyglet +Requires-Dist: pyglet>=1.2; extra == "pyglet" Provides-Extra: pyqt5 +Requires-Dist: pyqt5; extra == "pyqt5" Provides-Extra: pyqt6 +Requires-Dist: pyqt6; extra == "pyqt6" Provides-Extra: pyside +Requires-Dist: PySide; extra == "pyside" Provides-Extra: pyside2 +Requires-Dist: PySide2; extra == "pyside2" Provides-Extra: pyside6 +Requires-Dist: PySide6; extra == "pyside6" +Provides-Extra: glfw +Requires-Dist: glfw; extra == "glfw" Provides-Extra: sdl2 +Requires-Dist: PySDL2; extra == "sdl2" Provides-Extra: wx +Requires-Dist: wxPython; extra == "wx" Provides-Extra: tk +Requires-Dist: pyopengltk; extra == "tk" Provides-Extra: doc +Requires-Dist: pydata-sphinx-theme; extra == "doc" +Requires-Dist: numpydoc; extra == "doc" +Requires-Dist: sphinxcontrib-apidoc; extra == "doc" +Requires-Dist: sphinx-gallery; extra == "doc" +Requires-Dist: myst-parser; extra == "doc" +Requires-Dist: pillow; extra == "doc" +Requires-Dist: pytest; extra == "doc" +Requires-Dist: pyopengl; extra == "doc" Provides-Extra: io -License-File: LICENSE.txt +Requires-Dist: meshio; extra == "io" +Requires-Dist: Pillow; extra == "io" VisPy: interactive scientific visualization in Python ----------------------------------------------------- @@ -180,7 +207,7 @@ - `Chat room <https://gitter.im/vispy/vispy>`__ - `Developer chat room <https://gitter.im/vispy/vispy-dev>`__ - `Wiki <http://github.com/vispy/vispy/wiki>`__ -- `Gallery <http://vispy.org/gallery.html>`__ +- `Gallery <http://vispy.org/gallery/index.html>`__ - `Documentation <http://vispy.readthedocs.org>`__ .. |Build Status| image:: https://github.com/vispy/vispy/workflows/CI/badge.svg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vispy-0.14.2/vispy.egg-info/requires.txt new/vispy-0.14.3/vispy.egg-info/requires.txt --- old/vispy-0.14.2/vispy.egg-info/requires.txt 2024-03-14 16:42:02.000000000 +0100 +++ new/vispy-0.14.3/vispy.egg-info/requires.txt 2024-06-17 14:07:38.000000000 +0200 @@ -3,7 +3,6 @@ hsluv kiwisolver packaging -importlib-resources [doc] pydata-sphinx-theme @@ -15,6 +14,9 @@ pytest pyopengl +[glfw] +glfw + [io] meshio Pillow
