2
2
Fork
You've already forked overpass-api-python-wrapper
2

Release v0.8.1: status parser fixes and 1.0 deprecation warnings #197

Merged
mvexel merged 3 commits from 0.8.x into main 2026年05月03日 18:44:53 +02:00

This PR merges the 0.8.x maintenance branch to main for release as v0.8.1.

It combines the two maintenance slices defined in plans/api-1.0-redesign.md ([M1] and [M2]) into a single release.

Fixed

  • Status URL derivation: _api_status() no longer hard-codes https://overpass-api.de/api/status. It derives the status URL from the configured endpoint by replacing the trailing path component, and accepts an explicit status_url constructor
    argument as an override.
  • Missing running-queries section: Hardened status parsing when the Overpass status response omits the "Currently running queries" header. Previously this raised StopIteration; now it correctly returns an empty tuple.
  • Malformed lines: Unparseable lines in the status response are skipped rather than crashing.
  • Coverage: Added fixture-based status tests for derived URLs, custom endpoints, missing headers, and malformed lines.

Deprecated

Every 0.8 API that is removed or renamed in 1.0 now emits DeprecationWarning on use (not on import):

Deprecated in 0.8 1.0 replacement
overpass.API overpass.OverpassClient
API.Get, API.Search Removed
API.get(build=...) client.query_raw(...)
API.get(responseformat=...) client.query(..., output=...)
API.get(verbosity=...) client.query(..., out=...)
MapQuery recipes.bbox_geometry(BBox(...))
WayQuery recipes.ways_with_nodes(...)
Utils.to_overpass_id(...) AreaId.from_relation(...)
Utils.to_overpass_id(..., area=True) No replacement; way-derived 2400xxx area IDs are unsupported by Overpass API 0.7.57+
TimeoutError OverpassTimeout
MultipleRequestsError OverpassRateLimited
ServerLoadError OverpassServerBusy
ServerRuntimeError OverpassRuntimeError
UnknownOverpassError OverpassError base or a subclass
debug=True OverpassClient(log_queries=True)
  • Added tests/test_deprecations.py covering every deprecated path.
  • Added a "Migrating to 1.0" section to README.md with a link to the full design document.
This PR merges the `0.8.x` maintenance branch to `main` for release as **v0.8.1**. It combines the two maintenance slices defined in `plans/api-1.0-redesign.md` ([M1] and [M2]) into a single release. ### Fixed - **Status URL derivation:** `_api_status()` no longer hard-codes `https://overpass-api.de/api/status`. It derives the status URL from the configured endpoint by replacing the trailing path component, and accepts an explicit `status_url` constructor argument as an override. - **Missing running-queries section:** Hardened status parsing when the Overpass status response omits the "Currently running queries" header. Previously this raised `StopIteration`; now it correctly returns an empty tuple. - **Malformed lines:** Unparseable lines in the status response are skipped rather than crashing. - **Coverage:** Added fixture-based status tests for derived URLs, custom endpoints, missing headers, and malformed lines. ### Deprecated Every 0.8 API that is removed or renamed in 1.0 now emits `DeprecationWarning` on use (not on import): | Deprecated in 0.8 | 1.0 replacement | |---|---| | `overpass.API` | `overpass.OverpassClient` | | `API.Get`, `API.Search` | Removed | | `API.get(build=...)` | `client.query_raw(...)` | | `API.get(responseformat=...)` | `client.query(..., output=...)` | | `API.get(verbosity=...)` | `client.query(..., out=...)` | | `MapQuery` | `recipes.bbox_geometry(BBox(...))` | | `WayQuery` | `recipes.ways_with_nodes(...)` | | `Utils.to_overpass_id(...)` | `AreaId.from_relation(...)` | | `Utils.to_overpass_id(..., area=True)` | No replacement; way-derived `2400xxx` area IDs are unsupported by Overpass API 0.7.57+ | | `TimeoutError` | `OverpassTimeout` | | `MultipleRequestsError` | `OverpassRateLimited` | | `ServerLoadError` | `OverpassServerBusy` | | `ServerRuntimeError` | `OverpassRuntimeError` | | `UnknownOverpassError` | `OverpassError` base or a subclass | | `debug=True` | `OverpassClient(log_queries=True)` | - Added `tests/test_deprecations.py` covering every deprecated path. - Added a "Migrating to 1.0" section to `README.md` with a link to the full design document.
- Replace hard-coded status URL with derivation from self.endpoint via urljoin;
 add status_url constructor parameter as an explicit override.
- Fix StopIteration crash when 'Currently running queries' header is absent:
 next(...) now uses a default of None and returns an empty tuple.
- Skip running-query lines with fewer than 4 tokens (malformed lines) instead of
 raising IndexError.
- Add fixture files: no_running_queries_no_header.txt, custom_endpoint_status.txt,
 malformed_lines.txt.
- Add four new tests covering both bugs and the custom-endpoint scenario.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
docs: log 0.8.x rebase validation
All checks were successful
Check / check (pull_request) Successful in 28s
0b1efb2786
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mvexel/overpass-api-python-wrapper!197
Reference in a new issue
mvexel/overpass-api-python-wrapper
No description provided.
Delete branch "0.8.x"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?