[Git][debian-gis-team/python-geojson][upstream] New upstream version 3.3.0

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Fri May 29 05:13:41 BST 2026



Bas Couwenberg pushed to branch upstream at Debian GIS Project / python-geojson


Commits:
ddce9471 by Bas Couwenberg at 2026-05-29T05:47:15+02:00
New upstream version 3.3.0
- - - - -


15 changed files:

- .github/workflows/lint.yml
- .github/workflows/release.yml
- .github/workflows/test.yml
- .pre-commit-config.yaml
- CHANGELOG.rst
- LICENSE.rst
- README.rst
- geojson/__init__.py
- geojson/_version.py
- geojson/codec.py
- geojson/factory.py
- geojson/feature.py
- setup.py
- + tests/test_feature_collection.py
- tox.ini


Changes:

=====================================
.github/workflows/lint.yml
=====================================
@@ -10,10 +10,10 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout at v3
+      - uses: actions/checkout at v6
 
-      - uses: actions/setup-python at v4
+      - uses: actions/setup-python at v6
         with:
           python-version: "3.x"
 
-      - uses: pre-commit/action at v3.0.0
+      - uses: pre-commit/action at v3.0.1


=====================================
.github/workflows/release.yml
=====================================
@@ -11,12 +11,12 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout at v3
+      - uses: actions/checkout at v6
         with:
           fetch-depth: 0
 
       - name: Set up Python
-        uses: actions/setup-python at v4
+        uses: actions/setup-python at v6
         with:
           python-version: "3.x"
           cache: pip


=====================================
.github/workflows/test.yml
=====================================
@@ -11,13 +11,13 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python-version: ['pypy3.9', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
+        python-version: ['pypy3.10', '3.10', '3.11', '3.12', '3.13', '3.14']
 
     steps:
-    - uses: actions/checkout at v3
+    - uses: actions/checkout at v6
 
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python at v4
+      uses: actions/setup-python at v6
       with:
         python-version: ${{ matrix.python-version }}
         allow-prereleases: true
@@ -34,6 +34,6 @@ jobs:
           tox -e py
 
     - name: Upload coverage
-      uses: codecov/codecov-action at v3
+      uses: codecov/codecov-action at v6
       with:
         name: Python ${{ matrix.python-version }}


=====================================
.pre-commit-config.yaml
=====================================
@@ -1,6 +1,6 @@
 repos:
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v5.0.0
+    rev: v6.0.0
     hooks:
       - id: check-case-conflict
       - id: check-merge-conflict
@@ -9,12 +9,12 @@ repos:
       - id: trailing-whitespace
 
   - repo: https://github.com/tox-dev/tox-ini-fmt
-    rev: 1.4.1
+    rev: 1.7.1
     hooks:
       - id: tox-ini-fmt
 
   - repo: https://github.com/PyCQA/flake8
-    rev: 7.1.1
+    rev: 7.3.0
     hooks:
       - id: flake8
 


=====================================
CHANGELOG.rst
=====================================
@@ -1,6 +1,33 @@
 Changes
 =======
 
+3.3.0
+----------
+
+- `__all__` must be a sequence of strings: fix `__init__.py` and `factory.py`
+
+  -  https://github.com/jazzband/geojson/pull/247
+
+- remove simplejson
+
+  -  https://github.com/jazzband/geojson/pull/246
+
+- Add support for Python 3.14
+
+  - https://github.com/jazzband/geojson/pull/245
+
+- Remove EOL Python version support
+
+  - https://github.com/jazzband/geojson/pull/244
+
+- Update GH action versions for Node 24
+
+  - https://github.com/jazzband/geojson/pull/243
+
+- fix: convert dict features to Feature objects in FeatureCollection
+
+  - https://github.com/jazzband/geojson/pull/242
+
 3.2.0
 ----------
 


=====================================
LICENSE.rst
=====================================
@@ -1,4 +1,4 @@
-Copyright © 2007-2019, contributors of geojson
+Copyright © 2007-2026, contributors of geojson
 
 All rights reserved.
 


=====================================
README.rst
=====================================
@@ -29,7 +29,7 @@ This Python library contains:
 Installation
 ------------
 
-geojson is compatible with Python 3.7 - 3.13. The recommended way to install is via pip_:
+geojson is compatible with Python 3.10 - 3.14. The recommended way to install is via pip_:
 
 .. code::
 


=====================================
geojson/__init__.py
=====================================
@@ -7,11 +7,13 @@ from geojson.feature import Feature, FeatureCollection
 from geojson.base import GeoJSON
 from geojson._version import __version__, __version_info__
 
-__all__ = ([dump, dumps, load, loads, GeoJSONEncoder] +
-           [coords, map_coords] +
-           [Point, LineString, Polygon] +
-           [MultiLineString, MultiPoint, MultiPolygon] +
-           [GeometryCollection] +
-           [Feature, FeatureCollection] +
-           [GeoJSON] +
-           [__version__, __version_info__])
+__all__ = (
+        ["dump", "dumps", "load", "loads", "GeoJSONEncoder"] +
+        ["coords", "map_coords"] +
+        ["Point", "LineString", "Polygon"] +
+        ["MultiLineString", "MultiPoint", "MultiPolygon"] +
+        ["GeometryCollection"] +
+        ["Feature", "FeatureCollection"] +
+        ["GeoJSON"] +
+        ["__version__", "__version_info__"]
+)


=====================================
geojson/_version.py
=====================================
@@ -1,2 +1,2 @@
-__version__ = "3.2.0"
+__version__ = "3.3.0"
 __version_info__ = tuple(map(int, __version__.split(".")))


=====================================
geojson/codec.py
=====================================
@@ -1,7 +1,4 @@
-try:
-    import simplejson as json
-except ImportError:
-    import json
+import json
 
 import geojson
 import geojson.factory


=====================================
geojson/factory.py
=====================================
@@ -4,8 +4,10 @@ from geojson.geometry import GeometryCollection
 from geojson.feature import Feature, FeatureCollection
 from geojson.base import GeoJSON
 
-__all__ = ([Point, LineString, Polygon] +
-           [MultiLineString, MultiPoint, MultiPolygon] +
-           [GeometryCollection] +
-           [Feature, FeatureCollection] +
-           [GeoJSON])
+__all__ = (
+        ["Point", "LineString", "Polygon"] +
+        ["MultiLineString", "MultiPoint", "MultiPolygon"] +
+        ["GeometryCollection"] +
+        ["Feature", "FeatureCollection"] +
+        ["GeoJSON"]
+)


=====================================
geojson/feature.py
=====================================
@@ -44,7 +44,10 @@ class FeatureCollection(GeoJSON):
         :rtype: FeatureCollection
         """
         super().__init__(**extra)
-        self["features"] = features
+        self["features"] = [
+            self.to_instance(f) if not isinstance(f, GeoJSON) else f
+            for f in features
+        ]
 
     def errors(self):
         return self.check_list_errors(lambda x: x.errors(), self.features)


=====================================
setup.py
=====================================
@@ -17,8 +17,8 @@ else:
 
 
 major_version, minor_version = sys.version_info[:2]
-if not (major_version == 3 and 7 <= minor_version <= 13):
-    sys.stderr.write("Sorry, only Python 3.7 - 3.13 are "
+if not (major_version == 3 and 10 <= minor_version <= 14):
+    sys.stderr.write("Sorry, only Python 3.10 - 3.14 are "
                      "supported at this time.\n")
     exit(1)
 
@@ -38,7 +38,7 @@ setup(
     package_dir={"geojson": "geojson"},
     package_data={"geojson": ["*.rst"]},
     install_requires=[],
-    python_requires=">=3.7",
+    python_requires=">=3.10",
     classifiers=[
         "Development Status :: 5 - Production/Stable",
         "Intended Audience :: Developers",
@@ -47,13 +47,11 @@ setup(
         "Operating System :: OS Independent",
         "Programming Language :: Python",
         "Programming Language :: Python :: 3",
-        "Programming Language :: Python :: 3.7",
-        "Programming Language :: Python :: 3.8",
-        "Programming Language :: Python :: 3.9",
         "Programming Language :: Python :: 3.10",
         "Programming Language :: Python :: 3.11",
         "Programming Language :: Python :: 3.12",
         "Programming Language :: Python :: 3.13",
+        "Programming Language :: Python :: 3.14",
         "Topic :: Scientific/Engineering :: GIS",
     ]
 )


=====================================
tests/test_feature_collection.py
=====================================
@@ -0,0 +1,27 @@
+import unittest
+
+import geojson
+
+
+class FeatureCollectionsTest(unittest.TestCase):
+    def test_to_instance_converts_nested_features(self):
+        """to_instance() should convert dict features to Feature objects in FeatureCollection."""
+
+        feature_collection_dict = {
+            "type": "FeatureCollection",
+            "features": [
+                {
+                    "type": "Feature",
+                    "properties": {"foo": "bar"},
+                    "geometry": {
+                        "type": "Polygon",
+                        "coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]],
+                    },
+                },
+            ],
+        }
+
+        obj = geojson.GeoJSON.to_instance(feature_collection_dict)
+        self.assertTrue(isinstance(obj, geojson.FeatureCollection))
+        self.assertTrue(isinstance(obj.features[0], geojson.Feature))
+        self.assertTrue(obj.is_valid)


=====================================
tox.ini
=====================================
@@ -1,8 +1,8 @@
 [tox]
 requires =
-    tox>=4.2
+    tox>=4.5
 env_list =
-    py{py3, 313, 312, 311, 310, 39, 38, 37}
+    py{py3, 314, 313, 312, 311, 310}
 
 [testenv]
 deps =



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-geojson/-/commit/ddce947132ebd5b13b8e53d095fa770cf677862f

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-geojson/-/commit/ddce947132ebd5b13b8e53d095fa770cf677862f
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20260529/106f13b7/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list