[Git][debian-gis-team/python-shapely][master] 4 commits: New upstream version 1.8.5
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Thu Oct 13 04:49:15 BST 2022
Bas Couwenberg pushed to branch master at Debian GIS Project / python-shapely
Commits:
d674a24e by Bas Couwenberg at 2022-10-13T05:36:43+02:00
New upstream version 1.8.5
- - - - -
41d3a632 by Bas Couwenberg at 2022-10-13T05:36:45+02:00
Update upstream source from tag 'upstream/1.8.5'
Update to upstream version '1.8.5'
with Debian dir b311224a022aec938bf73b63de643173413f33a9
- - - - -
fc8a0907 by Bas Couwenberg at 2022-10-13T05:40:27+02:00
New upstream release.
- - - - -
8e1ee19d by Bas Couwenberg at 2022-10-13T05:42:22+02:00
Set distribution to unstable.
- - - - -
11 changed files:
- .github/workflows/release.yml
- CHANGES.txt
- debian/changelog
- docs/migration.rst
- pyproject.toml
- shapely/__init__.py
- shapely/geometry/base.py
- shapely/geometry/linestring.py
- shapely/geos.py
- tests/test_buffer.py
- tests/test_parallel_offset.py
Changes:
=====================================
.github/workflows/release.yml
=====================================
@@ -21,12 +21,14 @@ jobs:
steps:
- name: Checkout source
- uses: actions/checkout at v2
+ uses: actions/checkout at v3
+ with:
+ fetch-depth: 0
- name: Set up Python
- uses: actions/setup-python at v2
+ uses: actions/setup-python at v4
with:
- python-version: "3.8"
+ python-version: "3.10"
- name: Build a source tarball
env:
@@ -40,7 +42,7 @@ jobs:
python -m pip install cython==0.29.28 oldest-supported-numpy
python -m build --sdist
- - uses: actions/upload-artifact at v2
+ - uses: actions/upload-artifact at v3
with:
path: ./dist/*.tar.gz
retention-days: 30
@@ -76,10 +78,13 @@ jobs:
cmake_osx_architectures: "x86_64;arm64"
steps:
- - uses: actions/checkout at v2
+ - name: Checkout source
+ uses: actions/checkout at v3
+ with:
+ fetch-depth: 0
- name: Cache GEOS build
- uses: actions/cache at v2
+ uses: actions/cache at v3
with:
path: ${{ runner.temp }}/geos-${{ env.GEOS_VERSION }}
key: ${{ matrix.os }}-${{ matrix.arch }}-${{ env.GEOS_VERSION }}-${{ hashFiles('ci/*') }}
@@ -114,12 +119,9 @@ jobs:
if: ${{ matrix.os == 'windows-2019' }}
- name: Build wheels
- uses: pypa/cibuildwheel at v2.3.1
+ uses: pypa/cibuildwheel at v2.10.2
env:
CIBW_ARCHS: ${{ matrix.arch }}
- CIBW_SKIP: pp* *musllinux* cp310-manylinux_i686
- CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
- CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_ENVIRONMENT_LINUX:
GEOS_VERSION=${{ env.GEOS_VERSION }}
GEOS_INSTALL=/host${{ runner.temp }}/geos-${{ env.GEOS_VERSION }}
@@ -144,7 +146,7 @@ jobs:
CIBW_TEST_COMMAND_WINDOWS: xcopy /y /i {project}\tests ${{ runner.temp }}\tests && chdir /d ${{ runner.temp }} && dir && python -m pytest -vv -k "not test_fallbacks and not test_minimum_clearance" tests
- name: Upload artifacts
- uses: actions/upload-artifact at v2
+ uses: actions/upload-artifact at v3
with:
path: ./wheelhouse/*.whl
retention-days: 5
@@ -155,7 +157,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
steps:
- - uses: actions/download-artifact at v2
+ - uses: actions/download-artifact at v3
with:
name: artifact
path: dist
=====================================
CHANGES.txt
=====================================
@@ -1,6 +1,20 @@
Changes
=======
+1.8.5 (2022-10-12)
+------------------
+
+Packaging:
+
+Python 3.11 wheels have been added to the matrix for all platforms.
+
+Bug fixes:
+
+- Assign _lgeos in the macos frozen app check, fixing a bug introduced in 1.8.2
+ (#1528).
+- An exception is now raised when nan is passed to buffer and parallel_offset,
+ preventing segmentation faults (#1516).
+
1.8.4 (2022-08-17)
------------------
=====================================
debian/changelog
=====================================
@@ -1,8 +1,9 @@
-python-shapely (1.8.4-2) UNRELEASED; urgency=medium
+python-shapely (1.8.5-1) unstable; urgency=medium
+ * New upstream release.
* Use pybuild-plugin-pyproject instead of python3-setuptools.
- -- Bas Couwenberg <sebastic at debian.org> Thu, 22 Sep 2022 20:49:20 +0200
+ -- Bas Couwenberg <sebastic at debian.org> Thu, 13 Oct 2022 05:42:14 +0200
python-shapely (1.8.4-1) unstable; urgency=medium
=====================================
docs/migration.rst
=====================================
@@ -261,9 +261,9 @@ manager that can be copied into your project::
import contextlib
import shapely
import warnings
- from distutils.version import LooseVersion
+ from packaging import version # https://packaging.pypa.io/
- SHAPELY_GE_20 = str(shapely.__version__) >= LooseVersion("2.0")
+ SHAPELY_GE_20 = version.parse(shapely.__version__) >= version.parse("2.0a1")
try:
from shapely.errors import ShapelyDeprecationWarning as shapely_warning
=====================================
pyproject.toml
=====================================
@@ -4,3 +4,14 @@ requires = [
"oldest-supported-numpy",
"setuptools<64",
]
+
+[tool.cibuildwheel]
+build = ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"]
+skip = "pp* *musllinux*"
+manylinux-x86_64-image = "manylinux2014"
+manylinux-i686-image = "manylinux2014"
+
+[[tool.cibuildwheel.overrides]]
+select = "cp3{7,8,9,10}-*"
+manylinux-x86_64-image = "manylinux2010"
+manylinux-i686-image = "manylinux2010"
=====================================
shapely/__init__.py
=====================================
@@ -1 +1 @@
-__version__ = "1.8.4"
+__version__ = "1.8.5"
=====================================
shapely/geometry/base.py
=====================================
@@ -622,6 +622,8 @@ class BaseGeometry:
if mitre_limit == 0.0:
raise ValueError(
'Cannot compute offset from zero-length line segment')
+ elif not math.isfinite(distance):
+ raise ValueError("buffer distance must be finite")
if 'buffer_with_params' in self.impl:
params = self._lgeos.GEOSBufferParams_create()
=====================================
shapely/geometry/linestring.py
=====================================
@@ -2,6 +2,7 @@
"""
from ctypes import c_double
+import math
import warnings
from shapely.coords import CoordinateSequence
@@ -171,6 +172,8 @@ class LineString(BaseGeometry):
if mitre_limit == 0.0:
raise ValueError(
'Cannot compute offset from zero-length line segment')
+ elif not math.isfinite(distance):
+ raise ValueError("parallel_offset distance must be finite")
try:
return geom_factory(self.impl['parallel_offset'](
self, distance, resolution, join_style, mitre_limit, side))
=====================================
shapely/geos.py
=====================================
@@ -145,6 +145,7 @@ elif sys.platform == 'darwin':
]
if hasattr(sys, "_MEIPASS"):
alt_paths.append(os.path.join(sys._MEIPASS, "libgeos_c.1.dylib"))
+ _lgeos = load_dll('geos_c', fallbacks=alt_paths)
elif exists_conda_env():
# conda package.
=====================================
tests/test_buffer.py
=====================================
@@ -1,7 +1,16 @@
+import pytest
+
from . import unittest
from shapely import geometry
+ at pytest.mark.parametrize("distance", [float("nan"), float("inf")])
+def test_non_finite_distance(distance):
+ g = geometry.Point(0, 0)
+ with pytest.raises(ValueError, match="distance must be finite"):
+ g.buffer(distance)
+
+
class BufferSingleSidedCase(unittest.TestCase):
""" Test Buffer Point/Line/Polygon with and without single_sided params """
=====================================
tests/test_parallel_offset.py
=====================================
@@ -1,6 +1,15 @@
+import pytest
+
from . import unittest
from shapely.geometry import LineString, LinearRing
-from shapely.wkt import loads
+
+
+ at pytest.mark.parametrize("distance", [float("nan"), float("inf")])
+def test_non_finite_distance(distance):
+ g = LineString([(0, 0), (10, 0)])
+ with pytest.raises(ValueError, match="distance must be finite"):
+ g.parallel_offset(distance)
+
class OperationsTestCase(unittest.TestCase):
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-shapely/-/compare/06f34b83f24b649b268af0596a017dfc9792478e...8e1ee19d8abee00101dba486ff71c101da260731
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-shapely/-/compare/06f34b83f24b649b268af0596a017dfc9792478e...8e1ee19d8abee00101dba486ff71c101da260731
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/20221013/9903f3c6/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list