[fiona] 01/08: Imported Upstream version 1.7.7
Bas Couwenberg
sebastic at debian.org
Mon Jun 19 05:57:36 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository fiona.
commit 139c0d1affcdde0ca52de750d5a2df3f07da6877
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Mon Jun 19 07:41:01 2017 +0200
Imported Upstream version 1.7.7
---
.travis.yml | 1 +
CHANGES.txt | 10 ++++++++++
fiona/__init__.py | 2 +-
fiona/_crs.pyx | 4 +++-
fiona/_drivers.pyx | 6 ++++--
fiona/_err.pyx | 2 ++
fiona/_geometry.pyx | 2 ++
fiona/_transform.pyx | 10 ++++------
fiona/ogrext1.pyx | 5 +++--
fiona/ogrext2.pyx | 7 ++++---
tests/test_bytescollection.py | 5 ++---
tests/test_collection.py | 11 ++---------
12 files changed, 38 insertions(+), 27 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 774f1ad..d5854f9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,6 +31,7 @@ python:
- "3.5"
before_install:
- pip install -U pip
+ - pip install setuptools==36.0.1
- pip install wheel
- . ./scripts/travis_gdal_install.sh
- export PATH=$GDALINST/gdal-$GDALVERSION/bin:$PATH
diff --git a/CHANGES.txt b/CHANGES.txt
index d5f451a..e8e1ce1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,16 @@ Changes
All issue numbers are relative to https://github.com/Toblerity/Fiona/issues.
+Next (2017-)
+------------------
+
+Bug fixes:
+
+- Switch logger `warn()` (deprecated) calls to `warning()`.
+- Replace all relative imports and cimports in Cython modules with absolute
+ imports (#450).
+- Avoid setting `PROJ_LIB` to a non-existent directory (#439).
+
1.7.6 (2017-04-26)
------------------
diff --git a/fiona/__init__.py b/fiona/__init__.py
index 7c11959..6147e27 100644
--- a/fiona/__init__.py
+++ b/fiona/__init__.py
@@ -81,7 +81,7 @@ import uuid
__all__ = ['bounds', 'listlayers', 'open', 'prop_type', 'prop_width']
-__version__ = "1.7.6"
+__version__ = "1.7.7"
__gdal_version__ = get_gdal_release_name().decode('utf-8')
log = logging.getLogger(__name__)
diff --git a/fiona/_crs.pyx b/fiona/_crs.pyx
index fc3dcd1..f6cb493 100644
--- a/fiona/_crs.pyx
+++ b/fiona/_crs.pyx
@@ -3,11 +3,13 @@
Calls methods from GDAL's OSR module.
"""
+from __future__ import absolute_import
+
import logging
from six import string_types
-cimport _cpl
+from fiona cimport _cpl
from fiona.errors import CRSError
diff --git a/fiona/_drivers.pyx b/fiona/_drivers.pyx
index 79d5b73..1886833 100644
--- a/fiona/_drivers.pyx
+++ b/fiona/_drivers.pyx
@@ -1,6 +1,8 @@
# The GDAL and OGR driver registry.
# GDAL driver management.
+from __future__ import absolute_import
+
import os
import os.path
import logging
@@ -119,7 +121,7 @@ cdef class GDALEnv(object):
os.environ['GDAL_DATA'] = share_datadir
log.debug("Set GDAL_DATA = %r", share_datadir)
else:
- log.warn("GDAL data files not located, GDAL_DATA not set")
+ log.warning("GDAL data files not located, GDAL_DATA not set")
if 'PROJ_LIB' in os.environ:
log.debug("PROJ_LIB: %s", os.environ['PROJ_LIB'])
@@ -134,7 +136,7 @@ cdef class GDALEnv(object):
os.environ['PROJ_LIB'] = share_datadir
log.debug("Set PROJ_LIB = %r", share_datadir)
else:
- log.warn("PROJ data files not located, PROJ_LIB not set")
+ log.warning("PROJ data files not located, PROJ_LIB not set")
for key, val in self.options.items():
key_b = key.upper().encode('utf-8')
diff --git a/fiona/_err.pyx b/fiona/_err.pyx
index 467e8ed..c311e4c 100644
--- a/fiona/_err.pyx
+++ b/fiona/_err.pyx
@@ -29,6 +29,8 @@ manager raises a more useful and informative error:
ValueError: The PNG driver does not support update access to existing datasets.
"""
+from __future__ import absolute_import
+
# CPL function declarations.
cdef extern from "cpl_error.h":
diff --git a/fiona/_geometry.pyx b/fiona/_geometry.pyx
index 8adda35..639ca93 100644
--- a/fiona/_geometry.pyx
+++ b/fiona/_geometry.pyx
@@ -1,5 +1,7 @@
# Coordinate and geometry transformations.
+from __future__ import absolute_import
+
import logging
from fiona.errors import UnsupportedGeometryTypeError
diff --git a/fiona/_transform.pyx b/fiona/_transform.pyx
index bafdba5..16c4a4d 100644
--- a/fiona/_transform.pyx
+++ b/fiona/_transform.pyx
@@ -2,14 +2,12 @@
#
# Coordinate and geometry transformations.
-import logging
+from __future__ import absolute_import
-cimport _cpl
-cimport _crs
-cimport _csl
-cimport _geometry
+import logging
-from _crs cimport OGRSpatialReferenceH
+from fiona cimport _cpl, _crs, _csl, _geometry
+from fiona._crs cimport OGRSpatialReferenceH
cdef extern from "ogr_geometry.h" nogil:
diff --git a/fiona/ogrext1.pyx b/fiona/ogrext1.pyx
index 57d6c43..c2eeb40 100644
--- a/fiona/ogrext1.pyx
+++ b/fiona/ogrext1.pyx
@@ -1,5 +1,6 @@
# These are extension functions and classes using the OGR C API.
+from __future__ import absolute_import
import datetime
import json
@@ -12,8 +13,8 @@ import uuid
from six import integer_types, string_types, text_type
-cimport ogrext1
-from _geometry cimport (
+from fiona cimport ogrext1
+from fiona._geometry cimport (
GeomBuilder, OGRGeomBuilder, geometry_type_code,
normalize_geometry_type_code)
from fiona._err cimport exc_wrap_pointer
diff --git a/fiona/ogrext2.pyx b/fiona/ogrext2.pyx
index 3a0d416..ed28dca 100644
--- a/fiona/ogrext2.pyx
+++ b/fiona/ogrext2.pyx
@@ -1,5 +1,6 @@
# These are extension functions and classes using the OGR C API.
+from __future__ import absolute_import
import datetime
import json
@@ -12,9 +13,9 @@ import uuid
from six import integer_types, string_types, text_type
-cimport ogrext2
-from ogrext2 cimport OGREnvelope
-from _geometry cimport (
+from fiona cimport ogrext2
+from fiona.ogrext2 cimport OGREnvelope
+from fiona._geometry cimport (
GeomBuilder, OGRGeomBuilder, geometry_type_code,
normalize_geometry_type_code)
from fiona._err cimport exc_wrap_pointer
diff --git a/tests/test_bytescollection.py b/tests/test_bytescollection.py
index 92c4d5b..511b3e4 100644
--- a/tests/test_bytescollection.py
+++ b/tests/test_bytescollection.py
@@ -9,6 +9,7 @@ import fiona
FIXME_WINDOWS = sys.platform.startswith('win')
+
class ReadingTest(unittest.TestCase):
def setUp(self):
@@ -30,7 +31,6 @@ class ReadingTest(unittest.TestCase):
def test_open_repr(self):
# I'm skipping checking the name of the virtual file as it produced by uuid.
self.assertTrue(repr(self.c).startswith("<open BytesCollection '/vsimem/"))
- self.assertTrue(repr(self.c).endswith(":OGRGeoJSON', mode 'r' at %s>" % hex(id(self.c))))
@unittest.skipIf(FIXME_WINDOWS,
reason="FIXME on Windows. Please look into why this test is not working.")
@@ -38,7 +38,6 @@ class ReadingTest(unittest.TestCase):
# I'm skipping checking the name of the virtual file as it produced by uuid.
self.c.close()
self.assertTrue(repr(self.c).startswith("<closed BytesCollection '/vsimem/"))
- self.assertTrue(repr(self.c).endswith(":OGRGeoJSON', mode 'r' at %s>" % hex(id(self.c))))
def test_path(self):
self.assertEqual(self.c.path, self.c.virtual_file)
@@ -52,7 +51,7 @@ class ReadingTest(unittest.TestCase):
self.assertTrue(self.c.bytesbuf is None)
def test_name(self):
- self.assertEqual(self.c.name, 'OGRGeoJSON')
+ self.assertTrue(len(self.c.name) > 0)
def test_mode(self):
self.assertEqual(self.c.mode, 'r')
diff --git a/tests/test_collection.py b/tests/test_collection.py
index dc31a5a..2218dec 100644
--- a/tests/test_collection.py
+++ b/tests/test_collection.py
@@ -11,7 +11,8 @@ import unittest
import fiona
from fiona.collection import Collection, supported_drivers
-from fiona.errors import FionaValueError, DriverError, SchemaError, CRSError
+from fiona.errors import FionaValueError, DriverError
+
FIXME_WINDOWS = sys.platform.startswith('win')
@@ -594,14 +595,6 @@ class GeoJSONCRSWritingTest(unittest.TestCase):
self.sink.close()
shutil.rmtree(self.tempdir)
- def test_crs(self):
- """OGR's GeoJSON driver only deals in WGS84"""
- self.sink.close()
- info = subprocess.check_output(
- ["ogrinfo", self.filename, "OGRGeoJSON"])
- self.assertTrue(
- 'GEOGCS["WGS 84' in info.decode('utf-8'),
- info)
@unittest.skipIf(FIXME_WINDOWS,
reason="FIXME on Windows. Test raises PermissionError. Please look into why this test isn't working.")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/fiona.git
More information about the Pkg-grass-devel
mailing list