diff --git a/CHANGES.txt b/CHANGES.txt index 954986ff..c9d57d74 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,26 @@ Changes All issue numbers are relative to https://github.com/Toblerity/Fiona/issues. +1.10.0 (2024-09-03) +------------------- + +The package version, credits, and citation file have been updated. There have +been no other changes since 1.10.0rc1. Fiona is the work of 73 contributors, +including 25 new contributors since 1.9.0. + +1.10.0rc1 (2024-08-21) +---------------------- + +This is the first release candidate for 1.10.0. + +Changes: + +- Mutable item access to Feature, Geometry, and Properties instances has been + restored (reported in #1430). This usage should be avoided as instances of + these classes will be immutable in a future version. +- The setup.cfg duplicates project configuration in pyproject.toml and has been + removed. + 1.10b3 (2024-07-29) ------------------- diff --git a/CITATION.cff b/CITATION.cff index 136eaa56..5287702b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ cff-version: 1.2.0 message: "Please cite this software using these metadata." type: software title: Fiona -version: "1.9.5" -date-released: "2023-10-11" +version: "1.10.0" +date-released: "2024-09-03" abstract: "Fiona streams simple feature data to and from GIS formats like GeoPackage and Shapefile." keywords: - cartography diff --git a/CREDITS.txt b/CREDITS.txt index 864a0804..8003f8e4 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -3,13 +3,20 @@ Credits Fiona is written by: +- Adam J. Stewart - Alan D. Snow +- Alexandre Detiste - Ariel Nunez - Ariki - Bas Couwenberg - Brandon Liu - Brendan Ward +- Chad Hawkins - Chris Mutel +- Christoph Gohlke +- Dan "Ducky" Little +- daryl herzmann +- Denis - Denis Rykov - dimlev - Efrén @@ -19,36 +26,54 @@ Fiona is written by: - Ewout ter Hoeven - Filipe Fernandes - fredj +- Gavin S - Géraud - Hannes Gräuler +- Hao Lyu <20434183+IncubatorShokuhou@users.noreply.github.com> +- Herz +- Ian Rose - Jacob Wasserman +- James McBride +- James Wilshaw +- Jelle van der Waa - Jesse Crocker +- joehuanguf <51337028+joehuanguf@users.noreply.github.com> - Johan Van de Wauw - Joris Van den Bossche - Joshua Arnott - Juan Luis Cano Rodríguez +- Keith Jenkins - Kelsey Jordahl - Kevin Wurster +- lgolston <30876419+lgolston@users.noreply.github.com> +- Loïc Dutrieux - Ludovic Delauné - Martijn Visser - Matthew Perry -- Micah Cochran +- Micah Cochran - Michael Weisman - Michele Citterio - Mike Taves - Miro Hrončok - Oliver Tonnhofer - Patrick Young +- Phillip Cloud <417981+cpcloud@users.noreply.github.com> +- pmav99 - qinfeng - René Buffat +- Reuben Fletcher-Costin - Ryan Grout +- Ryan Munro +- Sandro Mani - Sean Gillies - Sid Kapur - Simon Norris +- Stefan Brand - Stefano Costa - Stephane Poss - Tim Tröndle - wilsaj +- Yann-Sebastien Tremblay-Johnston The GeoPandas project (Joris Van den Bossche et al.) has been a major driver for new features in 1.8.0. diff --git a/fiona/__init__.py b/fiona/__init__.py index c4fc9262..8b6132fd 100644 --- a/fiona/__init__.py +++ b/fiona/__init__.py @@ -78,7 +78,7 @@ "remove", ] -__version__ = "1.10.0rc1.dev" +__version__ = "1.10.1.dev" __gdal_version__ = get_gdal_release_name() gdal_version = get_gdal_version_tuple() diff --git a/fiona/model.py b/fiona/model.py index fb246c7d..30f4f186 100644 --- a/fiona/model.py +++ b/fiona/model.py @@ -139,12 +139,15 @@ def _props(self): } def __getitem__(self, item): - props = { - k: (dict(v) if isinstance(v, Object) else v) - for k, v in self._props().items() - } - props.update(**self._data) - return props[item] + if item in self._delegated_properties: + return getattr(self._delegate, item) + else: + props = { + k: (dict(v) if isinstance(v, Object) else v) + for k, v in self._props().items() + } + props.update(**self._data) + return props[item] def __iter__(self): props = self._props() diff --git a/pyproject.toml b/pyproject.toml index 486036c6..1e343ad3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,8 @@ all = ["fiona[calc,s3,test]"] calc = ["pyparsing", "shapely"] s3 = ["boto3>=1.3.1"] test = [ + "aiohttp", + "fsspec", "fiona[s3]", "pytest>=7", "pytest-cov", diff --git a/requirements.txt b/requirements.txt index 8d5f9bce..346085b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,4 @@ click~=8.0 click-plugins cligj>=0.5.0 importlib-metadata;python_version<"3.10" -munch>=2.3.2 certifi diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a61c037d..00000000 --- a/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[options.entry_points] -console_scripts = - fio = fiona.fio.main:main_group diff --git a/tests/test_model.py b/tests/test_model.py index 4a3825c7..2228cc43 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -342,3 +342,12 @@ def test_feature_repr(): properties=Properties(a=1, foo="bar"), ) assert repr(feat) == "fiona.Feature(geometry=fiona.Geometry(coordinates=[(0, 0), ...], type='LineString'), id='1', properties=fiona.Properties(a=1, foo='bar'))" + + +def test_issue1430(): + """__getitem__() returns property, not disconnected dict.""" + feat = Feature(properties=Properties()) + with pytest.warns(FionaDeprecationWarning, match="immutable"): + feat["properties"]["foo"] = "bar" + assert feat["properties"]["foo"] == "bar" + assert feat.properties["foo"] == "bar"