[python-shapely] 01/04: Imported Upstream version 1.5.16

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri May 27 09:40:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository python-shapely.

commit 3df921e304ec28fd64007dde4d713cf143d5fd0c
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri May 27 11:13:37 2016 +0200

    Imported Upstream version 1.5.16
---
 CHANGES.txt              | 9 +++++++++
 shapely/__init__.py      | 2 +-
 shapely/geometry/base.py | 1 +
 shapely/prepared.py      | 4 ++++
 4 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index ecc2cb9..9c1cac8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,15 @@
 Changes
 =======
 
+1.5.16 (2016-05-26)
+-------------------
+- Bug fix: eliminate memory leak when unpickling geometry objects (#384, #385).
+- Bug fix: prevent crashes when attempting to pickle a prepared geometry,
+  raising ``PicklingError`` instead (#386).
+- Packaging: extension modules in the OS X wheels uploaded to PyPI link only
+  libgeos_c.dylib now (you can verify and compare to previous releases with
+  ``otool -L shapely/vectorized/_vectorized.so``).
+
 1.5.15 (2016-03-29)
 -------------------
 - Bug fix: use uintptr_t to store pointers instead of long in _geos.pxi,
diff --git a/shapely/__init__.py b/shapely/__init__.py
index 3723cfa..35ddfd4 100644
--- a/shapely/__init__.py
+++ b/shapely/__init__.py
@@ -1 +1 @@
-__version__ = "1.5.15"
+__version__ = "1.5.16"
diff --git a/shapely/geometry/base.py b/shapely/geometry/base.py
index 2696a3b..5fe1ccd 100644
--- a/shapely/geometry/base.py
+++ b/shapely/geometry/base.py
@@ -231,6 +231,7 @@ class BaseGeometry(object):
     def __setstate__(self, state):
         self.empty()
         self.__geom__ = deserialize_wkb(state)
+        self._is_empty = False
         if lgeos.methods['has_z'](self.__geom__):
             self._ndim = 3
         else:
diff --git a/shapely/prepared.py b/shapely/prepared.py
index fb9080a..544bf00 100644
--- a/shapely/prepared.py
+++ b/shapely/prepared.py
@@ -4,6 +4,7 @@ Support for GEOS prepared geometry operations.
 
 from shapely.geos import lgeos
 from shapely.impl import DefaultImplementation, delegated
+from pickle import PicklingError
 
 
 class PreparedGeometry(object):
@@ -83,6 +84,9 @@ class PreparedGeometry(object):
         """Returns True if geometry is within the other, else False"""
         return bool(self.impl['prepared_within'](self, other))
 
+    def __reduce__(self):
+        raise PicklingError("Prepared geometries cannot be pickled.")
+
 def prep(ob):
     """Creates and returns a prepared geometric object."""
     return PreparedGeometry(ob)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-shapely.git



More information about the Pkg-grass-devel mailing list