[Git][debian-gis-team/fiona][master] 5 commits: New upstream version 1.9.5

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Thu Oct 12 04:25:42 BST 2023



Bas Couwenberg pushed to branch master at Debian GIS Project / fiona


Commits:
84bf47f5 by Bas Couwenberg at 2023-10-12T05:16:55+02:00
New upstream version 1.9.5
- - - - -
825796f6 by Bas Couwenberg at 2023-10-12T05:16:57+02:00
Update upstream source from tag 'upstream/1.9.5'

Update to upstream version '1.9.5'
with Debian dir 64f55cdeb846ccdad485e7854a3ee68c0f988204
- - - - -
3eeadcec by Bas Couwenberg at 2023-10-12T05:20:13+02:00
New upstream release.

- - - - -
67f252e3 by Bas Couwenberg at 2023-10-12T05:21:01+02:00
Refresh patches.

- - - - -
a26b3b46 by Bas Couwenberg at 2023-10-12T05:21:20+02:00
Set distribution to unstable.

- - - - -


25 changed files:

- .github/workflows/rstcheck.yml
- .github/workflows/test_gdal_latest.yaml → .github/workflows/test_gdal_latest.yml
- .github/workflows/tests.yaml → .github/workflows/tests.yml
- + .readthedocs.yaml
- CHANGES.txt
- CITATION.cff
- MANIFEST.in
- debian/changelog
- − debian/patches/0001-Exclude-py-files-from-docs-examples-scripts-tests-fr.patch
- debian/patches/0001-Rename-fio-command-to-fiona-to-avoid-name-clash.patch
- debian/patches/series
- − debian/patches/timezone.patch
- docs/manual.rst
- environment.yml
- fiona/__init__.py
- fiona/model.py
- fiona/ogrext.pyx
- fiona/session.py
- pyproject.toml
- pytest.ini
- − readthedocs.yml
- requirements-dev.txt
- tests/conftest.py
- tests/test_datetime.py
- tests/test_model.py


Changes:

=====================================
.github/workflows/rstcheck.yml
=====================================
@@ -20,7 +20,7 @@ jobs:
 
     steps:
       - name: Checkout code
-        uses: actions/checkout at v2
+        uses: actions/checkout at v4
 
       - name: Set up Python
         uses: actions/setup-python at v2


=====================================
.github/workflows/test_gdal_latest.yaml → .github/workflows/test_gdal_latest.yml
=====================================
@@ -24,7 +24,7 @@ jobs:
       GDAL_DATA: ${{ github.workspace }}/gdal_install/share/gdal
       LD_LIBRARY_PATH: "${{ github.workspace }}/gdal_install/lib/:${LD_LIBRARY_PATH}"
     steps:
-      - uses: actions/checkout at v3
+      - uses: actions/checkout at v4
       - name: Update
         run: |
           apt-get update


=====================================
.github/workflows/tests.yaml → .github/workflows/tests.yml
=====================================
@@ -32,22 +32,28 @@ jobs:
   docker_tests:
     runs-on: ubuntu-latest
     name: Docker | GDAL=${{ matrix.gdal-version }} | python=${{ matrix.python-version }}
-    container: osgeo/gdal:ubuntu-small-${{ matrix.gdal-version }}
+    container: ghcr.io/osgeo/gdal:ubuntu-small-${{ matrix.gdal-version }}
     env:
         DEBIAN_FRONTEND: noninteractive
     strategy:
       fail-fast: false
       matrix:
-        python-version: ['3.9', '3.10']
-        gdal-version: ['3.5.3', '3.6.2']
         include:
-          - python-version: '3.9'
+          - python-version: '3.7'
+            gdal-version: '3.4.3'
+          - python-version: '3.8'
             gdal-version: '3.4.3'
           - python-version: '3.9'
-            gdal-version: '3.3.3'
+            gdal-version: '3.5.3'
+          - python-version: '3.10'
+            gdal-version: '3.6.4'
+          - python-version: '3.11'
+            gdal-version: '3.7.1'
+          - python-version: '3.12'
+            gdal-version: '3.7.1'
 
     steps:
-      - uses: actions/checkout at v3
+      - uses: actions/checkout at v4
 
       - name: Update
         run: |
@@ -92,7 +98,7 @@ jobs:
           - os: ubuntu-latest
             python-version: '3.10'
     steps:
-      - uses: actions/checkout at v3
+      - uses: actions/checkout at v4
 
       - name: Conda Setup
         uses: s-weigand/setup-conda at v1


=====================================
.readthedocs.yaml
=====================================
@@ -0,0 +1,9 @@
+version: 2
+
+build:
+  os: "ubuntu-22.04"
+  tools:
+    python: "mambaforge-22.9"
+
+conda:
+  environment: environment.yml


=====================================
CHANGES.txt
=====================================
@@ -3,6 +3,28 @@ Changes
 
 All issue numbers are relative to https://github.com/Toblerity/Fiona/issues.
 
+1.9.5 (2023-10-11)
+------------------
+
+Bug fixes:
+
+- Expand keys in schema mismatch exception, resolving #1278.
+- Preserve the null properties and geometry of a Feature when serializing
+  (#1276).
+
+Packaging:
+
+* Builds now require Cython >= 3.0.2 (#1276).
+* PyPI wheels include GDAL 3.6.4, PROJ 9.0.1, and GEOS 3.11.2.
+* PyPI wheels include curl 8.4.0, addressing CVE-2023-38545 and CVE-38546.
+* PyPI wheels are now available for Python 3.12.
+
+1.9.4.post1 (2023-05-23)
+------------------------
+
+Extraneous files were unintentionally packaged in the 1.9.4 wheels. This post1
+release excludes them so that wheel contents are as in version 1.9.3.
+
 1.9.4 (2023-05-16)
 ------------------
 


=====================================
CITATION.cff
=====================================
@@ -2,9 +2,9 @@ cff-version: 1.2.0
 message: "Please cite this software using these metadata."
 type: software
 title: Fiona
-version: "1.9.0"
-date-released: "2023-01-30"
-abstract: "OGR's neat, nimble, no-nonsense API."
+version: "1.9.5"
+date-released: "2023-10-11"
+abstract: "Fiona streams simple feature data to and from GIS formats like GeoPackage and Shapefile."
 keywords:
   - cartography
   - GIS


=====================================
MANIFEST.in
=====================================
@@ -2,6 +2,8 @@ global-exclude .DS_Store
 global-exclude *.pyc
 recursive-exclude docs/data *
 recursive-exclude docs/_build *
+recursive-exclude _build *
+recursive-exclude venv *
 exclude *.txt *.py
 recursive-include docs *.rst *.txt
 recursive-include tests *.py


=====================================
debian/changelog
=====================================
@@ -1,9 +1,11 @@
-fiona (1.9.4-4) UNRELEASED; urgency=medium
+fiona (1.9.5-1) unstable; urgency=medium
 
   * Team upload.
+  * New upstream release.
   * Switch to dh-sequence-*.
+  * Refresh patches.
 
- -- Bas Couwenberg <sebastic at debian.org>  Wed, 30 Aug 2023 17:21:41 +0200
+ -- Bas Couwenberg <sebastic at debian.org>  Thu, 12 Oct 2023 05:21:02 +0200
 
 fiona (1.9.4-3) unstable; urgency=medium
 


=====================================
debian/patches/0001-Exclude-py-files-from-docs-examples-scripts-tests-fr.patch deleted
=====================================
@@ -1,16 +0,0 @@
-Description: Exclude py files from docs, examples, scripts, tests from wheels
-Author: Sean Gillies <sean.gillies at gmail.com>
-Origin: https://github.com/Toblerity/Fiona/commit/a1480ef417c882d316a5b82206c568bfe6a519ae
-Bug: https://github.com/Toblerity/Fiona/pull/1272
-Bug-Debian: https://bugs.debian.org/1040361
-
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -83,5 +83,5 @@ include-package-data = false
- version = {attr = "fiona.__version__"}
- readme = {file = ["README.rst", "CHANGES.txt", "CREDITS.txt"]}
- 
--[tool.setuptools.packages]
--find = {}
-+[tool.setuptools.packages.find]
-+include = ["fiona", "fiona.*"]


=====================================
debian/patches/0001-Rename-fio-command-to-fiona-to-avoid-name-clash.patch
=====================================
@@ -5,7 +5,7 @@ Forwarded: not-needed
 
 --- a/pyproject.toml
 +++ b/pyproject.toml
-@@ -55,7 +55,7 @@ test = [
+@@ -56,7 +56,7 @@ test = [
  ]
  
  [project.scripts]


=====================================
debian/patches/series
=====================================
@@ -1,4 +1,2 @@
 0001-Rename-fio-command-to-fiona-to-avoid-name-clash.patch
 test_drvsupport.patch
-0001-Exclude-py-files-from-docs-examples-scripts-tests-fr.patch
-timezone.patch


=====================================
debian/patches/timezone.patch deleted
=====================================
@@ -1,44 +0,0 @@
-Description: Fix pytz.exceptions.UnknownTimeZoneError: 'US/Mountain'.
- tzdata (2023c-8) in Debian no longer provides the US timezones:
- .
-   * Ship only timezones in tzdata that follow the current rules of geographical
-     region (continent or ocean) and city name. Move all legacy timezone symlinks
-     (that are upgraded during package update) to tzdata-legacy. This includes
-     dropping the special handling for US/* timezones. (Closes: #1040997)
-Author: Bas Couwenberg <sebastic at debian.org>
-Forwarded: https://github.com/Toblerity/Fiona/pull/1287
-Applied-Upstream: https://github.com/Toblerity/Fiona/commit/cf838e82143aa8ba6a495de831b2e67b215ce7bc
-
---- a/tests/test_datetime.py
-+++ b/tests/test_datetime.py
-@@ -174,10 +174,10 @@ def generate_testdata(field_type, driver
-             ),
-             (
-                 datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
--                    timezone("US/Mountain")
-+                    timezone("America/Denver")
-                 ),
-                 datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
--                    timezone("US/Mountain")
-+                    timezone("America/Denver")
-                 ),
-             ),
-             (
-@@ -270,7 +270,7 @@ def test_compare_datetimes_utc():
-         timezone("Europe/Zurich")
-     )
-     d2 = datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
--        timezone("US/Mountain")
-+        timezone("America/Denver")
-     )
-     assert d1 == d2
-     assert compare_datetimes_utc(d1, d2)
-@@ -279,7 +279,7 @@ def test_compare_datetimes_utc():
-         timezone("Europe/Zurich")
-     )
-     d2 = datetime.datetime(2020, 6, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
--        timezone("US/Mountain")
-+        timezone("America/Denver")
-     )
-     assert d1 == d2
-     assert compare_datetimes_utc(d1, d2)


=====================================
docs/manual.rst
=====================================
@@ -254,10 +254,9 @@ collection to get back to the beginning.
 .. admonition:: File Encoding
 
    The format drivers will attempt to detect the encoding of your data, but may
-   fail. In my experience GDAL 1.7.2 (for example) doesn't detect that the
-   encoding of the Natural Earth dataset is Windows-1252. In this case, the
-   proper encoding can be specified explicitly by using the ``encoding``
-   keyword parameter of :py:func:`fiona.open`: ``encoding='Windows-1252'``.
+   fail. In this case, the proper encoding can be specified explicitly by using
+   the ``encoding`` keyword parameter of :py:func:`fiona.open`, for example:
+   ``encoding='Windows-1252'``.
 
    New in version 0.9.1.
 


=====================================
environment.yml
=====================================
@@ -7,5 +7,6 @@ dependencies:
 - python=3.9.*
 - libgdal=3.4.*
 - sphinx-click
+- sphinx-rtd-theme
 - pip:
   - jinja2==3.0.3


=====================================
fiona/__init__.py
=====================================
@@ -82,7 +82,7 @@ __all__ = [
     "remove",
 ]
 
-__version__ = "1.9.4"
+__version__ = "1.9.5"
 __gdal_version__ = get_gdal_release_name()
 
 gdal_version = get_gdal_version_tuple()
@@ -135,7 +135,7 @@ def open(
 
     The drivers used by Fiona will try to detect the encoding of data
     files. If they fail, you may provide the proper ``encoding``, such
-    as 'Windows-1252' for the Natural Earth datasets.
+    as 'Windows-1252' for the original Natural Earth datasets.
 
     When the provided path is to a file containing multiple named layers
     of data, a layer can be singled out by ``layer``.


=====================================
fiona/model.py
=====================================
@@ -384,15 +384,15 @@ class ObjectEncoder(JSONEncoder):
     """Encodes Geometry, Feature, and Properties."""
 
     def default(self, o):
-        if isinstance(o, (Geometry, Properties)):
-            return {k: self.default(v) for k, v in o.items() if v is not None}
-        elif isinstance(o, Feature):
-            o_dict = dict(o)
-            o_dict["type"] = "Feature"
-            if o.geometry is not None:
-                o_dict["geometry"] = self.default(o.geometry)
-            if o.properties is not None:
-                o_dict["properties"] = self.default(o.properties)
+        if isinstance(o, Object):
+            o_dict = {k: self.default(v) for k, v in o.items()}
+            if isinstance(o, Geometry):
+                if o.type == "GeometryCollection":
+                    _ = o_dict.pop("coordinates", None)
+                else:
+                    _ = o_dict.pop("geometries", None)
+            elif isinstance(o, Feature):
+                o_dict["type"] = "Feature"
             return o_dict
         elif isinstance(o, bytes):
             return hexlify(o)


=====================================
fiona/ogrext.pyx
=====================================
@@ -1396,7 +1396,7 @@ cdef class WritingSession(Session):
             if set(record.properties.keys()) != schema_props_keys:
                 raise ValueError(
                     "Record does not match collection schema: %r != %r" % (
-                        record.properties.keys(),
+                        list(record.properties.keys()),
                         list(schema_props_keys) ))
 
             if not validate_geometry_type(record):


=====================================
fiona/session.py
=====================================
@@ -2,13 +2,16 @@
 
 import logging
 import os
+import warnings
 
 from fiona.path import parse_path, UnparsedPath
 
 log = logging.getLogger(__name__)
 
 try:
-    import boto3
+    with warnings.catch_warnings():
+        warnings.simplefilter("ignore")
+        import boto3
 except ImportError:
     log.debug("Could not import boto3, continuing with reduced functionality.")
     boto3 = None


=====================================
pyproject.toml
=====================================
@@ -1,13 +1,14 @@
 [build-system]
 requires = [
-    "Cython~=0.29.29",
+    "cython~=3.0.2",
     "oldest-supported-numpy",
-    "setuptools>=61",
+    "setuptools>=67.8",
+    "wheel",
 ]
 build-backend = "setuptools.build_meta"
 
 [project]
-name = "Fiona"
+name = "fiona"
 dynamic = ["readme", "version"]
 authors = [
     {name = "Sean Gillies"},
@@ -83,5 +84,5 @@ include-package-data = false
 version = {attr = "fiona.__version__"}
 readme = {file = ["README.rst", "CHANGES.txt", "CREDITS.txt"]}
 
-[tool.setuptools.packages]
-find = {}
+[tool.setuptools.packages.find]
+include = ["fiona", "fiona.*"]


=====================================
pytest.ini
=====================================
@@ -6,6 +6,7 @@ filterwarnings =
     ignore:.*negative step size may be slow*:RuntimeWarning
     ignore:.*is buggy and will be removed in Fiona 2.0.*
     ignore:.*unclosed <socket.socket
+    ignore:.*The 'strict' parameter is no longer needed
 markers =
     iconv: marks tests that require gdal to be compiled with iconv
     network: marks tests that require a network connection


=====================================
readthedocs.yml deleted
=====================================
@@ -1,5 +0,0 @@
-python:
-  version: 3
-  pip_install: true
-conda:
-  file: environment.yml


=====================================
requirements-dev.txt
=====================================
@@ -5,4 +5,5 @@ cython~=0.29.29
 pytest~=7.2
 pytest-cov~=4.0
 pytz==2022.6
+setuptools
 wheel


=====================================
tests/conftest.py
=====================================
@@ -7,6 +7,8 @@ import shutil
 import tarfile
 import zipfile
 from collections import OrderedDict
+import warnings
+
 from click.testing import CliRunner
 import pytest
 


=====================================
tests/test_datetime.py
=====================================
@@ -174,10 +174,10 @@ def generate_testdata(field_type, driver):
             ),
             (
                 datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
-                    timezone("US/Mountain")
+                    timezone("America/Denver")
                 ),
                 datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
-                    timezone("US/Mountain")
+                    timezone("America/Denver")
                 ),
             ),
             (
@@ -270,7 +270,7 @@ def test_compare_datetimes_utc():
         timezone("Europe/Zurich")
     )
     d2 = datetime.datetime(2020, 1, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
-        timezone("US/Mountain")
+        timezone("America/Denver")
     )
     assert d1 == d2
     assert compare_datetimes_utc(d1, d2)
@@ -279,7 +279,7 @@ def test_compare_datetimes_utc():
         timezone("Europe/Zurich")
     )
     d2 = datetime.datetime(2020, 6, 21, 12, 0, 0, tzinfo=pytz.utc).astimezone(
-        timezone("US/Mountain")
+        timezone("America/Denver")
     )
     assert d1 == d2
     assert compare_datetimes_utc(d1, d2)


=====================================
tests/test_model.py
=====================================
@@ -132,7 +132,7 @@ def test_geometry__props():
 
 def test_geometry_gi():
     """Geometry __geo_interface__"""
-    gi = Geometry(coordinates=(0, 0), type="Point").__geo_interface__
+    gi = Geometry(coordinates=(0, 0), type="Point", geometries=[]).__geo_interface__
     assert gi["type"] == "Point"
     assert gi["coordinates"] == (0, 0)
 
@@ -314,3 +314,22 @@ def test_encode_bytes():
     """Bytes are encoded using base64."""
     assert ObjectEncoder().default(b"01234") == b'3031323334'
 
+
+def test_null_property_encoding():
+    """A null feature property is retained."""
+    # Verifies fix for gh-1270.
+    assert ObjectEncoder().default(Properties(a=1, b=None)) == {"a": 1, "b": None}
+
+
+def test_null_geometry_encoding():
+    """A null feature geometry is retained."""
+    # Verifies fix for gh-1270.
+    o_dict = ObjectEncoder().default(Feature())
+    assert o_dict["geometry"] is None
+
+
+def test_geometry_collection_encoding():
+    """No coordinates in a GeometryCollection."""
+    assert "coordinates" not in ObjectEncoder().default(
+        Geometry(type="GeometryCollection", geometries=[])
+    )



View it on GitLab: https://salsa.debian.org/debian-gis-team/fiona/-/compare/4f628286f3284f9917c2ca215428c4ed6e4416d1...a26b3b46269b74bb637328f7187cd514b7a776d1

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/fiona/-/compare/4f628286f3284f9917c2ca215428c4ed6e4416d1...a26b3b46269b74bb637328f7187cd514b7a776d1
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/20231012/8220c34f/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list