[Git][debian-gis-team/python-shapely][master] 4 commits: New upstream version 2.0.6

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Fri Aug 23 07:26:17 BST 2024



Bas Couwenberg pushed to branch master at Debian GIS Project / python-shapely


Commits:
8377df15 by Bas Couwenberg at 2024-08-23T08:18:37+02:00
New upstream version 2.0.6
- - - - -
cc07967a by Bas Couwenberg at 2024-08-23T08:18:38+02:00
Update upstream source from tag 'upstream/2.0.6'

Update to upstream version '2.0.6'
with Debian dir 659969c61986080fdc098517e0d6a0e1eb2d6b39
- - - - -
410615e3 by Bas Couwenberg at 2024-08-23T08:19:51+02:00
New upstream release.

- - - - -
fd9e6a37 by Bas Couwenberg at 2024-08-23T08:21:24+02:00
Set distribution to unstable.

- - - - -


13 changed files:

- .circleci/config.yml
- .github/workflows/release.yml
- .github/workflows/tests.yml
- CHANGES.txt
- CITATION.cff
- debian/changelog
- docs/release/2.x.rst
- shapely/_version.py
- shapely/creation.py
- shapely/set_operations.py
- shapely/tests/legacy/test_operations.py
- shapely/tests/legacy/test_predicates.py
- shapely/tests/test_strtree.py


Changes:

=====================================
.circleci/config.yml
=====================================
@@ -23,7 +23,7 @@ jobs:
       - run:
           name: Build the Linux aarch64 wheels.
           command: |
-            python3 -m pip install --user cibuildwheel==2.16.5
+            python3 -m pip install --user cibuildwheel==2.20.0
             echo 'export GEOS_INSTALL=~/linux-aarch64-wheels/geosinstall/geos-"$GEOS_VERSION"' >> "$BASH_ENV"
             echo 'export GEOS_CONFIG="$GEOS_INSTALL"/bin/geos-config' >> "$BASH_ENV"
             echo 'export LD_LIBRARY_PATH="$GEOS_INSTALL"/lib' >> "$BASH_ENV"


=====================================
.github/workflows/release.yml
=====================================
@@ -111,7 +111,7 @@ jobs:
         if: ${{ matrix.msvc_arch }}
 
       - name: Build wheels
-        uses: pypa/cibuildwheel at v2.19.2
+        uses: pypa/cibuildwheel at v2.20.0
         env:
           CIBW_ARCHS: ${{ matrix.arch }}
           CIBW_SKIP: cp36-* pp* *musllinux* *-manylinux_i686
@@ -129,6 +129,7 @@ jobs:
             LDFLAGS=-Wl,-rpath,${{ runner.temp }}/geos-${{ env.GEOS_VERSION }}/lib
             MACOSX_DEPLOYMENT_TARGET=10.9
             CMAKE_OSX_ARCHITECTURES='${{ matrix.cmake_osx_architectures }}'
+            CFLAGS='-Wno-error=incompatible-function-pointer-types'
           CIBW_ENVIRONMENT_WINDOWS:
             PIP_PRE=1
             GEOS_INSTALL='${{ runner.temp }}\geos-${{ env.GEOS_VERSION }}'


=====================================
.github/workflows/tests.yml
=====================================
@@ -48,9 +48,9 @@ jobs:
             geos: 3.12.2
             numpy: 1.26.0
           # 2024
-          - python: "3.12"  # update to "3.13" after binary wheels for numpy are available
+          - python: "3.13"
             geos: 3.12.2
-            numpy: 2.0.0
+            numpy: 2.1.0
           # apple silicon
           - os: macos-14
             python: "3.12"


=====================================
CHANGES.txt
=====================================
@@ -1,6 +1,15 @@
 Changes
 =======
 
+2.0.6 (2024-08-19)
+------------------
+
+Bug fixes:
+
+- Fix compatibility with NumPy 2.1.0 (#2099).
+
+Wheels are available for Python 3.13 (and still include GEOS 3.11.4).
+
 2.0.5 (2024-07-13)
 ------------------
 


=====================================
CITATION.cff
=====================================
@@ -2,8 +2,8 @@ cff-version: 1.2.0
 message: "Please cite this software using these metadata."
 type: software
 title: Shapely
-version: "2.0.5"
-date-released: "2024-07-13"
+version: "2.0.6"
+date-released: "2024-08-19"
 doi: 10.5281/zenodo.5597138
 abstract: "Manipulation and analysis of geometric objects in the Cartesian plane."
 repository-artifact: https://pypi.org/project/Shapely


=====================================
debian/changelog
=====================================
@@ -1,8 +1,9 @@
-python-shapely (2.0.5-3) UNRELEASED; urgency=medium
+python-shapely (2.0.6-1) unstable; urgency=medium
 
+  * New upstream release.
   * Bump Standards-Version to 4.7.0, no changes.
 
- -- Bas Couwenberg <sebastic at debian.org>  Sun, 28 Jul 2024 19:59:52 +0200
+ -- Bas Couwenberg <sebastic at debian.org>  Fri, 23 Aug 2024 08:21:10 +0200
 
 python-shapely (2.0.5-2) unstable; urgency=medium
 


=====================================
docs/release/2.x.rst
=====================================
@@ -1,6 +1,17 @@
 Version 2.x
 ===========
 
+.. _version-2-0-6:
+
+Version 2.0.6 (2024-08-19)
+--------------------------
+
+Bug fixes:
+
+- Fix compatibility with NumPy 2.1.0 (#2099).
+
+Wheels are available for Python 3.13 (and still include GEOS 3.11.4).
+
 .. _version-2-0-5:
 
 Version 2.0.5 (2024-07-13)


=====================================
shapely/_version.py
=====================================
@@ -25,9 +25,9 @@ def get_keywords():
     # setup.py/versioneer.py will grep for the variable names, so they must
     # each be defined on a line of their own. _version.py will just call
     # get_keywords().
-    git_refnames = " (tag: 2.0.5, maint-2.0)"
-    git_full = "a4fe42f45db97f264d7ba71671fc9718063a3aa2"
-    git_date = "2024-07-13 16:49:25 +1200"
+    git_refnames = " (tag: 2.0.6)"
+    git_full = "5a4207d2fb74b25d7bb2fb5d04813f68a3a612f4"
+    git_date = "2024-08-19 23:29:00 +0200"
     keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
     return keywords
 


=====================================
shapely/creation.py
=====================================
@@ -353,7 +353,7 @@ def multipoints(geometries, indices=None, out=None, **kwargs):
     ):
         geometries = points(geometries)
     if indices is None:
-        return lib.create_collection(geometries, typ, out=out, **kwargs)
+        return lib.create_collection(geometries, np.intc(typ), out=out, **kwargs)
     else:
         return collections_1d(geometries, indices, typ, out=out)
 
@@ -390,7 +390,7 @@ def multilinestrings(geometries, indices=None, out=None, **kwargs):
         geometries = linestrings(geometries)
 
     if indices is None:
-        return lib.create_collection(geometries, typ, out=out, **kwargs)
+        return lib.create_collection(geometries, np.intc(typ), out=out, **kwargs)
     else:
         return collections_1d(geometries, indices, typ, out=out)
 
@@ -426,7 +426,7 @@ def multipolygons(geometries, indices=None, out=None, **kwargs):
     ):
         geometries = polygons(geometries)
     if indices is None:
-        return lib.create_collection(geometries, typ, out=out, **kwargs)
+        return lib.create_collection(geometries, np.intc(typ), out=out, **kwargs)
     else:
         return collections_1d(geometries, indices, typ, out=out)
 
@@ -457,7 +457,7 @@ def geometrycollections(geometries, indices=None, out=None, **kwargs):
     """
     typ = GeometryType.GEOMETRYCOLLECTION
     if indices is None:
-        return lib.create_collection(geometries, typ, out=out, **kwargs)
+        return lib.create_collection(geometries, np.intc(typ), out=out, **kwargs)
     else:
         return collections_1d(geometries, indices, typ, out=out)
 


=====================================
shapely/set_operations.py
=====================================
@@ -403,7 +403,9 @@ def union_all(geometries, grid_size=None, axis=None, **kwargs):
         geometries = np.rollaxis(geometries, axis=axis, start=geometries.ndim)
 
     # create_collection acts on the inner axis
-    collections = lib.create_collection(geometries, GeometryType.GEOMETRYCOLLECTION)
+    collections = lib.create_collection(
+        geometries, np.intc(GeometryType.GEOMETRYCOLLECTION)
+    )
 
     if grid_size is not None:
         if lib.geos_version < (3, 9, 0):
@@ -501,5 +503,7 @@ def coverage_union_all(geometries, axis=None, **kwargs):
             np.asarray(geometries), axis=axis, start=geometries.ndim
         )
     # create_collection acts on the inner axis
-    collections = lib.create_collection(geometries, GeometryType.GEOMETRYCOLLECTION)
+    collections = lib.create_collection(
+        geometries, np.intc(GeometryType.GEOMETRYCOLLECTION)
+    )
     return lib.coverage_union(collections, **kwargs)


=====================================
shapely/tests/legacy/test_operations.py
=====================================
@@ -3,6 +3,7 @@ import unittest
 import pytest
 
 import shapely
+from shapely import geos_version
 from shapely.errors import TopologicalError
 from shapely.geometry import GeometryCollection, LineString, MultiPoint, Point, Polygon
 from shapely.wkt import loads
@@ -79,8 +80,11 @@ class OperationsTestCase(unittest.TestCase):
             "POLYGON ((40 100, 80 100, 80 60, 40 60, 40 100), (60 60, 80 60, 80 40, 60 40, 60 60))"
         )
         assert not invalid_polygon.is_valid
-        with pytest.raises((TopologicalError, shapely.GEOSException)):
-            invalid_polygon.relate(invalid_polygon)
+        if geos_version < (3, 13, 0):
+            with pytest.raises((TopologicalError, shapely.GEOSException)):
+                invalid_polygon.relate(invalid_polygon)
+        else:  # resolved with RelateNG
+            assert invalid_polygon.relate(invalid_polygon) == "2FFF1FFF2"
 
     def test_hausdorff_distance(self):
         point = Point(1, 1)


=====================================
shapely/tests/legacy/test_predicates.py
=====================================
@@ -5,6 +5,7 @@ import unittest
 import pytest
 
 import shapely
+from shapely import geos_version
 from shapely.geometry import Point, Polygon
 
 
@@ -67,8 +68,15 @@ class PredicatesTestCase(unittest.TestCase):
             (339, 207),
         ]
 
-        with pytest.raises(shapely.GEOSException):
-            Polygon(p1).within(Polygon(p2))
+        g1 = Polygon(p1)
+        g2 = Polygon(p2)
+        assert not g1.is_valid
+        assert not g2.is_valid
+        if geos_version < (3, 13, 0):
+            with pytest.raises(shapely.GEOSException):
+                g1.within(g2)
+        else:  # resolved with RelateNG
+            assert not g1.within(g2)
 
     def test_relate_pattern(self):
 


=====================================
shapely/tests/test_strtree.py
=====================================
@@ -368,39 +368,51 @@ def test_query_with_partially_prepared_inputs(tree):
 
 
 @pytest.mark.parametrize(
-    "predicate",
+    "predicate,expected",
     [
-        # intersects is intentionally omitted; it does not raise an exception
+        pytest.param(
+            "intersects",
+            [1],
+            marks=pytest.mark.xfail(geos_version < (3, 13, 0), reason="GEOS < 3.13"),
+        ),
         pytest.param(
             "within",
+            [],
             marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
         ),
         pytest.param(
             "contains",
+            [],
             marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
         ),
-        "overlaps",
-        "crosses",
-        "touches",
+        ("overlaps", []),
+        ("crosses", [1]),
+        ("touches", []),
         pytest.param(
             "covers",
+            [],
             marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
         ),
         pytest.param(
             "covered_by",
+            [],
             marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
         ),
         pytest.param(
             "contains_properly",
+            [],
             marks=pytest.mark.xfail(geos_version < (3, 8, 0), reason="GEOS < 3.8"),
         ),
     ],
 )
-def test_query_predicate_errors(tree, predicate):
+def test_query_predicate_errors(tree, predicate, expected):
     with ignore_invalid():
         line_nan = shapely.linestrings([1, 1], [1, float("nan")])
-    with pytest.raises(shapely.GEOSException):
-        tree.query(line_nan, predicate=predicate)
+    if geos_version < (3, 13, 0):
+        with pytest.raises(shapely.GEOSException):
+            tree.query(line_nan, predicate=predicate)
+    else:
+        assert_array_equal(tree.query(line_nan, predicate=predicate), expected)
 
 
 ### predicate == 'intersects'



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-shapely/-/compare/7a3afe6dd57356fec08a9659d94f89ef09963dc9...fd9e6a37f753ac7c669fb02407a4e1fc99cfb12e

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-shapely/-/compare/7a3afe6dd57356fec08a9659d94f89ef09963dc9...fd9e6a37f753ac7c669fb02407a4e1fc99cfb12e
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/20240823/4aa652a5/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list