[Git][debian-gis-team/mapproxy][upstream] New upstream version 4.1.2+dfsg

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Wed May 28 04:22:35 BST 2025



Bas Couwenberg pushed to branch upstream at Debian GIS Project / mapproxy


Commits:
8fe56dde by Bas Couwenberg at 2025-05-28T05:16:21+02:00
New upstream version 4.1.2+dfsg
- - - - -


7 changed files:

- .github/workflows/test.yml
- CHANGES.txt
- doc/configuration.rst
- mapproxy/image/merge.py
- mapproxy/service/demo.py
- requirements-tests.txt
- setup.py


Changes:

=====================================
.github/workflows/test.yml
=====================================
@@ -29,6 +29,10 @@ jobs:
     strategy:
       matrix:
         python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
+        pillow-version: ["11.2.1"]
+        include:
+          - python-version: "3.9"
+            pillow-version: "8.1.2"
 
     env:
       MAPPROXY_TEST_COUCHDB: 'http://localhost:5984'
@@ -51,20 +55,13 @@ jobs:
       uses: actions/setup-python at v5
       with:
         python-version: ${{ matrix.python-version }}
-
-    - name: Cache python deps 💾
-      uses: actions/cache at v4
-      with:
-        path: ~/.cache/pip
-        key: ${{ runner.OS }}-python-${{ hashFiles('**/requirements-tests.txt') }}
-        restore-keys: |
-          ${{ runner.OS }}-python-
-          ${{ runner.OS }}-
+        cache: 'pip'
 
     - name: Install dependencies ⏬
       run: |
         pip install .
         pip install -r requirements-tests.txt
+        pip install Pillow==${{ matrix.pillow-version }}
         pip freeze
 
     - name: Run tests 🏗️


=====================================
CHANGES.txt
=====================================
@@ -1,3 +1,14 @@
+4.1.2 2025-05-27
+~~~~~~~~~~~~~~~~
+
+Maintenance:
+
+    - Set Pillow versions in setup.py to actually supported versions
+    - Using PIL instead of Pillow was not working since Python 2, so it is removed from setup.py
+    - Using a higher pyproj version for Python 3.13 is necessary
+    - Added a test for an older Pillow version with Python 3.9
+
+
 4.1.1 2025-04-30
 ~~~~~~~~~~~~~~~~
 


=====================================
doc/configuration.rst
=====================================
@@ -1302,10 +1302,9 @@ The following encoding options are available:
 
 ``quantizer``
   The algorithm used to quantize (reduce) the image colors. Quantizing is used for GIF and paletted PNG images. Available quantizers are ``mediancut`` and ``fastoctree``. ``fastoctree`` is much faster and also supports 8bit PNG with full alpha support, but the image quality can be better with ``mediancut`` in some cases.
-  The quantizing is done by the Python Image Library (PIL). ``fastoctree`` is a `new quantizer <http://mapproxy.org/blog/improving-the-performance-for-png-requests/>`_ that is only available in Pillow >=2.0. See :ref:`installation of PIL<dependencies_pil>`.
 
 ``tiff_compression``
-  Enable compression for TIFF images. Available compression methods are `tiff_lzw` for lossless LZW compression, `jpeg` for JPEG compression and `raw` for no compression (default). You can use the ``jpeg_quality`` option to tune the image quality for JPEG compressed TIFFs. Requires Pillow >= 6.1.0.
+  Enable compression for TIFF images. Available compression methods are `tiff_lzw` for lossless LZW compression, `jpeg` for JPEG compression and `raw` for no compression (default). You can use the ``jpeg_quality`` option to tune the image quality for JPEG compressed TIFFs.
 
   .. versionadded:: 1.12.0
 


=====================================
mapproxy/image/merge.py
=====================================
@@ -211,10 +211,14 @@ class BandMerger(object):
         for op in self.ops:
             chan = src_img_bands[op.src_img][op.src_band]
             if op.factor != 1.0:
-                chan = ImageMath.lambda_eval(
-                    lambda args: args["convert"](args["int"](args["float"](args["a"]) * op.factor), 'L'),
-                    a=chan
-                )
+                # eval is deprecated since Pillow==10.3.0, lambda_eval is the replacement
+                if hasattr(ImageMath, 'lambda_eval'):
+                    chan = ImageMath.lambda_eval(
+                        lambda args: args["convert"](args["int"](args["float"](args["a"]) * op.factor), 'L'),
+                        a=chan
+                    )
+                else:
+                    chan = ImageMath.eval("convert(int(float(a) * %f), 'L')" % op.factor, a=chan)
                 if result_bands[op.dst_band] is None:
                     result_bands[op.dst_band] = chan
                 else:


=====================================
mapproxy/service/demo.py
=====================================
@@ -126,7 +126,7 @@ class DemoServer(Server):
         if pattern.match(url):
             return True
         else:
-            logging.warn(f"A request was blocked that was trying to access a non-http resource: {url}")
+            logging.warning(f"A request was blocked that was trying to access a non-http resource: {url}")
             return False
 
     @staticmethod


=====================================
requirements-tests.txt
=====================================
@@ -7,7 +7,7 @@ beautifulsoup4==4.12.3
 boto3==1.35.6
 boto==2.49.0
 botocore==1.35.6
-certifi==2024.7.4
+certifi==2025.4.26
 cffi==1.17.1;
 cfn-lint==0.80.3
 chardet==5.2.0
@@ -38,13 +38,14 @@ networkx==3.1;python_version<"3.10"
 networkx==3.4.2;python_version>="3.10"
 numpy==1.26.4
 packaging==24.2
-Pillow==11.2.1
+Pillow==11.2.1 # This version is overwritten in the test workflow, please adjust there as well
 pluggy==1.5.0
 py==1.11.0
 pyasn1==0.5.1
 pycparser==2.22
 pyparsing==3.2.3
-pyproj==3.6.1
+pyproj==3.6.1;python_version<"3.10"
+pyproj==3.7.1;python_version>="3.10"
 pyrsistent==0.20.0
 pytest-rerunfailures==13.0
 pytest==8.3.2


=====================================
setup.py
=====================================
@@ -1,6 +1,3 @@
-import platform
-import importlib.metadata
-
 from setuptools import setup, find_packages
 
 
@@ -9,35 +6,15 @@ install_requires = [
     'future',
     'pyproj>=2',
     'jsonschema>=4',
-    'werkzeug<4'
+    'werkzeug<4',
+    'Pillow>=8,!=8.3.0,!=8.3.1;python_version=="3.9"',
+    'Pillow>=9;python_version=="3.10"',
+    'Pillow>=10;python_version=="3.11"',
+    'Pillow>=10.1;python_version=="3.12"',
+    'Pillow>=11;python_version=="3.13"'
 ]
 
 
-def package_installed(pkg):
-    """Check if package is installed"""
-    try:
-        importlib.metadata.version(pkg)
-    except importlib.metadata.PackageNotFoundError:
-        return False
-    else:
-        return True
-
-
-# depend on Pillow if it is installed, otherwise
-# depend on PIL if it is installed, otherwise
-# require Pillow
-if package_installed('Pillow'):
-    install_requires.append('Pillow !=2.4.0,!=8.3.0,!=8.3.1')
-elif package_installed('PIL'):
-    install_requires.append('PIL>=1.1.6,<1.2.99')
-else:
-    install_requires.append('Pillow !=2.4.0,!=8.3.0,!=8.3.1')
-
-if platform.python_version_tuple() < ('2', '6'):
-    # for mapproxy-seed
-    install_requires.append('multiprocessing>=2.6')
-
-
 def long_description(changelog_releases=10):
     import re
     import textwrap
@@ -62,7 +39,7 @@ def long_description(changelog_releases=10):
 
 setup(
     name='MapProxy',
-    version="4.1.1",
+    version="4.1.2",
     description='An accelerating proxy for tile and web map services',
     long_description=long_description(7),
     long_description_content_type='text/x-rst',
@@ -86,6 +63,7 @@ setup(
         "Development Status :: 5 - Production/Stable",
         "License :: OSI Approved :: Apache Software License",
         "Operating System :: OS Independent",
+        "Programming Language :: Python :: 3 :: Only",
         "Programming Language :: Python :: 3.9",
         "Programming Language :: Python :: 3.10",
         "Programming Language :: Python :: 3.11",



View it on GitLab: https://salsa.debian.org/debian-gis-team/mapproxy/-/commit/8fe56ddebbdde2af6b1f8119481a7b7f6b3e33fd

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapproxy/-/commit/8fe56ddebbdde2af6b1f8119481a7b7f6b3e33fd
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/pkg-grass-devel/attachments/20250528/b9297b76/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list