[med-svn] [Git][med-team/openslide-python][upstream] New upstream version 1.4.2

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Mon Nov 24 21:05:49 GMT 2025



Étienne Mollier pushed to branch upstream at Debian Med / openslide-python


Commits:
90d70b15 by Étienne Mollier at 2025-11-24T21:47:10+01:00
New upstream version 1.4.2
- - - - -


27 changed files:

- CHANGELOG.md
- COPYING.LESSER
- MANIFEST.in
- PKG-INFO
- README.md
- doc/jekyll_fix.py
- examples/deepzoom/deepzoom_multiserver.py
- examples/deepzoom/deepzoom_server.py
- examples/deepzoom/deepzoom_tile.py
- + examples/deepzoom/licenses/LICENSE.jquery
- + examples/deepzoom/licenses/LICENSE.openseadragon
- + examples/deepzoom/licenses/LICENSE.openseadragon-scalebar
- examples/deepzoom/static/openseadragon.js
- openslide/__init__.py
- openslide/_convert.c
- openslide/_convert.pyi
- openslide/_version.py
- openslide/deepzoom.py
- openslide/lowlevel.py
- openslide_python.egg-info/PKG-INFO
- openslide_python.egg-info/SOURCES.txt
- pyproject.toml
- tests/common.py
- tests/test_base.py
- tests/test_deepzoom.py
- tests/test_imageslide.py
- tests/test_openslide.py


Changes:

=====================================
CHANGELOG.md
=====================================
@@ -1,5 +1,19 @@
 # Notable Changes in OpenSlide Python
 
+## Version 1.4.2, 2025-04-28
+
+### Changes
+
+* Drop support for Python 3.8
+* Switch to [PEP 639][] project license metadata
+* examples: Update OpenSeadragon to 5.0.1
+* examples: Add license files for bundled JavaScript
+* tests: Add [PEP 735][] dependency group for test dependencies
+
+[PEP 639]: https://peps.python.org/pep-0639/
+[PEP 735]: https://peps.python.org/pep-0735/
+
+
 ## Version 1.4.1, 2024-10-30
 
 ### Bug fixes


=====================================
COPYING.LESSER
=====================================
@@ -2,7 +2,7 @@
                        Version 2.1, February 1999
 
  Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ <https://fsf.org/>
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
@@ -484,8 +484,7 @@ convey the exclusion of warranty; and each file should have at least the
     Lesser General Public License for more details.
 
     You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+    License along with this library; if not, see <https://www.gnu.org/licenses/>.
 
 Also add information on how to contact you by electronic and paper mail.
 
@@ -496,7 +495,7 @@ necessary.  Here is a sample; alter the names:
   Yoyodyne, Inc., hereby disclaims all copyright interest in the
   library `Frob' (a library for tweaking knobs) written by James Random Hacker.
 
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
+  <signature of Moe Ghoul>, 1 April 1990
+  Moe Ghoul, President of Vice
 
 That's all there is to it!


=====================================
MANIFEST.in
=====================================
@@ -1,5 +1,5 @@
 include *.md
-global-include py.typed *.pyi
+global-include LICENSE.* py.typed *.pyi
 recursive-include doc *.py *.rst
 recursive-include examples *.html *.js *.png *.py
 recursive-include tests *.dcm *.png *.py *.svs *.tiff


=====================================
PKG-INFO
=====================================
@@ -1,9 +1,9 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
 Name: openslide-python
-Version: 1.4.1
+Version: 1.4.2
 Summary: Python interface to OpenSlide
 Maintainer-email: OpenSlide project <openslide-users at lists.andrew.cmu.edu>
-License: GNU Lesser General Public License, version 2.1
+License-Expression: LGPL-2.1-only AND BSD-3-Clause AND MIT AND LicenseRef-Public-Domain
 Project-URL: Homepage, https://openslide.org/
 Project-URL: Documentation, https://openslide.org/api/python/
 Project-URL: Release notes, https://github.com/openslide/openslide-python/blob/main/CHANGELOG.md
@@ -13,13 +13,11 @@ Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Healthcare Industry
 Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)
 Classifier: Operating System :: MacOS :: MacOS X
 Classifier: Operating System :: Microsoft :: Windows
 Classifier: Operating System :: POSIX :: Linux
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
@@ -27,10 +25,14 @@ Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
 Classifier: Typing :: Typed
-Requires-Python: >=3.8
+Requires-Python: >=3.9
 Description-Content-Type: text/markdown
 License-File: COPYING.LESSER
+License-File: examples/deepzoom/licenses/LICENSE.jquery
+License-File: examples/deepzoom/licenses/LICENSE.openseadragon
+License-File: examples/deepzoom/licenses/LICENSE.openseadragon-scalebar
 Requires-Dist: Pillow
+Dynamic: license-file
 
 # OpenSlide Python
 
@@ -75,7 +77,7 @@ OpenSlide can read virtual slides in several formats:
 
 ## Requirements
 
-* Python ≥ 3.8
+* Python ≥ 3.9
 * OpenSlide ≥ 3.4.0
 * Pillow
 
@@ -107,7 +109,13 @@ installing so OpenSlide Python can find OpenSlide.
 ## License
 
 OpenSlide Python is released under the terms of the [GNU Lesser General
-Public License, version 2.1](https://openslide.org/license/).
+Public License, version 2.1](https://openslide.org/license/).  The Deep Zoom
+example code includes JavaScript released under the
+[BSD license](https://github.com/openslide/openslide-python/tree/main/examples/deepzoom/licenses/LICENSE.openseadragon),
+the
+[MIT license](https://github.com/openslide/openslide-python/tree/main/examples/deepzoom/licenses/LICENSE.jquery),
+and released into the
+[public domain](https://github.com/openslide/openslide-python/tree/main/examples/deepzoom/licenses/LICENSE.openseadragon-scalebar).
 
 OpenSlide Python is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY


=====================================
README.md
=====================================
@@ -41,7 +41,7 @@ OpenSlide can read virtual slides in several formats:
 
 ## Requirements
 
-* Python ≥ 3.8
+* Python ≥ 3.9
 * OpenSlide ≥ 3.4.0
 * Pillow
 
@@ -73,7 +73,13 @@ installing so OpenSlide Python can find OpenSlide.
 ## License
 
 OpenSlide Python is released under the terms of the [GNU Lesser General
-Public License, version 2.1](https://openslide.org/license/).
+Public License, version 2.1](https://openslide.org/license/).  The Deep Zoom
+example code includes JavaScript released under the
+[BSD license](https://github.com/openslide/openslide-python/tree/main/examples/deepzoom/licenses/LICENSE.openseadragon),
+the
+[MIT license](https://github.com/openslide/openslide-python/tree/main/examples/deepzoom/licenses/LICENSE.jquery),
+and released into the
+[public domain](https://github.com/openslide/openslide-python/tree/main/examples/deepzoom/licenses/LICENSE.openseadragon-scalebar).
 
 OpenSlide Python is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY


=====================================
doc/jekyll_fix.py
=====================================
@@ -14,8 +14,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 # Sphinx hardcodes that certain output paths have names starting with


=====================================
examples/deepzoom/deepzoom_multiserver.py
=====================================
@@ -15,8 +15,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 from __future__ import annotations


=====================================
examples/deepzoom/deepzoom_server.py
=====================================
@@ -15,20 +15,19 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 from __future__ import annotations
 
 from argparse import ArgumentParser
 import base64
-from collections.abc import Callable
+from collections.abc import Callable, Mapping
 from io import BytesIO
 import os
 from pathlib import Path
 import re
-from typing import TYPE_CHECKING, Any, Literal, Mapping
+from typing import TYPE_CHECKING, Any, Literal
 from unicodedata import normalize
 import zlib
 


=====================================
examples/deepzoom/deepzoom_tile.py
=====================================
@@ -15,8 +15,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 """An example program to generate a Deep Zoom directory tree from a slide."""


=====================================
examples/deepzoom/licenses/LICENSE.jquery
=====================================
@@ -0,0 +1,20 @@
+Copyright OpenJS Foundation and other contributors, https://openjsf.org/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


=====================================
examples/deepzoom/licenses/LICENSE.openseadragon
=====================================
@@ -0,0 +1,28 @@
+Copyright (C) 2009 CodePlex Foundation
+Copyright (C) 2010-2024 OpenSeadragon contributors
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+- Neither the name of CodePlex Foundation nor the names of its contributors
+  may be used to endorse or promote products derived from this software
+  without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.


=====================================
examples/deepzoom/licenses/LICENSE.openseadragon-scalebar
=====================================
@@ -0,0 +1,9 @@
+This software was developed at the National Institute of Standards and
+Technology by employees of the Federal Government in the course of
+their official duties. Pursuant to title 17 Section 105 of the United
+States Code this software is not subject to copyright protection and is
+in the public domain. This software is an experimental system. NIST assumes
+no responsibility whatsoever for its use by other parties, and makes no
+guarantees, expressed or implied, about its quality, reliability, or
+any other characteristic. We would appreciate acknowledgement if the
+software is used.


=====================================
examples/deepzoom/static/openseadragon.js
=====================================
@@ -1,6 +1,6 @@
-//! openseadragon 5.0.0
-//! Built on 2024-08-14
-//! Git commit: v5.0.0-0-f28b7fc1
+//! openseadragon 5.0.1
+//! Built on 2024-12-09
+//! Git commit: v5.0.1-0-480de92d
 //! http://openseadragon.github.io
 //! License: http://openseadragon.github.io/license/
 
@@ -90,7 +90,7 @@
 
 /**
  * @namespace OpenSeadragon
- * @version openseadragon 5.0.0
+ * @version openseadragon 5.0.1
  * @classdesc The root namespace for OpenSeadragon.  All utility methods
  * and classes are defined on or below this namespace.
  *
@@ -220,7 +220,7 @@
   *     For complete list of modes, please @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation/ globalCompositeOperation}
   *
   * @property {Boolean} [imageSmoothingEnabled=true]
-  *     Image smoothing for canvas rendering (only if the canvas drawer is used). Note: Ignored
+  *     Image smoothing for rendering (only if the canvas or webgl drawer is used). Note: Ignored
   *     by some (especially older) browsers which do not support this canvas property.
   *     This property can be changed in {@link Viewer.DrawerBase.setImageSmoothingEnabled}.
   *
@@ -856,10 +856,10 @@ function OpenSeadragon( options ){
      * @since 1.0.0
      */
     $.version = {
-        versionStr: '5.0.0',
+        versionStr: '5.0.1',
         major: parseInt('5', 10),
         minor: parseInt('0', 10),
-        revision: parseInt('0', 10)
+        revision: parseInt('1', 10)
     };
 
 
@@ -10407,8 +10407,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
     },
 
     /**
-     * Update pixel density ratio, clears all tiles and triggers updates for
-     * all items if the ratio has changed.
+     * Update pixel density ratio and forces a resize operation.
      * @private
      */
      _updatePixelDensityRatio: function() {
@@ -10416,8 +10415,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
         var currentPixelDensityRatio = $.getCurrentPixelDensityRatio();
         if (previusPixelDensityRatio !== currentPixelDensityRatio) {
             $.pixelDensityRatio = currentPixelDensityRatio;
-            this.world.resetItems();
-            this.forceRedraw();
+            this.forceResize();
         }
     },
 
@@ -12289,7 +12287,6 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /*
     },
 
     setDisplayTransform: function(rule) {
-      setElementTransform(this.displayRegion, rule);
       setElementTransform(this.canvas, rule);
       setElementTransform(this.element, rule);
     },
@@ -19044,9 +19041,17 @@ $.Tile.prototype = {
             };
         }
 
+        this.elementWrapper = document.createElement('div');
         this.element = options.element;
-        this.element.innerHTML = "<div>" + this.element.innerHTML + "</div>";
-        this.style = options.element.style;
+        this.elementWrapper.appendChild(this.element);
+
+        if (this.element.id) {
+            this.elementWrapper.id = "overlay-wrapper-" + this.element.id;
+        } else {
+            this.elementWrapper.id = "overlay-wrapper";
+        }
+
+        this.style = this.elementWrapper.style;
         this._init(options);
     };
 
@@ -19113,7 +19118,7 @@ $.Tile.prototype = {
          * @function
          */
         destroy: function() {
-            var element = this.element;
+            var element = this.elementWrapper;
             var style = this.style;
 
             if (element.parentNode) {
@@ -19158,7 +19163,7 @@ $.Tile.prototype = {
          * @param {Element} container
          */
         drawHTML: function(container, viewport) {
-            var element = this.element;
+            var element = this.elementWrapper;
             if (element.parentNode !== container) {
                 //save the source parent for later if we need it
                 element.prevElementParent = element.parentNode;
@@ -19169,7 +19174,7 @@ $.Tile.prototype = {
                 this.style.position = "absolute";
                 // this.size is used by overlays which don't get scaled in at
                 // least one direction when this.checkResize is set to false.
-                this.size = $.getElementSize(element);
+                this.size = $.getElementSize(this.elementWrapper);
             }
             var positionAndSize = this._getOverlayPositionAndSize(viewport);
             var position = positionAndSize.position;
@@ -19186,15 +19191,15 @@ $.Tile.prototype = {
                 this.onDraw(position, size, this.element);
             } else {
                 var style = this.style;
-                var innerElement = element.firstChild;
-                var innerStyle = innerElement.style;
+                var innerStyle = this.element.style;
+                innerStyle.display = "block";
                 style.left = position.x + "px";
                 style.top = position.y + "px";
                 if (this.width !== null) {
-                    style.width = size.x + "px";
+                    innerStyle.width = size.x + "px";
                 }
                 if (this.height !== null) {
-                    style.height = size.y + "px";
+                    innerStyle.height = size.y + "px";
                 }
                 var transformOriginProp = $.getCssPropertyWithVendorPrefix(
                     'transformOrigin');
@@ -19219,7 +19224,7 @@ $.Tile.prototype = {
                         style[transformProp] = "";
                     }
                 }
-                style.display = 'block';
+                style.display = 'flex';
             }
         },
 
@@ -19271,7 +19276,7 @@ $.Tile.prototype = {
             }
             if (this.checkResize &&
                 (this.width === null || this.height === null)) {
-                var eltSize = this.size = $.getElementSize(this.element);
+                var eltSize = this.size = $.getElementSize(this.elementWrapper);
                 if (this.width === null) {
                     width = eltSize.x;
                 }
@@ -21155,6 +21160,8 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
             this._renderingCanvas = null;
             this._backupCanvasDrawer = null;
 
+            this._imageSmoothingEnabled = true; // will be updated by setImageSmoothingEnabled
+
             // Add listeners for events that require modifying the scene or camera
             this._boundToTileReady = ev => this._tileReadyHandler(ev);
             this._boundToImageUnloaded = ev => this._imageUnloadedHandler(ev);
@@ -21198,10 +21205,7 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
             gl.bindRenderbuffer(gl.RENDERBUFFER, null);
             gl.bindFramebuffer(gl.FRAMEBUFFER, null);
 
-            let canvases = Array.from(this._TextureMap.keys());
-            canvases.forEach(canvas => {
-                this._cleanupImageData(canvas); // deletes texture, removes from _TextureMap
-            });
+            this._unloadTextures();
 
             // Delete all our created resources
             gl.deleteBuffer(this._secondPass.bufferOutputPosition);
@@ -21223,6 +21227,7 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
             // unbind our event listeners from the viewer
             this.viewer.removeHandler("tile-ready", this._boundToTileReady);
             this.viewer.removeHandler("image-unloaded", this._boundToImageUnloaded);
+            this.viewer.removeHandler("resize", this._resizeHandler);
 
             // set our webgl context reference to null to enable garbage collection
             this._gl = null;
@@ -21317,9 +21322,10 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
         */
         draw(tiledImages){
             let gl = this._gl;
+            const bounds = this.viewport.getBoundsNoRotateWithMargins(true);
             let view = {
-                bounds: this.viewport.getBoundsNoRotate(true),
-                center: this.viewport.getCenter(true),
+                bounds: bounds,
+                center: new OpenSeadragon.Point(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2),
                 rotation: this.viewport.getRotation(true) * Math.PI / 180
             };
 
@@ -21511,7 +21517,7 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
                         gl.bindBuffer(gl.ARRAY_BUFFER, this._secondPass.bufferTexturePosition);
                         gl.vertexAttribPointer(this._secondPass.aTexturePosition, 2, gl.FLOAT, false, 0, 0);
                         gl.bindBuffer(gl.ARRAY_BUFFER, this._secondPass.bufferOutputPosition);
-                        gl.vertexAttribPointer(this._firstPass.aOutputPosition, 2, gl.FLOAT, false, 0, 0);
+                        gl.vertexAttribPointer(this._secondPass.aOutputPosition, 2, gl.FLOAT, false, 0, 0);
 
                         // Draw the quad (two triangles)
                         gl.drawArrays(gl.TRIANGLES, 0, 6);
@@ -21547,11 +21553,15 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
 
         // Public API required by all Drawer implementations
         /**
-        * Required by DrawerBase, but has no effect on WebGLDrawer.
-        * @param {Boolean} enabled
+        * Sets whether image smoothing is enabled or disabled
+        * @param {Boolean} enabled If true, uses gl.LINEAR as the TEXTURE_MIN_FILTER and TEXTURE_MAX_FILTER, otherwise gl.NEAREST.
         */
         setImageSmoothingEnabled(enabled){
-            // noop - this property does not impact WebGLDrawer
+            if( this._imageSmoothingEnabled !== enabled ){
+                this._imageSmoothingEnabled = enabled;
+                this._unloadTextures();
+                this.viewer.world.draw();
+            }
         }
 
         /**
@@ -21661,6 +21671,11 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
 
         }
 
+        // private
+        _textureFilter(){
+            return this._imageSmoothingEnabled ? this._gl.LINEAR : this._gl.NEAREST;
+        }
+
         // private
         _setupRenderer(){
             let gl = this._gl;
@@ -21677,7 +21692,7 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
             gl.activeTexture(gl.TEXTURE0);
             gl.bindTexture(gl.TEXTURE_2D, this._renderToTexture);
             gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this._renderingCanvas.width, this._renderingCanvas.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
-            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, this._textureFilter());
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
 
@@ -21876,7 +21891,7 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
             gl.activeTexture(gl.TEXTURE0);
             gl.bindTexture(gl.TEXTURE_2D, this._renderToTexture);
             gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, w, h, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
-            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, this._textureFilter());
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
 
@@ -21902,8 +21917,7 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
 
             this._gl = this._renderingCanvas.getContext('webgl');
 
-            //make the additional canvas elements mirror size changes to the output canvas
-            this.viewer.addHandler("resize", function(){
+            this._resizeHandler = function(){
 
                 if(_this._outputCanvas !== _this.viewer.drawer.canvas){
                     _this._outputCanvas.style.width = _this.viewer.drawer.canvas.clientWidth + 'px';
@@ -21924,7 +21938,10 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
 
                 // important - update the size of the rendering viewport!
                 _this._resizeRenderer();
-            });
+            };
+
+            //make the additional canvas elements mirror size changes to the output canvas
+            this.viewer.addHandler("resize", this._resizeHandler);
         }
 
         // private
@@ -22014,8 +22031,8 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
                 // Set the parameters so we can render any size image.
                 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
                 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
-                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
-                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, this._textureFilter());
+                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, this._textureFilter());
 
                 // Upload the image into the texture.
                 this._uploadImageData(tileContext);
@@ -22039,6 +22056,14 @@ function determineSubPixelRoundingRule(subPixelRoundingRules) {
             };
         }
 
+        // private
+        _unloadTextures(){
+            let canvases = Array.from(this._TextureMap.keys());
+            canvases.forEach(canvas => {
+                this._cleanupImageData(canvas); // deletes texture, removes from _TextureMap
+            });
+        }
+
         // private
         _uploadImageData(tileContext){
 
@@ -25101,6 +25126,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
             this._clip = null;
         }
 
+        this._needsUpdate = true;
         this._needsDraw = true;
         /**
          * Raised when the TiledImage's clip is changed.


=====================================
openslide/__init__.py
=====================================
@@ -14,8 +14,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 """A library for reading whole-slide images.
@@ -26,9 +25,10 @@ This package provides Python bindings for the OpenSlide library.
 from __future__ import annotations
 
 from abc import ABCMeta, abstractmethod
+from collections.abc import Iterator, Mapping
 from io import BytesIO
 from types import TracebackType
-from typing import Iterator, Literal, Mapping, TypeVar
+from typing import Literal, TypeVar
 
 from PIL import Image, ImageCms
 


=====================================
openslide/_convert.c
=====================================
@@ -13,8 +13,7 @@
  * License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * along with this library.  If not, see <https://www.gnu.org/licenses/>.
  */
 
 #include <Python.h>


=====================================
openslide/_convert.pyi
=====================================
@@ -13,8 +13,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 from typing import Protocol


=====================================
openslide/_version.py
=====================================
@@ -13,8 +13,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 """The openslide package version.
@@ -22,4 +21,4 @@
 This module is an implementation detail.  The package version should be
 obtained from openslide.__version__."""
 
-__version__ = '1.4.1'
+__version__ = '1.4.2'


=====================================
openslide/deepzoom.py
=====================================
@@ -13,8 +13,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 """Support for Deep Zoom images.
@@ -263,10 +262,10 @@ class DeepZoomGenerator:
 
     @staticmethod
     def _pairs_from_n_tuples(
-        tuples: tuple[tuple[int, ...], ...]
+        tuples: tuple[tuple[int, ...], ...],
     ) -> tuple[tuple[int, int], ...]:
         def all_pairs(
-            tuples: tuple[tuple[int, ...], ...]
+            tuples: tuple[tuple[int, ...], ...],
         ) -> TypeGuard[tuple[tuple[int, int], ...]]:
             return all(len(t) == 2 for t in tuples)
 


=====================================
openslide/lowlevel.py
=====================================
@@ -14,8 +14,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 """
@@ -322,7 +321,7 @@ if TYPE_CHECKING:
     class _Func(Protocol[_P, _T]):
         available: bool
 
-        def __call__(self, *args: _P.args) -> _T: ...
+        def __call__(self, *args: _P.args) -> _T: ...  # type: ignore[valid-type]
 
     class _CTypesFunc(_Func[_P, _T]):
         restype: type | None
@@ -358,7 +357,7 @@ def _func(
 
 
 def _wraps_funcs(
-    wrapped: list[_Func[..., Any]]
+    wrapped: list[_Func[..., Any]],
 ) -> Callable[[Callable[_P, _T]], _Func[_P, _T]]:
     def decorator(fn: Callable[_P, _T]) -> _Func[_P, _T]:
         if TYPE_CHECKING:


=====================================
openslide_python.egg-info/PKG-INFO
=====================================
@@ -1,9 +1,9 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
 Name: openslide-python
-Version: 1.4.1
+Version: 1.4.2
 Summary: Python interface to OpenSlide
 Maintainer-email: OpenSlide project <openslide-users at lists.andrew.cmu.edu>
-License: GNU Lesser General Public License, version 2.1
+License-Expression: LGPL-2.1-only AND BSD-3-Clause AND MIT AND LicenseRef-Public-Domain
 Project-URL: Homepage, https://openslide.org/
 Project-URL: Documentation, https://openslide.org/api/python/
 Project-URL: Release notes, https://github.com/openslide/openslide-python/blob/main/CHANGELOG.md
@@ -13,13 +13,11 @@ Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Healthcare Industry
 Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)
 Classifier: Operating System :: MacOS :: MacOS X
 Classifier: Operating System :: Microsoft :: Windows
 Classifier: Operating System :: POSIX :: Linux
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
@@ -27,10 +25,14 @@ Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: 3.13
 Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
 Classifier: Typing :: Typed
-Requires-Python: >=3.8
+Requires-Python: >=3.9
 Description-Content-Type: text/markdown
 License-File: COPYING.LESSER
+License-File: examples/deepzoom/licenses/LICENSE.jquery
+License-File: examples/deepzoom/licenses/LICENSE.openseadragon
+License-File: examples/deepzoom/licenses/LICENSE.openseadragon-scalebar
 Requires-Dist: Pillow
+Dynamic: license-file
 
 # OpenSlide Python
 
@@ -75,7 +77,7 @@ OpenSlide can read virtual slides in several formats:
 
 ## Requirements
 
-* Python ≥ 3.8
+* Python ≥ 3.9
 * OpenSlide ≥ 3.4.0
 * Pillow
 
@@ -107,7 +109,13 @@ installing so OpenSlide Python can find OpenSlide.
 ## License
 
 OpenSlide Python is released under the terms of the [GNU Lesser General
-Public License, version 2.1](https://openslide.org/license/).
+Public License, version 2.1](https://openslide.org/license/).  The Deep Zoom
+example code includes JavaScript released under the
+[BSD license](https://github.com/openslide/openslide-python/tree/main/examples/deepzoom/licenses/LICENSE.openseadragon),
+the
+[MIT license](https://github.com/openslide/openslide-python/tree/main/examples/deepzoom/licenses/LICENSE.jquery),
+and released into the
+[public domain](https://github.com/openslide/openslide-python/tree/main/examples/deepzoom/licenses/LICENSE.openseadragon-scalebar).
 
 OpenSlide Python is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY


=====================================
openslide_python.egg-info/SOURCES.txt
=====================================
@@ -10,6 +10,9 @@ doc/jekyll_fix.py
 examples/deepzoom/deepzoom_multiserver.py
 examples/deepzoom/deepzoom_server.py
 examples/deepzoom/deepzoom_tile.py
+examples/deepzoom/licenses/LICENSE.jquery
+examples/deepzoom/licenses/LICENSE.openseadragon
+examples/deepzoom/licenses/LICENSE.openseadragon-scalebar
 examples/deepzoom/static/jquery.js
 examples/deepzoom/static/openseadragon-scalebar.js
 examples/deepzoom/static/openseadragon.js


=====================================
pyproject.toml
=====================================
@@ -5,20 +5,19 @@ maintainers = [
 ]
 description = "Python interface to OpenSlide"
 readme = "README.md"
-license = {text = "GNU Lesser General Public License, version 2.1"}
+license = "LGPL-2.1-only AND BSD-3-Clause AND MIT AND LicenseRef-Public-Domain"
+license-files = ["COPYING.LESSER", "**/LICENSE.*"]
 keywords = ["OpenSlide", "whole-slide image", "virtual slide", "library"]
 classifiers = [
     "Development Status :: 5 - Production/Stable",
     "Intended Audience :: Developers",
     "Intended Audience :: Healthcare Industry",
     "Intended Audience :: Science/Research",
-    "License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
     "Operating System :: MacOS :: MacOS X",
     "Operating System :: Microsoft :: Windows",
     "Operating System :: POSIX :: Linux",
     "Programming Language :: Python",
     "Programming Language :: Python :: 3",
-    "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
     "Programming Language :: Python :: 3.11",
@@ -27,7 +26,7 @@ classifiers = [
     "Topic :: Scientific/Engineering :: Bio-Informatics",
     "Typing :: Typed",
 ]
-requires-python = ">= 3.8"
+requires-python = ">= 3.9"
 dependencies = ["Pillow"]
 dynamic = ["version"]
 
@@ -37,6 +36,9 @@ Documentation = "https://openslide.org/api/python/"
 "Release notes" = "https://github.com/openslide/openslide-python/blob/main/CHANGELOG.md"
 Repository = "https://github.com/openslide/openslide-python"
 
+[dependency-groups]
+test = ["pytest >= 7"]
+
 [tool.setuptools]
 include-package-data = false
 packages = ["openslide"]
@@ -49,7 +51,13 @@ openslide = ["py.typed", "*.pyi"]
 
 [tool.black]
 skip-string-normalization = true
-target-version = ["py38", "py39", "py310", "py311", "py312", "py313"]
+target-version = ["py39", "py310", "py311", "py312", "py313"]
+
+# Ref: https://github.com/codespell-project/codespell#using-a-config-file
+[tool.codespell]
+check-hidden = true
+# ignore-regex = ""
+# ignore-words-list = ""
 
 # https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
 # also ignore:
@@ -79,5 +87,5 @@ pythonpath = "tests"
 ignore_messages = "(Hyperlink target \".*\" is not referenced\\.$)"
 
 [build-system]
-requires = ["setuptools >= 61.0.0"]
+requires = ["setuptools >= 77.0.0"]
 build-backend = "setuptools.build_meta"


=====================================
tests/common.py
=====================================
@@ -13,8 +13,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 from __future__ import annotations


=====================================
tests/test_base.py
=====================================
@@ -13,8 +13,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 from __future__ import annotations


=====================================
tests/test_deepzoom.py
=====================================
@@ -13,8 +13,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 from __future__ import annotations


=====================================
tests/test_imageslide.py
=====================================
@@ -13,8 +13,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 from __future__ import annotations


=====================================
tests/test_openslide.py
=====================================
@@ -13,8 +13,7 @@
 # License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #
 
 from __future__ import annotations



View it on GitLab: https://salsa.debian.org/med-team/openslide-python/-/commit/90d70b15f4f81c840830e1c739a19a9e391fc58b

-- 
View it on GitLab: https://salsa.debian.org/med-team/openslide-python/-/commit/90d70b15f4f81c840830e1c739a19a9e391fc58b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20251124/9e543efb/attachment-0001.htm>


More information about the debian-med-commit mailing list