This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository fiona.
commit 96bbef276dcfd5afa9d689a046fa1a46e49b3ad6 Author: Bas Couwenberg <[email protected]> Date: Sat Feb 6 23:02:07 2016 +0100 Refresh GDAL 2.0 patch for 1.6.3. --- debian/patches/0003-GDAL-2.0.patch | 42 +++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/debian/patches/0003-GDAL-2.0.patch b/debian/patches/0003-GDAL-2.0.patch index 2a25c78..85e276e 100644 --- a/debian/patches/0003-GDAL-2.0.patch +++ b/debian/patches/0003-GDAL-2.0.patch @@ -519,7 +519,7 @@ Subject: [PATCH 01/16] sperate implementation for gdal2 + void OGR_F_SetFieldInteger64 (void *feature, int n, long long value) --- a/fiona/ogrext.pyx +++ /dev/null -@@ -1,1233 +0,0 @@ +@@ -1,1243 +0,0 @@ -# These are extension functions and classes using the OGR C API. - -import datetime @@ -538,7 +538,9 @@ Subject: [PATCH 01/16] sperate implementation for gdal2 -from fiona._geometry cimport GeomBuilder, OGRGeomBuilder -from fiona._err import cpl_errs -from fiona._geometry import GEOMETRY_TYPES --from fiona.errors import DriverError, SchemaError, CRSError, FionaValueError +-from fiona.errors import ( +- DriverError, SchemaError, CRSError, FionaValueError, FieldNameEncodeError, +- StringFieldEncodeError, StringFieldDecodeError) -from fiona.odict import OrderedDict -from fiona.rfc3339 import parse_date, parse_datetime, parse_time -from fiona.rfc3339 import FionaDateType, FionaDateTimeType, FionaTimeType @@ -702,9 +704,10 @@ Subject: [PATCH 01/16] sperate implementation for gdal2 - try: - val = ograpi.OGR_F_GetFieldAsString(feature, i) - val = val.decode(encoding) -- except UnicodeDecodeError: -- log.warn( -- "Failed to decode %s using %s codec", val, encoding) +- except UnicodeError as exc: +- raise StringFieldDecodeError( +- "Failed to decode {0} using {1} codec: {2}".format( +- val, encoding, str(exc))) - - # Does the text contain a JSON object? Let's check. - # Let's check as cheaply as we can. @@ -780,11 +783,15 @@ Subject: [PATCH 01/16] sperate implementation for gdal2 - "Looking up %s in %s", key, repr(session._schema_mapping)) - ogr_key = session._schema_mapping[key] - schema_type = collection.schema['properties'][key] +- +- # Catch and re-raise unicode encoding errors. - try: - key_bytes = ogr_key.encode(encoding) -- except UnicodeDecodeError: -- log.warn("Failed to encode %s using %s codec", key, encoding) -- key_bytes = ogr_key +- except UnicodeError as exc: +- raise FieldNameEncodeError( +- "Failed to encode {0} using {1} codec: {2}".format( +- key, encoding, str(exc))) +- - key_c = key_bytes - i = ograpi.OGR_F_GetFieldIndex(cogr_feature, key_c) - if i < 0: @@ -826,12 +833,15 @@ Subject: [PATCH 01/16] sperate implementation for gdal2 - ograpi.OGR_F_SetFieldDateTime( - cogr_feature, i, 0, 0, 0, hh, mm, ss, 0) - elif isinstance(value, string_types): +- +- # Catch and re-raise string field value encoding errors. - try: - value_bytes = value.encode(encoding) -- except UnicodeDecodeError: -- log.warn( -- "Failed to encode %s using %s codec", value, encoding) -- value_bytes = value +- except UnicodeError as exc: +- raise StringFieldEncodeError( +- "Failed to encode {0} using {1} codec: {2}".format( +- value, encoding, str(exc))) +- - string_c = value_bytes - ograpi.OGR_F_SetFieldString(cogr_feature, i, string_c) - elif value is None: @@ -898,7 +908,7 @@ Subject: [PATCH 01/16] sperate implementation for gdal2 - path = collection.path - try: - path_b = path.encode('utf-8') -- except UnicodeDecodeError: +- except UnicodeError: - # Presume already a UTF-8 encoded string - path_b = path - path_c = path_b @@ -1221,7 +1231,7 @@ Subject: [PATCH 01/16] sperate implementation for gdal2 - if os.path.exists(path): - try: - path_b = path.encode('utf-8') -- except UnicodeDecodeError: +- except UnicodeError: - path_b = path - path_c = path_b - with cpl_errs: @@ -1257,7 +1267,7 @@ Subject: [PATCH 01/16] sperate implementation for gdal2 - elif collection.mode == 'w': - try: - path_b = path.encode('utf-8') -- except UnicodeDecodeError: +- except UnicodeError: - path_b = path - path_c = path_b - driver_b = collection.driver.encode() @@ -1710,7 +1720,7 @@ Subject: [PATCH 01/16] sperate implementation for gdal2 - # Open OGR data source. - try: - path_b = path.encode('utf-8') -- except UnicodeDecodeError: +- except UnicodeError: - path_b = path - path_c = path_b - with cpl_errs: -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/fiona.git _______________________________________________ Pkg-grass-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

