From f900980dfae517253265b75c2866d72626956ca5 Mon Sep 17 00:00:00 2001 From: Caglar Pir Date: Fri, 4 Sep 2026 10:01:08 +0200 Subject: [PATCH] Correct declared Python support and accept the 'id' field Two independent metadata/validation fixes. REQUIRES_PYTHON was ">=3.0", which is not satisfiable: the SDK cannot run on any Python 3.x below 3.10, because shapely>=2.1.0 (a declared runtime requirement) itself requires >=3.10. Verified by installing the built wheel into clean environments: 3.9 fails to resolve, 3.10 installs and the SDK works end to end against the live API. The SDK's own source uses no syntax newer than f-strings, so the floor comes from the dependency set rather than the code. Classifiers updated to match, and 3.13/3.14 added -- both verified working. 'id' was missing from every entity field list, so passing fields=['id'] raised InvalidFieldError even though the Graph API accepts it and every decoded feature carries an id. Confirmed against the live API for images, map features and detections: GET /1933525276802129?fields=id,captured_at {"id":"1933525276802129","captured_at":1507560881000} Added to the image, map feature, detection (both variants) and organization field lists. --- setup.py | 9 +++------ src/mapillary/config/api/entities.py | 8 +++++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index a771bfb..aa790f8 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ ) LONG_DESCRIPTION_CONTENT_TYPE = "text/markdown" URL = "https://github.com/mapillary/mapillary-python-sdk" -REQUIRES_PYTHON = ">=3.0" +REQUIRES_PYTHON = ">=3.10" HERE = os.path.abspath(os.path.dirname(__file__)) REQUIREMENTS = [ "mapbox-vector-tile>=2.1.0", @@ -58,14 +58,11 @@ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "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", ] PROJECT_URLS = { "Download": "https://pypi.org/project/mapillary/#files", diff --git a/src/mapillary/config/api/entities.py b/src/mapillary/config/api/entities.py index 4108797..3a317dd 100644 --- a/src/mapillary/config/api/entities.py +++ b/src/mapillary/config/api/entities.py @@ -371,6 +371,7 @@ def get_image_fields() -> list: """ return [ + "id", "altitude", "atomic_scale", "camera_parameters", @@ -441,6 +442,7 @@ def get_map_feature_fields() -> list: """ return [ + "id", "first_seen_at", "last_seen_at", "object_value", @@ -490,7 +492,7 @@ def get_detection_with_image_id_fields() -> list: :rtype: list """ - return ["created_at", "geometry", "image", "value"] + return ["id", "created_at", "geometry", "image", "value"] @staticmethod def get_detection_with_map_feature_id( @@ -533,7 +535,7 @@ def get_detection_with_map_feature_id_fields() -> list: :rtype: list """ - return ["created_at", "geometry", "image", "value"] + return ["id", "created_at", "geometry", "image", "value"] @staticmethod def get_organization_id( @@ -574,7 +576,7 @@ def get_organization_id_fields() -> list: :rtype: list """ - return ["slug", "name", "description"] + return ["id", "slug", "name", "description"] @staticmethod def get_sequence(