Skip to content

Commit b3edaf1

Browse files
authored
Correct declared Python support and accept the 'id' field (#184)
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.
1 parent 9eecb61 commit b3edaf1

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

‎setup.py‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
)
3232
LONG_DESCRIPTION_CONTENT_TYPE = "text/markdown"
3333
URL = "https://github.com/mapillary/mapillary-python-sdk"
34-
REQUIRES_PYTHON = ">=3.0"
34+
REQUIRES_PYTHON = ">=3.10"
3535
HERE = os.path.abspath(os.path.dirname(__file__))
3636
REQUIREMENTS = [
3737
"mapbox-vector-tile>=2.1.0",
@@ -58,14 +58,11 @@
5858
"License :: OSI Approved :: MIT License",
5959
"Programming Language :: Python",
6060
"Programming Language :: Python :: 3",
61-
"Programming Language :: Python :: 3.5",
62-
"Programming Language :: Python :: 3.6",
63-
"Programming Language :: Python :: 3.7",
64-
"Programming Language :: Python :: 3.8",
65-
"Programming Language :: Python :: 3.9",
6661
"Programming Language :: Python :: 3.10",
6762
"Programming Language :: Python :: 3.11",
6863
"Programming Language :: Python :: 3.12",
64+
"Programming Language :: Python :: 3.13",
65+
"Programming Language :: Python :: 3.14",
6966
]
7067
PROJECT_URLS = {
7168
"Download": "https://pypi.org/project/mapillary/#files",

‎src/mapillary/config/api/entities.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ def get_image_fields() -> list:
371371
"""
372372

373373
return [
374+
"id",
374375
"altitude",
375376
"atomic_scale",
376377
"camera_parameters",
@@ -441,6 +442,7 @@ def get_map_feature_fields() -> list:
441442
"""
442443

443444
return [
445+
"id",
444446
"first_seen_at",
445447
"last_seen_at",
446448
"object_value",
@@ -490,7 +492,7 @@ def get_detection_with_image_id_fields() -> list:
490492
:rtype: list
491493
"""
492494

493-
return ["created_at", "geometry", "image", "value"]
495+
return ["id", "created_at", "geometry", "image", "value"]
494496

495497
@staticmethod
496498
def get_detection_with_map_feature_id(
@@ -533,7 +535,7 @@ def get_detection_with_map_feature_id_fields() -> list:
533535
:rtype: list
534536
"""
535537

536-
return ["created_at", "geometry", "image", "value"]
538+
return ["id", "created_at", "geometry", "image", "value"]
537539

538540
@staticmethod
539541
def get_organization_id(
@@ -574,7 +576,7 @@ def get_organization_id_fields() -> list:
574576
:rtype: list
575577
"""
576578

577-
return ["slug", "name", "description"]
579+
return ["id", "slug", "name", "description"]
578580

579581
@staticmethod
580582
def get_sequence(

0 commit comments

Comments
 (0)