shapely 1.8.4__tar.gz → 1.8.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. {Shapely-1.8.4 → Shapely-1.8.5}/CHANGES.txt +14 -0
  2. {Shapely-1.8.4/Shapely.egg-info → Shapely-1.8.5}/PKG-INFO +15 -1
  3. {Shapely-1.8.4 → Shapely-1.8.5/Shapely.egg-info}/PKG-INFO +15 -1
  4. Shapely-1.8.5/VERSION.txt +1 -0
  5. {Shapely-1.8.4 → Shapely-1.8.5}/docs/migration.rst +2 -2
  6. Shapely-1.8.5/pyproject.toml +17 -0
  7. Shapely-1.8.5/shapely/__init__.py +1 -0
  8. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/base.py +2 -0
  9. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/linestring.py +3 -0
  10. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geos.py +1 -0
  11. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_buffer.py +9 -0
  12. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_parallel_offset.py +10 -1
  13. Shapely-1.8.4/VERSION.txt +0 -1
  14. Shapely-1.8.4/pyproject.toml +0 -6
  15. Shapely-1.8.4/shapely/__init__.py +0 -1
  16. {Shapely-1.8.4 → Shapely-1.8.5}/CREDITS.txt +0 -0
  17. {Shapely-1.8.4 → Shapely-1.8.5}/LICENSE.txt +0 -0
  18. {Shapely-1.8.4 → Shapely-1.8.5}/README.rst +0 -0
  19. {Shapely-1.8.4 → Shapely-1.8.5}/Shapely.egg-info/SOURCES.txt +0 -0
  20. {Shapely-1.8.4 → Shapely-1.8.5}/Shapely.egg-info/dependency_links.txt +0 -0
  21. {Shapely-1.8.4 → Shapely-1.8.5}/Shapely.egg-info/requires.txt +0 -0
  22. {Shapely-1.8.4 → Shapely-1.8.5}/Shapely.egg-info/top_level.txt +0 -0
  23. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/__init__.py +0 -0
  24. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/packaging/__about__.py +0 -0
  25. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/packaging/__init__.py +0 -0
  26. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/packaging/_compat.py +0 -0
  27. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/packaging/_structures.py +0 -0
  28. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/packaging/markers.py +0 -0
  29. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/packaging/requirements.py +0 -0
  30. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/packaging/specifiers.py +0 -0
  31. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/packaging/utils.py +0 -0
  32. {Shapely-1.8.4 → Shapely-1.8.5}/_vendor/packaging/version.py +0 -0
  33. {Shapely-1.8.4 → Shapely-1.8.5}/docs/design.rst +0 -0
  34. {Shapely-1.8.4 → Shapely-1.8.5}/docs/index.rst +0 -0
  35. {Shapely-1.8.4 → Shapely-1.8.5}/docs/manual.rst +0 -0
  36. {Shapely-1.8.4 → Shapely-1.8.5}/docs/project.rst +0 -0
  37. {Shapely-1.8.4 → Shapely-1.8.5}/setup.cfg +0 -0
  38. {Shapely-1.8.4 → Shapely-1.8.5}/setup.py +0 -0
  39. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/_buildcfg.py +0 -0
  40. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/_geos.pxi +0 -0
  41. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/affinity.py +0 -0
  42. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/algorithms/__init__.py +0 -0
  43. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/algorithms/cga.py +0 -0
  44. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/algorithms/polylabel.py +0 -0
  45. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/coords.py +0 -0
  46. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/ctypes_declarations.py +0 -0
  47. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/errors.py +0 -0
  48. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/examples/__init__.py +0 -0
  49. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/examples/dissolve.py +0 -0
  50. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/examples/geoms.py +0 -0
  51. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/examples/intersect.py +0 -0
  52. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/__init__.py +0 -0
  53. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/collection.py +0 -0
  54. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/conftest.py +0 -0
  55. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/geo.py +0 -0
  56. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/multilinestring.py +0 -0
  57. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/multipoint.py +0 -0
  58. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/multipolygon.py +0 -0
  59. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/point.py +0 -0
  60. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/polygon.py +0 -0
  61. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/geometry/proxy.py +0 -0
  62. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/impl.py +0 -0
  63. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/iterops.py +0 -0
  64. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/linref.py +0 -0
  65. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/ops.py +0 -0
  66. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/predicates.py +0 -0
  67. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/prepared.py +0 -0
  68. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/speedups/__init__.py +0 -0
  69. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/speedups/_speedups.pyx +0 -0
  70. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/strtree.py +0 -0
  71. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/topology.py +0 -0
  72. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/validation.py +0 -0
  73. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/vectorized/__init__.py +0 -0
  74. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/vectorized/_vectorized.pyx +0 -0
  75. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/wkb.py +0 -0
  76. {Shapely-1.8.4 → Shapely-1.8.5}/shapely/wkt.py +0 -0
  77. {Shapely-1.8.4 → Shapely-1.8.5}/tests/__init__.py +0 -0
  78. {Shapely-1.8.4 → Shapely-1.8.5}/tests/conftest.py +0 -0
  79. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_affinity.py +0 -0
  80. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_binascii_hex.txt +0 -0
  81. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_box.py +0 -0
  82. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_cga.py +0 -0
  83. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_clip_by_rect.py +0 -0
  84. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_collection.py +0 -0
  85. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_coords.py +0 -0
  86. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_create_inconsistent_dimensionality.py +0 -0
  87. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_default_impl.py +0 -0
  88. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_delaunay.py +0 -0
  89. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_delegated.py +0 -0
  90. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_dlls.py +0 -0
  91. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_doctests.py +0 -0
  92. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_emptiness.py +0 -0
  93. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_empty_polygons.py +0 -0
  94. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_equality.py +0 -0
  95. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_geointerface.py +0 -0
  96. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_geometry_base.py +0 -0
  97. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_geomseq.py +0 -0
  98. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_geos_err_handler.py +0 -0
  99. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_getitem.py +0 -0
  100. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_hash.py +0 -0
  101. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_invalid_geometries.py +0 -0
  102. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_iterops.py +0 -0
  103. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_linear_referencing.py +0 -0
  104. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_linemerge.py +0 -0
  105. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_linestring.py +0 -0
  106. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_locale.py +0 -0
  107. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_make_valid.py +0 -0
  108. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_mapping.py +0 -0
  109. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_minimum_clearance.py +0 -0
  110. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_minimum_rotated_rectangle.py +0 -0
  111. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_multi.py +0 -0
  112. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_multilinestring.py +0 -0
  113. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_multipoint.py +0 -0
  114. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_multipolygon.py +0 -0
  115. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_ndarrays.py +0 -0
  116. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_nearest.py +0 -0
  117. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_operations.py +0 -0
  118. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_operators.py +0 -0
  119. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_orient.py +0 -0
  120. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_persist.py +0 -0
  121. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_pickle.py +0 -0
  122. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_point.py +0 -0
  123. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_polygon.py +0 -0
  124. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_polygonize.py +0 -0
  125. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_polylabel.py +0 -0
  126. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_predicates.py +0 -0
  127. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_prepared.py +0 -0
  128. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_products_z.py +0 -0
  129. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_shape.py +0 -0
  130. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_shared_paths.py +0 -0
  131. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_singularity.py +0 -0
  132. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_snap.py +0 -0
  133. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_split.py +0 -0
  134. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_strtree.py +0 -0
  135. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_styles.py +0 -0
  136. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_substring.py +0 -0
  137. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_svg.py +0 -0
  138. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_transform.py +0 -0
  139. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_union.py +0 -0
  140. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_validation.py +0 -0
  141. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_vectorized.py +0 -0
  142. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_voronoi_diagram.py +0 -0
  143. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_wkb.py +0 -0
  144. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_wkt.py +0 -0
  145. {Shapely-1.8.4 → Shapely-1.8.5}/tests/test_xy.py +0 -0
  146. {Shapely-1.8.4 → Shapely-1.8.5}/tests/threading_test.py +0 -0
  147. {Shapely-1.8.4 → Shapely-1.8.5}/tests/unpickle-strtree.py +0 -0
@@ -1,6 +1,20 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ 1.8.5 (2022-10-12)
5
+ ------------------
6
+
7
+ Packaging:
8
+
9
+ Python 3.11 wheels have been added to the matrix for all platforms.
10
+
11
+ Bug fixes:
12
+
13
+ - Assign _lgeos in the macos frozen app check, fixing a bug introduced in 1.8.2
14
+ (#1528).
15
+ - An exception is now raised when nan is passed to buffer and parallel_offset,
16
+ preventing segmentation faults (#1516).
17
+
4
18
  1.8.4 (2022-08-17)
5
19
  ------------------
6
20
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Shapely
3
- Version: 1.8.4
3
+ Version: 1.8.5
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/shapely/shapely
6
6
  Author: Sean Gillies
@@ -331,6 +331,20 @@ U.S. National Endowment for the Humanities (https://www.neh.gov).
331
331
  Changes
332
332
  =======
333
333
 
334
+ 1.8.5 (2022-10-12)
335
+ ------------------
336
+
337
+ Packaging:
338
+
339
+ Python 3.11 wheels have been added to the matrix for all platforms.
340
+
341
+ Bug fixes:
342
+
343
+ - Assign _lgeos in the macos frozen app check, fixing a bug introduced in 1.8.2
344
+ (#1528).
345
+ - An exception is now raised when nan is passed to buffer and parallel_offset,
346
+ preventing segmentation faults (#1516).
347
+
334
348
  1.8.4 (2022-08-17)
335
349
  ------------------
336
350
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Shapely
3
- Version: 1.8.4
3
+ Version: 1.8.5
4
4
  Summary: Geometric objects, predicates, and operations
5
5
  Home-page: https://github.com/shapely/shapely
6
6
  Author: Sean Gillies
@@ -331,6 +331,20 @@ U.S. National Endowment for the Humanities (https://www.neh.gov).
331
331
  Changes
332
332
  =======
333
333
 
334
+ 1.8.5 (2022-10-12)
335
+ ------------------
336
+
337
+ Packaging:
338
+
339
+ Python 3.11 wheels have been added to the matrix for all platforms.
340
+
341
+ Bug fixes:
342
+
343
+ - Assign _lgeos in the macos frozen app check, fixing a bug introduced in 1.8.2
344
+ (#1528).
345
+ - An exception is now raised when nan is passed to buffer and parallel_offset,
346
+ preventing segmentation faults (#1516).
347
+
334
348
  1.8.4 (2022-08-17)
335
349
  ------------------
336
350
 
@@ -0,0 +1 @@
1
+ 1.8.5
@@ -261,9 +261,9 @@ manager that can be copied into your project::
261
261
  import contextlib
262
262
  import shapely
263
263
  import warnings
264
- from distutils.version import LooseVersion
264
+ from packaging import version # https://packaging.pypa.io/
265
265
 
266
- SHAPELY_GE_20 = str(shapely.__version__) >= LooseVersion("2.0")
266
+ SHAPELY_GE_20 = version.parse(shapely.__version__) >= version.parse("2.0a1")
267
267
 
268
268
  try:
269
269
  from shapely.errors import ShapelyDeprecationWarning as shapely_warning
@@ -0,0 +1,17 @@
1
+ [build-system]
2
+ requires = [
3
+ "Cython>=0.29.24,<3",
4
+ "oldest-supported-numpy",
5
+ "setuptools<64",
6
+ ]
7
+
8
+ [tool.cibuildwheel]
9
+ build = ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"]
10
+ skip = "pp* *musllinux*"
11
+ manylinux-x86_64-image = "manylinux2014"
12
+ manylinux-i686-image = "manylinux2014"
13
+
14
+ [[tool.cibuildwheel.overrides]]
15
+ select = "cp3{7,8,9,10}-*"
16
+ manylinux-x86_64-image = "manylinux2010"
17
+ manylinux-i686-image = "manylinux2010"
@@ -0,0 +1 @@
1
+ __version__ = "1.8.5"
@@ -622,6 +622,8 @@ class BaseGeometry:
622
622
  if mitre_limit == 0.0:
623
623
  raise ValueError(
624
624
  'Cannot compute offset from zero-length line segment')
625
+ elif not math.isfinite(distance):
626
+ raise ValueError("buffer distance must be finite")
625
627
 
626
628
  if 'buffer_with_params' in self.impl:
627
629
  params = self._lgeos.GEOSBufferParams_create()
@@ -2,6 +2,7 @@
2
2
  """
3
3
 
4
4
  from ctypes import c_double
5
+ import math
5
6
  import warnings
6
7
 
7
8
  from shapely.coords import CoordinateSequence
@@ -171,6 +172,8 @@ class LineString(BaseGeometry):
171
172
  if mitre_limit == 0.0:
172
173
  raise ValueError(
173
174
  'Cannot compute offset from zero-length line segment')
175
+ elif not math.isfinite(distance):
176
+ raise ValueError("parallel_offset distance must be finite")
174
177
  try:
175
178
  return geom_factory(self.impl['parallel_offset'](
176
179
  self, distance, resolution, join_style, mitre_limit, side))
@@ -145,6 +145,7 @@ elif sys.platform == 'darwin':
145
145
  ]
146
146
  if hasattr(sys, "_MEIPASS"):
147
147
  alt_paths.append(os.path.join(sys._MEIPASS, "libgeos_c.1.dylib"))
148
+ _lgeos = load_dll('geos_c', fallbacks=alt_paths)
148
149
 
149
150
  elif exists_conda_env():
150
151
  # conda package.
@@ -1,7 +1,16 @@
1
+ import pytest
2
+
1
3
  from . import unittest
2
4
  from shapely import geometry
3
5
 
4
6
 
7
+ @pytest.mark.parametrize("distance", [float("nan"), float("inf")])
8
+ def test_non_finite_distance(distance):
9
+ g = geometry.Point(0, 0)
10
+ with pytest.raises(ValueError, match="distance must be finite"):
11
+ g.buffer(distance)
12
+
13
+
5
14
  class BufferSingleSidedCase(unittest.TestCase):
6
15
  """ Test Buffer Point/Line/Polygon with and without single_sided params """
7
16
 
@@ -1,6 +1,15 @@
1
+ import pytest
2
+
1
3
  from . import unittest
2
4
  from shapely.geometry import LineString, LinearRing
3
- from shapely.wkt import loads
5
+
6
+
7
+ @pytest.mark.parametrize("distance", [float("nan"), float("inf")])
8
+ def test_non_finite_distance(distance):
9
+ g = LineString([(0, 0), (10, 0)])
10
+ with pytest.raises(ValueError, match="distance must be finite"):
11
+ g.parallel_offset(distance)
12
+
4
13
 
5
14
  class OperationsTestCase(unittest.TestCase):
6
15
 
Shapely-1.8.4/VERSION.txt DELETED
@@ -1 +0,0 @@
1
- 1.8.4
@@ -1,6 +0,0 @@
1
- [build-system]
2
- requires = [
3
- "Cython>=0.29.24,<3",
4
- "oldest-supported-numpy",
5
- "setuptools<64",
6
- ]
@@ -1 +0,0 @@
1
- __version__ = "1.8.4"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes