Releases: timwie/aio-overpass
Releases · timwie/aio-overpass
v0.14.1
v0.14.0
Added
- Add the
Element.base_geometry(_details)
properties to allow properly typed access
to an element's geometry when the exact type is unknown - Add the
center
property toWay
andRelation
- Add the
bounds
property toWay
andRelation
- Add the
QueryRejectError.timed_out_after_secs
property - Add the
QueryRejectError.oom_using_mib
property - Add the
GiveupCause
class that gives more context toGiveupErrors
- Add the
GiveupError.cause
property - Add the
DefaultQueryRunner.cache_delete()
function, which was internal before
Changed
- Breaking: Move
GeoJsonDict
type fromelement
to newspatial
module - Breaking: Move
SpatialDict
class fromelement
to newspatial
module - Breaking: Move
Spatial
class fromelement
to newspatial
module - Change
numpy
version requirement for Python<3.12
to>=1.23,<3
(from^1.23
) - All tag values are strings, but were previously typed as
Any
:- Change the type of
Element.tags
todict[str, str] | None
, fromdict[str, Any] | None
- Change the return type of
Element.tag()
tostr | None
, fromAny
- Change the type of
Route.tags
todict[str, str]
, fromdict[str, Any]
- Change the return type of
Route.tag()
tostr | None
, fromAny
- Change the type of
Removed
- Breaking: Remove export of no longer used
OverpassDict
type alias - Breaking: Remove the
geometry
property from theElement
base class due to typing violation - Breaking: Remove the
bounds
property from theElement
base class - Breaking: Remove the
center
property from theElement
base class
Fixed
- Fix
Query.reset()
removing the selected logger - Fix a possible
IndexError
inOrderedRouteView.paths
- Fix a bug in
to_ordered_routes()
that would omit the last node of the path between two stops,
and raise anAssertionError
v0.13.1
v0.13.0
Changed
- Relax
aiohttp
version requirement to^3.9
(from~3.9
) - Relax
joblib
version requirement to^1.3
(from~1.3
) - Relax
shapely
version requirement to^2
(from~2.0
) raise_on_failure
is now a keyword-only argument inClient.run_query()
- The string representation of a query without kwargs is now
"query{}"
instead of"query <no kwargs>"
- Log a message when a query is done
- Log the error more explicitly when a try fails
- Debug logging when matching Overpass error messages
v0.12.1
v0.12.0
Added
- Add convenience type guard functions to the
error
module (is_too_busy()
etc.) - Add
status_timeout_secs
parameter toClient
, which limits the duration of
all status requests - Add
timeout_secs
parameter toClient.cancel_queries()
- Add
ResponseErrorCause
type alias
Changed
- Change
Client.run_query()
to no longer enforce a rate limit before making a request.
This is because we cannot easily know the total amount of slots at an API server
that uses load balancing, as the default server does.
Previously this would lead to using a maximum of 6 slots instead of the actual 12 slots.
The new behavior is to simply adhere to the cooldown duration when the server tells us
we're making too many requests - The
[timeout:*]
setting is overwritten ifrun_timeout_secs
is set, and the remaining
time is lower than the current setting. Previously, we would use a query timeout that is
higher than the request timeout. - In case that we lower the
[timeout:*]
this way, and previously had a try with equal
or higher query timeout fail withEXCEEDED_TIMEOUT
, we give up trying immediately. - The request in
Client.cancel_queries()
is no longer subject to the concurrency limit - Shorten
Query.cache_key
to 16 characters instead of 64 - Increase
aiohttp
requirement to~3.9
Removed
- Remove the
Status.concurrency
property, since the reported number of slots
no longer affects the concurrency - Remove the
Query.code
property, which has no real use when there isQuery.input_code
Fixed
- Fix
run_timeout_secs
having no effect on query request timeouts
v0.11.0
Added
- Add the
should_retry
property to all error classes,
which is used by the default query runner to decide whether to retry or not - Add the
ResponseError.is_server_error
property - Add the
SpatialDict
class, which has the__geo_interface__
property- Compared to the old
Spatial.__geo_interface__
, this property does not
containFeatureCollections
, which is not specified by the protocol
- Compared to the old
- Add
Spatial.geo_interfaces
to map objects toSpatialDicts
Changed
- Increased
aiohttp
requirement to~3.9.0rc0
ResponseError
is reverted to include server-side errors,
replacingServerError
- Retry all
ResponseErrors
by default - In the default runner, only log response bodies of
ResponseErrors
whenis_server_error
is false - GeoJSON
"bbox"
will useElement.bounds
ifgeometry
is not set - Add
py.typed
to make the package PEP 561 compatible
Removed
- Remove
ServerError
, which reverts the last release's decision
to split these error cases offResponseError
- Remove
Spatial.__geo_interface__
v0.10.0
Added
- Add
ServerError
, which is similar toResponseError
, but for
responses with status code >=500
. The crucial difference is
that it will be retried by default
Changed
- Replaced all fields in
ResponseError
:- Remove
request_info
,history
,status
,message
, andheaders
- Add
response
,body
, andcause
- Remove
- The default query runner will log
ResponseError.body
if such an error occurs logger
argument ofQuery
can no longer beNone
,
and defaults to a logger that does nothing- Change
networkx
requirement from>=2.7
to^3
- There is now an explicit
numpy
requirement when enabling theshapely
extra:
^1.26
for Python 3.12 and above, and^1.23
for Python 3.11 and below
v0.9.0
The Python versions supported by this release are 3.10-3.12.
Added
- Add Python 3.12 support
- Add
__slots__
to a lot of classes - Add
pt_ordered.to_ordered_routes()
andto_ordered_route()
- Add
GeometryDetails
, which provides information on whether an
element's geometry is "valid" - Add
Way.geometry_details
andRelation.geometry_details
- Add
Status.endpoint
- Add
Status.nb_running_queries
Changed
- Increased
aiohttp
requirement to~3.9.0b0
- Enable
speedups
extra ofaiohttp
- Make
QueryRunner
an abstract class, not a protocol Way.geometry
andRelation.geometry
may now be geometries fixed
byshapely
instead of the original geometries by the Overpass API.
To access the original geometry, useWay.geometry_details
and
Relation.geometry_details
DefaultQueryRunner
no longer blocks the event loop while reading
from or writing to a cache file- Add
raise_on_failure
argument toClient.run_query()
, which can be
disabled to not raiseQuery.error
if a query fails
Removed
- Drop Python 3.9 support
collect_elements()
already no longer worked for "area" elements with the previous
release, but its documentation did not reflect that change
Fixed
- Fix an error when
RequestTimeout.total_without_query_secs
was set toNone
- Fix an edge case that would lead to an error if
Query.run_timeout_secs
wasNone
when a query cooldown occurred - Fix an edge case where
DefaultQueryRunner
would raise an exception
if a cache file could not be read - Fix
collect_ordered_routes()
breaking when a stop position is missing - Fix
collect_elements()
raising when the result set is empty - Fix
collect_elements()
breaking when the result set included "area" elements
v0.8.0
Added
- Add the
Element.geometry
property
Changed
Ways
may now also havePolygon
geometriesRelation
may now havePolygon
orMultiPolygon
geometries
Removed
- Remove
AreaWay
andAreaRelation
- These subclasses could be confusing since "area" is also specific Overpass terminology
- There is no good reason to have these subclasses since their only difference
is easily modelled through thegeometry
property