Skip to content

Commit 0cfe585

Browse files
Bump default API version to v1.11
1 parent dcdf0bf commit 0cfe585

10 files changed

Lines changed: 36 additions & 30 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.7.0] - 2026-03-12
11+
12+
### Changed
13+
- Updated default API version to v1.11
14+
1015
## [0.6.0] - 2026-02-24
1116

1217
### Changed
@@ -64,7 +69,8 @@ When ready to release:
6469
5. Push tags: `git push --tags`
6570
6. GitHub Actions will automatically publish to PyPI
6671

67-
[Unreleased]: https://github.com/Geocodio/geocodio-library-python/compare/v0.6.0...HEAD
72+
[Unreleased]: https://github.com/Geocodio/geocodio-library-python/compare/v0.7.0...HEAD
73+
[0.7.0]: https://github.com/Geocodio/geocodio-library-python/compare/v0.6.0...v0.7.0
6874
[0.6.0]: https://github.com/Geocodio/geocodio-library-python/compare/v0.5.1...v0.6.0
6975
[0.5.1]: https://github.com/Geocodio/geocodio-library-python/compare/v0.5.0...v0.5.1
7076
[0.5.0]: https://github.com/Geocodio/geocodio-library-python/compare/v0.4.0...v0.5.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "geocodio-library-python"
7-
version = "0.6.0"
7+
version = "0.7.0"
88
description = "A Python client for the Geocodio API"
99
readme = "README.md"
1010
requires-python = ">=3.11"

smoke_lists.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def main():
5757
logger.info("Creating a new list...")
5858
file_content = "Zip\n20003\n20001"
5959
# --- Capture request details ---
60-
logger.info("REQUEST: POST /v1.10/lists")
60+
logger.info("REQUEST: POST /v1.11/lists")
6161
logger.info(f"Request params: {{'api_key': '***', 'direction': 'forward', 'format': '{{A}}'}}")
6262
logger.info(f"Request files: {{'file': ('smoke_test_list.csv', {repr(file_content)})}}")
6363
new_list_response = client.create_list(
@@ -66,7 +66,7 @@ def main():
6666
format_="{{A}}"
6767
)
6868
# --- Capture response details ---
69-
logger.info("RESPONSE: POST /v1.10/lists")
69+
logger.info("RESPONSE: POST /v1.11/lists")
7070
print_headers_and_body("Response", {
7171
"id": new_list_response.id,
7272
"file": new_list_response.file,

src/geocodio/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version information for geocodio package."""
22

3-
__version__ = "0.6.0"
3+
__version__ = "0.7.0"

src/geocodio/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444

4545
class Geocodio:
46-
BASE_PATH = "/v1.10" # keep in sync with Geocodio's current version
46+
BASE_PATH = "/v1.11" # keep in sync with Geocodio's current version
4747
DEFAULT_SINGLE_TIMEOUT = 5.0
4848
DEFAULT_BATCH_TIMEOUT = 1800.0 # 30 minutes
4949
LIST_API_TIMEOUT = 60.0

tests/unit/test_distance.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def test_distance_basic(self, client, httpx_mock):
213213
"""Test basic distance calculation."""
214214
def response_callback(request):
215215
assert request.method == "GET"
216-
assert "/v1.10/distance" in str(request.url)
216+
assert "/v1.11/distance" in str(request.url)
217217
return httpx.Response(200, json=sample_distance_response())
218218

219219
httpx_mock.add_callback(callback=response_callback)
@@ -464,7 +464,7 @@ def sample_job_status_response():
464464
"name": "My Job",
465465
"status": "COMPLETED",
466466
"progress": 100,
467-
"download_url": "https://api.geocod.io/v1.10/distance-jobs/123/download",
467+
"download_url": "https://api.geocod.io/v1.11/distance-jobs/123/download",
468468
"total_calculations": 4,
469469
"calculations_completed": 4,
470470
"origins_count": 2,
@@ -502,7 +502,7 @@ def sample_jobs_list_response():
502502
"current_page": 1,
503503
"from": 1,
504504
"to": 2,
505-
"path": "/v1.10/distance-jobs",
505+
"path": "/v1.11/distance-jobs",
506506
"per_page": 10
507507
}
508508

@@ -656,7 +656,7 @@ def test_geocode_with_destinations(self, client, httpx_mock):
656656
"""Test geocode with destination parameter."""
657657
def response_callback(request):
658658
url_str = str(request.url)
659-
assert "/v1.10/geocode" in url_str
659+
assert "/v1.11/geocode" in url_str
660660
assert "destinations%5B%5D" in url_str or "destinations[]" in url_str.replace("%5B", "[").replace("%5D", "]")
661661
return httpx.Response(200, json=sample_geocode_with_distance_response())
662662

@@ -673,7 +673,7 @@ def test_geocode_with_distance_mode(self, client, httpx_mock):
673673
"""Test geocode with distance mode parameter."""
674674
def response_callback(request):
675675
url_str = str(request.url)
676-
assert "/v1.10/geocode" in url_str
676+
assert "/v1.11/geocode" in url_str
677677
assert "distance_mode=driving" in url_str
678678
return httpx.Response(200, json=sample_geocode_with_distance_response())
679679

@@ -689,7 +689,7 @@ def test_geocode_with_distance_units(self, client, httpx_mock):
689689
"""Test geocode with distance units parameter."""
690690
def response_callback(request):
691691
url_str = str(request.url)
692-
assert "/v1.10/geocode" in url_str
692+
assert "/v1.11/geocode" in url_str
693693
assert "distance_units=km" in url_str
694694
return httpx.Response(200, json=sample_geocode_with_distance_response())
695695

@@ -714,7 +714,7 @@ def test_reverse_with_destinations(self, client, httpx_mock):
714714
"""Test reverse geocode with destination parameter."""
715715
def response_callback(request):
716716
url_str = str(request.url)
717-
assert "/v1.10/reverse" in url_str
717+
assert "/v1.11/reverse" in url_str
718718
assert "destinations%5B%5D" in url_str or "destinations[]" in url_str.replace("%5B", "[").replace("%5D", "]")
719719
return httpx.Response(200, json=sample_geocode_with_distance_response())
720720

@@ -731,7 +731,7 @@ def test_reverse_with_distance_mode(self, client, httpx_mock):
731731
"""Test reverse geocode with distance mode parameter."""
732732
def response_callback(request):
733733
url_str = str(request.url)
734-
assert "/v1.10/reverse" in url_str
734+
assert "/v1.11/reverse" in url_str
735735
assert "distance_mode=straightline" in url_str
736736
return httpx.Response(200, json=sample_geocode_with_distance_response())
737737

tests/unit/test_errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def _add_err(httpx_mock, status_code):
99
# this should actually make the request and see and error response
1010
# but we are mocking it here for testing purposes
1111
httpx_mock.add_response(
12-
url=httpx.URL("https://api.test/v1.10/geocode", params={"q": "bad input"}),
12+
url=httpx.URL("https://api.test/v1.11/geocode", params={"q": "bad input"}),
1313
match_headers={"Authorization": "Bearer TEST_KEY"},
1414
json={"error": "boom"},
1515
status_code=status_code,

tests/unit/test_geocode.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def response_callback(request):
5757

5858
httpx_mock.add_callback(
5959
callback=response_callback,
60-
url=httpx.URL("https://api.test/v1.10/geocode", params={"q": "1109 N Highland St, Arlington, VA"}),
60+
url=httpx.URL("https://api.test/v1.11/geocode", params={"q": "1109 N Highland St, Arlington, VA"}),
6161
match_headers={"Authorization": "Bearer TEST_KEY"},
6262
)
6363

@@ -140,7 +140,7 @@ def batch_response_callback(request):
140140

141141
httpx_mock.add_callback(
142142
callback=batch_response_callback,
143-
url=httpx.URL("https://api.test/v1.10/geocode"),
143+
url=httpx.URL("https://api.test/v1.11/geocode"),
144144
match_headers={"Authorization": "Bearer TEST_KEY"},
145145
)
146146

@@ -172,7 +172,7 @@ def response_callback(request):
172172

173173
httpx_mock.add_callback(
174174
callback=response_callback,
175-
url=httpx.URL("https://api.test/v1.10/geocode", params={
175+
url=httpx.URL("https://api.test/v1.11/geocode", params={
176176
"street": "1109 N Highland St",
177177
"city": "Arlington",
178178
"state": "VA"
@@ -229,7 +229,7 @@ def response_callback(request):
229229

230230
httpx_mock.add_callback(
231231
callback=response_callback,
232-
url=httpx.URL("https://api.test/v1.10/geocode", params={
232+
url=httpx.URL("https://api.test/v1.11/geocode", params={
233233
"q": "1109 Highland St, Arlington, VA",
234234
"fields": "timezone,cd"
235235
}),
@@ -292,7 +292,7 @@ def response_callback(request):
292292

293293
httpx_mock.add_callback(
294294
callback=response_callback,
295-
url=httpx.URL("https://api.test/v1.10/geocode", params={
295+
url=httpx.URL("https://api.test/v1.11/geocode", params={
296296
"q": "1109 Highland St, Arlington, VA",
297297
"limit": "2"
298298
}),
@@ -371,7 +371,7 @@ def batch_response_callback(request):
371371

372372
httpx_mock.add_callback(
373373
callback=batch_response_callback,
374-
url=httpx.URL("https://api.test/v1.10/geocode"),
374+
url=httpx.URL("https://api.test/v1.11/geocode"),
375375
match_headers={"Authorization": "Bearer TEST_KEY"},
376376
)
377377

@@ -478,7 +478,7 @@ def batch_response_callback(request):
478478

479479
httpx_mock.add_callback(
480480
callback=batch_response_callback,
481-
url=httpx.URL("https://api.test/v1.10/geocode", params={"fields": "timezone,cd"}),
481+
url=httpx.URL("https://api.test/v1.11/geocode", params={"fields": "timezone,cd"}),
482482
match_headers={"Authorization": "Bearer TEST_KEY"},
483483
)
484484

@@ -558,7 +558,7 @@ def response_callback(request):
558558

559559
httpx_mock.add_callback(
560560
callback=response_callback,
561-
url=httpx.URL("https://api.test/v1.10/geocode", params={
561+
url=httpx.URL("https://api.test/v1.11/geocode", params={
562562
"street": "1640 Main St",
563563
"city": "Sheldon",
564564
"state": "VT",
@@ -671,7 +671,7 @@ def response_callback(request):
671671

672672
httpx_mock.add_callback(
673673
callback=response_callback,
674-
url=httpx.URL("https://api.test/v1.10/geocode", params={
674+
url=httpx.URL("https://api.test/v1.11/geocode", params={
675675
"q": "600 Santa Ray Ave, Oakland CA 94610",
676676
"fields": "stateleg"
677677
}),

tests/unit/test_reverse.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def response_callback(request):
3232

3333
httpx_mock.add_callback(
3434
callback=response_callback,
35-
url=httpx.URL("https://api.test/v1.10/reverse", params={"q": "38.886672,-77.094735"}),
35+
url=httpx.URL("https://api.test/v1.11/reverse", params={"q": "38.886672,-77.094735"}),
3636
match_headers={"Authorization": "Bearer TEST_KEY"},
3737
)
3838

@@ -110,7 +110,7 @@ def batch_response_callback(request):
110110

111111
httpx_mock.add_callback(
112112
callback=batch_response_callback,
113-
url=httpx.URL("https://api.test/v1.10/reverse"),
113+
url=httpx.URL("https://api.test/v1.11/reverse"),
114114
match_headers={"Authorization": "Bearer TEST_KEY"},
115115
)
116116

@@ -162,7 +162,7 @@ def response_callback(request):
162162

163163
httpx_mock.add_callback(
164164
callback=response_callback,
165-
url=httpx.URL("https://api.test/v1.10/reverse", params={
165+
url=httpx.URL("https://api.test/v1.11/reverse", params={
166166
"q": "38.886672,-77.094735",
167167
"fields": "timezone,cd"
168168
}),
@@ -225,7 +225,7 @@ def response_callback(request):
225225

226226
httpx_mock.add_callback(
227227
callback=response_callback,
228-
url=httpx.URL("https://api.test/v1.10/reverse", params={
228+
url=httpx.URL("https://api.test/v1.11/reverse", params={
229229
"q": "38.886672,-77.094735",
230230
"limit": "2"
231231
}),
@@ -244,7 +244,7 @@ def response_callback(request):
244244
def test_reverse_invalid_coordinate(client, httpx_mock):
245245
# Arrange: stub the API call with error response
246246
httpx_mock.add_response(
247-
url=httpx.URL("https://api.test/v1.10/reverse", params={
247+
url=httpx.URL("https://api.test/v1.11/reverse", params={
248248
"q": "invalid,coordinate"
249249
}),
250250
match_headers={"Authorization": "Bearer TEST_KEY"},

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)